From f4fd16d2471c8a80ea7397346aa7766794ef8240 Mon Sep 17 00:00:00 2001 From: mniip Date: Mon, 16 Aug 2021 13:41:22 +0300 Subject: [PATCH] Naming changes (#117) * Rename openapi-diff -> comparest Rename OpenAPI.Checker -> Data.OpenApi.Compare * Tweak emojis used in reports * Shuffle imports * Fix workflow * Reuse nix Co-authored-by: iko --- .github/workflows/linux-binary.yaml | 6 +- CHANGELOG.md | 2 +- README.md | 26 ++--- .../OpenApi/Compare}/Options.hs | 16 ++-- app/FormatHeuristic.hs | 4 +- app/Main.hs | 4 +- benchmarks/README.md | 4 +- benchmarks/default.nix | 20 ++-- openapi-diff.cabal => comparest.cabal | 96 +++++++++---------- default.nix | 14 +-- github-action/Main.hs | 2 +- .../OpenApi/Compare}/Behavior.hs | 4 +- .../OpenApi/Compare}/Common.hs | 2 +- .../OpenApi/Compare}/Formula.hs | 8 +- .../Checker => Data/OpenApi/Compare}/Memo.hs | 2 +- .../OpenApi/Compare}/Orphans.hs | 2 +- .../Checker => Data/OpenApi/Compare}/Paths.hs | 2 +- .../OpenApi/Compare}/PathsPrefixTree.hs | 4 +- .../OpenApi/Compare}/References.hs | 6 +- .../OpenApi/Compare}/Report.hs | 48 +++++----- .../OpenApi/Compare}/Report/Html/Template.hs | 6 +- .../OpenApi/Compare}/Report/Jet.hs | 2 +- .../Checker => Data/OpenApi/Compare}/Run.hs | 12 +-- .../OpenApi/Compare}/Subtree.hs | 12 +-- .../OpenApi/Compare}/Validate/Header.hs | 10 +- .../OpenApi/Compare}/Validate/Link.hs | 8 +- .../Compare}/Validate/MediaTypeObject.hs | 16 ++-- .../OpenApi/Compare}/Validate/OAuth2Flows.hs | 8 +- .../OpenApi/Compare}/Validate/OpenApi.hs | 10 +- .../OpenApi/Compare}/Validate/Operation.hs | 34 +++---- .../OpenApi/Compare}/Validate/Param.hs | 10 +- .../OpenApi/Compare}/Validate/PathFragment.hs | 10 +- .../OpenApi/Compare}/Validate/Products.hs | 8 +- .../OpenApi/Compare}/Validate/RequestBody.hs | 10 +- .../OpenApi/Compare}/Validate/Responses.hs | 20 ++-- .../OpenApi/Compare}/Validate/Schema.hs | 24 ++--- .../OpenApi/Compare}/Validate/Schema/DNF.hs | 2 +- .../Compare}/Validate/Schema/Issues.hs | 16 ++-- .../Compare}/Validate/Schema/JsonFormula.hs | 10 +- .../Compare}/Validate/Schema/Partition.hs | 16 ++-- .../Compare}/Validate/Schema/Process.hs | 26 ++--- .../Compare}/Validate/Schema/Traced.hs | 4 +- .../Compare}/Validate/Schema/TypedJson.hs | 2 +- .../Compare}/Validate/SecurityRequirement.hs | 10 +- .../Compare}/Validate/SecurityScheme.hs | 10 +- .../OpenApi/Compare}/Validate/Server.hs | 14 +-- .../OpenApi/Compare}/Validate/Sums.hs | 8 +- test/README.md | 2 +- test/Spec/Golden/TraceTree.hs | 4 +- .../common/bad-oneof-unchanged/report.md | 12 +-- test/golden/common/enum-added/report.md | 14 +-- test/golden/common/enum-anyof/report.md | 6 +- test/golden/common/id/report.md | 6 +- test/golden/common/json/recursive/report.md | 6 +- test/golden/common/maximum-lowered/report.md | 14 +-- .../allowEmptyValue/reset/report.md | 8 +- .../parameters/allowEmptyValue/set/report.md | 8 +- .../operation/parameters/change/report.md | 10 +- .../parameters/required/false/add/report.md | 6 +- .../parameters/required/false/del/report.md | 6 +- .../parameters/required/reset/report.md | 8 +- .../parameters/required/set/report.md | 8 +- .../parameters/required/true/add/report.md | 8 +- .../parameters/required/true/del/report.md | 8 +- .../requestBody/mediaTypeObject/add/report.md | 8 +- .../mediaTypeObject/change/report.md | 14 +-- .../requestBody/mediaTypeObject/del/report.md | 8 +- .../requestBody/required/reset/report.md | 8 +- .../requestBody/required/set/report.md | 8 +- .../operation/responses/add/report.md | 8 +- .../change/headers/mandatory/add/report.md | 8 +- .../change/headers/mandatory/del/report.md | 8 +- .../change/headers/optional/add/report.md | 6 +- .../change/headers/optional/del/report.md | 6 +- .../change/mediaTypeObject/add/report.md | 8 +- .../change/mediaTypeObject/change/report.md | 14 +-- .../change/mediaTypeObject/del/report.md | 8 +- .../operation/responses/del/report.md | 8 +- .../property-removed-additional/report.md | 14 +-- test/golden/common/property-removed/report.md | 12 +-- .../golden/common/property-required/report.md | 14 +-- test/golden/common/random-example/report.md | 18 ++-- test/golden/common/recursive/report.md | 14 +-- test/golden/common/security-scheme/report.md | 10 +- test/golden/common/servers/report.md | 10 +- .../report.md | 18 ++-- .../heterogeneous-length-mismatch/report.md | 12 +-- .../homogeneous-component-mismatch/report.md | 18 ++-- .../homogeneous-length-mismatch/report.md | 26 ++--- .../tuple-items/homogeneous-vector/report.md | 6 +- test/golden/common/type-changing/report.md | 30 +++--- .../common/unguarded-recursive/report.md | 12 +-- test/golden/common/variant-added/report.md | 14 +-- test/golden/common/variant-changed/report.md | 18 ++-- .../common/variant-deep-changed/report.md | 18 ++-- 95 files changed, 553 insertions(+), 555 deletions(-) rename app/{OpenAPI/Checker => Data/OpenApi/Compare}/Options.hs (89%) rename openapi-diff.cabal => comparest.cabal (67%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Behavior.hs (98%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Common.hs (84%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Formula.hs (97%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Memo.hs (99%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Orphans.hs (95%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Paths.hs (99%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/PathsPrefixTree.hs (99%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/References.hs (91%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Report.hs (90%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Report/Html/Template.hs (84%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Report/Jet.hs (98%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Run.hs (75%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Subtree.hs (97%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Header.hs (92%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Link.hs (68%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/MediaTypeObject.hs (93%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/OAuth2Flows.hs (98%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/OpenApi.hs (95%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Operation.hs (96%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Param.hs (96%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/PathFragment.hs (92%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Products.hs (90%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/RequestBody.hs (92%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Responses.hs (93%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Schema.hs (97%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Schema/DNF.hs (98%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Schema/Issues.hs (97%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Schema/JsonFormula.hs (97%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Schema/Partition.hs (97%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Schema/Process.hs (95%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Schema/Traced.hs (97%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Schema/TypedJson.hs (98%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/SecurityRequirement.hs (95%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/SecurityScheme.hs (90%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Server.hs (95%) rename src/{OpenAPI/Checker => Data/OpenApi/Compare}/Validate/Sums.hs (78%) diff --git a/.github/workflows/linux-binary.yaml b/.github/workflows/linux-binary.yaml index 7c7befb..b706452 100644 --- a/.github/workflows/linux-binary.yaml +++ b/.github/workflows/linux-binary.yaml @@ -35,14 +35,14 @@ jobs: - name: Build run: | - stack build --ghc-options=-O3 --local-bin-path openapi-diff-linux --copy-bins --flag openapi-diff:Static + stack build --ghc-options=-O3 --local-bin-path comparest-linux --copy-bins --flag comparest:Static - name: Test - run: stack test --ghc-options=-O3 --flag openapi-diff:Static --test-arguments='--hide-successes --no-create' + run: stack test --ghc-options=-O3 --flag comparest:Static --test-arguments='--hide-successes --no-create' - name: Zip if: github.ref == 'refs/heads/master' run: | - zip openapi-diff-linux openapi-diff-linux/openapi-diff + zip comparest-linux comparest-linux/comparest - uses: "marvinpinto/action-automatic-releases@latest" if: github.ref == 'refs/heads/master' with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a3b4a..cd6f0dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -`openapi-diff` uses [PVP Versioning][1]. +`comparest` uses [PVP Versioning][1]. ## 0.0.0.0 diff --git a/README.md b/README.md index 730beea..f21938c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# openapi-diff +# CompaREST -[![Hackage](https://img.shields.io/hackage/v/openapi-diff.svg?logo=haskell)](https://hackage.haskell.org/package/openapi-diff) -[![Stackage Lts](http://stackage.org/package/openapi-diff/badge/lts)](http://stackage.org/lts/package/openapi-diff) -[![Stackage Nightly](http://stackage.org/package/openapi-diff/badge/nightly)](http://stackage.org/nightly/package/openapi-diff) +[![Hackage](https://img.shields.io/hackage/v/comparest.svg?logo=haskell)](https://hackage.haskell.org/package/comparest) +[![Stackage Lts](http://stackage.org/package/comparest/badge/lts)](http://stackage.org/lts/package/comparest) +[![Stackage Nightly](http://stackage.org/package/comparest/badge/nightly)](http://stackage.org/nightly/package/comparest) [![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) Compatibility checker for OpenAPI @@ -241,32 +241,32 @@ docker run --rm -v $(pwd):/data:rw typeable/comparest --client /data/api-1.0.0.y # CLI docs ``` -Usage: openapi-diff (-c|--client ARG) (-s|--server ARG) - [--silent | --only-breaking | --all] [-o|--output ARG] - [--folding-block-quotes-style | --header-style] - [--signal-exit-code] - A tool to check compatibility between two OpenApi specifications. +Usage: comparest (-c|--client ARG) (-s|--server ARG) + [--silent | --only-breaking | --all] [-o|--output ARG] + [--folding-block-quotes-style | --header-style] + [--signal-exit-code] + A tool to check compatibility between two OpenAPI specifications. Usage examples Compare files old.yaml with new.yaml and output the resulting report to stdout: - openapi-diff -c old.yaml -s new.yaml + comparest -c old.yaml -s new.yaml Only output breaking changes and write a styled HTML report to file report.html: - openapi-diff -c old.yaml -s new.yaml --only-breaking -o report + comparest -c old.yaml -s new.yaml --only-breaking -o report Don't output anything, only fail if there are breaking changes: - openapi-diff -c old.json -s new.json --silent + comparest -c old.json -s new.json --silent Write full report suitable for embedding into a GitHub comment to report.html: - openapi-diff -c old.json -s new.json --folding-block-quotes-style -o report.html + comparest -c old.json -s new.json --folding-block-quotes-style -o report.html Available options: -h,--help Show this help text diff --git a/app/OpenAPI/Checker/Options.hs b/app/Data/OpenApi/Compare/Options.hs similarity index 89% rename from app/OpenAPI/Checker/Options.hs rename to app/Data/OpenApi/Compare/Options.hs index e372840..8b5f0c9 100644 --- a/app/OpenAPI/Checker/Options.hs +++ b/app/Data/OpenApi/Compare/Options.hs @@ -1,12 +1,12 @@ -module OpenAPI.Checker.Options +module Data.OpenApi.Compare.Options ( Options (..) , OutputMode (..) , parseOptions ) where +import Data.OpenApi.Compare.Report import GHC.Generics (Generic) -import OpenAPI.Checker.Report import Options.Applicative import Options.Applicative.Help hiding (fullDesc) @@ -31,21 +31,21 @@ optionsParserInfo = info (helper <*> optionsParser) (fullDesc - <> header "openapi-diff" + <> header "CompaREST" <> progDescDoc (Just $ - par "A tool to check compatibility between two OpenApi specifications." + par "A tool to check compatibility between two OpenAPI specifications." <$$> hardline <> par "Usage examples" <> hardline <$$> indent 4 (par "Compare files old.yaml with new.yaml and output the resulting report to stdout:" - <$$> hardline <> indent 4 "openapi-diff -c old.yaml -s new.yaml" + <$$> hardline <> indent 4 "comparest -c old.yaml -s new.yaml" <$$> hardline <> par "Only output breaking changes and write a styled HTML report to file report.html:" - <$$> hardline <> indent 4 "openapi-diff -c old.yaml -s new.yaml --only-breaking -o report" + <$$> hardline <> indent 4 "comparest -c old.yaml -s new.yaml --only-breaking -o report" <$$> hardline <> par "Don't output anything, only fail if there are breaking changes:" - <$$> hardline <> indent 4 "openapi-diff -c old.json -s new.json --silent" + <$$> hardline <> indent 4 "comparest -c old.json -s new.json --silent" <$$> hardline <> par "Write full report suitable for embedding into a GitHub comment to report.html:" - <$$> hardline <> indent 4 "openapi-diff -c old.json -s new.json --folding-block-quotes-style -o report.html"))) + <$$> hardline <> indent 4 "comparest -c old.json -s new.json --folding-block-quotes-style -o report.html"))) optionsParser :: Parser Options optionsParser = diff --git a/app/FormatHeuristic.hs b/app/FormatHeuristic.hs index 2258a56..0ad498d 100644 --- a/app/FormatHeuristic.hs +++ b/app/FormatHeuristic.hs @@ -10,10 +10,10 @@ import Data.ByteString.Lazy (ByteString) import Data.Char (toLower) import Data.Functor import qualified Data.Map as M +import qualified Data.OpenApi.Compare.Report.Html.Template as Html import Data.Text (Text) import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.Encoding as TL -import qualified OpenAPI.Checker.Report.Html.Template as Html import System.FilePath (takeExtension) import Text.DocTemplates.Internal import Text.Pandoc @@ -80,7 +80,7 @@ formatFromFilePath x = def { writerTemplate = Just Html.template , -- Not actually used. Needed to silence warning. - writerVariables = Context $ M.fromList [("pagetitle", toVal ("OpenApi Diff" :: Text))] + writerVariables = Context $ M.fromList [("pagetitle", toVal ("CompaREST" :: Text))] } _ -> Nothing where diff --git a/app/Main.hs b/app/Main.hs index 76151a6..866698d 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -6,11 +6,11 @@ import Data.Aeson import qualified Data.ByteString.Lazy as BSL import Data.Default import Data.Maybe +import Data.OpenApi.Compare.Options +import Data.OpenApi.Compare.Run import qualified Data.Text.IO as T import qualified Data.Yaml as Yaml import FormatHeuristic -import OpenAPI.Checker.Options -import OpenAPI.Checker.Run import System.Exit import System.IO import Text.Pandoc hiding (report) diff --git a/benchmarks/README.md b/benchmarks/README.md index 9b38d15..90b4aa7 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -1,6 +1,6 @@ # OpenApi comparison benchmarks -This is a nix expression that automatically downloads, builds and runs multiple OpenApi comparison tools on the same set of inputs to compare how well they behave. +This is a nix expression that automatically downloads, builds and runs multiple OpenAPI comparison tools on the same set of inputs to compare how well they behave. To run the benchmarks run the following command in this directory: @@ -12,7 +12,7 @@ nix-build | Tool | Output file name | | -------------------------------------------------------------------------- | ------------------------------------------- | -| [Typeable OpenApi Diff](https://github.com/typeable/openapi-diff) | `typeable.md` | +| [Typeable CompaREST](https://github.com/typeable/compaREST) | `typeable.md` | | [Atlassian OpenApi Diff](https://bitbucket.org/atlassian/openapi-diff) | `atlassian.json`, `atlassian.error.txt` | | [OpenApi Tools OpenApi Diff](https://github.com/OpenAPITools/openapi-diff) | `openapitools.md`, `openapitools.error.txt` | | [Tufin OpenApi Diff](https://github.com/tufin/oasdiff) | `oasdiff.txt`, `oasdiff.error.txt` | diff --git a/benchmarks/default.nix b/benchmarks/default.nix index 79ff7ab..9d71259 100644 --- a/benchmarks/default.nix +++ b/benchmarks/default.nix @@ -1,6 +1,6 @@ { sources ? import ./nix/sources.nix -, haskellNix ? import sources.haskellNix { } , gomod2nix ? sources.gomod2nix +, haskellNix ? (import ../. {}).haskellNix , pkgs ? import haskellNix.sources.nixpkgs-2105 (haskellNix.nixpkgsArgs // { overlays = haskellNix.nixpkgsArgs.overlays ++ [ (self: super: { @@ -8,23 +8,19 @@ }) ]; }) +, compaRESThsPkgs ? (import ../. {}).hsPkgs , npmNix ? import (sources.npmNix + "/npmPackages") { inherit pkgs; } , mavenix ? import (sources.mavenix) { inherit pkgs; } , bumpToken ? null , bumpDocumentation ? null }: let - typeable-openapi-diff = (pkgs.haskell-nix.stackProject { - src = pkgs.haskell-nix.haskellLib.cleanGit { - name = "openapi-diff"; - src = ./..; - }; - }).openapi-diff.components.exes.openapi-diff; - typeable-openapi-diff-exe = typeable-openapi-diff + "/bin/openapi-diff"; - typeable-openapi-diff-differ = pkgs.writeScript "typeable-openapi-diff-differ" '' + typeable-comparest = compaRESThsPkgs.comparest.components.exes.comparest; + typeable-comparest-exe = typeable-comparest + "/bin/comparest"; + typeable-comparest-differ = pkgs.writeScript "typeable-comparest-differ" '' #!${pkgs.stdenv.shell} set +e - ${typeable-openapi-diff-exe} -c $1 -s $2 -o $3/typeable.md + ${typeable-comparest-exe} -c $1 -s $2 -o $3/typeable.md exit 0 ''; @@ -130,7 +126,7 @@ let }) (getInputs root); differs = [ - typeable-openapi-diff-differ + typeable-comparest-differ atlassian-openapi-diff-differ openapitools-openapi-diff-differ oasdiff-differ @@ -164,7 +160,7 @@ let tools = [ "Typeable" "Atlassian" - "OpenApi Tools" + "OpenAPI Tools" "oasdiff" "Bump.sh" ]; diff --git a/openapi-diff.cabal b/comparest.cabal similarity index 67% rename from openapi-diff.cabal rename to comparest.cabal index cbbf8e9..861016d 100644 --- a/openapi-diff.cabal +++ b/comparest.cabal @@ -1,13 +1,13 @@ cabal-version: 2.4 -name: openapi-diff +name: comparest version: 0.0.0.0 synopsis: Compatibility checker for OpenAPI -description: Compatibility checker for OpenAPI +description: Compatibility checker for OpenAPI. license: MIT license-file: LICENSE -author: Aleksey Uymanov -maintainer: Aleksey Uymanov -copyright: 2021 Aleksey Uymanov +author: Typeable +maintainer: comparest@typeable.io +copyright: 2021 Typeable category: Web build-type: Simple extra-doc-files: README.md @@ -112,51 +112,51 @@ library , ordered-containers , bytestring hs-source-dirs: src - exposed-modules: Data.HList - , OpenAPI.Checker.Behavior - , OpenAPI.Checker.Formula - , OpenAPI.Checker.Memo - , OpenAPI.Checker.Orphans - , OpenAPI.Checker.Paths - , OpenAPI.Checker.PathsPrefixTree - , OpenAPI.Checker.References - , OpenAPI.Checker.Subtree - , OpenAPI.Checker.Validate.MediaTypeObject - , OpenAPI.Checker.Validate.OpenApi - , OpenAPI.Checker.Validate.Operation - , OpenAPI.Checker.Validate.Param - , OpenAPI.Checker.Validate.PathFragment - , OpenAPI.Checker.Validate.Products - , OpenAPI.Checker.Validate.RequestBody - , OpenAPI.Checker.Validate.Responses - , OpenAPI.Checker.Validate.Schema - , OpenAPI.Checker.Validate.Schema.TypedJson - , OpenAPI.Checker.Validate.Schema.DNF - , OpenAPI.Checker.Validate.Schema.Issues - , OpenAPI.Checker.Validate.Schema.JsonFormula - , OpenAPI.Checker.Validate.Schema.Partition - , OpenAPI.Checker.Validate.Schema.Process - , OpenAPI.Checker.Validate.Schema.Traced - , OpenAPI.Checker.Validate.SecurityRequirement - , OpenAPI.Checker.Validate.Server - , OpenAPI.Checker.Validate.Sums - , OpenAPI.Checker.Validate.Header - , OpenAPI.Checker.Validate.Link - , OpenAPI.Checker.Common - , OpenAPI.Checker.Validate.SecurityScheme - , OpenAPI.Checker.Validate.OAuth2Flows - , OpenAPI.Checker.Report + exposed-modules: Data.OpenApi.Compare.Behavior + , Data.OpenApi.Compare.Common + , Data.OpenApi.Compare.Formula + , Data.OpenApi.Compare.Memo + , Data.OpenApi.Compare.Orphans + , Data.OpenApi.Compare.Paths + , Data.OpenApi.Compare.PathsPrefixTree + , Data.OpenApi.Compare.References + , Data.OpenApi.Compare.Report + , Data.OpenApi.Compare.Report.Html.Template + , Data.OpenApi.Compare.Report.Jet + , Data.OpenApi.Compare.Run + , Data.OpenApi.Compare.Subtree + , Data.OpenApi.Compare.Validate.Header + , Data.OpenApi.Compare.Validate.Link + , Data.OpenApi.Compare.Validate.MediaTypeObject + , Data.OpenApi.Compare.Validate.OAuth2Flows + , Data.OpenApi.Compare.Validate.OpenApi + , Data.OpenApi.Compare.Validate.Operation + , Data.OpenApi.Compare.Validate.Param + , Data.OpenApi.Compare.Validate.PathFragment + , Data.OpenApi.Compare.Validate.Products + , Data.OpenApi.Compare.Validate.RequestBody + , Data.OpenApi.Compare.Validate.Responses + , Data.OpenApi.Compare.Validate.Schema + , Data.OpenApi.Compare.Validate.Schema.DNF + , Data.OpenApi.Compare.Validate.Schema.Issues + , Data.OpenApi.Compare.Validate.Schema.JsonFormula + , Data.OpenApi.Compare.Validate.Schema.Partition + , Data.OpenApi.Compare.Validate.Schema.Process + , Data.OpenApi.Compare.Validate.Schema.Traced + , Data.OpenApi.Compare.Validate.Schema.TypedJson + , Data.OpenApi.Compare.Validate.SecurityRequirement + , Data.OpenApi.Compare.Validate.SecurityScheme + , Data.OpenApi.Compare.Validate.Server + , Data.OpenApi.Compare.Validate.Sums + other-modules: Data.HList , Data.OpenUnion.Extra - , OpenAPI.Checker.Report.Jet - , OpenAPI.Checker.Run - , OpenAPI.Checker.Report.Html.Template -executable openapi-diff +executable comparest import: common-options hs-source-dirs: app main-is: Main.hs build-depends: - openapi-diff + comparest , pandoc , data-default , bytestring @@ -173,14 +173,14 @@ executable openapi-diff -with-rtsopts=-N other-modules: FormatHeuristic - OpenAPI.Checker.Options + Data.OpenApi.Compare.Options executable comparest-github-action import: common-options hs-source-dirs: github-action main-is: Main.hs build-depends: - openapi-diff + comparest , pandoc , yaml , aeson @@ -198,7 +198,7 @@ executable comparest-github-action CompaREST.GitHub.API CompaREST.GitHub.Action.Config -test-suite openapi-diff-test +test-suite comparest-tests import: common-options type: exitcode-stdio-1.0 hs-source-dirs: test @@ -207,7 +207,7 @@ test-suite openapi-diff-test Spec.Golden.Extra Spec.Golden.TraceTree build-depends: - , openapi-diff + , comparest , tasty-golden , tasty , bytestring diff --git a/default.nix b/default.nix index 86de6d2..d4ee087 100644 --- a/default.nix +++ b/default.nix @@ -12,7 +12,7 @@ let include = [ ./stack.yaml ./stack.yaml.lock - ./openapi-diff.cabal + ./comparest.cabal ]; }; @@ -21,11 +21,11 @@ let dontStrip = false; dontPatchELF = false; enableDeadCodeElimination = true; - packages.openapi-diff.src = nix-filter { + packages.comparest.src = nix-filter { root = ./.; name = "compaREST-src"; include = with nix-filter; [ - (./openapi-diff.cabal) + (./comparest.cabal) (inDirectory ./test) (inDirectory ./src) (inDirectory ./app) @@ -47,15 +47,15 @@ let compaREST = pkgs.dockerTools.buildImage { name = "compaREST"; - contents = [ (staticify "compaREST-static" hsPkgs.projectCross.musl64.hsPkgs.openapi-diff.components.exes.openapi-diff) ]; + contents = [ (staticify "compaREST-static" hsPkgs.projectCross.musl64.hsPkgs.comparest.components.exes.comparest) ]; config = { - Entrypoint = [ "/bin/openapi-diff" ]; + Entrypoint = [ "/bin/comparest" ]; }; }; compaRESTGithubAction = let - action = staticify "compaREST-github-action-static" hsPkgs.projectCross.musl64.hsPkgs.openapi-diff.components.exes.comparest-github-action; + action = staticify "compaREST-github-action-static" hsPkgs.projectCross.musl64.hsPkgs.comparest.components.exes.comparest-github-action; wrapped = pkgs.runCommand "wrapped-compaREST-github-action" { buildInputs = [ pkgs.makeWrapper ]; } '' makeWrapper ${action}/bin/comparest-github-action $out/bin/pre --add-flags "pre" makeWrapper ${action}/bin/comparest-github-action $out/bin/run --add-flags "run" @@ -68,4 +68,4 @@ let }; in -{ inherit compaREST compaRESTGithubAction; } +{ inherit compaREST compaRESTGithubAction hsPkgs haskellNix; } diff --git a/github-action/Main.hs b/github-action/Main.hs index 5ba7b6c..65c7b4b 100644 --- a/github-action/Main.hs +++ b/github-action/Main.hs @@ -7,10 +7,10 @@ import Control.Monad.Freer import Control.Monad.Freer.Error import Control.Monad.Freer.GitHub import Control.Monad.Freer.Reader +import Data.OpenApi.Compare.Run import Data.Text (Text) import qualified Data.Yaml.Aeson as Yaml import qualified GitHub as GH -import OpenAPI.Checker.Run import System.Environment import System.Envy (decodeEnv) import System.FilePath (()) diff --git a/src/OpenAPI/Checker/Behavior.hs b/src/Data/OpenApi/Compare/Behavior.hs similarity index 98% rename from src/OpenAPI/Checker/Behavior.hs rename to src/Data/OpenApi/Compare/Behavior.hs index caa05fc..0ee06e2 100644 --- a/src/OpenAPI/Checker/Behavior.hs +++ b/src/Data/OpenApi/Compare/Behavior.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Behavior +module Data.OpenApi.Compare.Behavior ( BehaviorLevel (..) , Behavable (..) , IssueKind (..) @@ -15,8 +15,8 @@ where import Data.Aeson import Data.Kind +import Data.OpenApi.Compare.Paths import Data.Typeable -import OpenAPI.Checker.Paths import Text.Pandoc.Builder -- | Kind diff --git a/src/OpenAPI/Checker/Common.hs b/src/Data/OpenApi/Compare/Common.hs similarity index 84% rename from src/OpenAPI/Checker/Common.hs rename to src/Data/OpenApi/Compare/Common.hs index 992513f..38bf25a 100644 --- a/src/OpenAPI/Checker/Common.hs +++ b/src/Data/OpenApi/Compare/Common.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Common +module Data.OpenApi.Compare.Common ( zipAll ) where diff --git a/src/OpenAPI/Checker/Formula.hs b/src/Data/OpenApi/Compare/Formula.hs similarity index 97% rename from src/OpenAPI/Checker/Formula.hs rename to src/Data/OpenApi/Compare/Formula.hs index 23265bc..2623a2b 100644 --- a/src/OpenAPI/Checker/Formula.hs +++ b/src/Data/OpenApi/Compare/Formula.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Formula +module Data.OpenApi.Compare.Formula ( FormulaF , VarRef , variable @@ -11,10 +11,10 @@ module OpenAPI.Checker.Formula ) where import Data.Kind -import Data.Monoid import qualified Data.List.NonEmpty as NE -import OpenAPI.Checker.Paths -import qualified OpenAPI.Checker.PathsPrefixTree as P +import Data.Monoid +import Data.OpenApi.Compare.Paths +import qualified Data.OpenApi.Compare.PathsPrefixTree as P type VarRef = Int diff --git a/src/OpenAPI/Checker/Memo.hs b/src/Data/OpenApi/Compare/Memo.hs similarity index 99% rename from src/OpenAPI/Checker/Memo.hs rename to src/Data/OpenApi/Compare/Memo.hs index eaae472..0b88751 100644 --- a/src/OpenAPI/Checker/Memo.hs +++ b/src/Data/OpenApi/Compare/Memo.hs @@ -1,6 +1,6 @@ {-# LANGUAGE AllowAmbiguousTypes #-} -- | Utilities for effectfully memoizing other, more effectful functions. -module OpenAPI.Checker.Memo +module Data.OpenApi.Compare.Memo ( MonadMemo , MemoState , runMemo diff --git a/src/OpenAPI/Checker/Orphans.hs b/src/Data/OpenApi/Compare/Orphans.hs similarity index 95% rename from src/OpenAPI/Checker/Orphans.hs rename to src/Data/OpenApi/Compare/Orphans.hs index 0050dfe..51e914d 100644 --- a/src/OpenAPI/Checker/Orphans.hs +++ b/src/Data/OpenApi/Compare/Orphans.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Orphans () where +module Data.OpenApi.Compare.Orphans () where import Control.Comonad.Env import qualified Data.HashMap.Strict.InsOrd as IOHM diff --git a/src/OpenAPI/Checker/Paths.hs b/src/Data/OpenApi/Compare/Paths.hs similarity index 99% rename from src/OpenAPI/Checker/Paths.hs rename to src/Data/OpenApi/Compare/Paths.hs index 301bbea..ee8885b 100644 --- a/src/OpenAPI/Checker/Paths.hs +++ b/src/Data/OpenApi/Compare/Paths.hs @@ -1,7 +1,7 @@ -- | Utilities for traversing heterogeneous trees. A heterogeneous tree is a -- collection of datatypes that "contain" eachother in some form of tree -- structure. -module OpenAPI.Checker.Paths +module Data.OpenApi.Compare.Paths ( NiceQuiver , AdditionalQuiverConstraints , Paths (..) diff --git a/src/OpenAPI/Checker/PathsPrefixTree.hs b/src/Data/OpenApi/Compare/PathsPrefixTree.hs similarity index 99% rename from src/OpenAPI/Checker/PathsPrefixTree.hs rename to src/Data/OpenApi/Compare/PathsPrefixTree.hs index 2e21074..859d2c1 100644 --- a/src/OpenAPI/Checker/PathsPrefixTree.hs +++ b/src/Data/OpenApi/Compare/PathsPrefixTree.hs @@ -1,6 +1,6 @@ {-# LANGUAGE QuantifiedConstraints #-} -module OpenAPI.Checker.PathsPrefixTree +module Data.OpenApi.Compare.PathsPrefixTree ( PathsPrefixTree (PathsPrefixNode) , AStep (..) , empty @@ -27,13 +27,13 @@ import qualified Data.HashMap.Strict as HM import Data.Kind import qualified Data.Map as M import Data.Monoid +import Data.OpenApi.Compare.Paths import qualified Data.Set as S import qualified Data.Text as T import Data.Type.Equality import qualified Data.TypeRepMap as TRM import qualified Data.Vector as V import qualified GHC.Exts as Exts -import OpenAPI.Checker.Paths import Type.Reflection import Prelude hiding (filter, map, null, lookup) diff --git a/src/OpenAPI/Checker/References.hs b/src/Data/OpenApi/Compare/References.hs similarity index 91% rename from src/OpenAPI/Checker/References.hs rename to src/Data/OpenApi/Compare/References.hs index cad2b2a..f5c30dd 100644 --- a/src/OpenAPI/Checker/References.hs +++ b/src/Data/OpenApi/Compare/References.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.References +module Data.OpenApi.Compare.References ( Step (..) , dereference , Typeable @@ -11,9 +11,9 @@ import Data.HList import qualified Data.HashMap.Strict.InsOrd as IOHM import Data.Maybe import Data.OpenApi +import Data.OpenApi.Compare.Orphans () +import Data.OpenApi.Compare.Subtree import Data.Typeable -import OpenAPI.Checker.Orphans () -import OpenAPI.Checker.Subtree instance Typeable a => Steppable (Referenced a) a where data Step (Referenced a) a = InlineStep diff --git a/src/OpenAPI/Checker/Report.hs b/src/Data/OpenApi/Compare/Report.hs similarity index 90% rename from src/OpenAPI/Checker/Report.hs rename to src/Data/OpenApi/Compare/Report.hs index 73a7503..9497a53 100644 --- a/src/OpenAPI/Checker/Report.hs +++ b/src/Data/OpenApi/Compare/Report.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Report +module Data.OpenApi.Compare.Report ( generateReport , CheckerOutput(..) , ReportInput (..) @@ -23,6 +23,15 @@ import qualified Data.Map as M import Data.Map.Ordered (OMap) import qualified Data.Map.Ordered as OM import Data.Maybe +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Paths +import Data.OpenApi.Compare.PathsPrefixTree hiding (empty) +import qualified Data.OpenApi.Compare.PathsPrefixTree as P hiding (empty) +import Data.OpenApi.Compare.Report.Jet +import Data.OpenApi.Compare.Subtree (invertIssueOrientationP) +import Data.OpenApi.Compare.Validate.OpenApi +import Data.OpenApi.Compare.Validate.Schema.TypedJson +import Data.OpenApi.Compare.Validate.Schema.Issues import Data.OpenUnion import Data.OpenUnion.Extra import Data.Set @@ -32,15 +41,6 @@ import qualified Data.Text as T import Data.TypeRepMap hiding (empty) import Data.Typeable import Generic.Data -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Paths -import OpenAPI.Checker.PathsPrefixTree hiding (empty) -import qualified OpenAPI.Checker.PathsPrefixTree as P hiding (empty) -import OpenAPI.Checker.Report.Jet -import OpenAPI.Checker.Subtree (invertIssueOrientationP) -import OpenAPI.Checker.Validate.OpenApi -import OpenAPI.Checker.Validate.Schema.TypedJson -import OpenAPI.Checker.Validate.Schema.Issues import Text.Pandoc.Builder type Changes = P.PathsPrefixTree Behave AnIssue 'APILevel @@ -120,40 +120,42 @@ generateReport cfg inp = <> twoRowTable (when' schemaIssuesPresent - [ ( refOpt schemaIssuesPresent schemaIssuesId "❌ Schema issues" + [ ( refOpt schemaIssuesPresent schemaIssuesId "‼️ Schema issues" , show' $ P.size $ schemaIssues inp ) ] ++ - [ ( refOpt breakingChangesPresent breakingChangesId "⚠️ Breaking changes" + [ ( refOpt breakingChangesPresent breakingChangesId "❌ Breaking changes" , show' $ P.size $ breakingChanges inp ) ] ++ when' nonBreakingChangesShown - [ ( refOpt nonBreakingChangesPresent nonBreakingChangesId "🙆 Non-breaking changes" + [ ( refOpt nonBreakingChangesPresent nonBreakingChangesId "⚠️ Non-breaking changes" , show' $ P.size $ nonBreakingChanges inp ) ] - ++ [ ( refOpt unsupportedChangesPresent unsupportedChangesId "🤷 Unsupported feature changes" - , show' $ P.size $ unsupportedChanges inp - ) - ]) + ++ when' + unsupportedChangesPresent + [ ( refOpt unsupportedChangesPresent unsupportedChangesId "❓ Unsupported feature changes" + , show' $ P.size $ unsupportedChanges inp + ) + ]) <> when' schemaIssuesPresent - (header 1 (anchor schemaIssuesId <> "❌ Schema issues") + (header 1 (anchor schemaIssuesId <> "‼️ Schema issues") <> builder (showErrs $ schemaIssues inp)) <> when' breakingChangesPresent - (header 1 (anchor breakingChangesId <> "⚠️ Breaking changes") + (header 1 (anchor breakingChangesId <> "❌ Breaking changes") <> builder (showErrs $ breakingChanges inp)) <> when' (nonBreakingChangesPresent && nonBreakingChangesShown) - (header 1 (anchor nonBreakingChangesId <> "🙆 Non-breaking changes") + (header 1 (anchor nonBreakingChangesId <> "⚠️ Non-breaking changes") <> builder (showErrs $ nonBreakingChanges inp)) <> when' unsupportedChangesPresent - (header 1 (anchor unsupportedChangesId <> "🤷 Unsupported feature changes") + (header 1 (anchor unsupportedChangesId <> "❓ Unsupported feature changes") <> builder (showErrs $ unsupportedChanges inp)) status = if @@ -239,8 +241,8 @@ jets = , constructReportJet $ \p@(AtPath _) op@(InOperation _) -> strong (describeBehavior op) <> " " <> describeBehavior p :: Inlines , constructReportJet $ \(WithStatusCode c) ResponsePayload PayloadSchema -> - "📱⬅️ JSON Response – " <> str (T.pack . show $ c) :: Inlines - , constructReportJet $ \InRequest InPayload PayloadSchema -> "📱➡️ JSON Request" :: Inlines + "⬅️☁️ JSON Response – " <> str (T.pack . show $ c) :: Inlines + , constructReportJet $ \InRequest InPayload PayloadSchema -> "➡️☁️ JSON Request" :: Inlines ] where unwrapReportJetResult :: ReportJetResult Behave x -> ReportJet' Behave x diff --git a/src/OpenAPI/Checker/Report/Html/Template.hs b/src/Data/OpenApi/Compare/Report/Html/Template.hs similarity index 84% rename from src/OpenAPI/Checker/Report/Html/Template.hs rename to src/Data/OpenApi/Compare/Report/Html/Template.hs index 29fa9c6..f90a1d3 100644 --- a/src/OpenAPI/Checker/Report/Html/Template.hs +++ b/src/Data/OpenApi/Compare/Report/Html/Template.hs @@ -1,6 +1,6 @@ {-# LANGUAGE TemplateHaskell #-} -module OpenAPI.Checker.Report.Html.Template +module Data.OpenApi.Compare.Report.Html.Template ( template ) where @@ -24,11 +24,11 @@ template = \\ \\ \\ - \\ + \\ \\ \\ \\ - \

⛄ OpenApi Diff

\ + \

CompaREST

\ \
\ \$body$\ \
\ diff --git a/src/OpenAPI/Checker/Report/Jet.hs b/src/Data/OpenApi/Compare/Report/Jet.hs similarity index 98% rename from src/OpenAPI/Checker/Report/Jet.hs rename to src/Data/OpenApi/Compare/Report/Jet.hs index 8fdd278..0875bb5 100644 --- a/src/OpenAPI/Checker/Report/Jet.hs +++ b/src/Data/OpenApi/Compare/Report/Jet.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Report.Jet +module Data.OpenApi.Compare.Report.Jet ( ReportJet (..) , ReportJet' , ConstructReportJet (..) diff --git a/src/OpenAPI/Checker/Run.hs b/src/Data/OpenApi/Compare/Run.hs similarity index 75% rename from src/OpenAPI/Checker/Run.hs rename to src/Data/OpenApi/Compare/Run.hs index 3fb4db0..d968cd0 100644 --- a/src/OpenAPI/Checker/Run.hs +++ b/src/Data/OpenApi/Compare/Run.hs @@ -1,17 +1,17 @@ -module OpenAPI.Checker.Run +module Data.OpenApi.Compare.Run ( runChecker , runReport - , module OpenAPI.Checker.Report + , module Data.OpenApi.Compare.Report ) where import Data.HList import Data.OpenApi (OpenApi) -import OpenAPI.Checker.Paths -import OpenAPI.Checker.Report -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.OpenApi () import Text.Pandoc.Builder +import Data.OpenApi.Compare.Paths +import Data.OpenApi.Compare.Report +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.OpenApi () runChecker :: (OpenApi, OpenApi) -> CheckerOutput runChecker (client, server) = diff --git a/src/OpenAPI/Checker/Subtree.hs b/src/Data/OpenApi/Compare/Subtree.hs similarity index 97% rename from src/OpenAPI/Checker/Subtree.hs rename to src/Data/OpenApi/Compare/Subtree.hs index 6aa7c62..60ef4bb 100644 --- a/src/OpenAPI/Checker/Subtree.hs +++ b/src/Data/OpenApi/Compare/Subtree.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Subtree +module Data.OpenApi.Compare.Subtree ( Steppable (..) , Step (..) , TraceRoot @@ -60,13 +60,13 @@ import qualified Data.HashMap.Strict.InsOrd as IOHM import Data.Hashable import Data.Kind import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Formula +import Data.OpenApi.Compare.Memo +import Data.OpenApi.Compare.Paths +import qualified Data.OpenApi.Compare.PathsPrefixTree as P import qualified Data.Set as S import Data.Typeable -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Formula -import OpenAPI.Checker.Memo -import OpenAPI.Checker.Paths -import qualified OpenAPI.Checker.PathsPrefixTree as P class (Typeable Step, Typeable a, Typeable b, Ord (Step a b), Show (Step a b)) => diff --git a/src/OpenAPI/Checker/Validate/Header.hs b/src/Data/OpenApi/Compare/Validate/Header.hs similarity index 92% rename from src/OpenAPI/Checker/Validate/Header.hs rename to src/Data/OpenApi/Compare/Validate/Header.hs index 778e67e..5484e93 100644 --- a/src/OpenAPI/Checker/Validate/Header.hs +++ b/src/Data/OpenApi/Compare/Validate/Header.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.Header +module Data.OpenApi.Compare.Validate.Header ( ) where @@ -9,10 +9,10 @@ import Data.Foldable import Data.Functor import Data.Maybe import Data.OpenApi -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.References () -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Schema () +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.References () +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Schema () import Text.Pandoc.Builder instance Subtree Header where diff --git a/src/OpenAPI/Checker/Validate/Link.hs b/src/Data/OpenApi/Compare/Validate/Link.hs similarity index 68% rename from src/OpenAPI/Checker/Validate/Link.hs rename to src/Data/OpenApi/Compare/Validate/Link.hs index c0ab001..dc6394d 100644 --- a/src/OpenAPI/Checker/Validate/Link.hs +++ b/src/Data/OpenApi/Compare/Validate/Link.hs @@ -1,10 +1,10 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.Link () where +module Data.OpenApi.Compare.Validate.Link () where import Data.OpenApi -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Subtree +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Subtree import Text.Pandoc.Builder instance Subtree Link where @@ -19,4 +19,4 @@ instance Issuable 'LinkLevel where deriving stock (Eq, Ord, Show) issueKind = \case LinksUnsupported -> Unsupported - describeIssue _ LinksUnsupported = para "OpenApi Diff does not currently support Link Objects." + describeIssue _ LinksUnsupported = para "CompaREST does not currently support Link Objects." diff --git a/src/OpenAPI/Checker/Validate/MediaTypeObject.hs b/src/Data/OpenApi/Compare/Validate/MediaTypeObject.hs similarity index 93% rename from src/OpenAPI/Checker/Validate/MediaTypeObject.hs rename to src/Data/OpenApi/Compare/Validate/MediaTypeObject.hs index f8886fa..f6491b3 100644 --- a/src/OpenAPI/Checker/Validate/MediaTypeObject.hs +++ b/src/Data/OpenApi/Compare/Validate/MediaTypeObject.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.MediaTypeObject +module Data.OpenApi.Compare.Validate.MediaTypeObject ( Issue (..) , Behave (..) ) @@ -12,15 +12,15 @@ import Data.HList import Data.HashMap.Strict.InsOrd as IOHM import Data.Map.Strict as M import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Header () +import Data.OpenApi.Compare.Validate.Products +import Data.OpenApi.Compare.Validate.Schema () import Data.String import Data.Text (Text) import qualified Data.Text as T import Network.HTTP.Media (MediaType, mainType, subType) -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Header () -import OpenAPI.Checker.Validate.Products -import OpenAPI.Checker.Validate.Schema () import Text.Pandoc.Builder tracedSchema :: Traced MediaTypeObject -> Maybe (Traced (Referenced Schema)) @@ -45,7 +45,7 @@ instance Issuable 'PayloadLevel where describeIssue _ MediaTypeSchemaRequired = para "Media type expected, but was not specified." describeIssue Forward (MediaEncodingMissing enc) = para $ "Media encoding " <> str enc <> " has been removed." describeIssue Backward (MediaEncodingMissing enc) = para $ "Media encoding " <> str enc <> " added." - describeIssue _ EncodingNotSupported = para "OpenApi Diff does not currently support media encodings other than JSON." + describeIssue _ EncodingNotSupported = para "CompaREST does not currently support media encodings other than JSON." instance Behavable 'PayloadLevel 'SchemaLevel where data Behave 'PayloadLevel 'SchemaLevel @@ -119,7 +119,7 @@ instance Subtree Encoding where -- FIXME: Support only JSON body for now. Then Encoding is checked only for -- multipart/form-url-encoded - -- https://github.com/typeable/openapi-diff/issues/54 + -- #54 checkSemanticCompatibility _env beh _pc = issueAt beh EncodingNotSupported diff --git a/src/OpenAPI/Checker/Validate/OAuth2Flows.hs b/src/Data/OpenApi/Compare/Validate/OAuth2Flows.hs similarity index 98% rename from src/OpenAPI/Checker/Validate/OAuth2Flows.hs rename to src/Data/OpenApi/Compare/Validate/OAuth2Flows.hs index 9207d52..d54a504 100644 --- a/src/OpenAPI/Checker/Validate/OAuth2Flows.hs +++ b/src/Data/OpenApi/Compare/Validate/OAuth2Flows.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.OAuth2Flows +module Data.OpenApi.Compare.Validate.OAuth2Flows ( Step (..) , Issue (..) , Behave (..) @@ -12,13 +12,13 @@ import Data.Function import Data.Functor import qualified Data.HashMap.Strict.InsOrd as IOHM import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Orphans () +import Data.OpenApi.Compare.Subtree import Data.Proxy import Data.Set (Set) import qualified Data.Set as S import Data.Text (Text) -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Orphans () -import OpenAPI.Checker.Subtree import Text.Pandoc.Builder instance Subtree OAuth2Flows where diff --git a/src/OpenAPI/Checker/Validate/OpenApi.hs b/src/Data/OpenApi/Compare/Validate/OpenApi.hs similarity index 95% rename from src/OpenAPI/Checker/Validate/OpenApi.hs rename to src/Data/OpenApi/Compare/Validate/OpenApi.hs index 8525746..d3ab48c 100644 --- a/src/OpenAPI/Checker/Validate/OpenApi.hs +++ b/src/Data/OpenApi/Compare/Validate/OpenApi.hs @@ -2,7 +2,7 @@ -- Does not compiles otherwise {-# OPTIONS_GHC -fconstraint-solver-iterations=0 #-} -module OpenAPI.Checker.Validate.OpenApi +module Data.OpenApi.Compare.Validate.OpenApi ( Behave (..) , Issue (..) ) @@ -11,10 +11,10 @@ where import Data.HList import qualified Data.HashMap.Strict.InsOrd as IOHM import Data.OpenApi -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Paths -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Operation +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Paths +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Operation tracedPaths :: Traced OpenApi -> Traced ProcessedPathItems tracedPaths oa = diff --git a/src/OpenAPI/Checker/Validate/Operation.hs b/src/Data/OpenApi/Compare/Validate/Operation.hs similarity index 96% rename from src/OpenAPI/Checker/Validate/Operation.hs rename to src/Data/OpenApi/Compare/Validate/Operation.hs index 0e130ef..2b4240a 100644 --- a/src/OpenAPI/Checker/Validate/Operation.hs +++ b/src/Data/OpenApi/Compare/Validate/Operation.hs @@ -2,7 +2,7 @@ {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -fconstraint-solver-iterations=0 #-} -module OpenAPI.Checker.Validate.Operation +module Data.OpenApi.Compare.Validate.Operation ( -- * Operation MatchedOperation (..) , OperationMethod (..) @@ -29,21 +29,21 @@ import qualified Data.List as L import Data.Map.Strict as M import Data.Maybe import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.References +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.MediaTypeObject +import Data.OpenApi.Compare.Validate.OAuth2Flows +import Data.OpenApi.Compare.Validate.PathFragment +import Data.OpenApi.Compare.Validate.Products +import Data.OpenApi.Compare.Validate.RequestBody +import Data.OpenApi.Compare.Validate.Responses +import Data.OpenApi.Compare.Validate.SecurityRequirement () +import Data.OpenApi.Compare.Validate.Server () +import Data.OpenApi.Compare.Validate.Sums import Data.String import Data.Text (Text) import qualified Data.Text as T -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.References -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.MediaTypeObject -import OpenAPI.Checker.Validate.OAuth2Flows -import OpenAPI.Checker.Validate.PathFragment -import OpenAPI.Checker.Validate.Products -import OpenAPI.Checker.Validate.RequestBody -import OpenAPI.Checker.Validate.Responses -import OpenAPI.Checker.Validate.SecurityRequirement () -import OpenAPI.Checker.Validate.Server () -import OpenAPI.Checker.Validate.Sums import Text.Pandoc.Builder data MatchedOperation = MatchedOperation @@ -86,7 +86,7 @@ tracedCallbacks (Traced t oper) = | (k, v) <- IOHM.toList . _operationCallbacks . operation $ oper ] --- FIXME: https://github.com/typeable/openapi-diff/issues/28 +-- FIXME: #28 getServers :: [Server] -- ^ Servers from env -> MatchedOperation @@ -241,7 +241,7 @@ instance Subtree MatchedOperation where checkProducts beh (const NoRequestBody) (const check) elements checkResponses = swapProdCons (checkCompatibility beh) env $ tracedResponses <$> prodCons - -- FIXME: https://github.com/typeable/openapi-diff/issues/27 + -- FIXME: #27 checkCallbacks = do let ProdCons pCallbacks cCallbacks = tracedCallbacks <$> prodCons for_ pCallbacks $ \(k, pCallback) -> do @@ -250,7 +250,7 @@ instance Subtree MatchedOperation where cCallbacks <&> \(_, cCallback) -> do swapProdCons (checkCompatibility beh') env $ ProdCons pCallback cCallback pure () - -- FIXME: https://github.com/typeable/openapi-diff/issues/28 + -- FIXME: #28 checkOperationSecurity = do let ProdCons pSecs cSecs = tracedSecurity <$> prodCons for_ pSecs $ \(i, pSec) -> do @@ -564,7 +564,7 @@ instance Issuable 'CallbackLevel where deriving stock (Eq, Ord, Show) issueKind = \case CallbacksUnsupported -> Unsupported - describeIssue _ CallbacksUnsupported = para "OpenApi Diff does not currently support callbacks." + describeIssue _ CallbacksUnsupported = para "CompaREST does not currently support callbacks." tracedCallbackPathItems :: Traced Callback -> Traced ProcessedPathItems tracedCallbackPathItems (Traced t (Callback x)) = diff --git a/src/OpenAPI/Checker/Validate/Param.hs b/src/Data/OpenApi/Compare/Validate/Param.hs similarity index 96% rename from src/OpenAPI/Checker/Validate/Param.hs rename to src/Data/OpenApi/Compare/Validate/Param.hs index 8b5069d..d1b40b4 100644 --- a/src/OpenAPI/Checker/Validate/Param.hs +++ b/src/Data/OpenApi/Compare/Validate/Param.hs @@ -1,7 +1,7 @@ {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} -module OpenAPI.Checker.Validate.Param +module Data.OpenApi.Compare.Validate.Param ( Behave (..) , Issue (..) ) @@ -11,11 +11,11 @@ import Control.Monad import Data.Functor import Data.Maybe import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Orphans () +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Schema () import Data.Text as T -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Orphans () -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Schema () import Text.Pandoc.Builder -- | The type is normalized encoding style of the parameter. If two encoding diff --git a/src/OpenAPI/Checker/Validate/PathFragment.hs b/src/Data/OpenApi/Compare/Validate/PathFragment.hs similarity index 92% rename from src/OpenAPI/Checker/Validate/PathFragment.hs rename to src/Data/OpenApi/Compare/Validate/PathFragment.hs index 813ad7a..b3f11c9 100644 --- a/src/OpenAPI/Checker/Validate/PathFragment.hs +++ b/src/Data/OpenApi/Compare/Validate/PathFragment.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Validate.PathFragment +module Data.OpenApi.Compare.Validate.PathFragment ( parsePath , PathFragment (..) , PathFragmentParam @@ -7,15 +7,15 @@ where import qualified Data.Aeson as A import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Param import Data.Text (Text) import qualified Data.Text as T import Data.Typeable -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Param -- TODO: templates can be only part of the PathFragment. Currently only supports templates as full PathFragment. --- https://github.com/typeable/openapi-diff/issues/23 +-- #23 parsePath :: FilePath -> [PathFragment Text] parsePath = fmap partition . T.splitOn "/" . T.pack where diff --git a/src/OpenAPI/Checker/Validate/Products.hs b/src/Data/OpenApi/Compare/Validate/Products.hs similarity index 90% rename from src/OpenAPI/Checker/Validate/Products.hs rename to src/Data/OpenApi/Compare/Validate/Products.hs index 69fea8c..4629933 100644 --- a/src/OpenAPI/Checker/Validate/Products.hs +++ b/src/Data/OpenApi/Compare/Validate/Products.hs @@ -12,7 +12,7 @@ and their schemas match. This module abstracts this logic for arbitrary elements -} -module OpenAPI.Checker.Validate.Products +module Data.OpenApi.Compare.Validate.Products ( checkProducts , ProductLike(..) ) where @@ -20,9 +20,9 @@ module OpenAPI.Checker.Validate.Products import Data.Foldable import Data.Map.Strict (Map) import qualified Data.Map.Strict as M -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Paths -import OpenAPI.Checker.Subtree +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Paths +import Data.OpenApi.Compare.Subtree -- | Some entity which is product-like data ProductLike a = ProductLike diff --git a/src/OpenAPI/Checker/Validate/RequestBody.hs b/src/Data/OpenApi/Compare/Validate/RequestBody.hs similarity index 92% rename from src/OpenAPI/Checker/Validate/RequestBody.hs rename to src/Data/OpenApi/Compare/Validate/RequestBody.hs index 1cad06c..4ab1e5a 100644 --- a/src/OpenAPI/Checker/Validate/RequestBody.hs +++ b/src/Data/OpenApi/Compare/Validate/RequestBody.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.RequestBody +module Data.OpenApi.Compare.Validate.RequestBody ( Issue (..) , Behave (..) ) @@ -11,12 +11,12 @@ import Data.HashMap.Strict.InsOrd as IOHM import Data.Map.Strict as M import Data.Maybe import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.MediaTypeObject +import Data.OpenApi.Compare.Validate.Sums import qualified Data.Text as T import Network.HTTP.Media (MediaType) -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.MediaTypeObject -import OpenAPI.Checker.Validate.Sums import Text.Pandoc.Builder -- TODO: Use RequestMediaTypeObjectMapping diff --git a/src/OpenAPI/Checker/Validate/Responses.hs b/src/Data/OpenApi/Compare/Validate/Responses.hs similarity index 93% rename from src/OpenAPI/Checker/Validate/Responses.hs rename to src/Data/OpenApi/Compare/Validate/Responses.hs index 358b0c0..aedbcf4 100644 --- a/src/OpenAPI/Checker/Validate/Responses.hs +++ b/src/Data/OpenApi/Compare/Validate/Responses.hs @@ -1,7 +1,7 @@ {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} -module OpenAPI.Checker.Validate.Responses +module Data.OpenApi.Compare.Validate.Responses ( Behave (..) ) where @@ -11,17 +11,17 @@ import Data.HashMap.Strict.InsOrd as IOHM import Data.Map.Strict as M import Data.Maybe import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.References +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Header () +import Data.OpenApi.Compare.Validate.Link () +import Data.OpenApi.Compare.Validate.MediaTypeObject +import Data.OpenApi.Compare.Validate.Products +import Data.OpenApi.Compare.Validate.Schema () +import Data.OpenApi.Compare.Validate.Sums import qualified Data.Text as T import Network.HTTP.Media (MediaType) -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.References -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Header () -import OpenAPI.Checker.Validate.Link () -import OpenAPI.Checker.Validate.MediaTypeObject -import OpenAPI.Checker.Validate.Products -import OpenAPI.Checker.Validate.Schema () -import OpenAPI.Checker.Validate.Sums import Text.Pandoc.Builder tracedResponses :: Traced Responses -> IOHM.InsOrdHashMap HttpStatusCode (Traced (Referenced Response)) diff --git a/src/OpenAPI/Checker/Validate/Schema.hs b/src/Data/OpenApi/Compare/Validate/Schema.hs similarity index 97% rename from src/OpenAPI/Checker/Validate/Schema.hs rename to src/Data/OpenApi/Compare/Validate/Schema.hs index 1e88c67..434ea8e 100644 --- a/src/OpenAPI/Checker/Validate/Schema.hs +++ b/src/Data/OpenApi/Compare/Validate/Schema.hs @@ -1,5 +1,5 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.Schema +module Data.OpenApi.Compare.Validate.Schema ( ) where @@ -15,22 +15,22 @@ import qualified Data.Map as M import Data.List (group, genericLength, genericIndex) import Data.Maybe import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Paths +import qualified Data.OpenApi.Compare.PathsPrefixTree as P +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Schema.DNF +import Data.OpenApi.Compare.Validate.Schema.Issues +import Data.OpenApi.Compare.Validate.Schema.JsonFormula +import Data.OpenApi.Compare.Validate.Schema.Traced +import Data.OpenApi.Compare.Validate.Schema.TypedJson +import Data.OpenApi.Compare.Validate.Schema.Partition +import Data.OpenApi.Compare.Validate.Schema.Process import Data.Ord import Data.Ratio import Data.Semigroup import qualified Data.Set as S import Data.Text (Text) -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Paths -import qualified OpenAPI.Checker.PathsPrefixTree as P -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Schema.DNF -import OpenAPI.Checker.Validate.Schema.Issues -import OpenAPI.Checker.Validate.Schema.JsonFormula -import OpenAPI.Checker.Validate.Schema.Traced -import OpenAPI.Checker.Validate.Schema.TypedJson -import OpenAPI.Checker.Validate.Schema.Partition -import OpenAPI.Checker.Validate.Schema.Process checkFormulas :: (ReassembleHList xs (CheckEnv (Referenced Schema))) diff --git a/src/OpenAPI/Checker/Validate/Schema/DNF.hs b/src/Data/OpenApi/Compare/Validate/Schema/DNF.hs similarity index 98% rename from src/OpenAPI/Checker/Validate/Schema/DNF.hs rename to src/Data/OpenApi/Compare/Validate/Schema/DNF.hs index 4c6f2a9..327c96d 100644 --- a/src/OpenAPI/Checker/Validate/Schema/DNF.hs +++ b/src/Data/OpenApi/Compare/Validate/Schema/DNF.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Validate.Schema.DNF +module Data.OpenApi.Compare.Validate.Schema.DNF ( DNF (..) , Disjunct (..) , pattern SingleDisjunct diff --git a/src/OpenAPI/Checker/Validate/Schema/Issues.hs b/src/Data/OpenApi/Compare/Validate/Schema/Issues.hs similarity index 97% rename from src/OpenAPI/Checker/Validate/Schema/Issues.hs rename to src/Data/OpenApi/Compare/Validate/Schema/Issues.hs index 1765a71..5d5a070 100644 --- a/src/OpenAPI/Checker/Validate/Schema/Issues.hs +++ b/src/Data/OpenApi/Compare/Validate/Schema/Issues.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.Schema.Issues +module Data.OpenApi.Compare.Validate.Schema.Issues ( Issue (..) , Behave (..) ) @@ -8,14 +8,14 @@ where import qualified Data.Aeson as A import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Schema.JsonFormula +import Data.OpenApi.Compare.Validate.Schema.Partition +import Data.OpenApi.Compare.Validate.Schema.TypedJson import Data.Scientific import Data.Text (Text) import qualified Data.Text as T -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Schema.JsonFormula -import OpenAPI.Checker.Validate.Schema.Partition -import OpenAPI.Checker.Validate.Schema.TypedJson import Text.Pandoc.Builder hiding (Format, Null) instance Issuable 'TypedSchemaLevel where @@ -263,7 +263,7 @@ instance Issuable 'SchemaLevel where UnexpectedProperty -> Just () _ -> Nothing describeIssue _ (NotSupported i) = - para (emph "Encountered a feature that OpenApi Diff does not support: " <> text i <> ".") + para (emph "Encountered a feature that CompaREST does not support: " <> text i <> ".") describeIssue _ OneOfNotDisjoint = para $ "Could not deduce that " <> code "oneOf" @@ -275,7 +275,7 @@ instance Issuable 'SchemaLevel where describeIssue _ (InvalidSchema i) = para (emph "The schema is invalid: " <> text i <> ".") describeIssue _ UnguardedRecursion = - para "Encountered recursion that is too complex for OpenApi Diff to untangle." + para "Encountered recursion that is too complex for CompaREST to untangle." describeIssue Forward (TypesRestricted tys) = case tys of [] -> para "No longer has any valid values." -- weird _ -> para "Values are now limited to the following types: " <> bulletList (para . describeJSONType <$> tys) diff --git a/src/OpenAPI/Checker/Validate/Schema/JsonFormula.hs b/src/Data/OpenApi/Compare/Validate/Schema/JsonFormula.hs similarity index 97% rename from src/OpenAPI/Checker/Validate/Schema/JsonFormula.hs rename to src/Data/OpenApi/Compare/Validate/Schema/JsonFormula.hs index 332becc..b9e46cd 100644 --- a/src/OpenAPI/Checker/Validate/Schema/JsonFormula.hs +++ b/src/Data/OpenApi/Compare/Validate/Schema/JsonFormula.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Validate.Schema.JsonFormula +module Data.OpenApi.Compare.Validate.Schema.JsonFormula ( Bound (..) , showBound , Property (..) @@ -27,6 +27,10 @@ import Data.Kind import qualified Data.Map as M import Data.Maybe import Data.OpenApi +import Data.OpenApi.Compare.Orphans () +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Schema.DNF +import Data.OpenApi.Compare.Validate.Schema.TypedJson import Data.Ord import Data.Ratio import Data.Scientific @@ -35,10 +39,6 @@ import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as T import Data.Typeable -import OpenAPI.Checker.Orphans () -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Schema.DNF -import OpenAPI.Checker.Validate.Schema.TypedJson import Text.Pandoc.Builder hiding (Format, Null) import Text.Regex.Pcre2 diff --git a/src/OpenAPI/Checker/Validate/Schema/Partition.hs b/src/Data/OpenApi/Compare/Validate/Schema/Partition.hs similarity index 97% rename from src/OpenAPI/Checker/Validate/Schema/Partition.hs rename to src/Data/OpenApi/Compare/Validate/Schema/Partition.hs index b348f66..abd9d31 100644 --- a/src/OpenAPI/Checker/Validate/Schema/Partition.hs +++ b/src/Data/OpenApi/Compare/Validate/Schema/Partition.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Validate.Schema.Partition +module Data.OpenApi.Compare.Validate.Schema.Partition ( partitionSchema , partitionRefSchema , selectPartition @@ -32,17 +32,17 @@ import qualified Data.List.NonEmpty as NE import qualified Data.Map as M import Data.Maybe import Data.OpenApi +import Data.OpenApi.Compare.Memo +import Data.OpenApi.Compare.References +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Schema.DNF +import Data.OpenApi.Compare.Validate.Schema.JsonFormula +import Data.OpenApi.Compare.Validate.Schema.Traced +import Data.OpenApi.Compare.Validate.Schema.TypedJson import Data.Ord import qualified Data.Set as S import Data.Text (Text) import qualified Data.Text as T -import OpenAPI.Checker.Memo -import OpenAPI.Checker.References -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Schema.DNF -import OpenAPI.Checker.Validate.Schema.JsonFormula -import OpenAPI.Checker.Validate.Schema.Traced -import OpenAPI.Checker.Validate.Schema.TypedJson import Text.Pandoc.Builder hiding (Format, Null) data PartitionData diff --git a/src/OpenAPI/Checker/Validate/Schema/Process.hs b/src/Data/OpenApi/Compare/Validate/Schema/Process.hs similarity index 95% rename from src/OpenAPI/Checker/Validate/Schema/Process.hs rename to src/Data/OpenApi/Compare/Validate/Schema/Process.hs index b9aa600..316f8fe 100644 --- a/src/OpenAPI/Checker/Validate/Schema/Process.hs +++ b/src/Data/OpenApi/Compare/Validate/Schema/Process.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Validate.Schema.Process +module Data.OpenApi.Compare.Validate.Schema.Process ( schemaToFormula ) where @@ -14,20 +14,20 @@ import qualified Data.HashMap.Strict.InsOrd as IOHM import qualified Data.Map as M import Data.Maybe import Data.OpenApi hiding (get) +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Memo +import Data.OpenApi.Compare.Paths +import qualified Data.OpenApi.Compare.PathsPrefixTree as P +import Data.OpenApi.Compare.References +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.Schema.DNF +import Data.OpenApi.Compare.Validate.Schema.Issues +import Data.OpenApi.Compare.Validate.Schema.JsonFormula +import Data.OpenApi.Compare.Validate.Schema.Partition +import Data.OpenApi.Compare.Validate.Schema.Traced +import Data.OpenApi.Compare.Validate.Schema.TypedJson import Data.Ord import qualified Data.Set as S -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Memo -import OpenAPI.Checker.Paths -import qualified OpenAPI.Checker.PathsPrefixTree as P -import OpenAPI.Checker.References -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.Schema.DNF -import OpenAPI.Checker.Validate.Schema.Issues -import OpenAPI.Checker.Validate.Schema.JsonFormula -import OpenAPI.Checker.Validate.Schema.Partition -import OpenAPI.Checker.Validate.Schema.Traced -import OpenAPI.Checker.Validate.Schema.TypedJson -- | A fake writer monad that doesn't actually record anything and allows lazy recursion. newtype Silent w a = Silent {runSilent :: a} diff --git a/src/OpenAPI/Checker/Validate/Schema/Traced.hs b/src/Data/OpenApi/Compare/Validate/Schema/Traced.hs similarity index 97% rename from src/OpenAPI/Checker/Validate/Schema/Traced.hs rename to src/Data/OpenApi/Compare/Validate/Schema/Traced.hs index 159b5b6..9c862af 100644 --- a/src/OpenAPI/Checker/Validate/Schema/Traced.hs +++ b/src/Data/OpenApi/Compare/Validate/Schema/Traced.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.Schema.Traced +module Data.OpenApi.Compare.Validate.Schema.Traced ( Step (..) , tracedAllOf , tracedAnyOf @@ -21,9 +21,9 @@ import Data.Functor import qualified Data.HashMap.Strict.InsOrd as IOHM import qualified Data.List.NonEmpty as NE import Data.OpenApi +import Data.OpenApi.Compare.Subtree import qualified Data.Set as S import Data.Text (Text) -import OpenAPI.Checker.Subtree data PartitionChoice = CByEnumValue (S.Set A.Value) diff --git a/src/OpenAPI/Checker/Validate/Schema/TypedJson.hs b/src/Data/OpenApi/Compare/Validate/Schema/TypedJson.hs similarity index 98% rename from src/OpenAPI/Checker/Validate/Schema/TypedJson.hs rename to src/Data/OpenApi/Compare/Validate/Schema/TypedJson.hs index b514344..f4c7760 100644 --- a/src/OpenAPI/Checker/Validate/Schema/TypedJson.hs +++ b/src/Data/OpenApi/Compare/Validate/Schema/TypedJson.hs @@ -1,4 +1,4 @@ -module OpenAPI.Checker.Validate.Schema.TypedJson +module Data.OpenApi.Compare.Validate.Schema.TypedJson ( JsonType (..) , describeJSONType , TypedValue (..) diff --git a/src/OpenAPI/Checker/Validate/SecurityRequirement.hs b/src/Data/OpenApi/Compare/Validate/SecurityRequirement.hs similarity index 95% rename from src/OpenAPI/Checker/Validate/SecurityRequirement.hs rename to src/Data/OpenApi/Compare/Validate/SecurityRequirement.hs index b162a27..5f69ada 100644 --- a/src/OpenAPI/Checker/Validate/SecurityRequirement.hs +++ b/src/Data/OpenApi/Compare/Validate/SecurityRequirement.hs @@ -1,7 +1,7 @@ {-# LANGUAGE PartialTypeSignatures #-} {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.SecurityRequirement +module Data.OpenApi.Compare.Validate.SecurityRequirement ( Issue (..) ) where @@ -17,14 +17,14 @@ import Data.HList import qualified Data.HashMap.Strict.InsOrd as IOHM import qualified Data.List.NonEmpty as NE import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.OAuth2Flows +import Data.OpenApi.Compare.Validate.SecurityScheme () import Data.Set (Set) import qualified Data.Set as S import Data.Text (Text) import Data.Traversable -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.OAuth2Flows -import OpenAPI.Checker.Validate.SecurityScheme () instance Subtree SecurityRequirement where type SubtreeLevel SecurityRequirement = 'SecurityRequirementLevel diff --git a/src/OpenAPI/Checker/Validate/SecurityScheme.hs b/src/Data/OpenApi/Compare/Validate/SecurityScheme.hs similarity index 90% rename from src/OpenAPI/Checker/Validate/SecurityScheme.hs rename to src/Data/OpenApi/Compare/Validate/SecurityScheme.hs index 4f80cf9..3a886bd 100644 --- a/src/OpenAPI/Checker/Validate/SecurityScheme.hs +++ b/src/Data/OpenApi/Compare/Validate/SecurityScheme.hs @@ -1,16 +1,16 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.SecurityScheme +module Data.OpenApi.Compare.Validate.SecurityScheme ( ) where import Control.Monad import Data.OpenApi -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Orphans () -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.OAuth2Flows +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Orphans () +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.OAuth2Flows instance Subtree SecurityScheme where type CheckEnv SecurityScheme = '[] diff --git a/src/OpenAPI/Checker/Validate/Server.hs b/src/Data/OpenApi/Compare/Validate/Server.hs similarity index 95% rename from src/OpenAPI/Checker/Validate/Server.hs rename to src/Data/OpenApi/Compare/Validate/Server.hs index 575a3b5..0e79b26 100644 --- a/src/OpenAPI/Checker/Validate/Server.hs +++ b/src/Data/OpenApi/Compare/Validate/Server.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-orphans #-} -module OpenAPI.Checker.Validate.Server +module Data.OpenApi.Compare.Validate.Server ( Issue (..) ) where @@ -19,15 +19,15 @@ import qualified Data.HashSet.InsOrd as IOHM import qualified Data.HashSet.InsOrd as IOHS import Data.Maybe import Data.OpenApi +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Common +import Data.OpenApi.Compare.Paths +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Validate.MediaTypeObject import qualified Data.Set as S import Data.Text (Text) import qualified Data.Text as T import Data.Traversable -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Common -import OpenAPI.Checker.Paths -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Validate.MediaTypeObject import Text.Pandoc.Builder import Prelude as P @@ -101,7 +101,7 @@ data ServerUrlPart var deriving stock (Eq, Show, Functor, Foldable, Traversable) -- | This is super rough. Things like @{a|b}c@ will not match @ac@. --- FIXME: https://github.com/typeable/openapi-diff/issues/46 +-- FIXME: #46 -- -- NOTE: syntax is defined vaguely in the spec. parseServerUrl :: Text -> [ServerUrlPart Text] diff --git a/src/OpenAPI/Checker/Validate/Sums.hs b/src/Data/OpenApi/Compare/Validate/Sums.hs similarity index 78% rename from src/OpenAPI/Checker/Validate/Sums.hs rename to src/Data/OpenApi/Compare/Validate/Sums.hs index 75885fa..b5e4c67 100644 --- a/src/OpenAPI/Checker/Validate/Sums.hs +++ b/src/Data/OpenApi/Compare/Validate/Sums.hs @@ -1,13 +1,13 @@ -module OpenAPI.Checker.Validate.Sums +module Data.OpenApi.Compare.Validate.Sums ( checkSums ) where import Data.Foldable import Data.Map.Strict (Map) import qualified Data.Map.Strict as M -import OpenAPI.Checker.Behavior -import OpenAPI.Checker.Subtree -import OpenAPI.Checker.Paths +import Data.OpenApi.Compare.Behavior +import Data.OpenApi.Compare.Subtree +import Data.OpenApi.Compare.Paths checkSums :: (Ord k, Issuable l) diff --git a/test/README.md b/test/README.md index 4bbb33f..9dd3448 100644 --- a/test/README.md +++ b/test/README.md @@ -30,7 +30,7 @@ This test would read the files `a.yaml` and `b.yaml` using the `Yaml.decodeFileT ## Supported feature tests -If a test starts with either `x ` or `v `, the test is assumed to test the support of some OpenApi functionality. If the test begins `x ` it means that the feature is expected to be not supported, and the result will only be checked to have an "unsupported" flag set. If it starts with `v ` the test is expected to be supported and the result is compared to some file on disk. +If a test starts with either `x ` or `v `, the test is assumed to test the support of some OpenAPI functionality. If the test begins `x ` it means that the feature is expected to be not supported, and the result will only be checked to have an "unsupported" flag set. If it starts with `v ` the test is expected to be supported and the result is compared to some file on disk. The result will be reflected in the generated compatibility matrix. diff --git a/test/Spec/Golden/TraceTree.hs b/test/Spec/Golden/TraceTree.hs index 7ce1cc8..acc6ba9 100644 --- a/test/Spec/Golden/TraceTree.hs +++ b/test/Spec/Golden/TraceTree.hs @@ -7,11 +7,11 @@ import Control.Category import Control.Exception import qualified Data.ByteString.Lazy as BSL import Data.Default +import Data.OpenApi.Compare.Run +import Data.OpenApi.Compare.Validate.OpenApi () import Data.Text (Text) import qualified Data.Text.Encoding as T import qualified Data.Yaml as Yaml -import OpenAPI.Checker.Run -import OpenAPI.Checker.Validate.OpenApi () import Spec.Golden.Extra import Test.Tasty (TestTree, testGroup) import Text.Pandoc.Builder diff --git a/test/golden/common/bad-oneof-unchanged/report.md b/test/golden/common/bad-oneof-unchanged/report.md index 4eb61a3..f815856 100644 --- a/test/golden/common/bad-oneof-unchanged/report.md +++ b/test/golden/common/bad-oneof-unchanged/report.md @@ -1,19 +1,19 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | [🤷 Unsupported feature changes](#unsupported-changes) | -|---------------------|------------------------|-------------------------------------------------------| -| 0 | 0 | 2 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | [❓ Unsupported feature changes](#unsupported-changes) | +|--------------------|-------------------------|-------------------------------------------------------| +| 0 | 0 | 2 | -# 🤷 Unsupported feature changes +# ❓ Unsupported feature changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request Could not deduce that `oneOf` cases don't overlap. Treating the `oneOf` as an `anyOf`. Reported errors might not be accurate. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 Could not deduce that `oneOf` cases don't overlap. Treating the `oneOf` as an `anyOf`. Reported errors might not be accurate. diff --git a/test/golden/common/enum-added/report.md b/test/golden/common/enum-added/report.md index 0f83007..d4ac335 100644 --- a/test/golden/common/enum-added/report.md +++ b/test/golden/common/enum-added/report.md @@ -1,14 +1,14 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 1 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 1 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(String)` @@ -18,11 +18,11 @@ The following enum value was added: "C" ``` -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(String)` diff --git a/test/golden/common/enum-anyof/report.md b/test/golden/common/enum-anyof/report.md index 70b7698..d7b13ae 100644 --- a/test/golden/common/enum-anyof/report.md +++ b/test/golden/common/enum-anyof/report.md @@ -1,5 +1,5 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|---------------------|------------------------|-------------------------------| -| 0 | 0 | 0 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | +|--------------------|-------------------------| +| 0 | 0 | diff --git a/test/golden/common/id/report.md b/test/golden/common/id/report.md index 70b7698..d7b13ae 100644 --- a/test/golden/common/id/report.md +++ b/test/golden/common/id/report.md @@ -1,5 +1,5 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|---------------------|------------------------|-------------------------------| -| 0 | 0 | 0 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | +|--------------------|-------------------------| +| 0 | 0 | diff --git a/test/golden/common/json/recursive/report.md b/test/golden/common/json/recursive/report.md index 70b7698..d7b13ae 100644 --- a/test/golden/common/json/recursive/report.md +++ b/test/golden/common/json/recursive/report.md @@ -1,5 +1,5 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|---------------------|------------------------|-------------------------------| -| 0 | 0 | 0 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | +|--------------------|-------------------------| +| 0 | 0 | diff --git a/test/golden/common/maximum-lowered/report.md b/test/golden/common/maximum-lowered/report.md index 186cd0c..8d53c70 100644 --- a/test/golden/common/maximum-lowered/report.md +++ b/test/golden/common/maximum-lowered/report.md @@ -1,24 +1,24 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 1 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 1 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Number)` Upper bound changed from 3.0 inclusive to 2.0 inclusive. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Number)` diff --git a/test/golden/common/pathItem/operation/parameters/allowEmptyValue/reset/report.md b/test/golden/common/pathItem/operation/parameters/allowEmptyValue/reset/report.md index 084ed09..d4e3719 100644 --- a/test/golden/common/pathItem/operation/parameters/allowEmptyValue/reset/report.md +++ b/test/golden/common/pathItem/operation/parameters/allowEmptyValue/reset/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 1 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 1 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/parameters/allowEmptyValue/set/report.md b/test/golden/common/pathItem/operation/parameters/allowEmptyValue/set/report.md index df37459..6493a06 100644 --- a/test/golden/common/pathItem/operation/parameters/allowEmptyValue/set/report.md +++ b/test/golden/common/pathItem/operation/parameters/allowEmptyValue/set/report.md @@ -1,10 +1,10 @@ # Summary -| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|---------------------|-------------------------------------------------|-------------------------------| -| 0 | 1 | 0 | +| ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) | +|--------------------|--------------------------------------------------| +| 0 | 1 | -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/parameters/change/report.md b/test/golden/common/pathItem/operation/parameters/change/report.md index 24ee5e4..961be2b 100644 --- a/test/golden/common/pathItem/operation/parameters/change/report.md +++ b/test/golden/common/pathItem/operation/parameters/change/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 1 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 1 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test @@ -16,7 +16,7 @@ The type has been removed. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/parameters/required/false/add/report.md b/test/golden/common/pathItem/operation/parameters/required/false/add/report.md index 70b7698..d7b13ae 100644 --- a/test/golden/common/pathItem/operation/parameters/required/false/add/report.md +++ b/test/golden/common/pathItem/operation/parameters/required/false/add/report.md @@ -1,5 +1,5 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|---------------------|------------------------|-------------------------------| -| 0 | 0 | 0 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | +|--------------------|-------------------------| +| 0 | 0 | diff --git a/test/golden/common/pathItem/operation/parameters/required/false/del/report.md b/test/golden/common/pathItem/operation/parameters/required/false/del/report.md index 70b7698..d7b13ae 100644 --- a/test/golden/common/pathItem/operation/parameters/required/false/del/report.md +++ b/test/golden/common/pathItem/operation/parameters/required/false/del/report.md @@ -1,5 +1,5 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|---------------------|------------------------|-------------------------------| -| 0 | 0 | 0 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | +|--------------------|-------------------------| +| 0 | 0 | diff --git a/test/golden/common/pathItem/operation/parameters/required/reset/report.md b/test/golden/common/pathItem/operation/parameters/required/reset/report.md index 6fedc96..e74287f 100644 --- a/test/golden/common/pathItem/operation/parameters/required/reset/report.md +++ b/test/golden/common/pathItem/operation/parameters/required/reset/report.md @@ -1,10 +1,10 @@ # Summary -| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|---------------------|-------------------------------------------------|-------------------------------| -| 0 | 1 | 0 | +| ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) | +|--------------------|--------------------------------------------------| +| 0 | 1 | -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/parameters/required/set/report.md b/test/golden/common/pathItem/operation/parameters/required/set/report.md index cded916..072ff19 100644 --- a/test/golden/common/pathItem/operation/parameters/required/set/report.md +++ b/test/golden/common/pathItem/operation/parameters/required/set/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 1 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 1 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/parameters/required/true/add/report.md b/test/golden/common/pathItem/operation/parameters/required/true/add/report.md index d8c6989..2925448 100644 --- a/test/golden/common/pathItem/operation/parameters/required/true/add/report.md +++ b/test/golden/common/pathItem/operation/parameters/required/true/add/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 1 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 1 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/parameters/required/true/del/report.md b/test/golden/common/pathItem/operation/parameters/required/true/del/report.md index 09f725d..513d7ee 100644 --- a/test/golden/common/pathItem/operation/parameters/required/true/del/report.md +++ b/test/golden/common/pathItem/operation/parameters/required/true/del/report.md @@ -1,10 +1,10 @@ # Summary -| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|---------------------|-------------------------------------------------|-------------------------------| -| 0 | 1 | 0 | +| ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) | +|--------------------|--------------------------------------------------| +| 0 | 1 | -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/add/report.md b/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/add/report.md index b07e363..650564a 100644 --- a/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/add/report.md +++ b/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/add/report.md @@ -1,10 +1,10 @@ # Summary -| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|---------------------|-------------------------------------------------|-------------------------------| -| 0 | 1 | 0 | +| ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) | +|--------------------|--------------------------------------------------| +| 0 | 1 | -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/change/report.md b/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/change/report.md index 05fa47b..84f539e 100644 --- a/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/change/report.md +++ b/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/change/report.md @@ -1,24 +1,24 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 1 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 1 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(String)` The type has been removed. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Number)` diff --git a/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/del/report.md b/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/del/report.md index b8feef4..79d5bf0 100644 --- a/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/del/report.md +++ b/test/golden/common/pathItem/operation/requestBody/mediaTypeObject/del/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 1 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 1 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/requestBody/required/reset/report.md b/test/golden/common/pathItem/operation/requestBody/required/reset/report.md index ebe67f6..9aa6724 100644 --- a/test/golden/common/pathItem/operation/requestBody/required/reset/report.md +++ b/test/golden/common/pathItem/operation/requestBody/required/reset/report.md @@ -1,10 +1,10 @@ # Summary -| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|---------------------|-------------------------------------------------|-------------------------------| -| 0 | 1 | 0 | +| ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) | +|--------------------|--------------------------------------------------| +| 0 | 1 | -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/requestBody/required/set/report.md b/test/golden/common/pathItem/operation/requestBody/required/set/report.md index 73beda5..52821c1 100644 --- a/test/golden/common/pathItem/operation/requestBody/required/set/report.md +++ b/test/golden/common/pathItem/operation/requestBody/required/set/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 1 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 1 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/responses/add/report.md b/test/golden/common/pathItem/operation/responses/add/report.md index 7bd275f..3dbfd96 100644 --- a/test/golden/common/pathItem/operation/responses/add/report.md +++ b/test/golden/common/pathItem/operation/responses/add/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 1 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 1 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/responses/change/headers/mandatory/add/report.md b/test/golden/common/pathItem/operation/responses/change/headers/mandatory/add/report.md index 6e05bde..cbcb1e7 100644 --- a/test/golden/common/pathItem/operation/responses/change/headers/mandatory/add/report.md +++ b/test/golden/common/pathItem/operation/responses/change/headers/mandatory/add/report.md @@ -1,10 +1,10 @@ # Summary -| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|---------------------|-------------------------------------------------|-------------------------------| -| 0 | 1 | 0 | +| ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) | +|--------------------|--------------------------------------------------| +| 0 | 1 | -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/responses/change/headers/mandatory/del/report.md b/test/golden/common/pathItem/operation/responses/change/headers/mandatory/del/report.md index e9aa73b..6810db1 100644 --- a/test/golden/common/pathItem/operation/responses/change/headers/mandatory/del/report.md +++ b/test/golden/common/pathItem/operation/responses/change/headers/mandatory/del/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 1 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 1 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/responses/change/headers/optional/add/report.md b/test/golden/common/pathItem/operation/responses/change/headers/optional/add/report.md index 70b7698..d7b13ae 100644 --- a/test/golden/common/pathItem/operation/responses/change/headers/optional/add/report.md +++ b/test/golden/common/pathItem/operation/responses/change/headers/optional/add/report.md @@ -1,5 +1,5 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|---------------------|------------------------|-------------------------------| -| 0 | 0 | 0 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | +|--------------------|-------------------------| +| 0 | 0 | diff --git a/test/golden/common/pathItem/operation/responses/change/headers/optional/del/report.md b/test/golden/common/pathItem/operation/responses/change/headers/optional/del/report.md index 70b7698..d7b13ae 100644 --- a/test/golden/common/pathItem/operation/responses/change/headers/optional/del/report.md +++ b/test/golden/common/pathItem/operation/responses/change/headers/optional/del/report.md @@ -1,5 +1,5 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|---------------------|------------------------|-------------------------------| -| 0 | 0 | 0 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | +|--------------------|-------------------------| +| 0 | 0 | diff --git a/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/add/report.md b/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/add/report.md index 9f2dc45..b91bd18 100644 --- a/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/add/report.md +++ b/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/add/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 1 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 1 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/change/report.md b/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/change/report.md index c66da10..4820602 100644 --- a/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/change/report.md +++ b/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/change/report.md @@ -1,24 +1,24 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 1 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 1 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Number)` The type has been added. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(String)` diff --git a/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/del/report.md b/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/del/report.md index f3b858f..e0fc105 100644 --- a/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/del/report.md +++ b/test/golden/common/pathItem/operation/responses/change/mediaTypeObject/del/report.md @@ -1,10 +1,10 @@ # Summary -| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|---------------------|-------------------------------------------------|-------------------------------| -| 0 | 1 | 0 | +| ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) | +|--------------------|--------------------------------------------------| +| 0 | 1 | -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test diff --git a/test/golden/common/pathItem/operation/responses/del/report.md b/test/golden/common/pathItem/operation/responses/del/report.md index 348fa4e..86edee7 100644 --- a/test/golden/common/pathItem/operation/responses/del/report.md +++ b/test/golden/common/pathItem/operation/responses/del/report.md @@ -1,10 +1,10 @@ # Summary -| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|---------------------|-------------------------------------------------|-------------------------------| -| 0 | 1 | 0 | +| ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) | +|--------------------|--------------------------------------------------| +| 0 | 1 | -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test diff --git a/test/golden/common/property-removed-additional/report.md b/test/golden/common/property-removed-additional/report.md index 1593c65..def06e5 100644 --- a/test/golden/common/property-removed-additional/report.md +++ b/test/golden/common/property-removed-additional/report.md @@ -1,14 +1,14 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 3 | 3 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 3 | 3 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$.property2` @@ -21,11 +21,11 @@ 3. The property may not be present. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$.property2` diff --git a/test/golden/common/property-removed/report.md b/test/golden/common/property-removed/report.md index a7d7289..f4c24e3 100644 --- a/test/golden/common/property-removed/report.md +++ b/test/golden/common/property-removed/report.md @@ -1,20 +1,20 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 2 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 2 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$.property2` The property has been removed. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$.property2` diff --git a/test/golden/common/property-required/report.md b/test/golden/common/property-required/report.md index 5a2a868..c39b7a1 100644 --- a/test/golden/common/property-required/report.md +++ b/test/golden/common/property-required/report.md @@ -1,24 +1,24 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 1 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 1 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$.property2` The property has become required. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$.property2` diff --git a/test/golden/common/random-example/report.md b/test/golden/common/random-example/report.md index 997f79d..bdec96e 100644 --- a/test/golden/common/random-example/report.md +++ b/test/golden/common/random-example/report.md @@ -1,14 +1,14 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 5 | 6 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 5 | 6 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **GET** /pets -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$[*].name(String)` @@ -18,7 +18,7 @@ ## **POST** /pets -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$.weight` @@ -33,7 +33,7 @@ Value is now a multiple of 1.0. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **GET** /pets @@ -45,7 +45,7 @@ Value is now a multiple of 1.0. Upper bound changed from 20.0 inclusive to 30.0 inclusive. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$[*].weight` @@ -62,7 +62,7 @@ Value is now a multiple of 1.0. ## **POST** /pets -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$.name(String)` diff --git a/test/golden/common/recursive/report.md b/test/golden/common/recursive/report.md index e3dcb0f..383e1e5 100644 --- a/test/golden/common/recursive/report.md +++ b/test/golden/common/recursive/report.md @@ -1,14 +1,14 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 1 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 1 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **GET** /api/foo -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$.leaf.value.foo(String)` @@ -18,11 +18,11 @@ The following enum value has been added: "a" ``` -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **GET** /api/foo -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$.leaf.value.foo(String)` diff --git a/test/golden/common/security-scheme/report.md b/test/golden/common/security-scheme/report.md index b711c46..43fe92e 100644 --- a/test/golden/common/security-scheme/report.md +++ b/test/golden/common/security-scheme/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 2 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 2 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /oauth/check @@ -22,7 +22,7 @@ Security scheme has been removed. Security scheme has been removed. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /oauth/check diff --git a/test/golden/common/servers/report.md b/test/golden/common/servers/report.md index a8ce5ea..43015d8 100644 --- a/test/golden/common/servers/report.md +++ b/test/golden/common/servers/report.md @@ -1,10 +1,10 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 3 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 3 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **GET** /pets @@ -18,7 +18,7 @@ The server was removed. 2. A variable has been changed from being open to being closed. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **GET** /pets diff --git a/test/golden/common/tuple-items/heterogeneous-component-mismatch/report.md b/test/golden/common/tuple-items/heterogeneous-component-mismatch/report.md index fc870c1..18f84eb 100644 --- a/test/golden/common/tuple-items/heterogeneous-component-mismatch/report.md +++ b/test/golden/common/tuple-items/heterogeneous-component-mismatch/report.md @@ -1,36 +1,36 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 2 | 2 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 2 | 2 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$[1](String)` The type has been removed. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$[1](Object)` The type has been added. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$[1](Object)` The type has been added. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$[1](String)` diff --git a/test/golden/common/tuple-items/heterogeneous-length-mismatch/report.md b/test/golden/common/tuple-items/heterogeneous-length-mismatch/report.md index 656aec1..103f2e1 100644 --- a/test/golden/common/tuple-items/heterogeneous-length-mismatch/report.md +++ b/test/golden/common/tuple-items/heterogeneous-length-mismatch/report.md @@ -1,20 +1,20 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|------------------------------------------|------------------------|-------------------------------| -| 2 | 0 | 0 | +| [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes | +|-----------------------------------------|-------------------------| +| 2 | 0 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Array)` Tuple length changed from 3 to 2. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Array)` diff --git a/test/golden/common/tuple-items/homogeneous-component-mismatch/report.md b/test/golden/common/tuple-items/homogeneous-component-mismatch/report.md index fcccf6b..a013a9c 100644 --- a/test/golden/common/tuple-items/homogeneous-component-mismatch/report.md +++ b/test/golden/common/tuple-items/homogeneous-component-mismatch/report.md @@ -1,14 +1,14 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 4 | 2 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 4 | 2 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Array)` @@ -18,7 +18,7 @@ The array is no longer explicitly defined as a tuple. The type has been removed. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Array)` @@ -28,17 +28,17 @@ The array is no longer explicitly defined as a tuple. The type has been added. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$[0](Number)` The type has been added. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$[0](String)` diff --git a/test/golden/common/tuple-items/homogeneous-length-mismatch/report.md b/test/golden/common/tuple-items/homogeneous-length-mismatch/report.md index 2914805..aa51dea 100644 --- a/test/golden/common/tuple-items/homogeneous-length-mismatch/report.md +++ b/test/golden/common/tuple-items/homogeneous-length-mismatch/report.md @@ -1,14 +1,14 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 5 | 5 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 5 | 5 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test1 -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Array)` @@ -16,7 +16,7 @@ The array is no longer explicitly defined as a tuple. ## **POST** /test2 -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Array)` @@ -24,13 +24,13 @@ The array is no longer explicitly defined as a tuple. ## **POST** /test3 -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Array)` Minimum length of the array changed from 2 to 3. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Array)` @@ -38,11 +38,11 @@ Minimum length of the array changed from 2 to 3. 2. The array is no longer explicitly defined as a tuple. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test1 -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Array)` @@ -50,7 +50,7 @@ The array is no longer explicitly defined as a tuple. ## **POST** /test2 -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Array)` @@ -58,7 +58,7 @@ The array is no longer explicitly defined as a tuple. ## **POST** /test3 -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Array)` @@ -66,7 +66,7 @@ The array is no longer explicitly defined as a tuple. 2. The array is no longer explicitly defined as a tuple. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Array)` diff --git a/test/golden/common/tuple-items/homogeneous-vector/report.md b/test/golden/common/tuple-items/homogeneous-vector/report.md index 70b7698..d7b13ae 100644 --- a/test/golden/common/tuple-items/homogeneous-vector/report.md +++ b/test/golden/common/tuple-items/homogeneous-vector/report.md @@ -1,5 +1,5 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | -|---------------------|------------------------|-------------------------------| -| 0 | 0 | 0 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | +|--------------------|-------------------------| +| 0 | 0 | diff --git a/test/golden/common/type-changing/report.md b/test/golden/common/type-changing/report.md index e18c96b..3cce056 100644 --- a/test/golden/common/type-changing/report.md +++ b/test/golden/common/type-changing/report.md @@ -1,14 +1,14 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 6 | 6 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 6 | 6 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test1 -### 📱➡️ JSON Request +### ➡️☁️ JSON Request Values are now limited to the following types: @@ -16,7 +16,7 @@ Values are now limited to the following types: ## **POST** /test2 -### 📱➡️ JSON Request +### ➡️☁️ JSON Request Values are now limited to the following types: @@ -28,7 +28,7 @@ Values are now limited to the following types: ## **POST** /test3 -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Array)` @@ -36,7 +36,7 @@ The type has been removed. ## **POST** /test4 -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Object)` @@ -44,7 +44,7 @@ The type has been removed. ## **POST** /test5 -### 📱➡️ JSON Request +### ➡️☁️ JSON Request Values are now limited to the following types: @@ -54,11 +54,11 @@ Values are now limited to the following types: Value is now a multiple of 1.0. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test1 -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 Values are now limited to the following types: @@ -66,7 +66,7 @@ Values are now limited to the following types: ## **POST** /test2 -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 Values are now limited to the following types: @@ -78,7 +78,7 @@ Values are now limited to the following types: ## **POST** /test3 -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Array)` @@ -86,7 +86,7 @@ The type has been removed. ## **POST** /test4 -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Object)` @@ -94,7 +94,7 @@ The type has been removed. ## **POST** /test5 -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 Values are now limited to the following types: diff --git a/test/golden/common/unguarded-recursive/report.md b/test/golden/common/unguarded-recursive/report.md index 43fd067..2436248 100644 --- a/test/golden/common/unguarded-recursive/report.md +++ b/test/golden/common/unguarded-recursive/report.md @@ -1,13 +1,13 @@ # Summary -| ⚠️ Breaking changes | 🙆 Non-breaking changes | [🤷 Unsupported feature changes](#unsupported-changes) | -|---------------------|------------------------|-------------------------------------------------------| -| 0 | 0 | 1 | +| ❌ Breaking changes | ⚠️ Non-breaking changes | [❓ Unsupported feature changes](#unsupported-changes) | +|--------------------|-------------------------|-------------------------------------------------------| +| 0 | 0 | 1 | -# 🤷 Unsupported feature changes +# ❓ Unsupported feature changes ## **GET** /api/foo -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 -Encountered recursion that is too complex for OpenApi Diff to untangle. +Encountered recursion that is too complex for CompaREST to untangle. diff --git a/test/golden/common/variant-added/report.md b/test/golden/common/variant-added/report.md index bfb3316..55881d8 100644 --- a/test/golden/common/variant-added/report.md +++ b/test/golden/common/variant-added/report.md @@ -1,24 +1,24 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 1 | 1 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 1 | 1 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### `$(Object)` The case where `$.tag` is `"C"` – has been added. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### `$(Object)` diff --git a/test/golden/common/variant-changed/report.md b/test/golden/common/variant-changed/report.md index 2080510..5235384 100644 --- a/test/golden/common/variant-changed/report.md +++ b/test/golden/common/variant-changed/report.md @@ -1,14 +1,14 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 2 | 2 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 2 | 2 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### In cases where `$.tag` is `"B"` @@ -16,7 +16,7 @@ The type has been removed. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### In cases where `$.tag` is `"B"` @@ -24,11 +24,11 @@ The type has been removed. The type has been added. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### In cases where `$.tag` is `"B"` @@ -36,7 +36,7 @@ The type has been added. The type has been added. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### In cases where `$.tag` is `"B"` diff --git a/test/golden/common/variant-deep-changed/report.md b/test/golden/common/variant-deep-changed/report.md index 9f1098e..9cfd079 100644 --- a/test/golden/common/variant-deep-changed/report.md +++ b/test/golden/common/variant-deep-changed/report.md @@ -1,14 +1,14 @@ # Summary -| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | -|------------------------------------------|-------------------------------------------------|-------------------------------| -| 2 | 2 | 0 | +| [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) | +|-----------------------------------------|--------------------------------------------------| +| 2 | 2 | -# ⚠️ Breaking changes +# ❌ Breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### In cases where `$.desc.name` is `"B"` @@ -16,7 +16,7 @@ The type has been removed. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### In cases where `$.desc.name` is `"B"` @@ -24,11 +24,11 @@ The type has been removed. The type has been added. -# 🙆 Non-breaking changes +# ⚠️ Non-breaking changes ## **POST** /test -### 📱➡️ JSON Request +### ➡️☁️ JSON Request #### In cases where `$.desc.name` is `"B"` @@ -36,7 +36,7 @@ The type has been added. The type has been added. -### 📱⬅️ JSON Response – 200 +### ⬅️☁️ JSON Response – 200 #### In cases where `$.desc.name` is `"B"`