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 <ilyakooo0@gmail.com>
This commit is contained in:
mniip 2021-08-16 13:41:22 +03:00 committed by GitHub
parent c7159b1f76
commit f4fd16d247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
95 changed files with 553 additions and 555 deletions

View File

@ -35,14 +35,14 @@ jobs:
- name: Build - name: Build
run: | 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 - 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 - name: Zip
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
run: | run: |
zip openapi-diff-linux openapi-diff-linux/openapi-diff zip comparest-linux comparest-linux/comparest
- uses: "marvinpinto/action-automatic-releases@latest" - uses: "marvinpinto/action-automatic-releases@latest"
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
with: with:

View File

@ -1,6 +1,6 @@
# Changelog # Changelog
`openapi-diff` uses [PVP Versioning][1]. `comparest` uses [PVP Versioning][1].
## 0.0.0.0 ## 0.0.0.0

View File

@ -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) [![Hackage](https://img.shields.io/hackage/v/comparest.svg?logo=haskell)](https://hackage.haskell.org/package/comparest)
[![Stackage Lts](http://stackage.org/package/openapi-diff/badge/lts)](http://stackage.org/lts/package/openapi-diff) [![Stackage Lts](http://stackage.org/package/comparest/badge/lts)](http://stackage.org/lts/package/comparest)
[![Stackage Nightly](http://stackage.org/package/openapi-diff/badge/nightly)](http://stackage.org/nightly/package/openapi-diff) [![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) [![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
Compatibility checker for OpenAPI 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 # CLI docs
``` ```
Usage: openapi-diff (-c|--client ARG) (-s|--server ARG) Usage: comparest (-c|--client ARG) (-s|--server ARG)
[--silent | --only-breaking | --all] [-o|--output ARG] [--silent | --only-breaking | --all] [-o|--output ARG]
[--folding-block-quotes-style | --header-style] [--folding-block-quotes-style | --header-style]
[--signal-exit-code] [--signal-exit-code]
A tool to check compatibility between two OpenApi specifications. A tool to check compatibility between two OpenAPI specifications.
Usage examples Usage examples
Compare files old.yaml with new.yaml and output the resulting report to Compare files old.yaml with new.yaml and output the resulting report to
stdout: 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 Only output breaking changes and write a styled HTML report to file
report.html: 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: 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 Write full report suitable for embedding into a GitHub comment to
report.html: 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: Available options:
-h,--help Show this help text -h,--help Show this help text

View File

@ -1,12 +1,12 @@
module OpenAPI.Checker.Options module Data.OpenApi.Compare.Options
( Options (..) ( Options (..)
, OutputMode (..) , OutputMode (..)
, parseOptions , parseOptions
) )
where where
import Data.OpenApi.Compare.Report
import GHC.Generics (Generic) import GHC.Generics (Generic)
import OpenAPI.Checker.Report
import Options.Applicative import Options.Applicative
import Options.Applicative.Help hiding (fullDesc) import Options.Applicative.Help hiding (fullDesc)
@ -31,21 +31,21 @@ optionsParserInfo =
info info
(helper <*> optionsParser) (helper <*> optionsParser)
(fullDesc (fullDesc
<> header "openapi-diff" <> header "CompaREST"
<> progDescDoc <> progDescDoc
(Just $ (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 <$$> hardline <> par "Usage examples" <> hardline
<$$> indent <$$> indent
4 4
(par "Compare files old.yaml with new.yaml and output the resulting report to stdout:" (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 <> 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 <> 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 <> 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 :: Parser Options
optionsParser = optionsParser =

View File

@ -10,10 +10,10 @@ import Data.ByteString.Lazy (ByteString)
import Data.Char (toLower) import Data.Char (toLower)
import Data.Functor import Data.Functor
import qualified Data.Map as M import qualified Data.Map as M
import qualified Data.OpenApi.Compare.Report.Html.Template as Html
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TL import qualified Data.Text.Lazy.Encoding as TL
import qualified OpenAPI.Checker.Report.Html.Template as Html
import System.FilePath (takeExtension) import System.FilePath (takeExtension)
import Text.DocTemplates.Internal import Text.DocTemplates.Internal
import Text.Pandoc import Text.Pandoc
@ -80,7 +80,7 @@ formatFromFilePath x =
def def
{ writerTemplate = Just Html.template { writerTemplate = Just Html.template
, -- Not actually used. Needed to silence warning. , -- 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 _ -> Nothing
where where

View File

@ -6,11 +6,11 @@ import Data.Aeson
import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy as BSL
import Data.Default import Data.Default
import Data.Maybe import Data.Maybe
import Data.OpenApi.Compare.Options
import Data.OpenApi.Compare.Run
import qualified Data.Text.IO as T import qualified Data.Text.IO as T
import qualified Data.Yaml as Yaml import qualified Data.Yaml as Yaml
import FormatHeuristic import FormatHeuristic
import OpenAPI.Checker.Options
import OpenAPI.Checker.Run
import System.Exit import System.Exit
import System.IO import System.IO
import Text.Pandoc hiding (report) import Text.Pandoc hiding (report)

View File

@ -1,6 +1,6 @@
# OpenApi comparison benchmarks # 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: To run the benchmarks run the following command in this directory:
@ -12,7 +12,7 @@ nix-build
| Tool | Output file name | | 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` | | [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` | | [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` | | [Tufin OpenApi Diff](https://github.com/tufin/oasdiff) | `oasdiff.txt`, `oasdiff.error.txt` |

View File

@ -1,6 +1,6 @@
{ sources ? import ./nix/sources.nix { sources ? import ./nix/sources.nix
, haskellNix ? import sources.haskellNix { }
, gomod2nix ? sources.gomod2nix , gomod2nix ? sources.gomod2nix
, haskellNix ? (import ../. {}).haskellNix
, pkgs ? import haskellNix.sources.nixpkgs-2105 (haskellNix.nixpkgsArgs // { , pkgs ? import haskellNix.sources.nixpkgs-2105 (haskellNix.nixpkgsArgs // {
overlays = haskellNix.nixpkgsArgs.overlays ++ [ overlays = haskellNix.nixpkgsArgs.overlays ++ [
(self: super: { (self: super: {
@ -8,23 +8,19 @@
}) })
]; ];
}) })
, compaRESThsPkgs ? (import ../. {}).hsPkgs
, npmNix ? import (sources.npmNix + "/npmPackages") { inherit pkgs; } , npmNix ? import (sources.npmNix + "/npmPackages") { inherit pkgs; }
, mavenix ? import (sources.mavenix) { inherit pkgs; } , mavenix ? import (sources.mavenix) { inherit pkgs; }
, bumpToken ? null , bumpToken ? null
, bumpDocumentation ? null , bumpDocumentation ? null
}: }:
let let
typeable-openapi-diff = (pkgs.haskell-nix.stackProject { typeable-comparest = compaRESThsPkgs.comparest.components.exes.comparest;
src = pkgs.haskell-nix.haskellLib.cleanGit { typeable-comparest-exe = typeable-comparest + "/bin/comparest";
name = "openapi-diff"; typeable-comparest-differ = pkgs.writeScript "typeable-comparest-differ" ''
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" ''
#!${pkgs.stdenv.shell} #!${pkgs.stdenv.shell}
set +e 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 exit 0
''; '';
@ -130,7 +126,7 @@ let
}) })
(getInputs root); (getInputs root);
differs = [ differs = [
typeable-openapi-diff-differ typeable-comparest-differ
atlassian-openapi-diff-differ atlassian-openapi-diff-differ
openapitools-openapi-diff-differ openapitools-openapi-diff-differ
oasdiff-differ oasdiff-differ
@ -164,7 +160,7 @@ let
tools = [ tools = [
"Typeable" "Typeable"
"Atlassian" "Atlassian"
"OpenApi Tools" "OpenAPI Tools"
"oasdiff" "oasdiff"
"Bump.sh" "Bump.sh"
]; ];

View File

@ -1,13 +1,13 @@
cabal-version: 2.4 cabal-version: 2.4
name: openapi-diff name: comparest
version: 0.0.0.0 version: 0.0.0.0
synopsis: Compatibility checker for OpenAPI synopsis: Compatibility checker for OpenAPI
description: Compatibility checker for OpenAPI description: Compatibility checker for OpenAPI.
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Aleksey Uymanov author: Typeable
maintainer: Aleksey Uymanov <s9gf4ult@gmail.com> maintainer: comparest@typeable.io
copyright: 2021 Aleksey Uymanov copyright: 2021 Typeable
category: Web category: Web
build-type: Simple build-type: Simple
extra-doc-files: README.md extra-doc-files: README.md
@ -112,51 +112,51 @@ library
, ordered-containers , ordered-containers
, bytestring , bytestring
hs-source-dirs: src hs-source-dirs: src
exposed-modules: Data.HList exposed-modules: Data.OpenApi.Compare.Behavior
, OpenAPI.Checker.Behavior , Data.OpenApi.Compare.Common
, OpenAPI.Checker.Formula , Data.OpenApi.Compare.Formula
, OpenAPI.Checker.Memo , Data.OpenApi.Compare.Memo
, OpenAPI.Checker.Orphans , Data.OpenApi.Compare.Orphans
, OpenAPI.Checker.Paths , Data.OpenApi.Compare.Paths
, OpenAPI.Checker.PathsPrefixTree , Data.OpenApi.Compare.PathsPrefixTree
, OpenAPI.Checker.References , Data.OpenApi.Compare.References
, OpenAPI.Checker.Subtree , Data.OpenApi.Compare.Report
, OpenAPI.Checker.Validate.MediaTypeObject , Data.OpenApi.Compare.Report.Html.Template
, OpenAPI.Checker.Validate.OpenApi , Data.OpenApi.Compare.Report.Jet
, OpenAPI.Checker.Validate.Operation , Data.OpenApi.Compare.Run
, OpenAPI.Checker.Validate.Param , Data.OpenApi.Compare.Subtree
, OpenAPI.Checker.Validate.PathFragment , Data.OpenApi.Compare.Validate.Header
, OpenAPI.Checker.Validate.Products , Data.OpenApi.Compare.Validate.Link
, OpenAPI.Checker.Validate.RequestBody , Data.OpenApi.Compare.Validate.MediaTypeObject
, OpenAPI.Checker.Validate.Responses , Data.OpenApi.Compare.Validate.OAuth2Flows
, OpenAPI.Checker.Validate.Schema , Data.OpenApi.Compare.Validate.OpenApi
, OpenAPI.Checker.Validate.Schema.TypedJson , Data.OpenApi.Compare.Validate.Operation
, OpenAPI.Checker.Validate.Schema.DNF , Data.OpenApi.Compare.Validate.Param
, OpenAPI.Checker.Validate.Schema.Issues , Data.OpenApi.Compare.Validate.PathFragment
, OpenAPI.Checker.Validate.Schema.JsonFormula , Data.OpenApi.Compare.Validate.Products
, OpenAPI.Checker.Validate.Schema.Partition , Data.OpenApi.Compare.Validate.RequestBody
, OpenAPI.Checker.Validate.Schema.Process , Data.OpenApi.Compare.Validate.Responses
, OpenAPI.Checker.Validate.Schema.Traced , Data.OpenApi.Compare.Validate.Schema
, OpenAPI.Checker.Validate.SecurityRequirement , Data.OpenApi.Compare.Validate.Schema.DNF
, OpenAPI.Checker.Validate.Server , Data.OpenApi.Compare.Validate.Schema.Issues
, OpenAPI.Checker.Validate.Sums , Data.OpenApi.Compare.Validate.Schema.JsonFormula
, OpenAPI.Checker.Validate.Header , Data.OpenApi.Compare.Validate.Schema.Partition
, OpenAPI.Checker.Validate.Link , Data.OpenApi.Compare.Validate.Schema.Process
, OpenAPI.Checker.Common , Data.OpenApi.Compare.Validate.Schema.Traced
, OpenAPI.Checker.Validate.SecurityScheme , Data.OpenApi.Compare.Validate.Schema.TypedJson
, OpenAPI.Checker.Validate.OAuth2Flows , Data.OpenApi.Compare.Validate.SecurityRequirement
, OpenAPI.Checker.Report , Data.OpenApi.Compare.Validate.SecurityScheme
, Data.OpenApi.Compare.Validate.Server
, Data.OpenApi.Compare.Validate.Sums
other-modules: Data.HList
, Data.OpenUnion.Extra , Data.OpenUnion.Extra
, OpenAPI.Checker.Report.Jet
, OpenAPI.Checker.Run
, OpenAPI.Checker.Report.Html.Template
executable openapi-diff executable comparest
import: common-options import: common-options
hs-source-dirs: app hs-source-dirs: app
main-is: Main.hs main-is: Main.hs
build-depends: build-depends:
openapi-diff comparest
, pandoc , pandoc
, data-default , data-default
, bytestring , bytestring
@ -173,14 +173,14 @@ executable openapi-diff
-with-rtsopts=-N -with-rtsopts=-N
other-modules: other-modules:
FormatHeuristic FormatHeuristic
OpenAPI.Checker.Options Data.OpenApi.Compare.Options
executable comparest-github-action executable comparest-github-action
import: common-options import: common-options
hs-source-dirs: github-action hs-source-dirs: github-action
main-is: Main.hs main-is: Main.hs
build-depends: build-depends:
openapi-diff comparest
, pandoc , pandoc
, yaml , yaml
, aeson , aeson
@ -198,7 +198,7 @@ executable comparest-github-action
CompaREST.GitHub.API CompaREST.GitHub.API
CompaREST.GitHub.Action.Config CompaREST.GitHub.Action.Config
test-suite openapi-diff-test test-suite comparest-tests
import: common-options import: common-options
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
hs-source-dirs: test hs-source-dirs: test
@ -207,7 +207,7 @@ test-suite openapi-diff-test
Spec.Golden.Extra Spec.Golden.Extra
Spec.Golden.TraceTree Spec.Golden.TraceTree
build-depends: build-depends:
, openapi-diff , comparest
, tasty-golden , tasty-golden
, tasty , tasty
, bytestring , bytestring

View File

@ -12,7 +12,7 @@ let
include = [ include = [
./stack.yaml ./stack.yaml
./stack.yaml.lock ./stack.yaml.lock
./openapi-diff.cabal ./comparest.cabal
]; ];
}; };
@ -21,11 +21,11 @@ let
dontStrip = false; dontStrip = false;
dontPatchELF = false; dontPatchELF = false;
enableDeadCodeElimination = true; enableDeadCodeElimination = true;
packages.openapi-diff.src = nix-filter { packages.comparest.src = nix-filter {
root = ./.; root = ./.;
name = "compaREST-src"; name = "compaREST-src";
include = with nix-filter; [ include = with nix-filter; [
(./openapi-diff.cabal) (./comparest.cabal)
(inDirectory ./test) (inDirectory ./test)
(inDirectory ./src) (inDirectory ./src)
(inDirectory ./app) (inDirectory ./app)
@ -47,15 +47,15 @@ let
compaREST = pkgs.dockerTools.buildImage { compaREST = pkgs.dockerTools.buildImage {
name = "compaREST"; 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 = { config = {
Entrypoint = [ "/bin/openapi-diff" ]; Entrypoint = [ "/bin/comparest" ];
}; };
}; };
compaRESTGithubAction = compaRESTGithubAction =
let 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 ]; } '' 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/pre --add-flags "pre"
makeWrapper ${action}/bin/comparest-github-action $out/bin/run --add-flags "run" makeWrapper ${action}/bin/comparest-github-action $out/bin/run --add-flags "run"
@ -68,4 +68,4 @@ let
}; };
in in
{ inherit compaREST compaRESTGithubAction; } { inherit compaREST compaRESTGithubAction hsPkgs haskellNix; }

View File

@ -7,10 +7,10 @@ import Control.Monad.Freer
import Control.Monad.Freer.Error import Control.Monad.Freer.Error
import Control.Monad.Freer.GitHub import Control.Monad.Freer.GitHub
import Control.Monad.Freer.Reader import Control.Monad.Freer.Reader
import Data.OpenApi.Compare.Run
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Yaml.Aeson as Yaml import qualified Data.Yaml.Aeson as Yaml
import qualified GitHub as GH import qualified GitHub as GH
import OpenAPI.Checker.Run
import System.Environment import System.Environment
import System.Envy (decodeEnv) import System.Envy (decodeEnv)
import System.FilePath ((</>)) import System.FilePath ((</>))

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Behavior module Data.OpenApi.Compare.Behavior
( BehaviorLevel (..) ( BehaviorLevel (..)
, Behavable (..) , Behavable (..)
, IssueKind (..) , IssueKind (..)
@ -15,8 +15,8 @@ where
import Data.Aeson import Data.Aeson
import Data.Kind import Data.Kind
import Data.OpenApi.Compare.Paths
import Data.Typeable import Data.Typeable
import OpenAPI.Checker.Paths
import Text.Pandoc.Builder import Text.Pandoc.Builder
-- | Kind -- | Kind

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Common module Data.OpenApi.Compare.Common
( zipAll ( zipAll
) )
where where

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Formula module Data.OpenApi.Compare.Formula
( FormulaF ( FormulaF
, VarRef , VarRef
, variable , variable
@ -11,10 +11,10 @@ module OpenAPI.Checker.Formula
) where ) where
import Data.Kind import Data.Kind
import Data.Monoid
import qualified Data.List.NonEmpty as NE import qualified Data.List.NonEmpty as NE
import OpenAPI.Checker.Paths import Data.Monoid
import qualified OpenAPI.Checker.PathsPrefixTree as P import Data.OpenApi.Compare.Paths
import qualified Data.OpenApi.Compare.PathsPrefixTree as P
type VarRef = Int type VarRef = Int

View File

@ -1,6 +1,6 @@
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE AllowAmbiguousTypes #-}
-- | Utilities for effectfully memoizing other, more effectful functions. -- | Utilities for effectfully memoizing other, more effectful functions.
module OpenAPI.Checker.Memo module Data.OpenApi.Compare.Memo
( MonadMemo ( MonadMemo
, MemoState , MemoState
, runMemo , runMemo

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Orphans () where module Data.OpenApi.Compare.Orphans () where
import Control.Comonad.Env import Control.Comonad.Env
import qualified Data.HashMap.Strict.InsOrd as IOHM import qualified Data.HashMap.Strict.InsOrd as IOHM

View File

@ -1,7 +1,7 @@
-- | Utilities for traversing heterogeneous trees. A heterogeneous tree is a -- | Utilities for traversing heterogeneous trees. A heterogeneous tree is a
-- collection of datatypes that "contain" eachother in some form of tree -- collection of datatypes that "contain" eachother in some form of tree
-- structure. -- structure.
module OpenAPI.Checker.Paths module Data.OpenApi.Compare.Paths
( NiceQuiver ( NiceQuiver
, AdditionalQuiverConstraints , AdditionalQuiverConstraints
, Paths (..) , Paths (..)

View File

@ -1,6 +1,6 @@
{-# LANGUAGE QuantifiedConstraints #-} {-# LANGUAGE QuantifiedConstraints #-}
module OpenAPI.Checker.PathsPrefixTree module Data.OpenApi.Compare.PathsPrefixTree
( PathsPrefixTree (PathsPrefixNode) ( PathsPrefixTree (PathsPrefixNode)
, AStep (..) , AStep (..)
, empty , empty
@ -27,13 +27,13 @@ import qualified Data.HashMap.Strict as HM
import Data.Kind import Data.Kind
import qualified Data.Map as M import qualified Data.Map as M
import Data.Monoid import Data.Monoid
import Data.OpenApi.Compare.Paths
import qualified Data.Set as S import qualified Data.Set as S
import qualified Data.Text as T import qualified Data.Text as T
import Data.Type.Equality import Data.Type.Equality
import qualified Data.TypeRepMap as TRM import qualified Data.TypeRepMap as TRM
import qualified Data.Vector as V import qualified Data.Vector as V
import qualified GHC.Exts as Exts import qualified GHC.Exts as Exts
import OpenAPI.Checker.Paths
import Type.Reflection import Type.Reflection
import Prelude hiding (filter, map, null, lookup) import Prelude hiding (filter, map, null, lookup)

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.References module Data.OpenApi.Compare.References
( Step (..) ( Step (..)
, dereference , dereference
, Typeable , Typeable
@ -11,9 +11,9 @@ import Data.HList
import qualified Data.HashMap.Strict.InsOrd as IOHM import qualified Data.HashMap.Strict.InsOrd as IOHM
import Data.Maybe import Data.Maybe
import Data.OpenApi import Data.OpenApi
import Data.OpenApi.Compare.Orphans ()
import Data.OpenApi.Compare.Subtree
import Data.Typeable import Data.Typeable
import OpenAPI.Checker.Orphans ()
import OpenAPI.Checker.Subtree
instance Typeable a => Steppable (Referenced a) a where instance Typeable a => Steppable (Referenced a) a where
data Step (Referenced a) a = InlineStep data Step (Referenced a) a = InlineStep

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Report module Data.OpenApi.Compare.Report
( generateReport ( generateReport
, CheckerOutput(..) , CheckerOutput(..)
, ReportInput (..) , ReportInput (..)
@ -23,6 +23,15 @@ import qualified Data.Map as M
import Data.Map.Ordered (OMap) import Data.Map.Ordered (OMap)
import qualified Data.Map.Ordered as OM import qualified Data.Map.Ordered as OM
import Data.Maybe 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
import Data.OpenUnion.Extra import Data.OpenUnion.Extra
import Data.Set import Data.Set
@ -32,15 +41,6 @@ import qualified Data.Text as T
import Data.TypeRepMap hiding (empty) import Data.TypeRepMap hiding (empty)
import Data.Typeable import Data.Typeable
import Generic.Data 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 import Text.Pandoc.Builder
type Changes = P.PathsPrefixTree Behave AnIssue 'APILevel type Changes = P.PathsPrefixTree Behave AnIssue 'APILevel
@ -120,40 +120,42 @@ generateReport cfg inp =
<> twoRowTable <> twoRowTable
(when' (when'
schemaIssuesPresent schemaIssuesPresent
[ ( refOpt schemaIssuesPresent schemaIssuesId " Schema issues" [ ( refOpt schemaIssuesPresent schemaIssuesId "‼️ Schema issues"
, show' $ P.size $ schemaIssues inp , show' $ P.size $ schemaIssues inp
) )
] ]
++ ++
[ ( refOpt breakingChangesPresent breakingChangesId "⚠️ Breaking changes" [ ( refOpt breakingChangesPresent breakingChangesId " Breaking changes"
, show' $ P.size $ breakingChanges inp , show' $ P.size $ breakingChanges inp
) )
] ]
++ when' ++ when'
nonBreakingChangesShown nonBreakingChangesShown
[ ( refOpt nonBreakingChangesPresent nonBreakingChangesId "🙆 Non-breaking changes" [ ( refOpt nonBreakingChangesPresent nonBreakingChangesId "⚠️ Non-breaking changes"
, show' $ P.size $ nonBreakingChanges inp , show' $ P.size $ nonBreakingChanges inp
) )
] ]
++ [ ( refOpt unsupportedChangesPresent unsupportedChangesId "🤷 Unsupported feature changes" ++ when'
, show' $ P.size $ unsupportedChanges inp unsupportedChangesPresent
) [ ( refOpt unsupportedChangesPresent unsupportedChangesId "❓ Unsupported feature changes"
]) , show' $ P.size $ unsupportedChanges inp
)
])
<> when' <> when'
schemaIssuesPresent schemaIssuesPresent
(header 1 (anchor schemaIssuesId <> " Schema issues") (header 1 (anchor schemaIssuesId <> "‼️ Schema issues")
<> builder (showErrs $ schemaIssues inp)) <> builder (showErrs $ schemaIssues inp))
<> when' <> when'
breakingChangesPresent breakingChangesPresent
(header 1 (anchor breakingChangesId <> "⚠️ Breaking changes") (header 1 (anchor breakingChangesId <> " Breaking changes")
<> builder (showErrs $ breakingChanges inp)) <> builder (showErrs $ breakingChanges inp))
<> when' <> when'
(nonBreakingChangesPresent && nonBreakingChangesShown) (nonBreakingChangesPresent && nonBreakingChangesShown)
(header 1 (anchor nonBreakingChangesId <> "🙆 Non-breaking changes") (header 1 (anchor nonBreakingChangesId <> "⚠️ Non-breaking changes")
<> builder (showErrs $ nonBreakingChanges inp)) <> builder (showErrs $ nonBreakingChanges inp))
<> when' <> when'
unsupportedChangesPresent unsupportedChangesPresent
(header 1 (anchor unsupportedChangesId <> "🤷 Unsupported feature changes") (header 1 (anchor unsupportedChangesId <> " Unsupported feature changes")
<> builder (showErrs $ unsupportedChanges inp)) <> builder (showErrs $ unsupportedChanges inp))
status = status =
if if
@ -239,8 +241,8 @@ jets =
, constructReportJet $ \p@(AtPath _) op@(InOperation _) -> , constructReportJet $ \p@(AtPath _) op@(InOperation _) ->
strong (describeBehavior op) <> " " <> describeBehavior p :: Inlines strong (describeBehavior op) <> " " <> describeBehavior p :: Inlines
, constructReportJet $ \(WithStatusCode c) ResponsePayload PayloadSchema -> , constructReportJet $ \(WithStatusCode c) ResponsePayload PayloadSchema ->
"📱⬅️ JSON Response " <> str (T.pack . show $ c) :: Inlines "️☁ JSON Response " <> str (T.pack . show $ c) :: Inlines
, constructReportJet $ \InRequest InPayload PayloadSchema -> "📱➡️ JSON Request" :: Inlines , constructReportJet $ \InRequest InPayload PayloadSchema -> "️☁ JSON Request" :: Inlines
] ]
where where
unwrapReportJetResult :: ReportJetResult Behave x -> ReportJet' Behave x unwrapReportJetResult :: ReportJetResult Behave x -> ReportJet' Behave x

View File

@ -1,6 +1,6 @@
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TemplateHaskell #-}
module OpenAPI.Checker.Report.Html.Template module Data.OpenApi.Compare.Report.Html.Template
( template ( template
) )
where where
@ -24,11 +24,11 @@ template =
\<meta charset=\"utf-8\">\ \<meta charset=\"utf-8\">\
\<title></title>\ \<title></title>\
\<meta name=\"description\" content=\"\">\ \<meta name=\"description\" content=\"\">\
\<meta name=\"generator\" content=\"OpenApi Diff\" />\ \<meta name=\"generator\" content=\"CompaREST\" />\
\<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=yes\" />\ \<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=yes\" />\
\</head>\ \</head>\
\<body>\ \<body>\
\<header><h1> OpenApi Diff</h1></header>\ \<header><h1>CompaREST</h1></header>\
\<main>\ \<main>\
\$body$\ \$body$\
\</main>\ \</main>\

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Report.Jet module Data.OpenApi.Compare.Report.Jet
( ReportJet (..) ( ReportJet (..)
, ReportJet' , ReportJet'
, ConstructReportJet (..) , ConstructReportJet (..)

View File

@ -1,17 +1,17 @@
module OpenAPI.Checker.Run module Data.OpenApi.Compare.Run
( runChecker ( runChecker
, runReport , runReport
, module OpenAPI.Checker.Report , module Data.OpenApi.Compare.Report
) )
where where
import Data.HList import Data.HList
import Data.OpenApi (OpenApi) 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 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 :: (OpenApi, OpenApi) -> CheckerOutput
runChecker (client, server) = runChecker (client, server) =

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Subtree module Data.OpenApi.Compare.Subtree
( Steppable (..) ( Steppable (..)
, Step (..) , Step (..)
, TraceRoot , TraceRoot
@ -60,13 +60,13 @@ import qualified Data.HashMap.Strict.InsOrd as IOHM
import Data.Hashable import Data.Hashable
import Data.Kind import Data.Kind
import Data.OpenApi 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 qualified Data.Set as S
import Data.Typeable 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 class
(Typeable Step, Typeable a, Typeable b, Ord (Step a b), Show (Step a b)) => (Typeable Step, Typeable a, Typeable b, Ord (Step a b), Show (Step a b)) =>

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.Header module Data.OpenApi.Compare.Validate.Header
( (
) )
where where
@ -9,10 +9,10 @@ import Data.Foldable
import Data.Functor import Data.Functor
import Data.Maybe import Data.Maybe
import Data.OpenApi import Data.OpenApi
import OpenAPI.Checker.Behavior import Data.OpenApi.Compare.Behavior
import OpenAPI.Checker.References () import Data.OpenApi.Compare.References ()
import OpenAPI.Checker.Subtree import Data.OpenApi.Compare.Subtree
import OpenAPI.Checker.Validate.Schema () import Data.OpenApi.Compare.Validate.Schema ()
import Text.Pandoc.Builder import Text.Pandoc.Builder
instance Subtree Header where instance Subtree Header where

View File

@ -1,10 +1,10 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.Link () where module Data.OpenApi.Compare.Validate.Link () where
import Data.OpenApi import Data.OpenApi
import OpenAPI.Checker.Behavior import Data.OpenApi.Compare.Behavior
import OpenAPI.Checker.Subtree import Data.OpenApi.Compare.Subtree
import Text.Pandoc.Builder import Text.Pandoc.Builder
instance Subtree Link where instance Subtree Link where
@ -19,4 +19,4 @@ instance Issuable 'LinkLevel where
deriving stock (Eq, Ord, Show) deriving stock (Eq, Ord, Show)
issueKind = \case issueKind = \case
LinksUnsupported -> Unsupported LinksUnsupported -> Unsupported
describeIssue _ LinksUnsupported = para "OpenApi Diff does not currently support Link Objects." describeIssue _ LinksUnsupported = para "CompaREST does not currently support Link Objects."

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.MediaTypeObject module Data.OpenApi.Compare.Validate.MediaTypeObject
( Issue (..) ( Issue (..)
, Behave (..) , Behave (..)
) )
@ -12,15 +12,15 @@ import Data.HList
import Data.HashMap.Strict.InsOrd as IOHM import Data.HashMap.Strict.InsOrd as IOHM
import Data.Map.Strict as M import Data.Map.Strict as M
import Data.OpenApi 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.String
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as T import qualified Data.Text as T
import Network.HTTP.Media (MediaType, mainType, subType) 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 import Text.Pandoc.Builder
tracedSchema :: Traced MediaTypeObject -> Maybe (Traced (Referenced Schema)) 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 _ MediaTypeSchemaRequired = para "Media type expected, but was not specified."
describeIssue Forward (MediaEncodingMissing enc) = para $ "Media encoding " <> str enc <> " has been removed." describeIssue Forward (MediaEncodingMissing enc) = para $ "Media encoding " <> str enc <> " has been removed."
describeIssue Backward (MediaEncodingMissing enc) = para $ "Media encoding " <> str enc <> " added." 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 instance Behavable 'PayloadLevel 'SchemaLevel where
data Behave 'PayloadLevel 'SchemaLevel 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 -- FIXME: Support only JSON body for now. Then Encoding is checked only for
-- multipart/form-url-encoded -- multipart/form-url-encoded
-- https://github.com/typeable/openapi-diff/issues/54 -- #54
checkSemanticCompatibility _env beh _pc = checkSemanticCompatibility _env beh _pc =
issueAt beh EncodingNotSupported issueAt beh EncodingNotSupported

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.OAuth2Flows module Data.OpenApi.Compare.Validate.OAuth2Flows
( Step (..) ( Step (..)
, Issue (..) , Issue (..)
, Behave (..) , Behave (..)
@ -12,13 +12,13 @@ import Data.Function
import Data.Functor import Data.Functor
import qualified Data.HashMap.Strict.InsOrd as IOHM import qualified Data.HashMap.Strict.InsOrd as IOHM
import Data.OpenApi import Data.OpenApi
import Data.OpenApi.Compare.Behavior
import Data.OpenApi.Compare.Orphans ()
import Data.OpenApi.Compare.Subtree
import Data.Proxy import Data.Proxy
import Data.Set (Set) import Data.Set (Set)
import qualified Data.Set as S import qualified Data.Set as S
import Data.Text (Text) import Data.Text (Text)
import OpenAPI.Checker.Behavior
import OpenAPI.Checker.Orphans ()
import OpenAPI.Checker.Subtree
import Text.Pandoc.Builder import Text.Pandoc.Builder
instance Subtree OAuth2Flows where instance Subtree OAuth2Flows where

View File

@ -2,7 +2,7 @@
-- Does not compiles otherwise -- Does not compiles otherwise
{-# OPTIONS_GHC -fconstraint-solver-iterations=0 #-} {-# OPTIONS_GHC -fconstraint-solver-iterations=0 #-}
module OpenAPI.Checker.Validate.OpenApi module Data.OpenApi.Compare.Validate.OpenApi
( Behave (..) ( Behave (..)
, Issue (..) , Issue (..)
) )
@ -11,10 +11,10 @@ where
import Data.HList import Data.HList
import qualified Data.HashMap.Strict.InsOrd as IOHM import qualified Data.HashMap.Strict.InsOrd as IOHM
import Data.OpenApi import Data.OpenApi
import OpenAPI.Checker.Behavior import Data.OpenApi.Compare.Behavior
import OpenAPI.Checker.Paths import Data.OpenApi.Compare.Paths
import OpenAPI.Checker.Subtree import Data.OpenApi.Compare.Subtree
import OpenAPI.Checker.Validate.Operation import Data.OpenApi.Compare.Validate.Operation
tracedPaths :: Traced OpenApi -> Traced ProcessedPathItems tracedPaths :: Traced OpenApi -> Traced ProcessedPathItems
tracedPaths oa = tracedPaths oa =

View File

@ -2,7 +2,7 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -fconstraint-solver-iterations=0 #-} {-# OPTIONS_GHC -fconstraint-solver-iterations=0 #-}
module OpenAPI.Checker.Validate.Operation module Data.OpenApi.Compare.Validate.Operation
( -- * Operation ( -- * Operation
MatchedOperation (..) MatchedOperation (..)
, OperationMethod (..) , OperationMethod (..)
@ -29,21 +29,21 @@ import qualified Data.List as L
import Data.Map.Strict as M import Data.Map.Strict as M
import Data.Maybe import Data.Maybe
import Data.OpenApi 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.String
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as T 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 import Text.Pandoc.Builder
data MatchedOperation = MatchedOperation data MatchedOperation = MatchedOperation
@ -86,7 +86,7 @@ tracedCallbacks (Traced t oper) =
| (k, v) <- IOHM.toList . _operationCallbacks . operation $ oper | (k, v) <- IOHM.toList . _operationCallbacks . operation $ oper
] ]
-- FIXME: https://github.com/typeable/openapi-diff/issues/28 -- FIXME: #28
getServers getServers
:: [Server] -- ^ Servers from env :: [Server] -- ^ Servers from env
-> MatchedOperation -> MatchedOperation
@ -241,7 +241,7 @@ instance Subtree MatchedOperation where
checkProducts beh (const NoRequestBody) (const check) elements checkProducts beh (const NoRequestBody) (const check) elements
checkResponses = checkResponses =
swapProdCons (checkCompatibility beh) env $ tracedResponses <$> prodCons swapProdCons (checkCompatibility beh) env $ tracedResponses <$> prodCons
-- FIXME: https://github.com/typeable/openapi-diff/issues/27 -- FIXME: #27
checkCallbacks = do checkCallbacks = do
let ProdCons pCallbacks cCallbacks = tracedCallbacks <$> prodCons let ProdCons pCallbacks cCallbacks = tracedCallbacks <$> prodCons
for_ pCallbacks $ \(k, pCallback) -> do for_ pCallbacks $ \(k, pCallback) -> do
@ -250,7 +250,7 @@ instance Subtree MatchedOperation where
cCallbacks <&> \(_, cCallback) -> do cCallbacks <&> \(_, cCallback) -> do
swapProdCons (checkCompatibility beh') env $ ProdCons pCallback cCallback swapProdCons (checkCompatibility beh') env $ ProdCons pCallback cCallback
pure () pure ()
-- FIXME: https://github.com/typeable/openapi-diff/issues/28 -- FIXME: #28
checkOperationSecurity = do checkOperationSecurity = do
let ProdCons pSecs cSecs = tracedSecurity <$> prodCons let ProdCons pSecs cSecs = tracedSecurity <$> prodCons
for_ pSecs $ \(i, pSec) -> do for_ pSecs $ \(i, pSec) -> do
@ -564,7 +564,7 @@ instance Issuable 'CallbackLevel where
deriving stock (Eq, Ord, Show) deriving stock (Eq, Ord, Show)
issueKind = \case issueKind = \case
CallbacksUnsupported -> Unsupported 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 Callback -> Traced ProcessedPathItems
tracedCallbackPathItems (Traced t (Callback x)) = tracedCallbackPathItems (Traced t (Callback x)) =

View File

@ -1,7 +1,7 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module OpenAPI.Checker.Validate.Param module Data.OpenApi.Compare.Validate.Param
( Behave (..) ( Behave (..)
, Issue (..) , Issue (..)
) )
@ -11,11 +11,11 @@ import Control.Monad
import Data.Functor import Data.Functor
import Data.Maybe import Data.Maybe
import Data.OpenApi 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 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 import Text.Pandoc.Builder
-- | The type is normalized encoding style of the parameter. If two encoding -- | The type is normalized encoding style of the parameter. If two encoding

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Validate.PathFragment module Data.OpenApi.Compare.Validate.PathFragment
( parsePath ( parsePath
, PathFragment (..) , PathFragment (..)
, PathFragmentParam , PathFragmentParam
@ -7,15 +7,15 @@ where
import qualified Data.Aeson as A import qualified Data.Aeson as A
import Data.OpenApi import Data.OpenApi
import Data.OpenApi.Compare.Behavior
import Data.OpenApi.Compare.Subtree
import Data.OpenApi.Compare.Validate.Param
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as T import qualified Data.Text as T
import Data.Typeable 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. -- 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 :: FilePath -> [PathFragment Text]
parsePath = fmap partition . T.splitOn "/" . T.pack parsePath = fmap partition . T.splitOn "/" . T.pack
where where

View File

@ -12,7 +12,7 @@ and their schemas match.
This module abstracts this logic for arbitrary elements -} This module abstracts this logic for arbitrary elements -}
module OpenAPI.Checker.Validate.Products module Data.OpenApi.Compare.Validate.Products
( checkProducts ( checkProducts
, ProductLike(..) , ProductLike(..)
) where ) where
@ -20,9 +20,9 @@ module OpenAPI.Checker.Validate.Products
import Data.Foldable import Data.Foldable
import Data.Map.Strict (Map) import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M import qualified Data.Map.Strict as M
import OpenAPI.Checker.Behavior import Data.OpenApi.Compare.Behavior
import OpenAPI.Checker.Paths import Data.OpenApi.Compare.Paths
import OpenAPI.Checker.Subtree import Data.OpenApi.Compare.Subtree
-- | Some entity which is product-like -- | Some entity which is product-like
data ProductLike a = ProductLike data ProductLike a = ProductLike

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.RequestBody module Data.OpenApi.Compare.Validate.RequestBody
( Issue (..) ( Issue (..)
, Behave (..) , Behave (..)
) )
@ -11,12 +11,12 @@ import Data.HashMap.Strict.InsOrd as IOHM
import Data.Map.Strict as M import Data.Map.Strict as M
import Data.Maybe import Data.Maybe
import Data.OpenApi 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 qualified Data.Text as T
import Network.HTTP.Media (MediaType) 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 import Text.Pandoc.Builder
-- TODO: Use RequestMediaTypeObjectMapping -- TODO: Use RequestMediaTypeObjectMapping

View File

@ -1,7 +1,7 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module OpenAPI.Checker.Validate.Responses module Data.OpenApi.Compare.Validate.Responses
( Behave (..) ( Behave (..)
) )
where where
@ -11,17 +11,17 @@ import Data.HashMap.Strict.InsOrd as IOHM
import Data.Map.Strict as M import Data.Map.Strict as M
import Data.Maybe import Data.Maybe
import Data.OpenApi 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 qualified Data.Text as T
import Network.HTTP.Media (MediaType) 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 import Text.Pandoc.Builder
tracedResponses :: Traced Responses -> IOHM.InsOrdHashMap HttpStatusCode (Traced (Referenced Response)) tracedResponses :: Traced Responses -> IOHM.InsOrdHashMap HttpStatusCode (Traced (Referenced Response))

View File

@ -1,5 +1,5 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.Schema module Data.OpenApi.Compare.Validate.Schema
( (
) )
where where
@ -15,22 +15,22 @@ import qualified Data.Map as M
import Data.List (group, genericLength, genericIndex) import Data.List (group, genericLength, genericIndex)
import Data.Maybe import Data.Maybe
import Data.OpenApi 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.Ord
import Data.Ratio import Data.Ratio
import Data.Semigroup import Data.Semigroup
import qualified Data.Set as S import qualified Data.Set as S
import Data.Text (Text) 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 checkFormulas
:: (ReassembleHList xs (CheckEnv (Referenced Schema))) :: (ReassembleHList xs (CheckEnv (Referenced Schema)))

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Validate.Schema.DNF module Data.OpenApi.Compare.Validate.Schema.DNF
( DNF (..) ( DNF (..)
, Disjunct (..) , Disjunct (..)
, pattern SingleDisjunct , pattern SingleDisjunct

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.Schema.Issues module Data.OpenApi.Compare.Validate.Schema.Issues
( Issue (..) ( Issue (..)
, Behave (..) , Behave (..)
) )
@ -8,14 +8,14 @@ where
import qualified Data.Aeson as A import qualified Data.Aeson as A
import Data.OpenApi 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.Scientific
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as T 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) import Text.Pandoc.Builder hiding (Format, Null)
instance Issuable 'TypedSchemaLevel where instance Issuable 'TypedSchemaLevel where
@ -263,7 +263,7 @@ instance Issuable 'SchemaLevel where
UnexpectedProperty -> Just () UnexpectedProperty -> Just ()
_ -> Nothing _ -> Nothing
describeIssue _ (NotSupported i) = 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 = describeIssue _ OneOfNotDisjoint =
para $ para $
"Could not deduce that " <> code "oneOf" "Could not deduce that " <> code "oneOf"
@ -275,7 +275,7 @@ instance Issuable 'SchemaLevel where
describeIssue _ (InvalidSchema i) = describeIssue _ (InvalidSchema i) =
para (emph "The schema is invalid: " <> text i <> ".") para (emph "The schema is invalid: " <> text i <> ".")
describeIssue _ UnguardedRecursion = 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 describeIssue Forward (TypesRestricted tys) = case tys of
[] -> para "No longer has any valid values." -- weird [] -> para "No longer has any valid values." -- weird
_ -> para "Values are now limited to the following types: " <> bulletList (para . describeJSONType <$> tys) _ -> para "Values are now limited to the following types: " <> bulletList (para . describeJSONType <$> tys)

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Validate.Schema.JsonFormula module Data.OpenApi.Compare.Validate.Schema.JsonFormula
( Bound (..) ( Bound (..)
, showBound , showBound
, Property (..) , Property (..)
@ -27,6 +27,10 @@ import Data.Kind
import qualified Data.Map as M import qualified Data.Map as M
import Data.Maybe import Data.Maybe
import Data.OpenApi 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.Ord
import Data.Ratio import Data.Ratio
import Data.Scientific import Data.Scientific
@ -35,10 +39,6 @@ import Data.Text (Text)
import qualified Data.Text as T import qualified Data.Text as T
import qualified Data.Text.Encoding as T import qualified Data.Text.Encoding as T
import Data.Typeable 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.Pandoc.Builder hiding (Format, Null)
import Text.Regex.Pcre2 import Text.Regex.Pcre2

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Validate.Schema.Partition module Data.OpenApi.Compare.Validate.Schema.Partition
( partitionSchema ( partitionSchema
, partitionRefSchema , partitionRefSchema
, selectPartition , selectPartition
@ -32,17 +32,17 @@ import qualified Data.List.NonEmpty as NE
import qualified Data.Map as M import qualified Data.Map as M
import Data.Maybe import Data.Maybe
import Data.OpenApi 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 Data.Ord
import qualified Data.Set as S import qualified Data.Set as S
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as T 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) import Text.Pandoc.Builder hiding (Format, Null)
data PartitionData data PartitionData

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Validate.Schema.Process module Data.OpenApi.Compare.Validate.Schema.Process
( schemaToFormula ( schemaToFormula
) )
where where
@ -14,20 +14,20 @@ import qualified Data.HashMap.Strict.InsOrd as IOHM
import qualified Data.Map as M import qualified Data.Map as M
import Data.Maybe import Data.Maybe
import Data.OpenApi hiding (get) 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 Data.Ord
import qualified Data.Set as S 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. -- | A fake writer monad that doesn't actually record anything and allows lazy recursion.
newtype Silent w a = Silent {runSilent :: a} newtype Silent w a = Silent {runSilent :: a}

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.Schema.Traced module Data.OpenApi.Compare.Validate.Schema.Traced
( Step (..) ( Step (..)
, tracedAllOf , tracedAllOf
, tracedAnyOf , tracedAnyOf
@ -21,9 +21,9 @@ import Data.Functor
import qualified Data.HashMap.Strict.InsOrd as IOHM import qualified Data.HashMap.Strict.InsOrd as IOHM
import qualified Data.List.NonEmpty as NE import qualified Data.List.NonEmpty as NE
import Data.OpenApi import Data.OpenApi
import Data.OpenApi.Compare.Subtree
import qualified Data.Set as S import qualified Data.Set as S
import Data.Text (Text) import Data.Text (Text)
import OpenAPI.Checker.Subtree
data PartitionChoice data PartitionChoice
= CByEnumValue (S.Set A.Value) = CByEnumValue (S.Set A.Value)

View File

@ -1,4 +1,4 @@
module OpenAPI.Checker.Validate.Schema.TypedJson module Data.OpenApi.Compare.Validate.Schema.TypedJson
( JsonType (..) ( JsonType (..)
, describeJSONType , describeJSONType
, TypedValue (..) , TypedValue (..)

View File

@ -1,7 +1,7 @@
{-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE PartialTypeSignatures #-}
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.SecurityRequirement module Data.OpenApi.Compare.Validate.SecurityRequirement
( Issue (..) ( Issue (..)
) )
where where
@ -17,14 +17,14 @@ import Data.HList
import qualified Data.HashMap.Strict.InsOrd as IOHM import qualified Data.HashMap.Strict.InsOrd as IOHM
import qualified Data.List.NonEmpty as NE import qualified Data.List.NonEmpty as NE
import Data.OpenApi 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 Data.Set (Set)
import qualified Data.Set as S import qualified Data.Set as S
import Data.Text (Text) import Data.Text (Text)
import Data.Traversable 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 instance Subtree SecurityRequirement where
type SubtreeLevel SecurityRequirement = 'SecurityRequirementLevel type SubtreeLevel SecurityRequirement = 'SecurityRequirementLevel

View File

@ -1,16 +1,16 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.SecurityScheme module Data.OpenApi.Compare.Validate.SecurityScheme
( (
) )
where where
import Control.Monad import Control.Monad
import Data.OpenApi import Data.OpenApi
import OpenAPI.Checker.Behavior import Data.OpenApi.Compare.Behavior
import OpenAPI.Checker.Orphans () import Data.OpenApi.Compare.Orphans ()
import OpenAPI.Checker.Subtree import Data.OpenApi.Compare.Subtree
import OpenAPI.Checker.Validate.OAuth2Flows import Data.OpenApi.Compare.Validate.OAuth2Flows
instance Subtree SecurityScheme where instance Subtree SecurityScheme where
type CheckEnv SecurityScheme = '[] type CheckEnv SecurityScheme = '[]

View File

@ -1,6 +1,6 @@
{-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -Wno-orphans #-}
module OpenAPI.Checker.Validate.Server module Data.OpenApi.Compare.Validate.Server
( Issue (..) ( Issue (..)
) )
where where
@ -19,15 +19,15 @@ import qualified Data.HashSet.InsOrd as IOHM
import qualified Data.HashSet.InsOrd as IOHS import qualified Data.HashSet.InsOrd as IOHS
import Data.Maybe import Data.Maybe
import Data.OpenApi 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 qualified Data.Set as S
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as T import qualified Data.Text as T
import Data.Traversable 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 Text.Pandoc.Builder
import Prelude as P import Prelude as P
@ -101,7 +101,7 @@ data ServerUrlPart var
deriving stock (Eq, Show, Functor, Foldable, Traversable) deriving stock (Eq, Show, Functor, Foldable, Traversable)
-- | This is super rough. Things like @{a|b}c@ will not match @ac@. -- | 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. -- NOTE: syntax is defined vaguely in the spec.
parseServerUrl :: Text -> [ServerUrlPart Text] parseServerUrl :: Text -> [ServerUrlPart Text]

View File

@ -1,13 +1,13 @@
module OpenAPI.Checker.Validate.Sums module Data.OpenApi.Compare.Validate.Sums
( checkSums ( checkSums
) where ) where
import Data.Foldable import Data.Foldable
import Data.Map.Strict (Map) import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M import qualified Data.Map.Strict as M
import OpenAPI.Checker.Behavior import Data.OpenApi.Compare.Behavior
import OpenAPI.Checker.Subtree import Data.OpenApi.Compare.Subtree
import OpenAPI.Checker.Paths import Data.OpenApi.Compare.Paths
checkSums checkSums
:: (Ord k, Issuable l) :: (Ord k, Issuable l)

View File

@ -30,7 +30,7 @@ This test would read the files `a.yaml` and `b.yaml` using the `Yaml.decodeFileT
## Supported feature tests ## 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. The result will be reflected in the generated compatibility matrix.

View File

@ -7,11 +7,11 @@ import Control.Category
import Control.Exception import Control.Exception
import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy as BSL
import Data.Default import Data.Default
import Data.OpenApi.Compare.Run
import Data.OpenApi.Compare.Validate.OpenApi ()
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text.Encoding as T import qualified Data.Text.Encoding as T
import qualified Data.Yaml as Yaml import qualified Data.Yaml as Yaml
import OpenAPI.Checker.Run
import OpenAPI.Checker.Validate.OpenApi ()
import Spec.Golden.Extra import Spec.Golden.Extra
import Test.Tasty (TestTree, testGroup) import Test.Tasty (TestTree, testGroup)
import Text.Pandoc.Builder import Text.Pandoc.Builder

View File

@ -1,19 +1,19 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | [🤷 Unsupported feature changes](#unsupported-changes) | | ❌ Breaking changes | ⚠️ Non-breaking changes | [ Unsupported feature changes](#unsupported-changes) |
|---------------------|------------------------|-------------------------------------------------------| |--------------------|-------------------------|-------------------------------------------------------|
| 0 | 0 | 2 | | 0 | 0 | 2 |
# <span id="unsupported-changes"></span>🤷 Unsupported feature changes # <span id="unsupported-changes"></span> Unsupported feature changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
Could not deduce that `oneOf` cases don't overlap. Treating the `oneOf` Could not deduce that `oneOf` cases don't overlap. Treating the `oneOf`
as an `anyOf`. Reported errors might not be accurate. 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` Could not deduce that `oneOf` cases don't overlap. Treating the `oneOf`
as an `anyOf`. Reported errors might not be accurate. as an `anyOf`. Reported errors might not be accurate.

View File

@ -1,14 +1,14 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 1 | 1 | 0 | | 1 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(String)` #### `$(String)`
@ -18,11 +18,11 @@ The following enum value was added:
"C" "C"
``` ```
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(String)` #### `$(String)`

View File

@ -1,5 +1,5 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | ❌ Breaking changes | ⚠️ Non-breaking changes |
|---------------------|------------------------|-------------------------------| |--------------------|-------------------------|
| 0 | 0 | 0 | | 0 | 0 |

View File

@ -1,5 +1,5 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | ❌ Breaking changes | ⚠️ Non-breaking changes |
|---------------------|------------------------|-------------------------------| |--------------------|-------------------------|
| 0 | 0 | 0 | | 0 | 0 |

View File

@ -1,5 +1,5 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | ❌ Breaking changes | ⚠️ Non-breaking changes |
|---------------------|------------------------|-------------------------------| |--------------------|-------------------------|
| 0 | 0 | 0 | | 0 | 0 |

View File

@ -1,24 +1,24 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 1 | 1 | 0 | | 1 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Number)` #### `$(Number)`
Upper bound changed from 3.0 inclusive to 2.0 inclusive. Upper bound changed from 3.0 inclusive to 2.0 inclusive.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Number)` #### `$(Number)`

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 1 | 0 | 0 | | 1 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) |
|---------------------|-------------------------------------------------|-------------------------------| |--------------------|--------------------------------------------------|
| 0 | 1 | 0 | | 0 | 1 |
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 1 | 1 | 0 | | 1 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
@ -16,7 +16,7 @@
The type has been removed. The type has been removed.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,5 +1,5 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | ❌ Breaking changes | ⚠️ Non-breaking changes |
|---------------------|------------------------|-------------------------------| |--------------------|-------------------------|
| 0 | 0 | 0 | | 0 | 0 |

View File

@ -1,5 +1,5 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | ❌ Breaking changes | ⚠️ Non-breaking changes |
|---------------------|------------------------|-------------------------------| |--------------------|-------------------------|
| 0 | 0 | 0 | | 0 | 0 |

View File

@ -1,10 +1,10 @@
# Summary # Summary
| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) |
|---------------------|-------------------------------------------------|-------------------------------| |--------------------|--------------------------------------------------|
| 0 | 1 | 0 | | 0 | 1 |
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 1 | 0 | 0 | | 1 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 1 | 0 | 0 | | 1 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) |
|---------------------|-------------------------------------------------|-------------------------------| |--------------------|--------------------------------------------------|
| 0 | 1 | 0 | | 0 | 1 |
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) |
|---------------------|-------------------------------------------------|-------------------------------| |--------------------|--------------------------------------------------|
| 0 | 1 | 0 | | 0 | 1 |
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,24 +1,24 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 1 | 1 | 0 | | 1 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(String)` #### `$(String)`
The type has been removed. The type has been removed.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Number)` #### `$(Number)`

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 1 | 0 | 0 | | 1 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) |
|---------------------|-------------------------------------------------|-------------------------------| |--------------------|--------------------------------------------------|
| 0 | 1 | 0 | | 0 | 1 |
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 1 | 0 | 0 | | 1 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 1 | 0 | 0 | | 1 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) |
|---------------------|-------------------------------------------------|-------------------------------| |--------------------|--------------------------------------------------|
| 0 | 1 | 0 | | 0 | 1 |
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 1 | 0 | 0 | | 1 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,5 +1,5 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | ❌ Breaking changes | ⚠️ Non-breaking changes |
|---------------------|------------------------|-------------------------------| |--------------------|-------------------------|
| 0 | 0 | 0 | | 0 | 0 |

View File

@ -1,5 +1,5 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | ❌ Breaking changes | ⚠️ Non-breaking changes |
|---------------------|------------------------|-------------------------------| |--------------------|-------------------------|
| 0 | 0 | 0 | | 0 | 0 |

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 1 | 0 | 0 | | 1 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,24 +1,24 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 1 | 1 | 0 | | 1 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Number)` #### `$(Number)`
The type has been added. The type has been added.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(String)` #### `$(String)`

View File

@ -1,10 +1,10 @@
# Summary # Summary
| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) |
|---------------------|-------------------------------------------------|-------------------------------| |--------------------|--------------------------------------------------|
| 0 | 1 | 0 | | 0 | 1 |
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,10 +1,10 @@
# Summary # Summary
| ⚠️ Breaking changes | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | ❌ Breaking changes | [⚠️ Non-breaking changes](#non-breaking-changes) |
|---------------------|-------------------------------------------------|-------------------------------| |--------------------|--------------------------------------------------|
| 0 | 1 | 0 | | 0 | 1 |
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test

View File

@ -1,14 +1,14 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 3 | 3 | 0 | | 3 | 3 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$.property2` #### `$.property2`
@ -21,11 +21,11 @@
3. The property may not be present. 3. The property may not be present.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$.property2` #### `$.property2`

View File

@ -1,20 +1,20 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 2 | 0 | 0 | | 2 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$.property2` #### `$.property2`
The property has been removed. The property has been removed.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$.property2` #### `$.property2`

View File

@ -1,24 +1,24 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 1 | 1 | 0 | | 1 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$.property2` #### `$.property2`
The property has become required. The property has become required.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$.property2` #### `$.property2`

View File

@ -1,14 +1,14 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 5 | 6 | 0 | | 5 | 6 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **GET** /pets ## **GET** /pets
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$[*].name(String)` #### `$[*].name(String)`
@ -18,7 +18,7 @@
## **POST** /pets ## **POST** /pets
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$.weight` #### `$.weight`
@ -33,7 +33,7 @@
Value is now a multiple of 1.0. Value is now a multiple of 1.0.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **GET** /pets ## **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. Upper bound changed from 20.0 inclusive to 30.0 inclusive.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$[*].weight` #### `$[*].weight`
@ -62,7 +62,7 @@ Value is now a multiple of 1.0.
## **POST** /pets ## **POST** /pets
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$.name(String)` #### `$.name(String)`

View File

@ -1,14 +1,14 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 1 | 1 | 0 | | 1 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **GET** /api/foo ## **GET** /api/foo
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$.leaf.value.foo(String)` #### `$.leaf.value.foo(String)`
@ -18,11 +18,11 @@ The following enum value has been added:
"a" "a"
``` ```
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **GET** /api/foo ## **GET** /api/foo
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$.leaf.value.foo(String)` #### `$.leaf.value.foo(String)`

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 2 | 1 | 0 | | 2 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /oauth/check ## **POST** /oauth/check
@ -22,7 +22,7 @@ Security scheme has been removed.
Security scheme has been removed. Security scheme has been removed.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /oauth/check ## **POST** /oauth/check

View File

@ -1,10 +1,10 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 3 | 1 | 0 | | 3 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **GET** /pets ## **GET** /pets
@ -18,7 +18,7 @@ The server was removed.
2. A variable has been changed from being open to being closed. 2. A variable has been changed from being open to being closed.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **GET** /pets ## **GET** /pets

View File

@ -1,36 +1,36 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 2 | 2 | 0 | | 2 | 2 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$[1](String)` #### `$[1](String)`
The type has been removed. The type has been removed.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$[1](Object)` #### `$[1](Object)`
The type has been added. The type has been added.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$[1](Object)` #### `$[1](Object)`
The type has been added. The type has been added.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$[1](String)` #### `$[1](String)`

View File

@ -1,20 +1,20 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | ⚠️ Non-breaking changes |
|------------------------------------------|------------------------|-------------------------------| |-----------------------------------------|-------------------------|
| 2 | 0 | 0 | | 2 | 0 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Array)` #### `$(Array)`
Tuple length changed from 3 to 2. Tuple length changed from 3 to 2.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Array)` #### `$(Array)`

View File

@ -1,14 +1,14 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 4 | 2 | 0 | | 4 | 2 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Array)` #### `$(Array)`
@ -18,7 +18,7 @@ The array is no longer explicitly defined as a tuple.
The type has been removed. The type has been removed.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Array)` #### `$(Array)`
@ -28,17 +28,17 @@ The array is no longer explicitly defined as a tuple.
The type has been added. The type has been added.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$[0](Number)` #### `$[0](Number)`
The type has been added. The type has been added.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$[0](String)` #### `$[0](String)`

View File

@ -1,14 +1,14 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 5 | 5 | 0 | | 5 | 5 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test1 ## **POST** /test1
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Array)` #### `$(Array)`
@ -16,7 +16,7 @@ The array is no longer explicitly defined as a tuple.
## **POST** /test2 ## **POST** /test2
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Array)` #### `$(Array)`
@ -24,13 +24,13 @@ The array is no longer explicitly defined as a tuple.
## **POST** /test3 ## **POST** /test3
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Array)` #### `$(Array)`
Minimum length of the array changed from 2 to 3. Minimum length of the array changed from 2 to 3.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Array)` #### `$(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. 2. The array is no longer explicitly defined as a tuple.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test1 ## **POST** /test1
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Array)` #### `$(Array)`
@ -50,7 +50,7 @@ The array is no longer explicitly defined as a tuple.
## **POST** /test2 ## **POST** /test2
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Array)` #### `$(Array)`
@ -58,7 +58,7 @@ The array is no longer explicitly defined as a tuple.
## **POST** /test3 ## **POST** /test3
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Array)` #### `$(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. 2. The array is no longer explicitly defined as a tuple.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Array)` #### `$(Array)`

View File

@ -1,5 +1,5 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | 🤷 Unsupported feature changes | | ❌ Breaking changes | ⚠️ Non-breaking changes |
|---------------------|------------------------|-------------------------------| |--------------------|-------------------------|
| 0 | 0 | 0 | | 0 | 0 |

View File

@ -1,14 +1,14 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 6 | 6 | 0 | | 6 | 6 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test1 ## **POST** /test1
### 📱➡️ JSON Request ### ➡️☁ JSON Request
Values are now limited to the following types: Values are now limited to the following types:
@ -16,7 +16,7 @@ Values are now limited to the following types:
## **POST** /test2 ## **POST** /test2
### 📱➡️ JSON Request ### ➡️☁ JSON Request
Values are now limited to the following types: Values are now limited to the following types:
@ -28,7 +28,7 @@ Values are now limited to the following types:
## **POST** /test3 ## **POST** /test3
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Array)` #### `$(Array)`
@ -36,7 +36,7 @@ The type has been removed.
## **POST** /test4 ## **POST** /test4
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Object)` #### `$(Object)`
@ -44,7 +44,7 @@ The type has been removed.
## **POST** /test5 ## **POST** /test5
### 📱➡️ JSON Request ### ➡️☁ JSON Request
Values are now limited to the following types: 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. Value is now a multiple of 1.0.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test1 ## **POST** /test1
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
Values are now limited to the following types: Values are now limited to the following types:
@ -66,7 +66,7 @@ Values are now limited to the following types:
## **POST** /test2 ## **POST** /test2
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
Values are now limited to the following types: Values are now limited to the following types:
@ -78,7 +78,7 @@ Values are now limited to the following types:
## **POST** /test3 ## **POST** /test3
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Array)` #### `$(Array)`
@ -86,7 +86,7 @@ The type has been removed.
## **POST** /test4 ## **POST** /test4
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Object)` #### `$(Object)`
@ -94,7 +94,7 @@ The type has been removed.
## **POST** /test5 ## **POST** /test5
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
Values are now limited to the following types: Values are now limited to the following types:

View File

@ -1,13 +1,13 @@
# Summary # Summary
| ⚠️ Breaking changes | 🙆 Non-breaking changes | [🤷 Unsupported feature changes](#unsupported-changes) | | ❌ Breaking changes | ⚠️ Non-breaking changes | [ Unsupported feature changes](#unsupported-changes) |
|---------------------|------------------------|-------------------------------------------------------| |--------------------|-------------------------|-------------------------------------------------------|
| 0 | 0 | 1 | | 0 | 0 | 1 |
# <span id="unsupported-changes"></span>🤷 Unsupported feature changes # <span id="unsupported-changes"></span> Unsupported feature changes
## **GET** /api/foo ## **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.

View File

@ -1,24 +1,24 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 1 | 1 | 0 | | 1 | 1 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### `$(Object)` #### `$(Object)`
The case where `$.tag` is `"C"` has been added. The case where `$.tag` is `"C"` has been added.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### `$(Object)` #### `$(Object)`

View File

@ -1,14 +1,14 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 2 | 2 | 0 | | 2 | 2 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### In cases where `$.tag` is `"B"` #### In cases where `$.tag` is `"B"`
@ -16,7 +16,7 @@
The type has been removed. The type has been removed.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### In cases where `$.tag` is `"B"` #### In cases where `$.tag` is `"B"`
@ -24,11 +24,11 @@ The type has been removed.
The type has been added. The type has been added.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### In cases where `$.tag` is `"B"` #### In cases where `$.tag` is `"B"`
@ -36,7 +36,7 @@ The type has been added.
The type has been added. The type has been added.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### In cases where `$.tag` is `"B"` #### In cases where `$.tag` is `"B"`

View File

@ -1,14 +1,14 @@
# Summary # Summary
| [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes | | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
|------------------------------------------|-------------------------------------------------|-------------------------------| |-----------------------------------------|--------------------------------------------------|
| 2 | 2 | 0 | | 2 | 2 |
# <span id="breaking-changes"></span>⚠️ Breaking changes # <span id="breaking-changes"></span> Breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### In cases where `$.desc.name` is `"B"` #### In cases where `$.desc.name` is `"B"`
@ -16,7 +16,7 @@
The type has been removed. The type has been removed.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### In cases where `$.desc.name` is `"B"` #### In cases where `$.desc.name` is `"B"`
@ -24,11 +24,11 @@ The type has been removed.
The type has been added. The type has been added.
# <span id="non-breaking-changes"></span>🙆 Non-breaking changes # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
## **POST** /test ## **POST** /test
### 📱➡️ JSON Request ### ➡️☁ JSON Request
#### In cases where `$.desc.name` is `"B"` #### In cases where `$.desc.name` is `"B"`
@ -36,7 +36,7 @@ The type has been added.
The type has been added. The type has been added.
### 📱⬅️ JSON Response 200 ### ⬅️☁ JSON Response 200
#### In cases where `$.desc.name` is `"B"` #### In cases where `$.desc.name` is `"B"`