Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains function to resolve references within the OpenAPI specification
Synopsis
- type ReferenceMap = Map Text ComponentReference
- data ComponentReference
- buildReferenceMap :: OpenApiSpecification -> ReferenceMap
- getSchemaReference :: Text -> ReferenceMap -> Maybe SchemaObject
- getResponseReference :: Text -> ReferenceMap -> Maybe ResponseObject
- getParameterReference :: Text -> ReferenceMap -> Maybe ParameterObject
- getExampleReference :: Text -> ReferenceMap -> Maybe ExampleObject
- getRequestBodyReference :: Text -> ReferenceMap -> Maybe RequestBodyObject
- getHeaderReference :: Text -> ReferenceMap -> Maybe HeaderObject
- getSecuritySchemeReference :: Text -> ReferenceMap -> Maybe SecuritySchemeObject
Documentation
type ReferenceMap = Map Text ComponentReference Source #
A lookup table for references within the OpenAPI specification
data ComponentReference Source #
Represents all types the ReferenceMap
can hold
Instances
buildReferenceMap :: OpenApiSpecification -> ReferenceMap Source #
Creates a ReferenceMap
from an OpenApiSpecification
containing all elements within components.
It does not capture possibly referenced locations anywhere else in the specification.
getSchemaReference :: Text -> ReferenceMap -> Maybe SchemaObject Source #
Resolve a SchemaObject
reference from a ReferenceMap
getResponseReference :: Text -> ReferenceMap -> Maybe ResponseObject Source #
Resolve a ResponseObject
reference from a ReferenceMap
getParameterReference :: Text -> ReferenceMap -> Maybe ParameterObject Source #
Resolve a ParameterObject
reference from a ReferenceMap
getExampleReference :: Text -> ReferenceMap -> Maybe ExampleObject Source #
Resolve a ExampleObject
reference from a ReferenceMap
getRequestBodyReference :: Text -> ReferenceMap -> Maybe RequestBodyObject Source #
Resolve a RequestBodyObject
reference from a ReferenceMap
getHeaderReference :: Text -> ReferenceMap -> Maybe HeaderObject Source #
Resolve a HeaderObject
reference from a ReferenceMap
getSecuritySchemeReference :: Text -> ReferenceMap -> Maybe SecuritySchemeObject Source #
Resolve a SecuritySchemeObject
reference from a ReferenceMap