-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Swagger 2.0 data model -- -- Please see README.md @package swagger2 @version 0.4.1 module Data.Swagger.Internal.Utils hashMapMapKeys :: (Eq k', Hashable k') => (k -> k') -> HashMap k v -> HashMap k' v hashMapTraverseKeys :: (Eq k', Hashable k', Applicative f) => (k -> f k') -> HashMap k v -> f (HashMap k' v) hashMapReadKeys :: (Eq k, Read k, Hashable k, Alternative f) => HashMap String v -> f (HashMap k v) jsonPrefix :: String -> Options deriveToJSON' :: Name -> Q [Dec] deriveJSONDefault :: Name -> Q [Dec] deriveJSON' :: Name -> Q [Dec] genericToJSONWithSub :: (Generic a, GToJSON (Rep a)) => Text -> Options -> a -> Value genericParseJSONWithSub :: (Generic a, GFromJSON (Rep a)) => Text -> Options -> Value -> Parser a (<+>) :: Value -> Value -> Value withDefaults :: (Value -> Parser a) -> [Pair] -> Value -> Parser a genericMempty :: (Generic a, GMonoid (Rep a)) => a genericMappend :: (Generic a, GMonoid (Rep a)) => a -> a -> a class GMonoid f gmempty :: GMonoid f => f p gmappend :: GMonoid f => f p -> f p -> f p class SwaggerMonoid m where swaggerMempty = mempty swaggerMappend = mappend swaggerMempty :: SwaggerMonoid m => m swaggerMappend :: SwaggerMonoid m => m -> m -> m instance Data.Swagger.Internal.Utils.GMonoid GHC.Generics.U1 instance (Data.Swagger.Internal.Utils.GMonoid f, Data.Swagger.Internal.Utils.GMonoid g) => Data.Swagger.Internal.Utils.GMonoid (f GHC.Generics.:*: g) instance Data.Swagger.Internal.Utils.SwaggerMonoid a => Data.Swagger.Internal.Utils.GMonoid (GHC.Generics.K1 i a) instance Data.Swagger.Internal.Utils.GMonoid f => Data.Swagger.Internal.Utils.GMonoid (GHC.Generics.M1 i t f) instance Data.Swagger.Internal.Utils.SwaggerMonoid [a] instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Text.Internal.Text instance Data.Swagger.Internal.Utils.SwaggerMonoid (GHC.Base.Maybe a) module Data.Swagger.Internal -- | This is the root document object for the API specification. data Swagger Swagger :: Info -> Maybe Host -> Maybe FilePath -> Maybe [Scheme] -> MimeList -> MimeList -> Paths -> HashMap Text Schema -> HashMap Text Parameter -> HashMap Text Response -> HashMap Text SecurityScheme -> [SecurityRequirement] -> [Tag] -> Maybe ExternalDocs -> Swagger -- | Provides metadata about the API. The metadata can be used by the -- clients if needed. [_info] :: Swagger -> Info -- | The host (name or ip) serving the API. It MAY include a port. If the -- host is not included, the host serving the documentation is to be used -- (including the port). [_host] :: Swagger -> Maybe Host -- | The base path on which the API is served, which is relative to the -- host. If it is not included, the API is served directly under the -- host. The value MUST start with a leading slash (/). [_basePath] :: Swagger -> Maybe FilePath -- | The transfer protocol of the API. If the schemes is not included, the -- default scheme to be used is the one used to access the Swagger -- definition itself. [_schemes] :: Swagger -> Maybe [Scheme] -- | A list of MIME types the APIs can consume. This is global to all APIs -- but can be overridden on specific API calls. [_consumes] :: Swagger -> MimeList -- | A list of MIME types the APIs can produce. This is global to all APIs -- but can be overridden on specific API calls. [_produces] :: Swagger -> MimeList -- | The available paths and operations for the API. [_paths] :: Swagger -> Paths -- | An object to hold data types produced and consumed by operations. [_definitions] :: Swagger -> HashMap Text Schema -- | An object to hold parameters that can be used across operations. This -- property does not define global parameters for all operations. [_parameters] :: Swagger -> HashMap Text Parameter -- | An object to hold responses that can be used across operations. This -- property does not define global responses for all operations. [_responses] :: Swagger -> HashMap Text Response -- | Security scheme definitions that can be used across the specification. [_securityDefinitions] :: Swagger -> HashMap Text SecurityScheme -- | A declaration of which security schemes are applied for the API as a -- whole. The list of values describes alternative security schemes that -- can be used (that is, there is a logical OR between the security -- requirements). Individual operations can override this definition. [_security] :: Swagger -> [SecurityRequirement] -- | A list of tags used by the specification with additional metadata. The -- order of the tags can be used to reflect on their order by the parsing -- tools. Not all tags that are used by the Operation Object must be -- declared. The tags that are not declared may be organized randomly or -- based on the tools' logic. Each tag name in the list MUST be unique. [_tags] :: Swagger -> [Tag] -- | Additional external documentation. [_externalDocs] :: Swagger -> Maybe ExternalDocs -- | The object provides metadata about the API. The metadata can be used -- by the clients if needed, and can be presented in the Swagger-UI for -- convenience. data Info Info :: Text -> Maybe Text -> Maybe Text -> Maybe Contact -> Maybe License -> Text -> Info -- | The title of the application. [_infoTitle] :: Info -> Text -- | A short description of the application. GFM syntax can be used for -- rich text representation. [_infoDescription] :: Info -> Maybe Text -- | The Terms of Service for the API. [_infoTermsOfService] :: Info -> Maybe Text -- | The contact information for the exposed API. [_infoContact] :: Info -> Maybe Contact -- | The license information for the exposed API. [_infoLicense] :: Info -> Maybe License -- | Provides the version of the application API (not to be confused with -- the specification version). [_infoVersion] :: Info -> Text -- | Contact information for the exposed API. data Contact Contact :: Maybe Text -> Maybe URL -> Maybe Text -> Contact -- | The identifying name of the contact person/organization. [_contactName] :: Contact -> Maybe Text -- | The URL pointing to the contact information. [_contactUrl] :: Contact -> Maybe URL -- | The email address of the contact person/organization. [_contactEmail] :: Contact -> Maybe Text -- | License information for the exposed API. data License License :: Text -> Maybe URL -> License -- | The license name used for the API. [_licenseName] :: License -> Text -- | A URL to the license used for the API. [_licenseUrl] :: License -> Maybe URL -- | The host (name or ip) serving the API. It MAY include a port. data Host Host :: HostName -> Maybe PortNumber -> Host -- | Host name. [_hostName] :: Host -> HostName -- | Optional port. [_hostPort] :: Host -> Maybe PortNumber -- | The transfer protocol of the API. data Scheme Http :: Scheme Https :: Scheme Ws :: Scheme Wss :: Scheme -- | The available paths and operations for the API. data Paths Paths :: HashMap FilePath PathItem -> Paths -- | Holds the relative paths to the individual endpoints. The path is -- appended to the basePath in order to construct the -- full URL. [_pathsMap] :: Paths -> HashMap FilePath PathItem -- | Describes the operations available on a single path. A -- PathItem 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. data PathItem PathItem :: Maybe Operation -> Maybe Operation -> Maybe Operation -> Maybe Operation -> Maybe Operation -> Maybe Operation -> Maybe Operation -> [Referenced Parameter] -> PathItem -- | A definition of a GET operation on this path. [_pathItemGet] :: PathItem -> Maybe Operation -- | A definition of a PUT operation on this path. [_pathItemPut] :: PathItem -> Maybe Operation -- | A definition of a POST operation on this path. [_pathItemPost] :: PathItem -> Maybe Operation -- | A definition of a DELETE operation on this path. [_pathItemDelete] :: PathItem -> Maybe Operation -- | A definition of a OPTIONS operation on this path. [_pathItemOptions] :: PathItem -> Maybe Operation -- | A definition of a HEAD operation on this path. [_pathItemHead] :: PathItem -> Maybe Operation -- | A definition of a PATCH operation on this path. [_pathItemPatch] :: PathItem -> Maybe Operation -- | A list of parameters that are applicable for all the operations -- described under this path. These parameters can be overridden at the -- operation level, but cannot be removed there. The list MUST NOT -- include duplicated parameters. A unique parameter is defined by a -- combination of a name and location. [_pathItemParameters] :: PathItem -> [Referenced Parameter] -- | Describes a single API operation on a path. data Operation Operation :: [Text] -> Maybe Text -> Maybe Text -> Maybe ExternalDocs -> Maybe Text -> Maybe MimeList -> Maybe MimeList -> [Referenced Parameter] -> Responses -> Maybe [Scheme] -> Maybe Bool -> [SecurityRequirement] -> Operation -- | A list of tags for API documentation control. Tags can be used for -- logical grouping of operations by resources or any other qualifier. [_operationTags] :: Operation -> [Text] -- | A short summary of what the operation does. For maximum readability in -- the swagger-ui, this field SHOULD be less than 120 characters. [_operationSummary] :: Operation -> Maybe Text -- | A verbose explanation of the operation behavior. GFM syntax can be -- used for rich text representation. [_operationDescription] :: Operation -> Maybe Text -- | Additional external documentation for this operation. [_operationExternalDocs] :: Operation -> Maybe ExternalDocs -- | Unique string used to identify the operation. The id MUST be unique -- among all operations described in the API. Tools and libraries MAY use -- the it to uniquely identify an operation, therefore, it is recommended -- to follow common programming naming conventions. [_operationOperationId] :: Operation -> Maybe Text -- | A list of MIME types the operation can consume. This overrides the -- consumes. Just [] MAY be used to clear the -- global definition. [_operationConsumes] :: Operation -> Maybe MimeList -- | A list of MIME types the operation can produce. This overrides the -- produces. Just [] MAY be used to clear the -- global definition. [_operationProduces] :: Operation -> Maybe MimeList -- | A list of parameters that are applicable for this operation. If a -- parameter is already defined at the PathItem, the new -- definition will override it, but can never remove it. The list MUST -- NOT include duplicated parameters. A unique parameter is defined by a -- combination of a name and location. [_operationParameters] :: Operation -> [Referenced Parameter] -- | The list of possible responses as they are returned from executing -- this operation. [_operationResponses] :: Operation -> Responses -- | The transfer protocol for the operation. The value overrides -- schemes. [_operationSchemes] :: Operation -> Maybe [Scheme] -- | Declares this operation to be deprecated. Usage of the declared -- operation should be refrained. Default value is False. [_operationDeprecated] :: Operation -> Maybe Bool -- | A declaration of which security schemes are applied for this -- operation. The list of values describes alternative security schemes -- that can be used (that is, there is a logical OR between the security -- requirements). This definition overrides any declared top-level -- security. To remove a top-level security declaration, Just [] -- can be used. [_operationSecurity] :: Operation -> [SecurityRequirement] newtype MimeList MimeList :: [MediaType] -> MimeList [getMimeList] :: MimeList -> [MediaType] -- | Describes a single operation parameter. A unique parameter is defined -- by a combination of a name and location. data Parameter Parameter :: Text -> Maybe Text -> Maybe Bool -> ParameterSchema -> Parameter -- | The name of the parameter. Parameter names are case sensitive. [_parameterName] :: Parameter -> Text -- | A brief description of the parameter. This could contain examples of -- use. GFM syntax can be used for rich text representation. [_parameterDescription] :: Parameter -> Maybe Text -- | Determines whether this parameter is mandatory. If the parameter is in -- "path", this property is required and its value MUST be true. -- Otherwise, the property MAY be included and its default value is -- False. [_parameterRequired] :: Parameter -> Maybe Bool -- | Parameter schema. [_parameterSchema] :: Parameter -> ParameterSchema data ParameterSchema ParameterBody :: (Referenced Schema) -> ParameterSchema ParameterOther :: ParameterOtherSchema -> ParameterSchema data ParameterOtherSchema ParameterOtherSchema :: ParameterLocation -> ParameterType -> Maybe Format -> Maybe Bool -> Maybe Items -> Maybe CollectionFormat -> SchemaCommon -> ParameterOtherSchema -- | The location of the parameter. [_parameterOtherSchemaIn] :: ParameterOtherSchema -> ParameterLocation -- | The type of the parameter. Since the parameter is not located at the -- request body, it is limited to simple types (that is, not an object). -- If type is ParamFile, the consumes MUST be -- either "multipartform-data" or " -- applicationx-www-form-urlencoded" and the parameter MUST be in -- ParameterFormData. [_parameterOtherSchemaType] :: ParameterOtherSchema -> ParameterType -- | The extending format for the previously mentioned type. [_parameterOtherSchemaFormat] :: ParameterOtherSchema -> Maybe Format -- | Sets the ability to pass empty-valued parameters. This is valid only -- for either ParameterQuery or -- ParameterFormData and allows you to send a parameter -- with a name only or an empty value. Default value is False. [_parameterOtherSchemaAllowEmptyValue] :: ParameterOtherSchema -> Maybe Bool -- | Required if type is ParamArray. Describes the -- type of items in the array. [_parameterOtherSchemaItems] :: ParameterOtherSchema -> Maybe Items -- | Determines the format of the array if ParamArray is -- used. Default value is csv. [_parameterOtherSchemaCollectionFormat] :: ParameterOtherSchema -> Maybe CollectionFormat [_parameterOtherSchemaCommon] :: ParameterOtherSchema -> SchemaCommon data ParameterType ParamString :: ParameterType ParamNumber :: ParameterType ParamInteger :: ParameterType ParamBoolean :: ParameterType ParamArray :: ParameterType ParamFile :: ParameterType data ParameterLocation -- | Parameters that are appended to the URL. For example, in -- /items?id=###, the query parameter is id. ParameterQuery :: ParameterLocation -- | Custom headers that are expected as part of the request. ParameterHeader :: ParameterLocation -- | Used together with Path Templating, where the parameter value is -- actually part of the operation's URL. This does not include the host -- or base path of the API. For example, in -- items{itemId}, the path parameter is itemId. ParameterPath :: ParameterLocation -- | Used to describe the payload of an HTTP request when either -- application/x-www-form-urlencoded or -- multipart/form-data are used as the content type of the -- request (in Swagger's definition, the consumes property of an -- operation). This is the only parameter type that can be used to send -- files, thus supporting the ParamFile type. Since form -- parameters are sent in the payload, they cannot be declared together -- with a body parameter for the same operation. Form parameters have a -- different format based on the content-type used (for further details, -- consult -- http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4). ParameterFormData :: ParameterLocation type Format = Text -- | Determines the format of the array. data CollectionFormat -- | Comma separated values: foo,bar. CollectionCSV :: CollectionFormat -- | Space separated values: foo bar. CollectionSSV :: CollectionFormat -- | Tab separated values: foo\tbar. CollectionTSV :: CollectionFormat -- | Pipe separated values: foo|bar. CollectionPipes :: CollectionFormat -- | Corresponds to multiple parameter instances instead of multiple values -- for a single instance foo=bar&foo=baz. This is valid only -- for parameters in ParameterQuery or -- ParameterFormData. CollectionMulti :: CollectionFormat data ItemsType ItemsString :: ItemsType ItemsNumber :: ItemsType ItemsInteger :: ItemsType ItemsBoolean :: ItemsType ItemsArray :: ItemsType data SchemaType SchemaArray :: SchemaType SchemaBoolean :: SchemaType SchemaInteger :: SchemaType SchemaNumber :: SchemaType SchemaNull :: SchemaType SchemaObject :: SchemaType SchemaString :: SchemaType -- | Determines the format of the nested array. data ItemsCollectionFormat -- | Comma separated values: foo,bar. ItemsCollectionCSV :: ItemsCollectionFormat -- | Space separated values: foo bar. ItemsCollectionSSV :: ItemsCollectionFormat -- | Tab separated values: foo\tbar. ItemsCollectionTSV :: ItemsCollectionFormat -- | Pipe separated values: foo|bar. ItemsCollectionPipes :: ItemsCollectionFormat type ParamName = Text data Schema Schema :: SchemaType -> Maybe Format -> Maybe Text -> Maybe Text -> [ParamName] -> Maybe SchemaItems -> Maybe [Schema] -> HashMap Text (Referenced Schema) -> Maybe Schema -> Maybe Text -> Maybe Bool -> Maybe Xml -> Maybe ExternalDocs -> Maybe Value -> Maybe Integer -> Maybe Integer -> SchemaCommon -> Schema [_schemaType] :: Schema -> SchemaType [_schemaFormat] :: Schema -> Maybe Format [_schemaTitle] :: Schema -> Maybe Text [_schemaDescription] :: Schema -> Maybe Text [_schemaRequired] :: Schema -> [ParamName] [_schemaItems] :: Schema -> Maybe SchemaItems [_schemaAllOf] :: Schema -> Maybe [Schema] [_schemaProperties] :: Schema -> HashMap Text (Referenced Schema) [_schemaAdditionalProperties] :: Schema -> Maybe Schema [_schemaDiscriminator] :: Schema -> Maybe Text [_schemaReadOnly] :: Schema -> Maybe Bool [_schemaXml] :: Schema -> Maybe Xml [_schemaExternalDocs] :: Schema -> Maybe ExternalDocs [_schemaExample] :: Schema -> Maybe Value [_schemaMaxProperties] :: Schema -> Maybe Integer [_schemaMinProperties] :: Schema -> Maybe Integer [_schemaSchemaCommon] :: Schema -> SchemaCommon data SchemaItems SchemaItemsObject :: (Referenced Schema) -> SchemaItems SchemaItemsArray :: [Referenced Schema] -> SchemaItems data SchemaCommon SchemaCommon :: Maybe Value -> Maybe Scientific -> Maybe Bool -> Maybe Scientific -> Maybe Bool -> Maybe Integer -> Maybe Integer -> Maybe Text -> Maybe Integer -> Maybe Integer -> Maybe Bool -> Maybe [Value] -> Maybe Scientific -> SchemaCommon -- | Declares the value of the parameter that the server will use if none -- is provided, for example a "count" to control the number of -- results per page might default to 100 if not supplied by the -- client in the request. (Note: "default" has no meaning for required -- parameters.) Unlike JSON Schema this value MUST conform to the defined -- type for this parameter. [_schemaCommonDefault] :: SchemaCommon -> Maybe Value [_schemaCommonMaximum] :: SchemaCommon -> Maybe Scientific [_schemaCommonExclusiveMaximum] :: SchemaCommon -> Maybe Bool [_schemaCommonMinimum] :: SchemaCommon -> Maybe Scientific [_schemaCommonExclusiveMinimum] :: SchemaCommon -> Maybe Bool [_schemaCommonMaxLength] :: SchemaCommon -> Maybe Integer [_schemaCommonMinLength] :: SchemaCommon -> Maybe Integer [_schemaCommonPattern] :: SchemaCommon -> Maybe Text [_schemaCommonMaxItems] :: SchemaCommon -> Maybe Integer [_schemaCommonMinItems] :: SchemaCommon -> Maybe Integer [_schemaCommonUniqueItems] :: SchemaCommon -> Maybe Bool [_schemaCommonEnum] :: SchemaCommon -> Maybe [Value] [_schemaCommonMultipleOf] :: SchemaCommon -> Maybe Scientific data Xml Xml :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Bool -> Maybe Bool -> Xml -- | Replaces the name of the element/attribute used for the described -- schema property. When defined within the Items -- (items), it will affect the name of the individual XML elements within -- the list. When defined alongside type being array (outside the items), -- it will affect the wrapping element and only if wrapped is true. If -- wrapped is false, it will be ignored. [_xmlName] :: Xml -> Maybe Text -- | The URL of the namespace definition. Value SHOULD be in the form of a -- URL. [_xmlNamespace] :: Xml -> Maybe Text -- | The prefix to be used for the name. [_xmlPrefix] :: Xml -> Maybe Text -- | Declares whether the property definition translates to an attribute -- instead of an element. Default value is False. [_xmlAttribute] :: Xml -> Maybe Bool -- | MAY be used only for an array definition. Signifies whether the array -- is wrapped (for example, -- <books><book><book></books>) -- or unwrapped (<book><book>). Default value -- is False. The definition takes effect only when defined -- alongside type being array (outside the items). [_xmlWrapped] :: Xml -> Maybe Bool data Items Items :: ItemsType -> Maybe Format -> Maybe Items -> Maybe ItemsCollectionFormat -> SchemaCommon -> Items -- | The internal type of the array. [_itemsType] :: Items -> ItemsType -- | The extending format for the previously mentioned type. [_itemsFormat] :: Items -> Maybe Format -- | Required if type is ItemsArray. Describes the -- type of items in the array. [_itemsItems] :: Items -> Maybe Items -- | Determines the format of the array if type array is used. Default -- value is ItemsCollectionCSV. [_itemsCollectionFormat] :: Items -> Maybe ItemsCollectionFormat [_itemsCommon] :: Items -> SchemaCommon -- | A container for the expected responses of an operation. The container -- maps a HTTP response code to the expected response. It is not expected -- from the documentation to necessarily cover all possible HTTP response -- codes, since they may not be known in advance. However, it is expected -- from the documentation to cover a successful operation response and -- any known errors. data Responses Responses :: Maybe (Referenced Response) -> HashMap HttpStatusCode (Referenced Response) -> Responses -- | The documentation of responses other than the ones declared for -- specific HTTP response codes. It can be used to cover undeclared -- responses. [_responsesDefault] :: Responses -> Maybe (Referenced Response) -- | Any HTTP status code can be used as the property name (one property -- per HTTP status code). Describes the expected response for those HTTP -- status codes. [_responsesResponses] :: Responses -> HashMap HttpStatusCode (Referenced Response) type HttpStatusCode = Int -- | Describes a single response from an API Operation. data Response Response :: Text -> Maybe (Referenced Schema) -> HashMap HeaderName Header -> Maybe Example -> Response -- | A short description of the response. GFM syntax can be used for rich -- text representation. [_responseDescription] :: Response -> Text -- | A definition of the response structure. It can be a primitive, an -- array or an object. If this field does not exist, it means no content -- is returned as part of the response. As an extension to the Schema -- Object, its root type value may also be "file". This SHOULD be -- accompanied by a relevant produces mime-type. [_responseSchema] :: Response -> Maybe (Referenced Schema) -- | A list of headers that are sent with the response. [_responseHeaders] :: Response -> HashMap HeaderName Header -- | An example of the response message. [_responseExamples] :: Response -> Maybe Example type HeaderName = Text data Header Header :: Maybe Text -> ItemsType -> Maybe Format -> Maybe Items -> Maybe ItemsCollectionFormat -> SchemaCommon -> Header -- | A short description of the header. [_headerDescription] :: Header -> Maybe Text -- | The type of the object. [_headerType] :: Header -> ItemsType -- | The extending format for the previously mentioned type. See Data Type -- Formats for further details. [_headerFormat] :: Header -> Maybe Format -- | Required if type is ItemsArray. Describes the -- type of items in the array. [_headerItems] :: Header -> Maybe Items -- | Determines the format of the array if type array is used. Default -- value is ItemsCollectionCSV. [_headerCollectionFormat] :: Header -> Maybe ItemsCollectionFormat [_headerCommon] :: Header -> SchemaCommon data Example Example :: Map MediaType Value -> Example [getExample] :: Example -> Map MediaType Value -- | The location of the API key. data ApiKeyLocation ApiKeyQuery :: ApiKeyLocation ApiKeyHeader :: ApiKeyLocation data ApiKeyParams ApiKeyParams :: Text -> ApiKeyLocation -> ApiKeyParams -- | The name of the header or query parameter to be used. [_apiKeyName] :: ApiKeyParams -> Text -- | The location of the API key. [_apiKeyIn] :: ApiKeyParams -> ApiKeyLocation -- | The authorization URL to be used for OAuth2 flow. This SHOULD be in -- the form of a URL. type AuthorizationURL = Text -- | The token URL to be used for OAuth2 flow. This SHOULD be in the form -- of a URL. type TokenURL = Text data OAuth2Flow OAuth2Implicit :: AuthorizationURL -> OAuth2Flow OAuth2Password :: TokenURL -> OAuth2Flow OAuth2Application :: TokenURL -> OAuth2Flow OAuth2AccessCode :: AuthorizationURL -> TokenURL -> OAuth2Flow data OAuth2Params OAuth2Params :: OAuth2Flow -> HashMap Text Text -> OAuth2Params -- | The flow used by the OAuth2 security scheme. [_oauth2Flow] :: OAuth2Params -> OAuth2Flow -- | The available scopes for the OAuth2 security scheme. [_oauth2Scopes] :: OAuth2Params -> HashMap Text Text data SecuritySchemeType SecuritySchemeBasic :: SecuritySchemeType SecuritySchemeApiKey :: ApiKeyParams -> SecuritySchemeType SecuritySchemeOAuth2 :: OAuth2Params -> SecuritySchemeType data SecurityScheme SecurityScheme :: SecuritySchemeType -> Maybe Text -> SecurityScheme -- | The type of the security scheme. [_securitySchemeType] :: SecurityScheme -> SecuritySchemeType -- | A short description for security scheme. [_securitySchemeDescription] :: SecurityScheme -> Maybe Text -- | Lists the required security schemes to execute this operation. The -- object can have multiple security schemes declared in it which are all -- required (that is, there is a logical AND between the schemes). newtype SecurityRequirement SecurityRequirement :: HashMap Text [Text] -> SecurityRequirement [getSecurityRequirement] :: SecurityRequirement -> HashMap Text [Text] -- | Allows adding meta data to a single tag that is used by -- Operation. It is not mandatory to have a Tag per tag -- used there. data Tag Tag :: Text -> Maybe Text -> Maybe ExternalDocs -> Tag -- | The name of the tag. [_tagName] :: Tag -> Text -- | A short description for the tag. GFM syntax can be used for rich text -- representation. [_tagDescription] :: Tag -> Maybe Text -- | Additional external documentation for this tag. [_tagExternalDocs] :: Tag -> Maybe ExternalDocs -- | Allows referencing an external resource for extended documentation. data ExternalDocs ExternalDocs :: Maybe Text -> URL -> ExternalDocs -- | A short description of the target documentation. GFM syntax can be -- used for rich text representation. [_externalDocsDescription] :: ExternalDocs -> Maybe Text -- | The URL for the target documentation. [_externalDocsUrl] :: ExternalDocs -> URL -- | A simple object to allow referencing other definitions in the -- specification. It can be used to reference parameters and responses -- that are defined at the top level for reuse. newtype Reference Reference :: Text -> Reference [getReference] :: Reference -> Text data Referenced a Ref :: Reference -> Referenced a Inline :: a -> Referenced a newtype URL URL :: Text -> URL [getUrl] :: URL -> Text instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Xml instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.OAuth2Flow instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.OAuth2Params instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.SecuritySchemeType instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Swagger instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.SecurityScheme instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Schema instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Header instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Items instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Host instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Paths instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.MimeList instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Parameter instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.ParameterSchema instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.ParameterOtherSchema instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.SchemaItems instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Responses instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Example instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Reference instance Data.Aeson.Types.Class.ToJSON a => Data.Aeson.Types.Class.ToJSON (Data.Swagger.Internal.Referenced a) instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.OAuth2Flow instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.OAuth2Params instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.SecuritySchemeType instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Swagger instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.SecurityScheme instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Schema instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Header instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Items instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Host instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Paths instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.MimeList instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Parameter instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.ParameterSchema instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.ParameterOtherSchema instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.SchemaItems instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Responses instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Example instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Response instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Operation instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.PathItem instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Reference instance Data.Aeson.Types.Class.FromJSON a => Data.Aeson.Types.Class.FromJSON (Data.Swagger.Internal.Referenced a) instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Xml instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.PathItem instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Response instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Operation instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.ExternalDocs instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.ExternalDocs instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Tag instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Tag instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Scheme instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Scheme instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.SchemaCommon instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.SchemaCommon instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.ApiKeyParams instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.ApiKeyParams instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.ApiKeyLocation instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.ApiKeyLocation instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.CollectionFormat instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.CollectionFormat instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.ItemsCollectionFormat instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.ItemsCollectionFormat instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.ItemsType instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.ItemsType instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.SchemaType instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.SchemaType instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.License instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.License instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Contact instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Contact instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.Info instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.Info instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.ParameterType instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.ParameterType instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.ParameterLocation instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.ParameterLocation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_13Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_12Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_11Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_10Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_9Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_8Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_7Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_6Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_5Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Swagger instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Swagger instance GHC.Generics.Datatype Data.Swagger.Internal.D1Swagger instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_5Info instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4Info instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3Info instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2Info instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Info instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Info instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Info instance GHC.Generics.Datatype Data.Swagger.Internal.D1Info instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Paths instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Paths instance GHC.Generics.Datatype Data.Swagger.Internal.D1Paths instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_7PathItem instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_6PathItem instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_5PathItem instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4PathItem instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3PathItem instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2PathItem instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1PathItem instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0PathItem instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0PathItem instance GHC.Generics.Datatype Data.Swagger.Internal.D1PathItem instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_11Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_10Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_9Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_8Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_7Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_6Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_5Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Operation instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Operation instance GHC.Generics.Datatype Data.Swagger.Internal.D1Operation instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3Parameter instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2Parameter instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Parameter instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Parameter instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Parameter instance GHC.Generics.Datatype Data.Swagger.Internal.D1Parameter instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Responses instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Responses instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Responses instance GHC.Generics.Datatype Data.Swagger.Internal.D1Responses instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3Response instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2Response instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Response instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Response instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Response instance GHC.Generics.Datatype Data.Swagger.Internal.D1Response instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_16Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_15Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_14Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_13Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_12Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_11Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_10Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_9Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_8Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_7Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_6Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_5Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Schema instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Schema instance GHC.Generics.Datatype Data.Swagger.Internal.D1Schema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1ExternalDocs instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0ExternalDocs instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0ExternalDocs instance GHC.Generics.Datatype Data.Swagger.Internal.D1ExternalDocs instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1SecurityScheme instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0SecurityScheme instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0SecurityScheme instance GHC.Generics.Datatype Data.Swagger.Internal.D1SecurityScheme instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1OAuth2Params instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0OAuth2Params instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0OAuth2Params instance GHC.Generics.Datatype Data.Swagger.Internal.D1OAuth2Params instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_5Header instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4Header instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3Header instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2Header instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Header instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Header instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Header instance GHC.Generics.Datatype Data.Swagger.Internal.D1Header instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_6ParameterOtherSchema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_5ParameterOtherSchema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4ParameterOtherSchema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3ParameterOtherSchema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2ParameterOtherSchema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1ParameterOtherSchema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0ParameterOtherSchema instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0ParameterOtherSchema instance GHC.Generics.Datatype Data.Swagger.Internal.D1ParameterOtherSchema instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4Items instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3Items instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2Items instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Items instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Items instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Items instance GHC.Generics.Datatype Data.Swagger.Internal.D1Items instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4Xml instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3Xml instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2Xml instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1Xml instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0Xml instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0Xml instance GHC.Generics.Datatype Data.Swagger.Internal.D1Xml instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_12SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_11SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_10SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_9SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_8SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_7SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_6SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_5SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_4SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_3SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_2SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_1SchemaCommon instance GHC.Generics.Selector Data.Swagger.Internal.S1_0_0SchemaCommon instance GHC.Generics.Constructor Data.Swagger.Internal.C1_0SchemaCommon instance GHC.Generics.Datatype Data.Swagger.Internal.D1SchemaCommon instance GHC.Generics.Generic Data.Swagger.Internal.Swagger instance GHC.Show.Show Data.Swagger.Internal.Swagger instance GHC.Classes.Eq Data.Swagger.Internal.Swagger instance GHC.Generics.Generic Data.Swagger.Internal.Info instance GHC.Show.Show Data.Swagger.Internal.Info instance GHC.Classes.Eq Data.Swagger.Internal.Info instance GHC.Show.Show Data.Swagger.Internal.Contact instance GHC.Classes.Eq Data.Swagger.Internal.Contact instance GHC.Show.Show Data.Swagger.Internal.License instance GHC.Classes.Eq Data.Swagger.Internal.License instance GHC.Generics.Generic Data.Swagger.Internal.Paths instance GHC.Show.Show Data.Swagger.Internal.Paths instance GHC.Classes.Eq Data.Swagger.Internal.Paths instance GHC.Generics.Generic Data.Swagger.Internal.PathItem instance GHC.Show.Show Data.Swagger.Internal.PathItem instance GHC.Classes.Eq Data.Swagger.Internal.PathItem instance GHC.Generics.Generic Data.Swagger.Internal.Operation instance GHC.Show.Show Data.Swagger.Internal.Operation instance GHC.Classes.Eq Data.Swagger.Internal.Operation instance GHC.Generics.Generic Data.Swagger.Internal.Parameter instance GHC.Show.Show Data.Swagger.Internal.Parameter instance GHC.Classes.Eq Data.Swagger.Internal.Parameter instance GHC.Show.Show Data.Swagger.Internal.ParameterSchema instance GHC.Classes.Eq Data.Swagger.Internal.ParameterSchema instance GHC.Generics.Generic Data.Swagger.Internal.Responses instance GHC.Show.Show Data.Swagger.Internal.Responses instance GHC.Classes.Eq Data.Swagger.Internal.Responses instance GHC.Generics.Generic Data.Swagger.Internal.Response instance GHC.Show.Show Data.Swagger.Internal.Response instance GHC.Classes.Eq Data.Swagger.Internal.Response instance GHC.Show.Show Data.Swagger.Internal.SchemaItems instance GHC.Classes.Eq Data.Swagger.Internal.SchemaItems instance GHC.Generics.Generic Data.Swagger.Internal.Schema instance GHC.Show.Show Data.Swagger.Internal.Schema instance GHC.Classes.Eq Data.Swagger.Internal.Schema instance GHC.Show.Show Data.Swagger.Internal.Tag instance GHC.Classes.Eq Data.Swagger.Internal.Tag instance GHC.Generics.Generic Data.Swagger.Internal.ExternalDocs instance GHC.Show.Show Data.Swagger.Internal.ExternalDocs instance GHC.Classes.Eq Data.Swagger.Internal.ExternalDocs instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.URL instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.URL instance GHC.Show.Show Data.Swagger.Internal.URL instance GHC.Classes.Eq Data.Swagger.Internal.URL instance GHC.Show.Show a => GHC.Show.Show (Data.Swagger.Internal.Referenced a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Swagger.Internal.Referenced a) instance GHC.Show.Show Data.Swagger.Internal.Reference instance GHC.Classes.Eq Data.Swagger.Internal.Reference instance Data.Aeson.Types.Class.FromJSON Data.Swagger.Internal.SecurityRequirement instance Data.Aeson.Types.Class.ToJSON Data.Swagger.Internal.SecurityRequirement instance GHC.Base.Monoid Data.Swagger.Internal.SecurityRequirement instance GHC.Show.Show Data.Swagger.Internal.SecurityRequirement instance GHC.Read.Read Data.Swagger.Internal.SecurityRequirement instance GHC.Classes.Eq Data.Swagger.Internal.SecurityRequirement instance GHC.Generics.Generic Data.Swagger.Internal.SecurityScheme instance GHC.Show.Show Data.Swagger.Internal.SecurityScheme instance GHC.Classes.Eq Data.Swagger.Internal.SecurityScheme instance GHC.Show.Show Data.Swagger.Internal.SecuritySchemeType instance GHC.Classes.Eq Data.Swagger.Internal.SecuritySchemeType instance GHC.Generics.Generic Data.Swagger.Internal.OAuth2Params instance GHC.Show.Show Data.Swagger.Internal.OAuth2Params instance GHC.Classes.Eq Data.Swagger.Internal.OAuth2Params instance GHC.Show.Show Data.Swagger.Internal.OAuth2Flow instance GHC.Classes.Eq Data.Swagger.Internal.OAuth2Flow instance GHC.Show.Show Data.Swagger.Internal.ApiKeyParams instance GHC.Classes.Eq Data.Swagger.Internal.ApiKeyParams instance GHC.Show.Show Data.Swagger.Internal.ApiKeyLocation instance GHC.Classes.Eq Data.Swagger.Internal.ApiKeyLocation instance GHC.Show.Show Data.Swagger.Internal.Example instance GHC.Classes.Eq Data.Swagger.Internal.Example instance GHC.Generics.Generic Data.Swagger.Internal.Header instance GHC.Show.Show Data.Swagger.Internal.Header instance GHC.Classes.Eq Data.Swagger.Internal.Header instance GHC.Generics.Generic Data.Swagger.Internal.ParameterOtherSchema instance GHC.Show.Show Data.Swagger.Internal.ParameterOtherSchema instance GHC.Classes.Eq Data.Swagger.Internal.ParameterOtherSchema instance GHC.Generics.Generic Data.Swagger.Internal.Items instance GHC.Show.Show Data.Swagger.Internal.Items instance GHC.Classes.Eq Data.Swagger.Internal.Items instance GHC.Generics.Generic Data.Swagger.Internal.Xml instance GHC.Show.Show Data.Swagger.Internal.Xml instance GHC.Classes.Eq Data.Swagger.Internal.Xml instance GHC.Generics.Generic Data.Swagger.Internal.SchemaCommon instance GHC.Show.Show Data.Swagger.Internal.SchemaCommon instance GHC.Classes.Eq Data.Swagger.Internal.SchemaCommon instance GHC.Show.Show Data.Swagger.Internal.ItemsCollectionFormat instance GHC.Classes.Eq Data.Swagger.Internal.ItemsCollectionFormat instance GHC.Show.Show Data.Swagger.Internal.SchemaType instance GHC.Classes.Eq Data.Swagger.Internal.SchemaType instance GHC.Show.Show Data.Swagger.Internal.ItemsType instance GHC.Classes.Eq Data.Swagger.Internal.ItemsType instance GHC.Show.Show Data.Swagger.Internal.CollectionFormat instance GHC.Classes.Eq Data.Swagger.Internal.CollectionFormat instance GHC.Show.Show Data.Swagger.Internal.ParameterLocation instance GHC.Classes.Eq Data.Swagger.Internal.ParameterLocation instance GHC.Show.Show Data.Swagger.Internal.ParameterType instance GHC.Classes.Eq Data.Swagger.Internal.ParameterType instance GHC.Base.Monoid Data.Swagger.Internal.MimeList instance GHC.Show.Show Data.Swagger.Internal.MimeList instance GHC.Classes.Eq Data.Swagger.Internal.MimeList instance GHC.Show.Show Data.Swagger.Internal.Scheme instance GHC.Classes.Eq Data.Swagger.Internal.Scheme instance GHC.Show.Show Data.Swagger.Internal.Host instance GHC.Classes.Eq Data.Swagger.Internal.Host instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.URL instance GHC.Base.Monoid Data.Swagger.Internal.Swagger instance GHC.Base.Monoid Data.Swagger.Internal.Info instance GHC.Base.Monoid Data.Swagger.Internal.Paths instance GHC.Base.Monoid Data.Swagger.Internal.PathItem instance GHC.Base.Monoid Data.Swagger.Internal.Schema instance GHC.Base.Monoid Data.Swagger.Internal.SchemaCommon instance GHC.Base.Monoid Data.Swagger.Internal.Parameter instance GHC.Base.Monoid Data.Swagger.Internal.ParameterOtherSchema instance GHC.Base.Monoid Data.Swagger.Internal.Responses instance GHC.Base.Monoid Data.Swagger.Internal.Response instance GHC.Base.Monoid Data.Swagger.Internal.ExternalDocs instance GHC.Base.Monoid Data.Swagger.Internal.Operation instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.Info instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.Paths instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.PathItem instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.Schema instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.SchemaCommon instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.Parameter instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.ParameterOtherSchema instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.Responses instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.Response instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.ExternalDocs instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.Operation instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.MimeList instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.SchemaType instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.ParameterType instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.ParameterLocation instance Data.Swagger.Internal.Utils.SwaggerMonoid (Data.HashMap.Base.HashMap Data.Text.Internal.Text Data.Swagger.Internal.Schema) instance Data.Swagger.Internal.Utils.SwaggerMonoid (Data.HashMap.Base.HashMap Data.Text.Internal.Text (Data.Swagger.Internal.Referenced Data.Swagger.Internal.Schema)) instance GHC.Base.Monoid a => Data.Swagger.Internal.Utils.SwaggerMonoid (Data.Swagger.Internal.Referenced a) instance Data.Swagger.Internal.Utils.SwaggerMonoid (Data.HashMap.Base.HashMap Data.Text.Internal.Text Data.Swagger.Internal.Parameter) instance Data.Swagger.Internal.Utils.SwaggerMonoid (Data.HashMap.Base.HashMap Data.Text.Internal.Text Data.Swagger.Internal.Response) instance Data.Swagger.Internal.Utils.SwaggerMonoid (Data.HashMap.Base.HashMap Data.Text.Internal.Text Data.Swagger.Internal.SecurityScheme) instance Data.Swagger.Internal.Utils.SwaggerMonoid (Data.HashMap.Base.HashMap GHC.IO.FilePath Data.Swagger.Internal.PathItem) instance Data.Swagger.Internal.Utils.SwaggerMonoid (Data.HashMap.Base.HashMap Data.Swagger.Internal.HeaderName Data.Swagger.Internal.Header) instance Data.Swagger.Internal.Utils.SwaggerMonoid (Data.HashMap.Base.HashMap Data.Swagger.Internal.HttpStatusCode (Data.Swagger.Internal.Referenced Data.Swagger.Internal.Response)) instance Data.Swagger.Internal.Utils.SwaggerMonoid Data.Swagger.Internal.ParameterSchema module Data.Swagger.Lens tags :: Lens' Swagger [Tag] securityDefinitions :: Lens' Swagger (HashMap Text SecurityScheme) security :: Lens' Swagger [SecurityRequirement] schemes :: Lens' Swagger (Maybe [Scheme]) responses :: Lens' Swagger (HashMap Text Response) produces :: Lens' Swagger MimeList paths :: Lens' Swagger Paths parameters :: Lens' Swagger (HashMap Text Parameter) info :: Lens' Swagger Info host :: Lens' Swagger (Maybe Host) externalDocs :: Lens' Swagger (Maybe ExternalDocs) definitions :: Lens' Swagger (HashMap Text Schema) consumes :: Lens' Swagger MimeList basePath :: Lens' Swagger (Maybe FilePath) hostPort :: Lens' Host (Maybe PortNumber) hostName :: Lens' Host HostName infoVersion :: Lens' Info Text infoTitle :: Lens' Info Text infoTermsOfService :: Lens' Info (Maybe Text) infoLicense :: Lens' Info (Maybe License) infoDescription :: Lens' Info (Maybe Text) infoContact :: Lens' Info (Maybe Contact) contactUrl :: Lens' Contact (Maybe URL) contactName :: Lens' Contact (Maybe Text) contactEmail :: Lens' Contact (Maybe Text) licenseUrl :: Lens' License (Maybe URL) licenseName :: Lens' License Text pathsMap :: Iso' Paths (HashMap FilePath PathItem) pathItemPut :: Lens' PathItem (Maybe Operation) pathItemPost :: Lens' PathItem (Maybe Operation) pathItemPatch :: Lens' PathItem (Maybe Operation) pathItemParameters :: Lens' PathItem [Referenced Parameter] pathItemOptions :: Lens' PathItem (Maybe Operation) pathItemHead :: Lens' PathItem (Maybe Operation) pathItemGet :: Lens' PathItem (Maybe Operation) pathItemDelete :: Lens' PathItem (Maybe Operation) tagName :: Lens' Tag Text tagExternalDocs :: Lens' Tag (Maybe ExternalDocs) tagDescription :: Lens' Tag (Maybe Text) operationTags :: Lens' Operation [Text] operationSummary :: Lens' Operation (Maybe Text) operationSecurity :: Lens' Operation [SecurityRequirement] operationSchemes :: Lens' Operation (Maybe [Scheme]) operationResponses :: Lens' Operation Responses operationProduces :: Lens' Operation (Maybe MimeList) operationParameters :: Lens' Operation [Referenced Parameter] operationOperationId :: Lens' Operation (Maybe Text) operationExternalDocs :: Lens' Operation (Maybe ExternalDocs) operationDescription :: Lens' Operation (Maybe Text) operationDeprecated :: Lens' Operation (Maybe Bool) operationConsumes :: Lens' Operation (Maybe MimeList) parameterSchema :: Lens' Parameter ParameterSchema parameterRequired :: Lens' Parameter (Maybe Bool) parameterName :: Lens' Parameter Text parameterDescription :: Lens' Parameter (Maybe Text) _ParameterOther :: Prism' ParameterSchema ParameterOtherSchema _ParameterBody :: Prism' ParameterSchema (Referenced Schema) parameterOtherSchemaType :: Lens' ParameterOtherSchema ParameterType parameterOtherSchemaItems :: Lens' ParameterOtherSchema (Maybe Items) parameterOtherSchemaIn :: Lens' ParameterOtherSchema ParameterLocation parameterOtherSchemaFormat :: Lens' ParameterOtherSchema (Maybe Format) parameterOtherSchemaCommon :: Lens' ParameterOtherSchema SchemaCommon parameterOtherSchemaCollectionFormat :: Lens' ParameterOtherSchema (Maybe CollectionFormat) parameterOtherSchemaAllowEmptyValue :: Lens' ParameterOtherSchema (Maybe Bool) itemsType :: Lens' Items ItemsType itemsItems :: Lens' Items (Maybe Items) itemsFormat :: Lens' Items (Maybe Format) itemsCommon :: Lens' Items SchemaCommon itemsCollectionFormat :: Lens' Items (Maybe ItemsCollectionFormat) headerType :: Lens' Header ItemsType headerItems :: Lens' Header (Maybe Items) headerFormat :: Lens' Header (Maybe Format) headerDescription :: Lens' Header (Maybe Text) headerCommon :: Lens' Header SchemaCommon headerCollectionFormat :: Lens' Header (Maybe ItemsCollectionFormat) schemaXml :: Lens' Schema (Maybe Xml) schemaType :: Lens' Schema SchemaType schemaTitle :: Lens' Schema (Maybe Text) schemaSchemaCommon :: Lens' Schema SchemaCommon schemaRequired :: Lens' Schema [ParamName] schemaReadOnly :: Lens' Schema (Maybe Bool) schemaProperties :: Lens' Schema (HashMap Text (Referenced Schema)) schemaMinProperties :: Lens' Schema (Maybe Integer) schemaMaxProperties :: Lens' Schema (Maybe Integer) schemaItems :: Lens' Schema (Maybe SchemaItems) schemaFormat :: Lens' Schema (Maybe Format) schemaExternalDocs :: Lens' Schema (Maybe ExternalDocs) schemaExample :: Lens' Schema (Maybe Value) schemaDiscriminator :: Lens' Schema (Maybe Text) schemaDescription :: Lens' Schema (Maybe Text) schemaAllOf :: Lens' Schema (Maybe [Schema]) schemaAdditionalProperties :: Lens' Schema (Maybe Schema) _SchemaItemsArray :: Prism' SchemaItems [Referenced Schema] _SchemaItemsObject :: Prism' SchemaItems (Referenced Schema) schemaCommonUniqueItems :: Lens' SchemaCommon (Maybe Bool) schemaCommonPattern :: Lens' SchemaCommon (Maybe Text) schemaCommonMultipleOf :: Lens' SchemaCommon (Maybe Scientific) schemaCommonMinimum :: Lens' SchemaCommon (Maybe Scientific) schemaCommonMinLength :: Lens' SchemaCommon (Maybe Integer) schemaCommonMinItems :: Lens' SchemaCommon (Maybe Integer) schemaCommonMaximum :: Lens' SchemaCommon (Maybe Scientific) schemaCommonMaxLength :: Lens' SchemaCommon (Maybe Integer) schemaCommonMaxItems :: Lens' SchemaCommon (Maybe Integer) schemaCommonExclusiveMinimum :: Lens' SchemaCommon (Maybe Bool) schemaCommonExclusiveMaximum :: Lens' SchemaCommon (Maybe Bool) schemaCommonEnum :: Lens' SchemaCommon (Maybe [Value]) schemaCommonDefault :: Lens' SchemaCommon (Maybe Value) xmlWrapped :: Lens' Xml (Maybe Bool) xmlPrefix :: Lens' Xml (Maybe Text) xmlNamespace :: Lens' Xml (Maybe Text) xmlName :: Lens' Xml (Maybe Text) xmlAttribute :: Lens' Xml (Maybe Bool) responsesResponses :: Lens' Responses (HashMap HttpStatusCode (Referenced Response)) responsesDefault :: Lens' Responses (Maybe (Referenced Response)) responseSchema :: Lens' Response (Maybe (Referenced Schema)) responseHeaders :: Lens' Response (HashMap HeaderName Header) responseExamples :: Lens' Response (Maybe Example) responseDescription :: Lens' Response Text securitySchemeType :: Lens' SecurityScheme SecuritySchemeType securitySchemeDescription :: Lens' SecurityScheme (Maybe Text) _SecuritySchemeOAuth2 :: Prism' SecuritySchemeType OAuth2Params _SecuritySchemeApiKey :: Prism' SecuritySchemeType ApiKeyParams _SecuritySchemeBasic :: Prism' SecuritySchemeType () apiKeyName :: Lens' ApiKeyParams Text apiKeyIn :: Lens' ApiKeyParams ApiKeyLocation oauth2Scopes :: Lens' OAuth2Params (HashMap Text Text) oauth2Flow :: Lens' OAuth2Params OAuth2Flow externalDocsUrl :: Lens' ExternalDocs URL externalDocsDescription :: Lens' ExternalDocs (Maybe Text) class HasDescription s d | s -> d description :: HasDescription s d => Lens' s d class HasSchemaCommon s schemaCommon :: HasSchemaCommon s => Lens' s SchemaCommon schemaDefault :: HasSchemaCommon s => Lens' s (Maybe Value) schemaMaximum :: HasSchemaCommon s => Lens' s (Maybe Scientific) schemaExclusiveMaximum :: HasSchemaCommon s => Lens' s (Maybe Bool) schemaMinimum :: HasSchemaCommon s => Lens' s (Maybe Scientific) schemaExclusiveMinimum :: HasSchemaCommon s => Lens' s (Maybe Bool) schemaMaxLength :: HasSchemaCommon s => Lens' s (Maybe Integer) schemaMinLength :: HasSchemaCommon s => Lens' s (Maybe Integer) schemaPattern :: HasSchemaCommon s => Lens' s (Maybe Text) schemaMaxItems :: HasSchemaCommon s => Lens' s (Maybe Integer) schemaMinItems :: HasSchemaCommon s => Lens' s (Maybe Integer) schemaUniqueItems :: HasSchemaCommon s => Lens' s (Maybe Bool) schemaEnum :: HasSchemaCommon s => Lens' s (Maybe [Value]) schemaMultipleOf :: HasSchemaCommon s => Lens' s (Maybe Scientific) instance Data.Swagger.Lens.HasDescription Data.Swagger.Internal.Response Data.Text.Internal.Text instance Data.Swagger.Lens.HasDescription Data.Swagger.Internal.Info (GHC.Base.Maybe Data.Text.Internal.Text) instance Data.Swagger.Lens.HasDescription Data.Swagger.Internal.Tag (GHC.Base.Maybe Data.Text.Internal.Text) instance Data.Swagger.Lens.HasDescription Data.Swagger.Internal.Operation (GHC.Base.Maybe Data.Text.Internal.Text) instance Data.Swagger.Lens.HasDescription Data.Swagger.Internal.Parameter (GHC.Base.Maybe Data.Text.Internal.Text) instance Data.Swagger.Lens.HasDescription Data.Swagger.Internal.Header (GHC.Base.Maybe Data.Text.Internal.Text) instance Data.Swagger.Lens.HasDescription Data.Swagger.Internal.Schema (GHC.Base.Maybe Data.Text.Internal.Text) instance Data.Swagger.Lens.HasDescription Data.Swagger.Internal.SecurityScheme (GHC.Base.Maybe Data.Text.Internal.Text) instance Data.Swagger.Lens.HasDescription Data.Swagger.Internal.ExternalDocs (GHC.Base.Maybe Data.Text.Internal.Text) instance Data.Swagger.Lens.HasSchemaCommon Data.Swagger.Internal.Schema instance Data.Swagger.Lens.HasSchemaCommon Data.Swagger.Internal.ParameterOtherSchema instance Data.Swagger.Lens.HasSchemaCommon Data.Swagger.Internal.Items instance Data.Swagger.Lens.HasSchemaCommon Data.Swagger.Internal.Header instance Data.Swagger.Lens.HasSchemaCommon Data.Swagger.Internal.SchemaCommon module Data.Swagger.Schema.Internal -- | A Schema with an optional name. This name can be used -- in references. type NamedSchema = (Maybe String, Schema) unnamed :: Schema -> NamedSchema named :: String -> Schema -> NamedSchema -- | Convert a type into Schema. -- -- An example type and instance: -- --
--   {-# LANGUAGE OverloadedStrings #-}   -- allows to write Text literals
--   {-# LANGUAGE OverloadedLists #-}     -- allows to write Map as list
--   
--   import Control.Lens
--   
--   data Coord = Coord { x :: Double, y :: Double }
--   
--   instance ToSchema Coord where
--     toNamedSchema = (Just "Coord", mempty
--        & schemaType .~ SchemaObject
--        & schemaProperties .~
--            [ ("x", toSchemaRef (Proxy :: Proxy Double))
--            , ("y", toSchemaRef (Proxy :: Proxy Double))
--            ]
--        & schemaRequired .~ [ "x", "y" ]
--   
-- -- Instead of manually writing your ToSchema instance you -- can use a default generic implementation of -- toNamedSchema. -- -- To do that, simply add deriving Generic clause to your -- datatype and declare a ToSchema instance for your -- datatype without giving definition for toNamedSchema. -- -- For instance, the previous example can be simplified into this: -- --
--   {-# LANGUAGE DeriveGeneric #-}
--   
--   import GHC.Generics (Generic)
--   
--   data Coord = Coord { x :: Double, y :: Double } deriving Generic
--   
--   instance ToSchema Coord
--   
class ToSchema a where toNamedSchema = genericToNamedSchema defaultSchemaOptions -- | Convert a type into an optionally named schema. toNamedSchema :: ToSchema a => proxy a -> NamedSchema -- | Get type's schema name according to its ToSchema -- instance. schemaName :: ToSchema a => proxy a -> Maybe String -- | Convert a type into a schema. toSchema :: ToSchema a => proxy a -> Schema -- | Convert a type into a referenced schema if possible. Only named -- schemas can be references, nameless schemas are inlined. toSchemaRef :: ToSchema a => proxy a -> Referenced Schema class GToSchema (f :: * -> *) gtoNamedSchema :: GToSchema f => SchemaOptions -> proxy f -> Schema -> NamedSchema gtoSchema :: GToSchema f => SchemaOptions -> proxy f -> Schema -> Schema timeNamedSchema :: String -> String -> NamedSchema -- |
--   >>> toSchema (Proxy :: Proxy Day) ^. schemaFormat
--   Just "yyyy-mm-dd"
--   
-- |
--   >>> toSchema (Proxy :: Proxy LocalTime) ^. schemaFormat
--   Just "yyyy-mm-ddThh:MM:ss"
--   
-- |
--   >>> toSchema (Proxy :: Proxy ZonedTime) ^. schemaFormat
--   Just "yyyy-mm-ddThh:MM:ss(Z|+hh:MM)"
--   
-- |
--   >>> toSchema (Proxy :: Proxy UTCTime) ^. schemaFormat
--   Just "yyyy-mm-ddThh:MM:ssZ"
--   
-- | NOTE: This schema does not account for the uniqueness of keys. -- | Options that specify how to encode your type to Swagger schema. data SchemaOptions SchemaOptions :: (String -> String) -> (String -> String) -> (String -> String) -> Bool -> Bool -> Bool -> SchemaOptions -- | Function applied to field labels. Handy for removing common record -- prefixes for example. [fieldLabelModifier] :: SchemaOptions -> String -> String -- | Function applied to constructor tags which could be handy for -- lower-casing them for example. [constructorTagModifier] :: SchemaOptions -> String -> String -- | Function applied to datatype name. [datatypeNameModifier] :: SchemaOptions -> String -> String -- | If True the constructors of a datatype, with all -- nullary constructors, will be encoded to a string enumeration schema -- with the constructor tags as possible values. [allNullaryToStringTag] :: SchemaOptions -> Bool -- | If True direct subschemas will be referenced if -- possible (rather than inlined). Note that this option does not -- influence nested schemas, e.g. for these types -- --
--   data Object = Object String deriving Generic
--   instance ToSchema Object
--   
--   newtype Objects = Objects [Object] deriving Generic
--   instance ToSchema Objects where
--      toNamedSchema = genericToNamedSchema defaultSchemaOptions
--        { useReferences = False }
--   
-- -- Schema for Objects will not inline Object -- schema because it is nested in a [] schema. [useReferences] :: SchemaOptions -> Bool -- | Hide the field name when a record constructor has only one field, like -- a newtype. [unwrapUnaryRecords] :: SchemaOptions -> Bool -- | Default encoding SchemaOptions. -- --
--   SchemaOptions
--   { fieldLabelModifier     = id
--   , constructorTagModifier = id
--   , datatypeNameModifier   = id
--   , allNullaryToStringTag  = True
--   , useReferences          = True
--   , unwrapUnaryRecords     = False
--   }
--   
defaultSchemaOptions :: SchemaOptions -- | Default schema for Bounded, Integral -- types. toSchemaBoundedIntegral :: (Bounded a, Integral a) => proxy a -> Schema -- | Default generic named schema for Bounded, -- Integral types. genericToNamedSchemaBoundedIntegral :: (Bounded a, Integral a, Generic a, Rep a ~ D1 d f, Datatype d) => SchemaOptions -> proxy a -> NamedSchema -- | A configurable generic Schema creator. genericToSchema :: (Generic a, GToSchema (Rep a)) => SchemaOptions -> proxy a -> Schema -- | A configurable generic NamedSchema creator. This -- function applied to defaultSchemaOptions is used as -- the default for toNamedSchema when the type is an -- instance of Generic. genericToNamedSchema :: (Generic a, GToSchema (Rep a)) => SchemaOptions -> proxy a -> NamedSchema gdatatypeSchemaName :: Datatype d => SchemaOptions -> proxy d -> Maybe String nullarySchema :: Schema -- | Single field constructor. gtoSchemaRef :: GToSchema f => SchemaOptions -> proxy f -> Referenced Schema appendItem :: Referenced Schema -> Maybe SchemaItems -> Maybe SchemaItems withFieldSchema :: (Selector s, GToSchema f) => SchemaOptions -> proxy s f -> Bool -> Schema -> Schema -- | Optional record fields. -- | Record fields. type AllNullary = All class GSumToSchema f gsumToSchema :: GSumToSchema f => SchemaOptions -> proxy f -> Schema -> (AllNullary, Schema) gsumConToSchema :: Constructor c => Bool -> Referenced Schema -> SchemaOptions -> proxy (C1 c f) -> Schema -> (AllNullary, Schema) data Proxy2 a b Proxy2 :: Proxy2 a b data Proxy3 a b c Proxy3 :: Proxy3 a b c instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema [a] instance Data.Swagger.Schema.Internal.ToSchema GHC.Base.String instance Data.Swagger.Schema.Internal.ToSchema GHC.Types.Bool instance Data.Swagger.Schema.Internal.ToSchema GHC.Integer.Type.Integer instance Data.Swagger.Schema.Internal.ToSchema GHC.Types.Int instance Data.Swagger.Schema.Internal.ToSchema GHC.Int.Int8 instance Data.Swagger.Schema.Internal.ToSchema GHC.Int.Int16 instance Data.Swagger.Schema.Internal.ToSchema GHC.Int.Int32 instance Data.Swagger.Schema.Internal.ToSchema GHC.Int.Int64 instance Data.Swagger.Schema.Internal.ToSchema GHC.Types.Word instance Data.Swagger.Schema.Internal.ToSchema GHC.Word.Word8 instance Data.Swagger.Schema.Internal.ToSchema GHC.Word.Word16 instance Data.Swagger.Schema.Internal.ToSchema GHC.Word.Word32 instance Data.Swagger.Schema.Internal.ToSchema GHC.Word.Word64 instance Data.Swagger.Schema.Internal.ToSchema GHC.Types.Char instance Data.Swagger.Schema.Internal.ToSchema Data.Scientific.Scientific instance Data.Swagger.Schema.Internal.ToSchema GHC.Types.Double instance Data.Swagger.Schema.Internal.ToSchema GHC.Types.Float instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (GHC.Base.Maybe a) instance (Data.Swagger.Schema.Internal.ToSchema a, Data.Swagger.Schema.Internal.ToSchema b) => Data.Swagger.Schema.Internal.ToSchema (Data.Either.Either a b) instance Data.Swagger.Schema.Internal.ToSchema () instance (Data.Swagger.Schema.Internal.ToSchema a, Data.Swagger.Schema.Internal.ToSchema b) => Data.Swagger.Schema.Internal.ToSchema (a, b) instance (Data.Swagger.Schema.Internal.ToSchema a, Data.Swagger.Schema.Internal.ToSchema b, Data.Swagger.Schema.Internal.ToSchema c) => Data.Swagger.Schema.Internal.ToSchema (a, b, c) instance (Data.Swagger.Schema.Internal.ToSchema a, Data.Swagger.Schema.Internal.ToSchema b, Data.Swagger.Schema.Internal.ToSchema c, Data.Swagger.Schema.Internal.ToSchema d) => Data.Swagger.Schema.Internal.ToSchema (a, b, c, d) instance (Data.Swagger.Schema.Internal.ToSchema a, Data.Swagger.Schema.Internal.ToSchema b, Data.Swagger.Schema.Internal.ToSchema c, Data.Swagger.Schema.Internal.ToSchema d, Data.Swagger.Schema.Internal.ToSchema e) => Data.Swagger.Schema.Internal.ToSchema (a, b, c, d, e) instance (Data.Swagger.Schema.Internal.ToSchema a, Data.Swagger.Schema.Internal.ToSchema b, Data.Swagger.Schema.Internal.ToSchema c, Data.Swagger.Schema.Internal.ToSchema d, Data.Swagger.Schema.Internal.ToSchema e, Data.Swagger.Schema.Internal.ToSchema f) => Data.Swagger.Schema.Internal.ToSchema (a, b, c, d, e, f) instance (Data.Swagger.Schema.Internal.ToSchema a, Data.Swagger.Schema.Internal.ToSchema b, Data.Swagger.Schema.Internal.ToSchema c, Data.Swagger.Schema.Internal.ToSchema d, Data.Swagger.Schema.Internal.ToSchema e, Data.Swagger.Schema.Internal.ToSchema f, Data.Swagger.Schema.Internal.ToSchema g) => Data.Swagger.Schema.Internal.ToSchema (a, b, c, d, e, f, g) instance Data.Swagger.Schema.Internal.ToSchema Data.Time.Calendar.Days.Day instance Data.Swagger.Schema.Internal.ToSchema Data.Time.LocalTime.LocalTime.LocalTime instance Data.Swagger.Schema.Internal.ToSchema Data.Time.LocalTime.LocalTime.ZonedTime instance Data.Swagger.Schema.Internal.ToSchema Data.Time.Clock.UTC.NominalDiffTime instance Data.Swagger.Schema.Internal.ToSchema Data.Time.Clock.UTC.UTCTime instance Data.Swagger.Schema.Internal.ToSchema Data.Text.Internal.Text instance Data.Swagger.Schema.Internal.ToSchema Data.Text.Internal.Lazy.Text instance Data.Swagger.Schema.Internal.ToSchema Data.IntSet.Base.IntSet instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.IntMap.Base.IntMap a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.Map.Base.Map GHC.Base.String a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.Map.Base.Map Data.Text.Internal.Text a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.Map.Base.Map Data.Text.Internal.Lazy.Text a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.HashMap.Base.HashMap GHC.Base.String a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.HashMap.Base.HashMap Data.Text.Internal.Text a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.HashMap.Base.HashMap Data.Text.Internal.Lazy.Text a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.Set.Base.Set a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.HashSet.HashSet a) instance Data.Swagger.Schema.Internal.ToSchema Data.Monoid.All instance Data.Swagger.Schema.Internal.ToSchema Data.Monoid.Any instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.Monoid.Sum a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.Monoid.Product a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.Monoid.First a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.Monoid.Last a) instance Data.Swagger.Schema.Internal.ToSchema a => Data.Swagger.Schema.Internal.ToSchema (Data.Monoid.Dual a) instance Data.Swagger.Schema.Internal.GToSchema GHC.Generics.U1 instance (Data.Swagger.Schema.Internal.GToSchema f, Data.Swagger.Schema.Internal.GToSchema g) => Data.Swagger.Schema.Internal.GToSchema (f GHC.Generics.:*: g) instance (GHC.Generics.Datatype d, Data.Swagger.Schema.Internal.GToSchema f) => Data.Swagger.Schema.Internal.GToSchema (GHC.Generics.D1 d f) instance Data.Swagger.Schema.Internal.GToSchema f => Data.Swagger.Schema.Internal.GToSchema (GHC.Generics.C1 c f) instance (GHC.Generics.Selector s, Data.Swagger.Schema.Internal.GToSchema f) => Data.Swagger.Schema.Internal.GToSchema (GHC.Generics.C1 c (GHC.Generics.S1 s f)) instance (GHC.Generics.Selector s, Data.Swagger.Schema.Internal.ToSchema c) => Data.Swagger.Schema.Internal.GToSchema (GHC.Generics.S1 s (GHC.Generics.K1 i (GHC.Base.Maybe c))) instance (GHC.Generics.Selector s, Data.Swagger.Schema.Internal.GToSchema f) => Data.Swagger.Schema.Internal.GToSchema (GHC.Generics.S1 s f) instance Data.Swagger.Schema.Internal.ToSchema c => Data.Swagger.Schema.Internal.GToSchema (GHC.Generics.K1 i c) instance (Data.Swagger.Schema.Internal.GSumToSchema f, Data.Swagger.Schema.Internal.GSumToSchema g) => Data.Swagger.Schema.Internal.GToSchema (f GHC.Generics.:+: g) instance (Data.Swagger.Schema.Internal.GSumToSchema f, Data.Swagger.Schema.Internal.GSumToSchema g) => Data.Swagger.Schema.Internal.GSumToSchema (f GHC.Generics.:+: g) instance (GHC.Generics.Constructor c, Data.Swagger.Schema.Internal.GToSchema f) => Data.Swagger.Schema.Internal.GSumToSchema (GHC.Generics.C1 c f) instance GHC.Generics.Constructor c => Data.Swagger.Schema.Internal.GSumToSchema (GHC.Generics.C1 c GHC.Generics.U1) instance (GHC.Generics.Constructor c, GHC.Generics.Selector s, Data.Swagger.Schema.Internal.GToSchema f) => Data.Swagger.Schema.Internal.GSumToSchema (GHC.Generics.C1 c (GHC.Generics.S1 s f)) -- | Types and functions for working with Swagger schema. module Data.Swagger.Schema -- | Convert a type into Schema. -- -- An example type and instance: -- --
--   {-# LANGUAGE OverloadedStrings #-}   -- allows to write Text literals
--   {-# LANGUAGE OverloadedLists #-}     -- allows to write Map as list
--   
--   import Control.Lens
--   
--   data Coord = Coord { x :: Double, y :: Double }
--   
--   instance ToSchema Coord where
--     toNamedSchema = (Just "Coord", mempty
--        & schemaType .~ SchemaObject
--        & schemaProperties .~
--            [ ("x", toSchemaRef (Proxy :: Proxy Double))
--            , ("y", toSchemaRef (Proxy :: Proxy Double))
--            ]
--        & schemaRequired .~ [ "x", "y" ]
--   
-- -- Instead of manually writing your ToSchema instance you -- can use a default generic implementation of -- toNamedSchema. -- -- To do that, simply add deriving Generic clause to your -- datatype and declare a ToSchema instance for your -- datatype without giving definition for toNamedSchema. -- -- For instance, the previous example can be simplified into this: -- --
--   {-# LANGUAGE DeriveGeneric #-}
--   
--   import GHC.Generics (Generic)
--   
--   data Coord = Coord { x :: Double, y :: Double } deriving Generic
--   
--   instance ToSchema Coord
--   
class ToSchema a where toNamedSchema = genericToNamedSchema defaultSchemaOptions -- | Convert a type into an optionally named schema. toNamedSchema :: ToSchema a => proxy a -> NamedSchema -- | A Schema with an optional name. This name can be used -- in references. type NamedSchema = (Maybe String, Schema) -- | Convert a type into a schema. toSchema :: ToSchema a => proxy a -> Schema -- | Convert a type into a referenced schema if possible. Only named -- schemas can be references, nameless schemas are inlined. toSchemaRef :: ToSchema a => proxy a -> Referenced Schema -- | Get type's schema name according to its ToSchema -- instance. schemaName :: ToSchema a => proxy a -> Maybe String -- | A configurable generic Schema creator. genericToSchema :: (Generic a, GToSchema (Rep a)) => SchemaOptions -> proxy a -> Schema -- | A configurable generic NamedSchema creator. This -- function applied to defaultSchemaOptions is used as -- the default for toNamedSchema when the type is an -- instance of Generic. genericToNamedSchema :: (Generic a, GToSchema (Rep a)) => SchemaOptions -> proxy a -> NamedSchema -- | Default generic named schema for Bounded, -- Integral types. genericToNamedSchemaBoundedIntegral :: (Bounded a, Integral a, Generic a, Rep a ~ D1 d f, Datatype d) => SchemaOptions -> proxy a -> NamedSchema -- | Default schema for Bounded, Integral -- types. toSchemaBoundedIntegral :: (Bounded a, Integral a) => proxy a -> Schema -- | Options that specify how to encode your type to Swagger schema. data SchemaOptions SchemaOptions :: (String -> String) -> (String -> String) -> (String -> String) -> Bool -> Bool -> Bool -> SchemaOptions -- | Function applied to field labels. Handy for removing common record -- prefixes for example. [fieldLabelModifier] :: SchemaOptions -> String -> String -- | Function applied to constructor tags which could be handy for -- lower-casing them for example. [constructorTagModifier] :: SchemaOptions -> String -> String -- | Function applied to datatype name. [datatypeNameModifier] :: SchemaOptions -> String -> String -- | If True the constructors of a datatype, with all -- nullary constructors, will be encoded to a string enumeration schema -- with the constructor tags as possible values. [allNullaryToStringTag] :: SchemaOptions -> Bool -- | If True direct subschemas will be referenced if -- possible (rather than inlined). Note that this option does not -- influence nested schemas, e.g. for these types -- --
--   data Object = Object String deriving Generic
--   instance ToSchema Object
--   
--   newtype Objects = Objects [Object] deriving Generic
--   instance ToSchema Objects where
--      toNamedSchema = genericToNamedSchema defaultSchemaOptions
--        { useReferences = False }
--   
-- -- Schema for Objects will not inline Object -- schema because it is nested in a [] schema. [useReferences] :: SchemaOptions -> Bool -- | Hide the field name when a record constructor has only one field, like -- a newtype. [unwrapUnaryRecords] :: SchemaOptions -> Bool -- | Default encoding SchemaOptions. -- --
--   SchemaOptions
--   { fieldLabelModifier     = id
--   , constructorTagModifier = id
--   , datatypeNameModifier   = id
--   , allNullaryToStringTag  = True
--   , useReferences          = True
--   , unwrapUnaryRecords     = False
--   }
--   
defaultSchemaOptions :: SchemaOptions -- | Swaggerâ„¢ is a project used to describe and document RESTful APIs. -- -- The Swagger specification defines a set of files required to describe -- such an API. These files can then be used by the Swagger-UI project to -- display the API and Swagger-Codegen to generate clients in various -- languages. Additional utilities can also take advantage of the -- resulting files, such as testing tools. module Data.Swagger -- | This is the root document object for the API specification. data Swagger Swagger :: Info -> Maybe Host -> Maybe FilePath -> Maybe [Scheme] -> MimeList -> MimeList -> Paths -> HashMap Text Schema -> HashMap Text Parameter -> HashMap Text Response -> HashMap Text SecurityScheme -> [SecurityRequirement] -> [Tag] -> Maybe ExternalDocs -> Swagger -- | Provides metadata about the API. The metadata can be used by the -- clients if needed. [_info] :: Swagger -> Info -- | The host (name or ip) serving the API. It MAY include a port. If the -- host is not included, the host serving the documentation is to be used -- (including the port). [_host] :: Swagger -> Maybe Host -- | The base path on which the API is served, which is relative to the -- host. If it is not included, the API is served directly under the -- host. The value MUST start with a leading slash (/). [_basePath] :: Swagger -> Maybe FilePath -- | The transfer protocol of the API. If the schemes is not included, the -- default scheme to be used is the one used to access the Swagger -- definition itself. [_schemes] :: Swagger -> Maybe [Scheme] -- | A list of MIME types the APIs can consume. This is global to all APIs -- but can be overridden on specific API calls. [_consumes] :: Swagger -> MimeList -- | A list of MIME types the APIs can produce. This is global to all APIs -- but can be overridden on specific API calls. [_produces] :: Swagger -> MimeList -- | The available paths and operations for the API. [_paths] :: Swagger -> Paths -- | An object to hold data types produced and consumed by operations. [_definitions] :: Swagger -> HashMap Text Schema -- | An object to hold parameters that can be used across operations. This -- property does not define global parameters for all operations. [_parameters] :: Swagger -> HashMap Text Parameter -- | An object to hold responses that can be used across operations. This -- property does not define global responses for all operations. [_responses] :: Swagger -> HashMap Text Response -- | Security scheme definitions that can be used across the specification. [_securityDefinitions] :: Swagger -> HashMap Text SecurityScheme -- | A declaration of which security schemes are applied for the API as a -- whole. The list of values describes alternative security schemes that -- can be used (that is, there is a logical OR between the security -- requirements). Individual operations can override this definition. [_security] :: Swagger -> [SecurityRequirement] -- | A list of tags used by the specification with additional metadata. The -- order of the tags can be used to reflect on their order by the parsing -- tools. Not all tags that are used by the Operation Object must be -- declared. The tags that are not declared may be organized randomly or -- based on the tools' logic. Each tag name in the list MUST be unique. [_tags] :: Swagger -> [Tag] -- | Additional external documentation. [_externalDocs] :: Swagger -> Maybe ExternalDocs -- | The host (name or ip) serving the API. It MAY include a port. data Host Host :: HostName -> Maybe PortNumber -> Host -- | Host name. [_hostName] :: Host -> HostName -- | Optional port. [_hostPort] :: Host -> Maybe PortNumber -- | The transfer protocol of the API. data Scheme Http :: Scheme Https :: Scheme Ws :: Scheme Wss :: Scheme -- | The object provides metadata about the API. The metadata can be used -- by the clients if needed, and can be presented in the Swagger-UI for -- convenience. data Info Info :: Text -> Maybe Text -> Maybe Text -> Maybe Contact -> Maybe License -> Text -> Info -- | The title of the application. [_infoTitle] :: Info -> Text -- | A short description of the application. GFM syntax can be used for -- rich text representation. [_infoDescription] :: Info -> Maybe Text -- | The Terms of Service for the API. [_infoTermsOfService] :: Info -> Maybe Text -- | The contact information for the exposed API. [_infoContact] :: Info -> Maybe Contact -- | The license information for the exposed API. [_infoLicense] :: Info -> Maybe License -- | Provides the version of the application API (not to be confused with -- the specification version). [_infoVersion] :: Info -> Text -- | Contact information for the exposed API. data Contact Contact :: Maybe Text -> Maybe URL -> Maybe Text -> Contact -- | The identifying name of the contact person/organization. [_contactName] :: Contact -> Maybe Text -- | The URL pointing to the contact information. [_contactUrl] :: Contact -> Maybe URL -- | The email address of the contact person/organization. [_contactEmail] :: Contact -> Maybe Text -- | License information for the exposed API. data License License :: Text -> Maybe URL -> License -- | The license name used for the API. [_licenseName] :: License -> Text -- | A URL to the license used for the API. [_licenseUrl] :: License -> Maybe URL -- | The available paths and operations for the API. data Paths Paths :: HashMap FilePath PathItem -> Paths -- | Holds the relative paths to the individual endpoints. The path is -- appended to the basePath in order to construct the -- full URL. [_pathsMap] :: Paths -> HashMap FilePath PathItem -- | Describes the operations available on a single path. A -- PathItem 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. data PathItem PathItem :: Maybe Operation -> Maybe Operation -> Maybe Operation -> Maybe Operation -> Maybe Operation -> Maybe Operation -> Maybe Operation -> [Referenced Parameter] -> PathItem -- | A definition of a GET operation on this path. [_pathItemGet] :: PathItem -> Maybe Operation -- | A definition of a PUT operation on this path. [_pathItemPut] :: PathItem -> Maybe Operation -- | A definition of a POST operation on this path. [_pathItemPost] :: PathItem -> Maybe Operation -- | A definition of a DELETE operation on this path. [_pathItemDelete] :: PathItem -> Maybe Operation -- | A definition of a OPTIONS operation on this path. [_pathItemOptions] :: PathItem -> Maybe Operation -- | A definition of a HEAD operation on this path. [_pathItemHead] :: PathItem -> Maybe Operation -- | A definition of a PATCH operation on this path. [_pathItemPatch] :: PathItem -> Maybe Operation -- | A list of parameters that are applicable for all the operations -- described under this path. These parameters can be overridden at the -- operation level, but cannot be removed there. The list MUST NOT -- include duplicated parameters. A unique parameter is defined by a -- combination of a name and location. [_pathItemParameters] :: PathItem -> [Referenced Parameter] -- | Allows adding meta data to a single tag that is used by -- Operation. It is not mandatory to have a Tag per tag -- used there. data Tag Tag :: Text -> Maybe Text -> Maybe ExternalDocs -> Tag -- | The name of the tag. [_tagName] :: Tag -> Text -- | A short description for the tag. GFM syntax can be used for rich text -- representation. [_tagDescription] :: Tag -> Maybe Text -- | Additional external documentation for this tag. [_tagExternalDocs] :: Tag -> Maybe ExternalDocs -- | Describes a single API operation on a path. data Operation Operation :: [Text] -> Maybe Text -> Maybe Text -> Maybe ExternalDocs -> Maybe Text -> Maybe MimeList -> Maybe MimeList -> [Referenced Parameter] -> Responses -> Maybe [Scheme] -> Maybe Bool -> [SecurityRequirement] -> Operation -- | A list of tags for API documentation control. Tags can be used for -- logical grouping of operations by resources or any other qualifier. [_operationTags] :: Operation -> [Text] -- | A short summary of what the operation does. For maximum readability in -- the swagger-ui, this field SHOULD be less than 120 characters. [_operationSummary] :: Operation -> Maybe Text -- | A verbose explanation of the operation behavior. GFM syntax can be -- used for rich text representation. [_operationDescription] :: Operation -> Maybe Text -- | Additional external documentation for this operation. [_operationExternalDocs] :: Operation -> Maybe ExternalDocs -- | Unique string used to identify the operation. The id MUST be unique -- among all operations described in the API. Tools and libraries MAY use -- the it to uniquely identify an operation, therefore, it is recommended -- to follow common programming naming conventions. [_operationOperationId] :: Operation -> Maybe Text -- | A list of MIME types the operation can consume. This overrides the -- consumes. Just [] MAY be used to clear the -- global definition. [_operationConsumes] :: Operation -> Maybe MimeList -- | A list of MIME types the operation can produce. This overrides the -- produces. Just [] MAY be used to clear the -- global definition. [_operationProduces] :: Operation -> Maybe MimeList -- | A list of parameters that are applicable for this operation. If a -- parameter is already defined at the PathItem, the new -- definition will override it, but can never remove it. The list MUST -- NOT include duplicated parameters. A unique parameter is defined by a -- combination of a name and location. [_operationParameters] :: Operation -> [Referenced Parameter] -- | The list of possible responses as they are returned from executing -- this operation. [_operationResponses] :: Operation -> Responses -- | The transfer protocol for the operation. The value overrides -- schemes. [_operationSchemes] :: Operation -> Maybe [Scheme] -- | Declares this operation to be deprecated. Usage of the declared -- operation should be refrained. Default value is False. [_operationDeprecated] :: Operation -> Maybe Bool -- | A declaration of which security schemes are applied for this -- operation. The list of values describes alternative security schemes -- that can be used (that is, there is a logical OR between the security -- requirements). This definition overrides any declared top-level -- security. To remove a top-level security declaration, Just [] -- can be used. [_operationSecurity] :: Operation -> [SecurityRequirement] data ParameterType ParamString :: ParameterType ParamNumber :: ParameterType ParamInteger :: ParameterType ParamBoolean :: ParameterType ParamArray :: ParameterType ParamFile :: ParameterType data ItemsType ItemsString :: ItemsType ItemsNumber :: ItemsType ItemsInteger :: ItemsType ItemsBoolean :: ItemsType ItemsArray :: ItemsType data SchemaType SchemaArray :: SchemaType SchemaBoolean :: SchemaType SchemaInteger :: SchemaType SchemaNumber :: SchemaType SchemaNull :: SchemaType SchemaObject :: SchemaType SchemaString :: SchemaType type Format = Text -- | Determines the format of the array. data CollectionFormat -- | Comma separated values: foo,bar. CollectionCSV :: CollectionFormat -- | Space separated values: foo bar. CollectionSSV :: CollectionFormat -- | Tab separated values: foo\tbar. CollectionTSV :: CollectionFormat -- | Pipe separated values: foo|bar. CollectionPipes :: CollectionFormat -- | Corresponds to multiple parameter instances instead of multiple values -- for a single instance foo=bar&foo=baz. This is valid only -- for parameters in ParameterQuery or -- ParameterFormData. CollectionMulti :: CollectionFormat -- | Determines the format of the nested array. data ItemsCollectionFormat -- | Comma separated values: foo,bar. ItemsCollectionCSV :: ItemsCollectionFormat -- | Space separated values: foo bar. ItemsCollectionSSV :: ItemsCollectionFormat -- | Tab separated values: foo\tbar. ItemsCollectionTSV :: ItemsCollectionFormat -- | Pipe separated values: foo|bar. ItemsCollectionPipes :: ItemsCollectionFormat -- | Describes a single operation parameter. A unique parameter is defined -- by a combination of a name and location. data Parameter Parameter :: Text -> Maybe Text -> Maybe Bool -> ParameterSchema -> Parameter -- | The name of the parameter. Parameter names are case sensitive. [_parameterName] :: Parameter -> Text -- | A brief description of the parameter. This could contain examples of -- use. GFM syntax can be used for rich text representation. [_parameterDescription] :: Parameter -> Maybe Text -- | Determines whether this parameter is mandatory. If the parameter is in -- "path", this property is required and its value MUST be true. -- Otherwise, the property MAY be included and its default value is -- False. [_parameterRequired] :: Parameter -> Maybe Bool -- | Parameter schema. [_parameterSchema] :: Parameter -> ParameterSchema data ParameterSchema ParameterBody :: (Referenced Schema) -> ParameterSchema ParameterOther :: ParameterOtherSchema -> ParameterSchema data ParameterOtherSchema ParameterOtherSchema :: ParameterLocation -> ParameterType -> Maybe Format -> Maybe Bool -> Maybe Items -> Maybe CollectionFormat -> SchemaCommon -> ParameterOtherSchema -- | The location of the parameter. [_parameterOtherSchemaIn] :: ParameterOtherSchema -> ParameterLocation -- | The type of the parameter. Since the parameter is not located at the -- request body, it is limited to simple types (that is, not an object). -- If type is ParamFile, the consumes MUST be -- either "multipartform-data" or " -- applicationx-www-form-urlencoded" and the parameter MUST be in -- ParameterFormData. [_parameterOtherSchemaType] :: ParameterOtherSchema -> ParameterType -- | The extending format for the previously mentioned type. [_parameterOtherSchemaFormat] :: ParameterOtherSchema -> Maybe Format -- | Sets the ability to pass empty-valued parameters. This is valid only -- for either ParameterQuery or -- ParameterFormData and allows you to send a parameter -- with a name only or an empty value. Default value is False. [_parameterOtherSchemaAllowEmptyValue] :: ParameterOtherSchema -> Maybe Bool -- | Required if type is ParamArray. Describes the -- type of items in the array. [_parameterOtherSchemaItems] :: ParameterOtherSchema -> Maybe Items -- | Determines the format of the array if ParamArray is -- used. Default value is csv. [_parameterOtherSchemaCollectionFormat] :: ParameterOtherSchema -> Maybe CollectionFormat [_parameterOtherSchemaCommon] :: ParameterOtherSchema -> SchemaCommon data ParameterLocation -- | Parameters that are appended to the URL. For example, in -- /items?id=###, the query parameter is id. ParameterQuery :: ParameterLocation -- | Custom headers that are expected as part of the request. ParameterHeader :: ParameterLocation -- | Used together with Path Templating, where the parameter value is -- actually part of the operation's URL. This does not include the host -- or base path of the API. For example, in -- items{itemId}, the path parameter is itemId. ParameterPath :: ParameterLocation -- | Used to describe the payload of an HTTP request when either -- application/x-www-form-urlencoded or -- multipart/form-data are used as the content type of the -- request (in Swagger's definition, the consumes property of an -- operation). This is the only parameter type that can be used to send -- files, thus supporting the ParamFile type. Since form -- parameters are sent in the payload, they cannot be declared together -- with a body parameter for the same operation. Form parameters have a -- different format based on the content-type used (for further details, -- consult -- http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4). ParameterFormData :: ParameterLocation type ParamName = Text data Items Items :: ItemsType -> Maybe Format -> Maybe Items -> Maybe ItemsCollectionFormat -> SchemaCommon -> Items -- | The internal type of the array. [_itemsType] :: Items -> ItemsType -- | The extending format for the previously mentioned type. [_itemsFormat] :: Items -> Maybe Format -- | Required if type is ItemsArray. Describes the -- type of items in the array. [_itemsItems] :: Items -> Maybe Items -- | Determines the format of the array if type array is used. Default -- value is ItemsCollectionCSV. [_itemsCollectionFormat] :: Items -> Maybe ItemsCollectionFormat [_itemsCommon] :: Items -> SchemaCommon data Header Header :: Maybe Text -> ItemsType -> Maybe Format -> Maybe Items -> Maybe ItemsCollectionFormat -> SchemaCommon -> Header -- | A short description of the header. [_headerDescription] :: Header -> Maybe Text -- | The type of the object. [_headerType] :: Header -> ItemsType -- | The extending format for the previously mentioned type. See Data Type -- Formats for further details. [_headerFormat] :: Header -> Maybe Format -- | Required if type is ItemsArray. Describes the -- type of items in the array. [_headerItems] :: Header -> Maybe Items -- | Determines the format of the array if type array is used. Default -- value is ItemsCollectionCSV. [_headerCollectionFormat] :: Header -> Maybe ItemsCollectionFormat [_headerCommon] :: Header -> SchemaCommon data Example Example :: Map MediaType Value -> Example [getExample] :: Example -> Map MediaType Value data Schema Schema :: SchemaType -> Maybe Format -> Maybe Text -> Maybe Text -> [ParamName] -> Maybe SchemaItems -> Maybe [Schema] -> HashMap Text (Referenced Schema) -> Maybe Schema -> Maybe Text -> Maybe Bool -> Maybe Xml -> Maybe ExternalDocs -> Maybe Value -> Maybe Integer -> Maybe Integer -> SchemaCommon -> Schema [_schemaType] :: Schema -> SchemaType [_schemaFormat] :: Schema -> Maybe Format [_schemaTitle] :: Schema -> Maybe Text [_schemaDescription] :: Schema -> Maybe Text [_schemaRequired] :: Schema -> [ParamName] [_schemaItems] :: Schema -> Maybe SchemaItems [_schemaAllOf] :: Schema -> Maybe [Schema] [_schemaProperties] :: Schema -> HashMap Text (Referenced Schema) [_schemaAdditionalProperties] :: Schema -> Maybe Schema [_schemaDiscriminator] :: Schema -> Maybe Text [_schemaReadOnly] :: Schema -> Maybe Bool [_schemaXml] :: Schema -> Maybe Xml [_schemaExternalDocs] :: Schema -> Maybe ExternalDocs [_schemaExample] :: Schema -> Maybe Value [_schemaMaxProperties] :: Schema -> Maybe Integer [_schemaMinProperties] :: Schema -> Maybe Integer [_schemaSchemaCommon] :: Schema -> SchemaCommon data SchemaItems SchemaItemsObject :: (Referenced Schema) -> SchemaItems SchemaItemsArray :: [Referenced Schema] -> SchemaItems data SchemaCommon SchemaCommon :: Maybe Value -> Maybe Scientific -> Maybe Bool -> Maybe Scientific -> Maybe Bool -> Maybe Integer -> Maybe Integer -> Maybe Text -> Maybe Integer -> Maybe Integer -> Maybe Bool -> Maybe [Value] -> Maybe Scientific -> SchemaCommon -- | Declares the value of the parameter that the server will use if none -- is provided, for example a "count" to control the number of -- results per page might default to 100 if not supplied by the -- client in the request. (Note: "default" has no meaning for required -- parameters.) Unlike JSON Schema this value MUST conform to the defined -- type for this parameter. [_schemaCommonDefault] :: SchemaCommon -> Maybe Value [_schemaCommonMaximum] :: SchemaCommon -> Maybe Scientific [_schemaCommonExclusiveMaximum] :: SchemaCommon -> Maybe Bool [_schemaCommonMinimum] :: SchemaCommon -> Maybe Scientific [_schemaCommonExclusiveMinimum] :: SchemaCommon -> Maybe Bool [_schemaCommonMaxLength] :: SchemaCommon -> Maybe Integer [_schemaCommonMinLength] :: SchemaCommon -> Maybe Integer [_schemaCommonPattern] :: SchemaCommon -> Maybe Text [_schemaCommonMaxItems] :: SchemaCommon -> Maybe Integer [_schemaCommonMinItems] :: SchemaCommon -> Maybe Integer [_schemaCommonUniqueItems] :: SchemaCommon -> Maybe Bool [_schemaCommonEnum] :: SchemaCommon -> Maybe [Value] [_schemaCommonMultipleOf] :: SchemaCommon -> Maybe Scientific data Xml Xml :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Bool -> Maybe Bool -> Xml -- | Replaces the name of the element/attribute used for the described -- schema property. When defined within the Items -- (items), it will affect the name of the individual XML elements within -- the list. When defined alongside type being array (outside the items), -- it will affect the wrapping element and only if wrapped is true. If -- wrapped is false, it will be ignored. [_xmlName] :: Xml -> Maybe Text -- | The URL of the namespace definition. Value SHOULD be in the form of a -- URL. [_xmlNamespace] :: Xml -> Maybe Text -- | The prefix to be used for the name. [_xmlPrefix] :: Xml -> Maybe Text -- | Declares whether the property definition translates to an attribute -- instead of an element. Default value is False. [_xmlAttribute] :: Xml -> Maybe Bool -- | MAY be used only for an array definition. Signifies whether the array -- is wrapped (for example, -- <books><book><book></books>) -- or unwrapped (<book><book>). Default value -- is False. The definition takes effect only when defined -- alongside type being array (outside the items). [_xmlWrapped] :: Xml -> Maybe Bool -- | A container for the expected responses of an operation. The container -- maps a HTTP response code to the expected response. It is not expected -- from the documentation to necessarily cover all possible HTTP response -- codes, since they may not be known in advance. However, it is expected -- from the documentation to cover a successful operation response and -- any known errors. data Responses Responses :: Maybe (Referenced Response) -> HashMap HttpStatusCode (Referenced Response) -> Responses -- | The documentation of responses other than the ones declared for -- specific HTTP response codes. It can be used to cover undeclared -- responses. [_responsesDefault] :: Responses -> Maybe (Referenced Response) -- | Any HTTP status code can be used as the property name (one property -- per HTTP status code). Describes the expected response for those HTTP -- status codes. [_responsesResponses] :: Responses -> HashMap HttpStatusCode (Referenced Response) -- | Describes a single response from an API Operation. data Response Response :: Text -> Maybe (Referenced Schema) -> HashMap HeaderName Header -> Maybe Example -> Response -- | A short description of the response. GFM syntax can be used for rich -- text representation. [_responseDescription] :: Response -> Text -- | A definition of the response structure. It can be a primitive, an -- array or an object. If this field does not exist, it means no content -- is returned as part of the response. As an extension to the Schema -- Object, its root type value may also be "file". This SHOULD be -- accompanied by a relevant produces mime-type. [_responseSchema] :: Response -> Maybe (Referenced Schema) -- | A list of headers that are sent with the response. [_responseHeaders] :: Response -> HashMap HeaderName Header -- | An example of the response message. [_responseExamples] :: Response -> Maybe Example data SecurityScheme SecurityScheme :: SecuritySchemeType -> Maybe Text -> SecurityScheme -- | The type of the security scheme. [_securitySchemeType] :: SecurityScheme -> SecuritySchemeType -- | A short description for security scheme. [_securitySchemeDescription] :: SecurityScheme -> Maybe Text data SecuritySchemeType SecuritySchemeBasic :: SecuritySchemeType SecuritySchemeApiKey :: ApiKeyParams -> SecuritySchemeType SecuritySchemeOAuth2 :: OAuth2Params -> SecuritySchemeType -- | Lists the required security schemes to execute this operation. The -- object can have multiple security schemes declared in it which are all -- required (that is, there is a logical AND between the schemes). newtype SecurityRequirement SecurityRequirement :: HashMap Text [Text] -> SecurityRequirement [getSecurityRequirement] :: SecurityRequirement -> HashMap Text [Text] data ApiKeyParams ApiKeyParams :: Text -> ApiKeyLocation -> ApiKeyParams -- | The name of the header or query parameter to be used. [_apiKeyName] :: ApiKeyParams -> Text -- | The location of the API key. [_apiKeyIn] :: ApiKeyParams -> ApiKeyLocation -- | The location of the API key. data ApiKeyLocation ApiKeyQuery :: ApiKeyLocation ApiKeyHeader :: ApiKeyLocation data OAuth2Params OAuth2Params :: OAuth2Flow -> HashMap Text Text -> OAuth2Params -- | The flow used by the OAuth2 security scheme. [_oauth2Flow] :: OAuth2Params -> OAuth2Flow -- | The available scopes for the OAuth2 security scheme. [_oauth2Scopes] :: OAuth2Params -> HashMap Text Text data OAuth2Flow OAuth2Implicit :: AuthorizationURL -> OAuth2Flow OAuth2Password :: TokenURL -> OAuth2Flow OAuth2Application :: TokenURL -> OAuth2Flow OAuth2AccessCode :: AuthorizationURL -> TokenURL -> OAuth2Flow -- | The authorization URL to be used for OAuth2 flow. This SHOULD be in -- the form of a URL. type AuthorizationURL = Text -- | The token URL to be used for OAuth2 flow. This SHOULD be in the form -- of a URL. type TokenURL = Text -- | Allows referencing an external resource for extended documentation. data ExternalDocs ExternalDocs :: Maybe Text -> URL -> ExternalDocs -- | A short description of the target documentation. GFM syntax can be -- used for rich text representation. [_externalDocsDescription] :: ExternalDocs -> Maybe Text -- | The URL for the target documentation. [_externalDocsUrl] :: ExternalDocs -> URL -- | A simple object to allow referencing other definitions in the -- specification. It can be used to reference parameters and responses -- that are defined at the top level for reuse. newtype Reference Reference :: Text -> Reference [getReference] :: Reference -> Text data Referenced a Ref :: Reference -> Referenced a Inline :: a -> Referenced a newtype MimeList MimeList :: [MediaType] -> MimeList [getMimeList] :: MimeList -> [MediaType] newtype URL URL :: Text -> URL [getUrl] :: URL -> Text