1module OpenAPI.Checker.Run (runChecker) where
4import qualified Data.ByteString.Char8 as BSC
6import qualified Data.Yaml as Yaml
7import OpenAPI.Checker.Options
8import OpenAPI.Checker.Subtree
9import OpenAPI.Checker.Paths
10import OpenAPI.Checker.Validate.OpenApi ()
11import Prelude hiding (id, (.))
15 opts <- execParser optionsParserInfo
16 let parseSchema path =
17 eitherDecodeFileStrict path >>= \case
19 Yaml.decodeFileEither path >>= \case
21 putStrLn "Could not parse as json or yaml"
22 putStrLn $ show jsonErr
23 putStrLn $ show yamlErr
27 a <- traced Root <$> parseSchema (clientFile opts)
28 b <- traced Root <$> parseSchema (serverFile opts)
29 let report = runCompatFormula $ checkCompatibility HNil Root (ProdCons a b)
30 BSC.putStrLn $ Yaml.encode report
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list