| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Acolyte.Codegen.Parse
Description
Parse OpenAPI 3.x and Swagger 2.0 specs into the shared IR.
Auto-detects the version from the "openapi" or "swagger" field.
Synopsis
- parseSpec :: Value -> Either ParseError ApiIR
- data ParseError
Documentation
parseSpec :: Value -> Either ParseError ApiIR Source #
Parse a JSON Value into ApiIR. Auto-detects Swagger 2.0 vs OpenAPI 3.x.
data ParseError Source #
Errors that can occur when parsing an OpenAPI or Swagger spec.
Constructors
| UnknownVersion !Text | |
| MissingField !Text | |
| InvalidJSON !Text |
Instances
| Show ParseError Source # | |
Defined in Acolyte.Codegen.Parse Methods showsPrec :: Int -> ParseError -> ShowS # show :: ParseError -> String # showList :: [ParseError] -> ShowS # | |