Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Definitions = InsOrdHashMap Text
- data OpenApi = OpenApi { }
- lowerOpenApiSpecVersion :: Version
- upperOpenApiSpecVersion :: Version
-
data
Info
=
Info
{
- _infoTitle :: Text
- _infoDescription :: Maybe Text
- _infoTermsOfService :: Maybe Text
- _infoContact :: Maybe Contact
- _infoLicense :: Maybe License
- _infoVersion :: Text
-
data
Contact
=
Contact
{
- _contactName :: Maybe Text
- _contactUrl :: Maybe URL
- _contactEmail :: Maybe Text
-
data
License
=
License
{
- _licenseName :: Text
- _licenseUrl :: Maybe URL
- data Server = Server { }
- data ServerVariable = ServerVariable { }
-
data
Components
=
Components
{
- _componentsSchemas :: Definitions Schema
- _componentsResponses :: Definitions Response
- _componentsParameters :: Definitions Param
- _componentsExamples :: Definitions Example
- _componentsRequestBodies :: Definitions RequestBody
- _componentsHeaders :: Definitions Header
- _componentsSecuritySchemes :: SecurityDefinitions
- _componentsLinks :: Definitions Link
- _componentsCallbacks :: Definitions Callback
-
data
PathItem
=
PathItem
{
- _pathItemSummary :: Maybe Text
- _pathItemDescription :: Maybe Text
- _pathItemGet :: Maybe Operation
- _pathItemPut :: Maybe Operation
- _pathItemPost :: Maybe Operation
- _pathItemDelete :: Maybe Operation
- _pathItemOptions :: Maybe Operation
- _pathItemHead :: Maybe Operation
- _pathItemPatch :: Maybe Operation
- _pathItemTrace :: Maybe Operation
- _pathItemServers :: [ Server ]
- _pathItemParameters :: [ Referenced Param ]
-
data
Operation
=
Operation
{
- _operationTags :: InsOrdHashSet TagName
- _operationSummary :: Maybe Text
- _operationDescription :: Maybe Text
- _operationExternalDocs :: Maybe ExternalDocs
- _operationOperationId :: Maybe Text
- _operationParameters :: [ Referenced Param ]
- _operationRequestBody :: Maybe ( Referenced RequestBody )
- _operationResponses :: Responses
- _operationCallbacks :: InsOrdHashMap Text ( Referenced Callback )
- _operationDeprecated :: Maybe Bool
- _operationSecurity :: [ SecurityRequirement ]
- _operationServers :: [ Server ]
- mediaTypeConstr :: Constr
- mediaTypeData :: DataType
- data RequestBody = RequestBody { }
- data MediaTypeObject = MediaTypeObject { }
- data Style
- data Encoding = Encoding { }
-
newtype
MimeList
=
MimeList
{
- getMimeList :: [ MediaType ]
- mimeListConstr :: Constr
- mimeListDataType :: DataType
-
data
Param
=
Param
{
- _paramName :: Text
- _paramDescription :: Maybe Text
- _paramRequired :: Maybe Bool
- _paramDeprecated :: Maybe Bool
- _paramIn :: ParamLocation
- _paramAllowEmptyValue :: Maybe Bool
- _paramAllowReserved :: Maybe Bool
- _paramSchema :: Maybe ( Referenced Schema )
- _paramStyle :: Maybe Style
- _paramExplode :: Maybe Bool
- _paramExample :: Maybe Value
- _paramExamples :: InsOrdHashMap Text ( Referenced Example )
- data Example = Example { }
-
data
ExpressionOrValue
- = Expression Text
- | Value Value
- data Link = Link { }
-
data
OpenApiItems
where
- OpenApiItemsObject :: Referenced Schema -> OpenApiItems
- OpenApiItemsArray :: [ Referenced Schema ] -> OpenApiItems
- data OpenApiType where
-
data
ParamLocation
- = ParamQuery
- | ParamHeader
- | ParamPath
- | ParamCookie
- type Format = Text
- type ParamName = Text
-
data
Schema
=
Schema
{
- _schemaTitle :: Maybe Text
- _schemaDescription :: Maybe Text
- _schemaRequired :: [ ParamName ]
- _schemaNullable :: Maybe Bool
- _schemaAllOf :: Maybe [ Referenced Schema ]
- _schemaOneOf :: Maybe [ Referenced Schema ]
- _schemaNot :: Maybe ( Referenced Schema )
- _schemaAnyOf :: Maybe [ Referenced Schema ]
- _schemaProperties :: InsOrdHashMap Text ( Referenced Schema )
- _schemaAdditionalProperties :: Maybe AdditionalProperties
- _schemaDiscriminator :: Maybe Discriminator
- _schemaReadOnly :: Maybe Bool
- _schemaWriteOnly :: Maybe Bool
- _schemaXml :: Maybe Xml
- _schemaExternalDocs :: Maybe ExternalDocs
- _schemaExample :: Maybe Value
- _schemaDeprecated :: Maybe Bool
- _schemaMaxProperties :: Maybe Integer
- _schemaMinProperties :: Maybe Integer
- _schemaDefault :: Maybe Value
- _schemaType :: Maybe OpenApiType
- _schemaFormat :: Maybe Format
- _schemaItems :: Maybe OpenApiItems
- _schemaMaximum :: Maybe Scientific
- _schemaExclusiveMaximum :: Maybe Bool
- _schemaMinimum :: Maybe Scientific
- _schemaExclusiveMinimum :: Maybe Bool
- _schemaMaxLength :: Maybe Integer
- _schemaMinLength :: Maybe Integer
- _schemaPattern :: Maybe Pattern
- _schemaMaxItems :: Maybe Integer
- _schemaMinItems :: Maybe Integer
- _schemaUniqueItems :: Maybe Bool
- _schemaEnum :: Maybe [ Value ]
- _schemaMultipleOf :: Maybe Scientific
- type Pattern = Text
- data Discriminator = Discriminator { }
- data NamedSchema = NamedSchema { }
-
data
Xml
=
Xml
{
- _xmlName :: Maybe Text
- _xmlNamespace :: Maybe Text
- _xmlPrefix :: Maybe Text
- _xmlAttribute :: Maybe Bool
- _xmlWrapped :: Maybe Bool
- data Responses = Responses { }
- type HttpStatusCode = Int
- data Response = Response { }
- newtype Callback = Callback ( InsOrdHashMap Text PathItem )
- type HeaderName = Text
-
data
Header
=
Header
{
- _headerDescription :: Maybe HeaderName
- _headerRequired :: Maybe Bool
- _headerDeprecated :: Maybe Bool
- _headerAllowEmptyValue :: Maybe Bool
- _headerExplode :: Maybe Bool
- _headerExample :: Maybe Value
- _headerExamples :: InsOrdHashMap Text ( Referenced Example )
- _headerSchema :: Maybe ( Referenced Schema )
- data ApiKeyLocation
- data ApiKeyParams = ApiKeyParams { }
- type AuthorizationURL = Text
- type TokenURL = Text
- newtype OAuth2ImplicitFlow = OAuth2ImplicitFlow { }
- newtype OAuth2PasswordFlow = OAuth2PasswordFlow { }
- newtype OAuth2ClientCredentialsFlow = OAuth2ClientCredentialsFlow { }
- data OAuth2AuthorizationCodeFlow = OAuth2AuthorizationCodeFlow { }
-
data
OAuth2Flow
p =
OAuth2Flow
{
- _oAuth2Params :: p
- _oAath2RefreshUrl :: Maybe URL
- _oAuth2Scopes :: InsOrdHashMap Text Text
- data OAuth2Flows = OAuth2Flows { }
- type BearerFormat = Text
- data HttpSchemeType
- data SecuritySchemeType
- data SecurityScheme = SecurityScheme { }
- newtype SecurityDefinitions = SecurityDefinitions ( Definitions SecurityScheme )
- newtype SecurityRequirement = SecurityRequirement { }
- type TagName = Text
- data Tag = Tag { }
- data ExternalDocs = ExternalDocs { }
-
newtype
Reference
=
Reference
{
- getReference :: Text
- data Referenced a
- newtype URL = URL { }
- data AdditionalProperties
- newtype OpenApiSpecVersion = OpenApiSpecVersion { }
- referencedToJSON :: ToJSON a => Text -> Referenced a -> Value
- referencedParseJSON :: FromJSON a => Text -> Value -> Parser ( Referenced a)
Documentation
>>>
:seti -XDataKinds
>>>
import Data.Aeson
>>>
import Data.ByteString.Lazy.Char8 as BSL
>>>
import Data.OpenApi.Internal.Utils
type Definitions = InsOrdHashMap Text Source #
A list of definitions that can be used in references.
This is the root document object for the API specification.
OpenApi | |
|
Instances
lowerOpenApiSpecVersion :: Version Source #
This is the lower version of the OpenApi Spec this library can parse or produce
upperOpenApiSpecVersion :: Version Source #
This is the upper version of the OpenApi Spec this library can parse or produce
The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
Info | |
|
Instances
Contact information for the exposed API.
Contact | |
|
Instances
License information for the exposed API.
License | |
|
Instances
Eq License Source # | |
Data License Source # | |
Defined in Data.OpenApi.Internal gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> License -> c License Source # gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c License Source # toConstr :: License -> Constr Source # dataTypeOf :: License -> DataType Source # dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c License ) Source # dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c License ) Source # gmapT :: ( forall b. Data b => b -> b) -> License -> License Source # gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> License -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> License -> r Source # gmapQ :: ( forall d. Data d => d -> u) -> License -> [u] Source # gmapQi :: Int -> ( forall d. Data d => d -> u) -> License -> u Source # gmapM :: Monad m => ( forall d. Data d => d -> m d) -> License -> m License Source # gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> License -> m License Source # gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> License -> m License Source # |
|
Show License Source # | |
IsString License Source # | |
Defined in Data.OpenApi.Internal fromString :: String -> License Source # |
|
Generic License Source # | |
ToJSON License Source # | |
FromJSON License Source # | |
HasName License Text Source # | |
(k ~ A_Lens , a ~ Text , b ~ Text ) => LabelOptic "name" k License License a b Source # | |
Defined in Data.OpenApi.Optics |
|
(k ~ A_Lens , a ~ Maybe URL , b ~ Maybe URL ) => LabelOptic "url" k License License a b Source # | |
Defined in Data.OpenApi.Optics |
|
HasUrl License ( Maybe URL ) Source # | |
HasLicense Info ( Maybe License ) Source # | |
type Rep License Source # | |
Defined in Data.OpenApi.Internal
type
Rep
License
=
D1
('
MetaData
"License" "Data.OpenApi.Internal" "openapi3-3.2.3-DDms5mjbCFD41v1R6d21dC" '
False
) (
C1
('
MetaCons
"License" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"_licenseName") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
Text
)
:*:
S1
('
MetaSel
('
Just
"_licenseUrl") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
(
Maybe
URL
))))
|
An object representing a Server.
Server | |
|
Instances
data ServerVariable Source #
ServerVariable | |
|
Instances
data Components Source #
Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
Instances
Describes the operations available on a single path.
A
may be empty, due to ACL constraints.
The path itself is still exposed to the documentation viewer
but they will not know which operations and parameters are available.
PathItem
PathItem | |
|
Instances
Describes a single API operation on a path.
Operation | |
|