h&/n       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~               )Nickolay Kudasov  experimental Safe-Inferred7$2swagger2 A declare monad parametrized by d+ @ the output to accumulate (declarations).This monad is similar to both state and writer monads. Thus it can be seen as4a restricted append-only version of a state monad ora writer monad with the extra ability to read all previous output.swagger2Definitions of declare and look! must satisfy the following laws: monoid homomorphism (mempty) mempty == return ()monoid homomorphism (mappend) x >>  y ==  (x <> y) for every x, ydeclare-look x >>  ==   (<> x)  <*  x for every xlook as left identity >> m == m for every mswagger2 x' is an action that produces the output x.swagger21 is an action that returns all the output so far.swagger2,A declare monad transformer parametrized by:d+ @ the output to accumulate (declarations);m @ the inner monad.This monad transformer is similar to both state and writer monad transformers. Thus it can be seen asa restricted append-only version of a state monad transformer ora writer monad transformer with the extra ability to read all previous output.swagger21Lift a computation from the simple Declare monad.swagger2-Retrieve a function of all the output so far. swagger2 Evaluate  d m a# computation, ignoring new output d. swagger2Execute DeclateT d m a= computation, ignoring result and only producing new output d. swagger2 Evaluate  d m a2 computation, starting with empty output history. swagger2Run  d a! computation with output history d, producing result a and new output d. swagger2 Evaluate  d a computation, ignoring output d.swagger2Execute Declate d a9 computation, ignoring result and only producing output d.swagger2 Evaluate  d m a2 computation, starting with empty output history.   Safe-Inferred ()0%*swagger2*Generic serialisation for swagger records.Features:omits nulls, empty objects and empty arrays (configurable)possible to add fieldspossible to merge sub-object+swagger2TODO:* This is only used by ToJSON (ParamSchema SwaggerKindSchema)Also uses default &!swagger2prefix !"#$%&'()*+,-"#*-+,$%& !(') Safe-Inferred.0'4swagger2Infer a 9( for a generic representation of a type.7swagger2 A combined shape for a sum type.8swagger2$A combined shape for a product type.9swagger2Shape of a datatype.:swagger2A simple enumeration.;swagger2(A product or a sum of non-unit products.<swagger28Mixed sum type with both unit and non-unit constructors. 456789<;: 9<;:87654 Safe-Inferred !;' =?>@BACDEFGHI CDEFGHI@BA=?> Safe-Inferred!$%()/045789:b#^swagger2A 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.aswagger2Allows referencing an external resource for extended documentation.cswagger2A short description of the target documentation. GFM syntax can be used for rich text representation.dswagger2%The URL for the target documentation.eswagger28Allows adding meta data to a single tag that is used by  Operation!. It is not mandatory to have a Tag per tag used there.gswagger2The name of the tag.hswagger2A short description for the tag. GFM syntax can be used for rich text representation.iswagger2/Additional external documentation for this tag.jswagger2 Tag name.kswagger2Lists 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).rswagger2 The type of the security scheme.sswagger2(A short description for security scheme.zswagger2,The flow used by the OAuth2 security scheme.{swagger24The available scopes for the OAuth2 security scheme.swagger2The token URL to be used for OAuth2 flow. This SHOULD be in the form of a URL.swagger2The authorization URL to be used for OAuth2 flow. This SHOULD be in the form of a URL.swagger25The name of the header or query parameter to be used.swagger2The location of the API key.swagger2The location of the API key.swagger2"A short description of the header.swagger22Describes a single response from an API Operation.swagger2A short description of the response. GFM syntax can be used for rich text representation.swagger2A 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.swagger22A list of headers that are sent with the response.swagger2#An example of the response message.swagger2A 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.swagger2The documentation of responses other than the ones declared for specific HTTP response codes. It can be used to cover undeclared responses.swagger2Any 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.swagger2Replaces the name of the element/attribute used for the described schema property. When defined within the  (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.swagger2The URL of the namespace definition. Value SHOULD be in the form of a URL.swagger2#The prefix to be used for the name.swagger2Declares whether the property definition translates to an attribute instead of an element. Default value is False.swagger2MAY be used only for an array definition. Signifies whether the array is wrapped (for example,  ) or unwrapped (). Default value is False. The definition takes effect only when defined alongside type being array (outside the items).swagger2Declares 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.swagger2Regex pattern for string type.swagger2A = with an optional name. This name can be used in references.swagger2#Determines the format of the array.swagger2:Parameters that are appended to the URL. For example, in  /items?id=###, the query parameter is id.swagger28Custom headers that are expected as part of the request.swagger2Used 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.swagger2The transfer protocol for the operation. The value overrides schemes.swagger2Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is False.swagger2A 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.swagger28Describes the operations available on a single path. A  may be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.swagger2-A definition of a GET operation on this path.swagger2-A definition of a PUT operation on this path.swagger2.A definition of a POST operation on this path.swagger20A definition of a DELETE operation on this path.swagger21A definition of a OPTIONS operation on this path.swagger2.A definition of a HEAD operation on this path.swagger2/A definition of a PATCH operation on this path.swagger2A 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.swagger2!The transfer protocol of the API.swagger2=The host (name or ip) serving the API. It MAY include a port.swagger2 Host name.swagger2Optional port.swagger2(License information for the exposed API.swagger2"The license name used for the API.swagger2&A URL to the license used for the API.swagger2(Contact information for the exposed API.swagger28The identifying name of the contact person/organization.swagger2,The URL pointing to the contact information.swagger25The email address of the contact person/organization.swagger2The 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.swagger2The title of the application.swagger2A short description of the application. GFM syntax can be used for rich text representation.swagger2!The Terms of Service for the API.swagger2,The contact information for the exposed API.swagger2,The license information for the exposed API.swagger2Provides the version of the application API (not to be confused with the specification version).swagger2;This is the root document object for the API specification.swagger2Provides metadata about the API. The metadata can be used by the clients if needed.swagger2The 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).swagger2The 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 (/).swagger2The 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.swagger2A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls.swagger2A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls.swagger2The available paths and operations for the API. Holds the relative paths to the individual endpoints. The path is appended to the basePath$ in order to construct the full URL.swagger2An object to hold data types produced and consumed by operations.swagger2An object to hold parameters that can be used across operations. This property does not define global parameters for all operations.swagger2An object to hold responses that can be used across operations. This property does not define global responses for all operations.swagger2Security scheme definitions that can be used across the specification.swagger2A 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.swagger2A 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.swagger2"Additional external documentation.swagger25A list of definitions that can be used in references.swagger2merge scopes of two OAuth2 security schemes when their flows are identical. In other case returns first security schemeswagger26decode "{}" :: Maybe (SwaggerItems 'SwaggerKindSchema)Just (SwaggerItemsArray [])eitherDecode "{\"$ref\":\"#/definitions/example\"}" :: Either String (SwaggerItems 'SwaggerKindSchema)Right (SwaggerItemsObject (Ref (Reference {getReference = "example"})))eitherDecode "[{\"$ref\":\"#/definitions/example\"}]" :: Either String (SwaggerItems 'SwaggerKindSchema)Right (SwaggerItemsArray [Ref (Reference {getReference = "example"})])swagger2:As for nullary schema for 0-arity type constructors, see  0https://github.com/GetShopTV/swagger2/issues/167.encode (SwaggerItemsArray [])."{\"example\":[],\"items\":{},\"maxItems\":0}"UWVXZY[\]^`_adcbeihgfjkmlnopsrqtwvux{zy|~}|~}x{zytwvupsrqnokmljeihgfadcb^`_[\]XZYUWV)Nickolay Kudasov  experimental Safe-Inferred()0fD%Andrzej Rybczak  experimental Safe-Inferred 0i )Nickolay Kudasov  experimental Safe-Inferred$%m\ swagger2?Options that specify how to encode your type to Swagger schema. swagger2Function applied to field labels. Handy for removing common record prefixes for example. swagger2Function applied to constructor tags which could be handy for lower-casing them for example. swagger2"Function applied to datatype name. swagger2If   the constructors of a datatype, with all nullary constructors, will be encoded to a string enumeration schema with the constructor tags as possible values. swagger2Hide the field name when a record constructor has only one field, like a newtype. swagger2Default encoding  .   {   = id ,   = id ,   = id ,   = True ,   = False } swagger2Convert   to  .-Specifically the following fields get copied:    )Note that these fields have no effect on  :   The rest is defined as in  .  Safe-Inferred!/0;vt swagger2Convert a type into a plain .An example type and instance: 8{-# LANGUAGE OverloadedStrings #-} -- allows to write   literals import Control.Lens data Direction = Up | Down instance ToParamSchema Direction where toParamSchema _ = mempty & type_ ?~ SwaggerString & enum_ ?~ [ "Up", "Down" ] !Instead of manually writing your  ; instance you can use a default generic implementation of  .To do that, simply add  deriving  ( clause to your datatype and declare a  ; instance for your datatype without giving definition for  .?For instance, the previous example can be simplified into this: {-# LANGUAGE DeriveGeneric #-} import GHC.Generics (Generic) data Direction = Up | Down deriving Generic instance ToParamSchema Direction swagger2-Convert a type into a plain parameter schema./encode $ toParamSchema (Proxy :: Proxy Integer)"{\"type\":\"integer\"}" swagger28Default schema for binary data (any sequence of octets). swagger20Default schema for binary data (base64 encoded). swagger2%Default schema for password string.  "password"; format is used to hint UIs the input needs to be obscured. swagger2Default plain schema for  ,   types.;encode $ toParamSchemaBoundedIntegral (Proxy :: Proxy Int8)9"{\"maximum\":127,\"minimum\":-128,\"type\":\"integer\"}" swagger2A configurable generic  creator.:set -XDeriveGeneric(data Color = Red | Blue deriving Genericencode $ genericToParamSchema defaultSchemaOptions (Proxy :: Proxy Color)3"{\"enum\":[\"Red\",\"Blue\"],\"type\":\"string\"}" swagger2*encode $ toParamSchema (Proxy :: Proxy ())("{\"enum\":[\"_\"],\"type\":\"string\"}" swagger20toParamSchema (Proxy :: Proxy UTCTime) ^. formatJust "yyyy-mm-ddThh:MM:ssZ" swagger22toParamSchema (Proxy :: Proxy ZonedTime) ^. formatJust "yyyy-mm-ddThh:MM:ss+hhMM" swagger22toParamSchema (Proxy :: Proxy LocalTime) ^. formatJust "yyyy-mm-ddThh:MM:ss" swagger22toParamSchema (Proxy :: Proxy TimeOfDay) ^. formatJust "hh:MM:ss" swagger2Format "date" corresponds to  yyyy-mm-dd format.  )Nickolay Kudasov  experimental Safe-Inferredw    Safe-Inferred!"./0;v( swagger2Convert a type into .An example type and instance: 8{-# LANGUAGE OverloadedStrings #-} -- allows to write   literals {-# LANGUAGE OverloadedLists #-} -- allows to write   and   as lists import Control.Lens import Data.Proxy import Data.Swagger data Coord = Coord { x :: Double, y :: Double } instance ToSchema Coord where declareNamedSchema _ = do doubleSchema <- declareSchemaRef (Proxy :: Proxy Double) return $ NamedSchema (Just "Coord") $ mempty & type_ ?~ SwaggerObject & properties .~ [ ("x", doubleSchema) , ("y", doubleSchema) ] & required .~ [ "x", "y" ] !Instead of manually writing your  ; instance you can use a default generic implementation of  .To do that, simply add  deriving  ( clause to your datatype and declare a  ; instance for your datatype without giving definition for  .?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 swagger2Convert a type into an optionally named schema together with all used definitions. Note that the schema itself is included in definitions only if it is recursive (and thus needs its definition in scope). swagger2Convert a type into a schema and declare all used schema definitions. swagger2/Convert a type into an optionally named schema.-toNamedSchema (Proxy :: Proxy String) ^. nameNothing8encode (toNamedSchema (Proxy :: Proxy String) ^. schema)"{\"type\":\"string\"}"*toNamedSchema (Proxy :: Proxy Day) ^. name Just "Day"5encode (toNamedSchema (Proxy :: Proxy Day) ^. schema)"{\"example\":\"2016-07-22\",\"format\":\"date\",\"type\":\"string\"}" swagger2(Get type's schema name according to its   instance.schemaName (Proxy :: Proxy Int)Nothing#schemaName (Proxy :: Proxy UTCTime)Just "UTCTime" swagger2Convert a type into a schema.'encode $ toSchema (Proxy :: Proxy Int8)9"{\"maximum\":127,\"minimum\":-128,\"type\":\"integer\"}"(encode $ toSchema (Proxy :: Proxy [Day])"{\"items\":{\"$ref\":\"#/definitions/Day\"},\"type\":\"array\"}" swagger2Convert a type into a referenced schema if possible. Only named schemas can be referenced, nameless schemas are inlined.-encode $ toSchemaRef (Proxy :: Proxy Integer)"{\"type\":\"integer\"}")encode $ toSchemaRef (Proxy :: Proxy Day)""{\"$ref\":\"#/definitions/Day\"}" swagger2Convert a type into a referenced schema if possible and declare all used schema definitions. Only named schemas can be referenced, nameless schemas are inlined.Schema definitions are typically declared for every referenced schema. If   returns a reference, a corresponding schema will be declared (regardless of whether it is recusive or not). swagger2Inline any referenced schema if its name satisfies given predicate.NOTE: if a referenced schema is not found in definitions the predicate is ignored and schema stays referenced.WARNING:   will produce infinite schemas when inlining recursive schemas. swagger2>Inline any referenced schema if its name is in the given list.NOTE: if a referenced schema is not found in definitions it stays referenced even if it appears in the list of names.WARNING:   will produce infinite schemas when inlining recursive schemas. swagger2Inline all schema references for which the definition can be found in .WARNING:   will produce infinite schemas when inlining recursive schemas. swagger20Convert a type into a schema without references./encode $ toInlinedSchema (Proxy :: Proxy [Day])"{\"items\":{\"example\":\"2016-07-22\",\"format\":\"date\",\"type\":\"string\"},\"type\":\"array\"}"WARNING:  ? will produce infinite schema when inlining recursive schemas. swagger2 Inline all  non-recursive3 schemas for which the definition can be found in . swagger28Default schema for binary data (any sequence of octets). swagger20Default schema for binary data (base64 encoded). swagger2%Default schema for password string.  "password"; format is used to hint UIs the input needs to be obscured. swagger2"Make an unrestrictive sketch of a  based on a  ? instance. Produced schema can be used for further refinement.encode $ sketchSchema "hello"-"{\"example\":\"hello\",\"type\":\"string\"}"encode $ sketchSchema (1, 2, 3)"{\"example\":[1,2,3],\"items\":{\"type\":\"number\"},\"type\":\"array\"}""encode $ sketchSchema ("Jack", 25)"{\"example\":[\"Jack\",25],\"items\":[{\"type\":\"string\"},{\"type\":\"number\"}],\"type\":\"array\"}"data Person = Person { name :: String, age :: Int } deriving (Generic)instance ToJSON Person(encode $ sketchSchema (Person "Jack" 25)"{\"required\":[\"name\",\"age\"],\"properties\":{\"name\":{\"type\":\"string\"},\"age\":{\"type\":\"number\"}},\"example\":{\"age\":25,\"name\":\"Jack\"},\"type\":\"object\"}" swagger2Make a restrictive sketch of a  based on a   instance. Produced schema uses as much constraints as possible.#encode $ sketchStrictSchema "hello""{\"enum\":[\"hello\"],\"maxLength\":5,\"minLength\":5,\"pattern\":\"hello\",\"type\":\"string\"}"%encode $ sketchStrictSchema (1, 2, 3)"{\"enum\":[[1,2,3]],\"items\":[{\"enum\":[1],\"maximum\":1,\"minimum\":1,\"multipleOf\":1,\"type\":\"number\"},{\"enum\":[2],\"maximum\":2,\"minimum\":2,\"multipleOf\":2,\"type\":\"number\"},{\"enum\":[3],\"maximum\":3,\"minimum\":3,\"multipleOf\":3,\"type\":\"number\"}],\"maxItems\":3,\"minItems\":3,\"type\":\"array\",\"uniqueItems\":true}"(encode $ sketchStrictSchema ("Jack", 25)"{\"enum\":[[\"Jack\",25]],\"items\":[{\"enum\":[\"Jack\"],\"maxLength\":4,\"minLength\":4,\"pattern\":\"Jack\",\"type\":\"string\"},{\"enum\":[25],\"maximum\":25,\"minimum\":25,\"multipleOf\":25,\"type\":\"number\"}],\"maxItems\":2,\"minItems\":2,\"type\":\"array\",\"uniqueItems\":true}"data Person = Person { name :: String, age :: Int } deriving (Generic)instance ToJSON Person.encode $ sketchStrictSchema (Person "Jack" 25)"{\"required\":[\"name\",\"age\"],\"properties\":{\"name\":{\"enum\":[\"Jack\"],\"maxLength\":4,\"minLength\":4,\"pattern\":\"Jack\",\"type\":\"string\"},\"age\":{\"enum\":[25],\"maximum\":25,\"minimum\":25,\"multipleOf\":25,\"type\":\"number\"}},\"maxProperties\":2,\"minProperties\":2,\"enum\":[{\"age\":25,\"name\":\"Jack\"}],\"type\":\"object\"}" swagger2Default schema for  ,   types.7encode $ toSchemaBoundedIntegral (Proxy :: Proxy Int16)="{\"maximum\":32767,\"minimum\":-32768,\"type\":\"integer\"}" swagger2!Default generic named schema for  ,   types. swagger2Declare a named schema for a newtype wrapper. swagger2Declare  for a mapping with     keys. This makes a much more useful schema when there aren't many options for key values.data ButtonState = Neutral | Focus | Active | Hover | Disabled deriving (Show, Bounded, Enum, Generic)instance ToJSON ButtonStateinstance ToSchema ButtonStateinstance ToJSONKey ButtonState where toJSONKey = toJSONKeyText (T.pack . show)type ImageUrl = T.Textencode $ toSchemaBoundedEnumKeyMapping (Proxy :: Proxy (Map ButtonState ImageUrl))"{\"properties\":{\"Neutral\":{\"type\":\"string\"},\"Focus\":{\"type\":\"string\"},\"Active\":{\"type\":\"string\"},\"Hover\":{\"type\":\"string\"},\"Disabled\":{\"type\":\"string\"}},\"type\":\"object\"}"Note: this is only useful when key is encoded with  . If it is encoded with   then a regular schema for [(key, value)] is used. swagger2A  for a mapping with     keys. This makes a much more useful schema when there aren't many options for key values.data ButtonState = Neutral | Focus | Active | Hover | Disabled deriving (Show, Bounded, Enum, Generic)instance ToJSON ButtonStateinstance ToSchema ButtonStateinstance ToJSONKey ButtonState where toJSONKey = toJSONKeyText (T.pack . show)type ImageUrl = T.Textencode $ toSchemaBoundedEnumKeyMapping (Proxy :: Proxy (Map ButtonState ImageUrl))"{\"properties\":{\"Neutral\":{\"type\":\"string\"},\"Focus\":{\"type\":\"string\"},\"Active\":{\"type\":\"string\"},\"Hover\":{\"type\":\"string\"},\"Disabled\":{\"type\":\"string\"}},\"type\":\"object\"}"Note: this is only useful when key is encoded with  . If it is encoded with   then a regular schema for [(key, value)] is used. swagger2A configurable generic  creator. swagger2A configurable generic $ creator. This function applied to   is used as the default for  " when the type is an instance of  . swagger2A configurable generic  creator.Unlike   also works for mixed sum types. Use with care since some Swagger tools do not support well schemas for mixed sum types. swagger2A configurable generic  creator.Unlike   also works for mixed sum types. Use with care since some Swagger tools do not support well schemas for mixed sum types. swagger2 Derive a  4-based name for a datatype and assign it to a given . swagger2 Lift a plain  into a model . swagger2 Lift a plain  into a model . swagger2Single field constructor. swagger2 swagger2>NOTE: This schema does not account for the uniqueness of keys. swagger2+toSchema (Proxy :: Proxy UTCTime) ^. formatJust "yyyy-mm-ddThh:MM:ssZ" swagger2Format "date" corresponds to yyyy-mm-ddThh:MM:ss(Z|+hh:MM) format. swagger2-toSchema (Proxy :: Proxy LocalTime) ^. formatJust "yyyy-mm-ddThh:MM:ss" swagger2Format "date" corresponds to  yyyy-mm-dd format. swagger2For   instance, see  -http://hackage.haskell.org/package/uuid-aeson uuid-aeson package. swagger2Record fields. swagger2Optional record fields. swagger2How to derive the name.swagger2,How to create a schema for the wrapped type.8 8 )Nickolay Kudasov  experimental Safe-Inferred& & )Nickolay Kudasov  experimental Safe-Inferred swagger2Prepend path piece to all operations of the spec. Leading and trailing slashes are trimmed/added automatically. experimental Safe-Inferred()07m swagger2Value validation. swagger2Validation configuration. swagger2Pattern checker for  validation. swagger22Schema definitions in scope to resolve references. swagger2Validation result type. swagger20Validation failed with a list of error messages. swagger2Validation passed. swagger2Validation error message. swagger2 Validate   instance matches   for a given value. This can be used with QuickCheck to ensure those instances are coherent:validateToJSON (x :: Int) == []NOTE:  2 does not perform string pattern validation. See  .See  ! on how the output is structured. swagger2 Variant of   with typed output. swagger2 Validate   instance matches   for a given value and pattern checker. This can be used with QuickCheck to ensure those instances are coherent.$For validation without patterns see  . See also:  . swagger2Pretty print validation errors together with actual JSON and Swagger Schema (using  ). import Data.Aeson as Aeson import Data.Foldable (traverse_)import GHC.Generics9data Phone = Phone { value :: String } deriving (Generic)data Person = Person { name :: String, phone :: Phone } deriving (Generic)instance ToJSON Person where toJSON p = object [ "name" Aeson..= name p ]instance ToSchema Phoneinstance ToSchema Person=let person = Person { name = "John", phone = Phone "123456" }traverse_ putStrLn $ renderValidationErrors validateToJSON person($Validation against the schema fails: * property "phone" is required, but not found in "{\"name\":\"John\"}" JSON value:{ "name": "John"}Swagger Schema:{ "properties": { "name": { "type": "string" }, "phone": {) "$ref": "#/definitions/Phone" } }, "required": [ "name", "phone" ], "type": "object"}Swagger Description Context:{ "Phone": { "properties": { "value": { "type": "string" } }, "required": [ "value" ], "type": "object" }} swagger2Validate JSON   against Swagger .validateJSON mempty (toSchema (Proxy :: Proxy Int)) (toJSON (x :: Int)) == []NOTE:  2 does not perform string pattern validation. See  . swagger2Validate JSON   agains Swagger  ' for a given value and pattern checker.$For validation without patterns see  . swagger2Default  : defaultConfig =   {   = \_pattern _str -> True ,   = mempty } swagger2Issue an error message. swagger2Validation passed. swagger2Validate schema's property given a lens into that property and property checker. swagger2Validate schema's property given a lens into that property and property checker. If property is missing in schema, consider it valid. swagger2*Validate same value with different schema. swagger27Validate same value with a part of the original schema. swagger2Validate value against a schema given schema reference and validation function. swagger2Validate JSON   with Swagger . swagger2Validate JSON   with Swagger . swagger2+Infer schema type based on used properties. This is like  , but also works for objects:4inferSchemaTypes <$> decode "{\"minProperties\": 1}"Just [SwaggerObject] swagger2+Infer schema type based on used properties.0inferSchemaTypes <$> decode "{\"minLength\": 2}"Just [SwaggerString]/inferSchemaTypes <$> decode "{\"maxItems\": 0}"Just [SwaggerArray]From numeric properties  type is inferred. If you want ) instead, you must specify it explicitly..inferSchemaTypes <$> decode "{\"minimum\": 1}"Just [SwaggerInteger]) ) )Nickolay Kudasov  experimental Safe-Inferredn  )Nickolay Kudasov  experimental Safe-InferredUVWXYZ[]\^_`abcdefghijklmnopqrstuvwxyz{|}~ efghijUVWpqrstuvwklmnoxyz{|}~abcd^_`[]\XYZ  Safe-Inferred"()^ swagger2Note:   may  ;, if schema type is not specified, and cannot be inferred.   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiijklmnnoppqrsstuvwxxyzz{{|}~`                                      swagger2-2.8-inplaceData.Swagger.Declare Data.Swagger.Internal.AesonUtilsData.Swagger.Internal.TypeShapeData.Swagger.Internal.UtilsData.Swagger.InternalData.Swagger.LensData.Swagger.OpticsData.Swagger.SchemaOptions!Data.Swagger.Internal.ParamSchemaData.Swagger.Internal.SchemaData.Swagger.Operation'Data.Swagger.Internal.Schema.ValidationData.Swagger.Schema.GeneratorData.Swagger.ParamSchemaData.Swagger.SchemaData.Swagger.Schema.Validation Data.SwaggerDeclare MonadDeclaredeclarelookDeclareT runDeclareT liftDeclarelooks evalDeclareT execDeclareT undeclareT runDeclare evalDeclare execDeclare undeclare$fMonadTransDeclareT$fMonadDeclareT$fApplicativeDeclareT$fMonadDeclaredWriterT$fMonadDeclaredWriterT0$fMonadDeclaredStateT$fMonadDeclaredStateT0$fMonadDeclaredRWST$fMonadDeclaredRWST0$fMonadDeclaredReaderT$fMonadDeclaredMaybeT$fMonadDeclaredIdentityT$fMonadDeclaredExceptT$fMonadDeclaredContT$fMonadDeclaredDeclareT$fFunctorDeclareTSwaggerAesonOptionsmkSwaggerAesonOptionsAesonDefaultValue defaultValueHasSwaggerAesonOptionsswaggerAesonOptions aesonDefaultssaoAdditionalPairs saoPrefix saoSubObjectsopSwaggerGenericToJSONsopSwaggerGenericToJSONWithOptssopSwaggerGenericParseJSONsopSwaggerGenericToEncoding $fAesonDefaultValueInsOrdHashMap $fAesonDefaultValueInsOrdHashSet$fAesonDefaultValueSet$fAesonDefaultValue[]$fAesonDefaultValueMaybe$fAesonDefaultValueText GenericShapeGenericHasSimpleShapeTypeHasSimpleShape SumCombine ProdCombine TypeShape Enumeration SumOfProductsMixed SwaggerMonoid swaggerMemptyswaggerMappendGMonoidgmemptygmappendswaggerFieldRules gunfoldEnum jsonPrefix parseOneOf<+> genericMemptygenericMappend $fGMonoidM1 $fGMonoid:*: $fGMonoidU1$fSwaggerMonoidMaybe$fSwaggerMonoidText$fSwaggerMonoidInsOrdHashMap$fSwaggerMonoidHashMap$fSwaggerMonoidMap$fSwaggerMonoidSet$fSwaggerMonoid[] $fGMonoidK1AdditionalPropertiesAdditionalPropertiesAllowedAdditionalPropertiesSchemaURLgetUrl ReferencedRefInline Reference getReference ExternalDocs_externalDocsDescription_externalDocsUrlTag_tagName_tagDescription_tagExternalDocsTagNameSecurityRequirementgetSecurityRequirementSecurityDefinitionsSecurityScheme_securitySchemeType_securitySchemeDescriptionSecuritySchemeTypeSecuritySchemeBasicSecuritySchemeApiKeySecuritySchemeOAuth2 OAuth2Params _oauth2Flow _oauth2Scopes OAuth2FlowOAuth2ImplicitOAuth2PasswordOAuth2ApplicationOAuth2AccessCodeTokenURLAuthorizationURL ApiKeyParams _apiKeyName _apiKeyInApiKeyLocation ApiKeyQuery ApiKeyHeaderExample getExampleHeader_headerDescription_headerParamSchema HeaderNameResponse_responseDescription_responseSchema_responseHeaders_responseExamplesHttpStatusCode Responses_responsesDefault_responsesResponsesXml_xmlName _xmlNamespace _xmlPrefix _xmlAttribute _xmlWrapped ParamSchema_paramSchemaDefault_paramSchemaType_paramSchemaFormat_paramSchemaItems_paramSchemaMaximum_paramSchemaExclusiveMaximum_paramSchemaMinimum_paramSchemaExclusiveMinimum_paramSchemaMaxLength_paramSchemaMinLength_paramSchemaPattern_paramSchemaMaxItems_paramSchemaMinItems_paramSchemaUniqueItems_paramSchemaEnum_paramSchemaMultipleOfPattern NamedSchema_namedSchemaName_namedSchemaSchemaSchema _schemaTitle_schemaDescription_schemaRequired _schemaAllOf_schemaProperties_schemaAdditionalProperties_schemaDiscriminator_schemaReadOnly _schemaXml_schemaExternalDocs_schemaExample_schemaMaxProperties_schemaMinProperties_schemaParamSchema ParamNameCollectionFormat CollectionCSV CollectionSSV CollectionTSVCollectionPipesCollectionMultiFormat ParamLocation ParamQuery ParamHeader ParamPath ParamFormData SwaggerType SwaggerString SwaggerNumberSwaggerIntegerSwaggerBoolean SwaggerArray SwaggerFile SwaggerNull SwaggerObjectSwaggerKindType SwaggerKindSwaggerKindNormalSwaggerKindParamOtherSchemaSwaggerKindSchema SwaggerItemsSwaggerItemsPrimitiveSwaggerItemsObjectSwaggerItemsArrayParamOtherSchema_paramOtherSchemaIn _paramOtherSchemaAllowEmptyValue_paramOtherSchemaParamSchemaParamAnySchema ParamBody ParamOtherParam _paramName_paramDescription_paramRequired _paramSchemaMimeList getMimeList Operation_operationTags_operationSummary_operationDescription_operationExternalDocs_operationOperationId_operationConsumes_operationProduces_operationParameters_operationResponses_operationSchemes_operationDeprecated_operationSecurityPathItem _pathItemGet _pathItemPut _pathItemPost_pathItemDelete_pathItemOptions _pathItemHead_pathItemPatch_pathItemParametersSchemeHttpHttpsWsWssHost _hostName _hostPortLicense _licenseName _licenseUrlContact _contactName _contactUrl _contactEmailInfo _infoTitle_infoDescription_infoTermsOfService _infoContact _infoLicense _infoVersionSwagger _swaggerInfo _swaggerHost_swaggerBasePath_swaggerSchemes_swaggerConsumes_swaggerProduces _swaggerPaths_swaggerDefinitions_swaggerParameters_swaggerResponses_swaggerSecurityDefinitions_swaggerSecurity _swaggerTags_swaggerExternalDocs Definitions hostConstr hostDataTypemimeListConstrmimeListDataTypeswaggerItemsPrimitiveConstrswaggerItemsObjectConstrswaggerItemsArrayConstrswaggerItemsDataTypeswaggerTypeConstrswaggerTypeDataTypeswaggerCommonTypesswaggerParamTypesswaggerSchemaTypesswaggerTypeConstrscollectionFormatConstrcollectionFormatDataTypecollectionCommonFormats exampleConstrexampleDataTypemergeSecurityScheme $fDataHost$fIsStringHost$fDataMimeList$fDataSwaggerType$fDataSwaggerType0$fDataSwaggerType1$fDataCollectionFormat $fDataExample$fIsStringReferenced$fHashableExternalDocs $fIsStringTag $fHashableTag$fIsStringLicense$fDataSwaggerItems$fDataSwaggerItems0$fDataSwaggerItems1$fIsStringResponse $fEqSwagger $fShowSwagger$fGenericSwagger $fDataSwagger $fEqPathItem$fShowPathItem$fGenericPathItem$fDataPathItem $fEqOperation$fShowOperation$fGenericOperation$fDataOperation $fEqParam $fShowParam$fGenericParam $fDataParam$fEqParamAnySchema$fShowParamAnySchema$fGenericParamAnySchema$fDataParamAnySchema$fEqParamOtherSchema$fShowParamOtherSchema$fGenericParamOtherSchema$fDataParamOtherSchema $fEqResponses$fShowResponses$fGenericResponses$fDataResponses $fEqResponse$fShowResponse$fGenericResponse$fDataResponse $fEqHeader $fShowHeader$fGenericHeader $fDataHeader$fEqNamedSchema$fShowNamedSchema$fGenericNamedSchema$fDataNamedSchema$fEqAdditionalProperties$fShowAdditionalProperties$fDataAdditionalProperties $fEqSchema $fShowSchema$fGenericSchema $fDataSchema$fEqParamSchema$fShowParamSchema$fGenericParamSchema$fEqInfo $fShowInfo $fGenericInfo $fDataInfo $fEqContact $fShowContact$fGenericContact $fDataContact $fEqLicense $fShowLicense$fGenericLicense $fDataLicense$fEqTag$fOrdTag $fShowTag $fGenericTag $fDataTag$fEqExternalDocs$fOrdExternalDocs$fShowExternalDocs$fGenericExternalDocs$fDataExternalDocs$fEqURL$fOrdURL $fShowURL $fHashableURL $fToJSONURL $fFromJSONURL $fDataURL$fEqReferenced$fShowReferenced$fFunctorReferenced$fDataReferenced $fEqReference$fShowReference$fDataReference$fEqSecurityRequirement$fReadSecurityRequirement$fShowSecurityRequirement$fSemigroupSecurityRequirement$fMonoidSecurityRequirement$fToJSONSecurityRequirement$fFromJSONSecurityRequirement$fDataSecurityRequirement$fEqSecurityDefinitions$fShowSecurityDefinitions$fGenericSecurityDefinitions$fDataSecurityDefinitions$fEqSecurityScheme$fShowSecurityScheme$fGenericSecurityScheme$fDataSecurityScheme$fEqSecuritySchemeType$fShowSecuritySchemeType$fGenericSecuritySchemeType$fDataSecuritySchemeType$fEqOAuth2Params$fShowOAuth2Params$fGenericOAuth2Params$fDataOAuth2Params$fEqOAuth2Flow$fShowOAuth2Flow$fGenericOAuth2Flow$fDataOAuth2Flow$fEqApiKeyParams$fShowApiKeyParams$fGenericApiKeyParams$fDataApiKeyParams$fEqApiKeyLocation$fShowApiKeyLocation$fGenericApiKeyLocation$fDataApiKeyLocation $fEqExample $fShowExample$fGenericExample$fEqXml $fShowXml $fGenericXml $fDataXml$fEqParamLocation$fShowParamLocation$fGenericParamLocation$fDataParamLocation $fEqMimeList$fShowMimeList$fSemigroupMimeList$fMonoidMimeList $fEqScheme $fShowScheme$fGenericScheme $fDataScheme$fEqHost $fShowHost $fGenericHost$fDataParamSchema$fDataCollectionFormat0$fShowCollectionFormat$fEqCollectionFormat$fShowSwaggerType$fEqSwaggerType$fShowSwaggerItems$fEqSwaggerItems$fHasDatatypeInfoHeader$fGenericHeader0$fHasDatatypeInfoOAuth2Params$fGenericOAuth2Params0$fHasDatatypeInfoOperation$fGenericOperation0$fHasDatatypeInfoParam$fGenericParam0!$fHasDatatypeInfoParamOtherSchema$fGenericParamOtherSchema0$fHasDatatypeInfoPathItem$fGenericPathItem0$fHasDatatypeInfoResponse$fGenericResponse0$fHasDatatypeInfoResponses$fGenericResponses0$fHasDatatypeInfoSecurityScheme$fGenericSecurityScheme0$fHasDatatypeInfoSchema$fGenericSchema0$fHasDatatypeInfoParamSchema$fGenericParamSchema0referencedToJSONreferencedParseJSON&$fAesonDefaultValueSecurityDefinitions $fAesonDefaultValueParamLocation$fAesonDefaultValueInfo$fAesonDefaultValueMimeList$fAesonDefaultValueSwaggerType%$fAesonDefaultValueSecuritySchemeType!$fAesonDefaultValueParamAnySchema$fAesonDefaultValueResponses$fAesonDefaultValueOAuth2Flow$fAesonDefaultValueParamSchema#$fHasSwaggerAesonOptionsParamSchema$$fHasSwaggerAesonOptionsParamSchema0$$fHasSwaggerAesonOptionsParamSchema1$fHasSwaggerAesonOptionsSwagger$fHasSwaggerAesonOptionsSchema&$fHasSwaggerAesonOptionsSecurityScheme!$fHasSwaggerAesonOptionsResponses $fHasSwaggerAesonOptionsResponse $fHasSwaggerAesonOptionsPathItem($fHasSwaggerAesonOptionsParamOtherSchema$fHasSwaggerAesonOptionsParam!$fHasSwaggerAesonOptionsOperation$$fHasSwaggerAesonOptionsOAuth2Params$fHasSwaggerAesonOptionsHeader$fFromJSONAdditionalProperties$fFromJSONParamSchema$fFromJSONParamSchema0$fFromJSONParamSchema1$fFromJSONCollectionFormat$fFromJSONCollectionFormat0$fFromJSONSwaggerType$fFromJSONSwaggerType0$fFromJSONSwaggerType1 $fFromJSONXml$fFromJSONReferenced$fFromJSONReferenced0$fFromJSONReferenced1$fFromJSONReference$fFromJSONSecurityDefinitions$fFromJSONPathItem$fFromJSONOperation$fFromJSONResponse$fFromJSONExample$fFromJSONResponses$fFromJSONParamOtherSchema$fFromJSONParamAnySchema$fFromJSONParam$fFromJSONMimeList$fFromJSONHost$fFromJSONSwaggerItems$fFromJSONSwaggerItems0$fFromJSONSwaggerItems1$fFromJSONHeader$fFromJSONSchema$fFromJSONSecurityScheme$fFromJSONSwagger$fFromJSONSecuritySchemeType$fFromJSONOAuth2Params$fFromJSONOAuth2Flow$fToJSONAdditionalProperties$fToJSONParamSchema$fToJSONCollectionFormat$fToJSONSwaggerType$fToJSONReferenced$fToJSONReferenced0$fToJSONReferenced1$fToJSONReference$fToJSONSecurityDefinitions$fToJSONExample$fToJSONPathItem$fToJSONOperation$fToJSONResponse$fToJSONResponses$fToJSONParamOtherSchema$fToJSONParamAnySchema $fToJSONParam$fToJSONMimeList $fToJSONHost$fToJSONSwaggerItems$fToJSONHeader$fToJSONSchema$fToJSONSecurityScheme$fToJSONSwagger$fToJSONSecuritySchemeType$fToJSONOAuth2Params$fToJSONOAuth2Flow$fFromJSONExternalDocs $fFromJSONTag$fFromJSONScheme$fFromJSONApiKeyParams$fFromJSONApiKeyLocation$fFromJSONLicense$fFromJSONContact$fFromJSONInfo$fFromJSONParamLocation $fToJSONXml$fToJSONExternalDocs $fToJSONTag$fToJSONScheme$fToJSONApiKeyParams$fToJSONApiKeyLocation$fToJSONLicense$fToJSONContact $fToJSONInfo$fToJSONParamLocation$fSwaggerMonoidParamAnySchema$fSwaggerMonoidReferenced$fSwaggerMonoidParamLocation$fSwaggerMonoidSwaggerType$fSwaggerMonoidMimeList$fSwaggerMonoidInsOrdHashSet"$fSwaggerMonoidSecurityDefinitions$fSwaggerMonoidOperation$fSwaggerMonoidExternalDocs$fSwaggerMonoidResponse$fSwaggerMonoidResponses$fSwaggerMonoidParamOtherSchema$fSwaggerMonoidParam$fSwaggerMonoidParamSchema$fSwaggerMonoidSchema$fSwaggerMonoidPathItem$fSwaggerMonoidInfo$fMonoidSecurityDefinitions$fSemigroupSecurityDefinitions$fSemigroupSecurityScheme$fMonoidExample$fSemigroupExample$fMonoidOperation$fSemigroupOperation$fMonoidExternalDocs$fSemigroupExternalDocs$fMonoidResponse$fSemigroupResponse$fMonoidResponses$fSemigroupResponses$fMonoidHeader$fSemigroupHeader$fMonoidParamOtherSchema$fSemigroupParamOtherSchema $fMonoidParam$fSemigroupParam$fMonoidParamSchema$fSemigroupParamSchema$fMonoidSchema$fSemigroupSchema$fMonoidPathItem$fSemigroupPathItem$fMonoidContact$fSemigroupContact $fMonoidInfo$fSemigroupInfo$fMonoidSwagger$fSemigroupSwagger$fHasDatatypeInfoSwagger$fGenericSwagger0$fSwaggerMonoidURLHasTagstagsHasSecurityDefinitionssecurityDefinitions HasSecuritysecurity HasSchemesschemes HasResponses responses HasProducesproducesHasPathspaths HasParameters parametersHasInfoinfoHasHosthostHasExternalDocs externalDocsHasDefinitions definitions HasConsumesconsumes HasBasePathbasePath$fHasBasePathSwaggerMaybe$fHasConsumesSwaggerMimeList$$fHasDefinitionsSwaggerInsOrdHashMap$fHasExternalDocsSwaggerMaybe$fHasHostSwaggerMaybe$fHasInfoSwaggerInfo#$fHasParametersSwaggerInsOrdHashMap$fHasPathsSwaggerInsOrdHashMap$fHasProducesSwaggerMimeList"$fHasResponsesSwaggerInsOrdHashMap$fHasSchemesSwaggerMaybe$fHasSecuritySwagger[]2$fHasSecurityDefinitionsSwaggerSecurityDefinitions$fHasTagsSwaggerInsOrdHashSetHasPortportHasNamename$fHasNameHost[]$fHasPortHostMaybe HasVersionversionHasTitletitleHasTermsOfServicetermsOfService HasLicenselicenseHasDescription description HasContactcontact$fHasContactInfoMaybe$fHasDescriptionInfoMaybe$fHasLicenseInfoMaybe$fHasTermsOfServiceInfoMaybe$fHasTitleInfoText$fHasVersionInfoTextHasUrlurlHasEmailemail$fHasNameContactMaybe$fHasEmailContactMaybe$fHasUrlContactMaybe$fHasUrlLicenseMaybe$fHasNameLicenseTextHasPutputHasPostpostHasPatchpatch HasOptionsoptionsHasHeadhead_HasGetget HasDeletedelete$fHasParametersPathItem[]$fHasDeletePathItemMaybe$fHasGetPathItemMaybe$fHasHeadPathItemMaybe$fHasOptionsPathItemMaybe$fHasPatchPathItemMaybe$fHasPostPathItemMaybe$fHasPutPathItemMaybe$fHasNameTagText$fHasExternalDocsTagMaybe$fHasDescriptionTagMaybe HasSummarysummaryHasOperationId operationId HasDeprecated deprecated$fHasTagsOperationInsOrdHashSet$fHasSecurityOperation[]$fHasSchemesOperationMaybe $fHasResponsesOperationResponses$fHasProducesOperationMaybe$fHasParametersOperation[]$fHasExternalDocsOperationMaybe$fHasDescriptionOperationMaybe$fHasConsumesOperationMaybe$fHasDeprecatedOperationMaybe$fHasOperationIdOperationMaybe$fHasSummaryOperationMaybe HasSchemaschema HasRequiredrequired$fHasNameParamText$fHasDescriptionParamMaybe$fHasRequiredParamMaybe$fHasSchemaParamParamAnySchemaHasParamSchema paramSchemaHasInin_HasAllowEmptyValueallowEmptyValue)$fHasAllowEmptyValueParamOtherSchemaMaybe$$fHasInParamOtherSchemaParamLocation+$fHasParamSchemaParamOtherSchemaParamSchema!$fHasParamSchemaHeaderParamSchema$fHasDescriptionHeaderMaybeHasXmlxml HasReadOnlyreadOnly HasProperties propertiesHasMinProperties minPropertiesHasMaxProperties maxProperties HasExampleexampleHasDiscriminator discriminatorHasAllOfallOfHasAdditionalPropertiesadditionalProperties$fHasTitleSchemaMaybe$fHasRequiredSchema[]!$fHasParamSchemaSchemaParamSchema$fHasExternalDocsSchemaMaybe$fHasDescriptionSchemaMaybe$$fHasAdditionalPropertiesSchemaMaybe$fHasAllOfSchemaMaybe$fHasDiscriminatorSchemaMaybe$fHasExampleSchemaMaybe$fHasMaxPropertiesSchemaMaybe$fHasMinPropertiesSchemaMaybe"$fHasPropertiesSchemaInsOrdHashMap$fHasReadOnlySchemaMaybe$fHasXmlSchemaMaybe$fHasSchemaNamedSchemaSchema$fHasNameNamedSchemaMaybeHasUniqueItems uniqueItemsHasTypetype_ HasPatternpattern HasMultipleOf multipleOf HasMinimumminimum_ HasMinLength minLength HasMinItemsminItems HasMaximummaximum_ HasMaxLength maxLength HasMaxItemsmaxItemsHasItemsitems HasFormatformatHasExclusiveMinimumexclusiveMinimumHasExclusiveMaximumexclusiveMaximumHasEnumenum_ HasDefaultdefault_$fHasDefaultParamSchemaMaybe$fHasEnumParamSchemaMaybe%$fHasExclusiveMaximumParamSchemaMaybe%$fHasExclusiveMinimumParamSchemaMaybe$fHasFormatParamSchemaMaybe$fHasItemsParamSchemaMaybe$fHasMaxItemsParamSchemaMaybe$fHasMaxLengthParamSchemaMaybe$fHasMaximumParamSchemaMaybe$fHasMinItemsParamSchemaMaybe$fHasMinLengthParamSchemaMaybe$fHasMinimumParamSchemaMaybe$fHasMultipleOfParamSchemaMaybe$fHasPatternParamSchemaMaybe$fHasTypeParamSchemaMaybe $fHasUniqueItemsParamSchemaMaybe HasWrappedwrapped HasPrefixprefix HasNamespace namespace HasAttribute attribute$fHasNameXmlMaybe$fHasAttributeXmlMaybe$fHasNamespaceXmlMaybe$fHasPrefixXmlMaybe$fHasWrappedXmlMaybe$$fHasResponsesResponsesInsOrdHashMap$fHasDefaultResponsesMaybe HasHeadersheaders HasExamplesexamples$fHasSchemaResponseMaybe$fHasDescriptionResponseText$fHasExamplesResponseMaybe!$fHasHeadersResponseInsOrdHashMap)$fHasTypeSecuritySchemeSecuritySchemeType#$fHasDescriptionSecuritySchemeMaybe$fHasUrlExternalDocsURL!$fHasDescriptionExternalDocsMaybe _ParamBody _ParamOther_SecuritySchemeBasic_SecuritySchemeApiKey_SecuritySchemeOAuth2_Ref_Inline_SwaggerItemsArray_SwaggerItemsObject_SwaggerItemsPrimitive$fHasMultipleOfsMaybe$fHasEnumsMaybe$fHasUniqueItemssMaybe$fHasMinItemssMaybe$fHasMaxItemssMaybe$fHasPatternsMaybe$fHasMinLengthsMaybe$fHasMaxLengthsMaybe$fHasExclusiveMinimumsMaybe$fHasMinimumsMaybe$fHasExclusiveMaximumsMaybe$fHasMaximumsMaybe$fHasItemssMaybe$fHasFormatsMaybe!$fHasDefaultParamOtherSchemaMaybe$fHasDefaultSchemaMaybe$fHasDefaultHeaderMaybe$fHasTypeParamOtherSchemaMaybe$fHasTypeNamedSchemaMaybe$fHasTypeSchemaMaybe$fHasTypeHeaderMaybe&$fHasParamSchemaNamedSchemaParamSchema$fAtSecurityDefinitions$fIxedSecurityDefinitions $fAtOperation$fIxedOperation $fAtResponses$fIxedResponses#$fLabelOptic"tags"kSwaggerSwaggerab2$fLabelOptic"securityDefinitions"kSwaggerSwaggerab'$fLabelOptic"security"kSwaggerSwaggerab&$fLabelOptic"schemes"kSwaggerSwaggerab($fLabelOptic"responses"kSwaggerSwaggerab'$fLabelOptic"produces"kSwaggerSwaggerab$$fLabelOptic"paths"kSwaggerSwaggerab)$fLabelOptic"parameters"kSwaggerSwaggerab#$fLabelOptic"info"kSwaggerSwaggerab#$fLabelOptic"host"kSwaggerSwaggerab+$fLabelOptic"externalDocs"kSwaggerSwaggerab*$fLabelOptic"definitions"kSwaggerSwaggerab'$fLabelOptic"consumes"kSwaggerSwaggerab'$fLabelOptic"basePath"kSwaggerSwaggerab$fLabelOptic"port"kHostHostab$fLabelOptic"name"kHostHostab $fLabelOptic"version"kInfoInfoab$fLabelOptic"title"kInfoInfoab'$fLabelOptic"termsOfService"kInfoInfoab $fLabelOptic"license"kInfoInfoab$$fLabelOptic"description"kInfoInfoab $fLabelOptic"contact"kInfoInfoab"$fLabelOptic"url"kContactContactab#$fLabelOptic"name"kContactContactab$$fLabelOptic"email"kContactContactab"$fLabelOptic"url"kLicenseLicenseab#$fLabelOptic"name"kLicenseLicenseab$$fLabelOptic"put"kPathItemPathItemab%$fLabelOptic"post"kPathItemPathItemab&$fLabelOptic"patch"kPathItemPathItemab+$fLabelOptic"parameters"kPathItemPathItemab($fLabelOptic"options"kPathItemPathItemab%$fLabelOptic"head"kPathItemPathItemab$$fLabelOptic"get"kPathItemPathItemab'$fLabelOptic"delete"kPathItemPathItemab$fLabelOptic"name"kTagTagab#$fLabelOptic"externalDocs"kTagTagab"$fLabelOptic"description"kTagTagab'$fLabelOptic"tags"kOperationOperationab*$fLabelOptic"summary"kOperationOperationab+$fLabelOptic"security"kOperationOperationab*$fLabelOptic"schemes"kOperationOperationab,$fLabelOptic"responses"kOperationOperationab+$fLabelOptic"produces"kOperationOperationab-$fLabelOptic"parameters"kOperationOperationab.$fLabelOptic"operationId"kOperationOperationab/$fLabelOptic"externalDocs"kOperationOperationab.$fLabelOptic"description"kOperationOperationab-$fLabelOptic"deprecated"kOperationOperationab+$fLabelOptic"consumes"kOperationOperationab!$fLabelOptic"schema"kParamParamab#$fLabelOptic"required"kParamParamab$fLabelOptic"name"kParamParamab&$fLabelOptic"description"kParamParamab<$fLabelOptic"paramSchema"kParamOtherSchemaParamOtherSchemaab3$fLabelOptic"in"kParamOtherSchemaParamOtherSchemaab$fLabelOptic"allowEmptyValue"kParamOtherSchemaParamOtherSchemaab($fLabelOptic"paramSchema"kHeaderHeaderab($fLabelOptic"description"kHeaderHeaderab $fLabelOptic"xml"kSchemaSchemaab"$fLabelOptic"title"kSchemaSchemaab%$fLabelOptic"required"kSchemaSchemaab%$fLabelOptic"readOnly"kSchemaSchemaab'$fLabelOptic"properties"kSchemaSchemaab($fLabelOptic"paramSchema"kSchemaSchemaab*$fLabelOptic"minProperties"kSchemaSchemaab*$fLabelOptic"maxProperties"kSchemaSchemaab)$fLabelOptic"externalDocs"kSchemaSchemaab$$fLabelOptic"example"kSchemaSchemaab*$fLabelOptic"discriminator"kSchemaSchemaab($fLabelOptic"description"kSchemaSchemaab"$fLabelOptic"allOf"kSchemaSchemaab1$fLabelOptic"additionalProperties"kSchemaSchemaab-$fLabelOptic"schema"kNamedSchemaNamedSchemaab+$fLabelOptic"name"kNamedSchemaNamedSchemaab2$fLabelOptic"uniqueItems"kParamSchemaParamSchemaab+$fLabelOptic"type"kParamSchemaParamSchemaab.$fLabelOptic"pattern"kParamSchemaParamSchemaab1$fLabelOptic"multipleOf"kParamSchemaParamSchemaab.$fLabelOptic"minimum"kParamSchemaParamSchemaab0$fLabelOptic"minLength"kParamSchemaParamSchemaab/$fLabelOptic"minItems"kParamSchemaParamSchemaab.$fLabelOptic"maximum"kParamSchemaParamSchemaab0$fLabelOptic"maxLength"kParamSchemaParamSchemaab/$fLabelOptic"maxItems"kParamSchemaParamSchemaab,$fLabelOptic"items"kParamSchemaParamSchemaab-$fLabelOptic"format"kParamSchemaParamSchemaab7$fLabelOptic"exclusiveMinimum"kParamSchemaParamSchemaab7$fLabelOptic"exclusiveMaximum"kParamSchemaParamSchemaab+$fLabelOptic"enum"kParamSchemaParamSchemaab.$fLabelOptic"default"kParamSchemaParamSchemaab$fLabelOptic"wrapped"kXmlXmlab$fLabelOptic"prefix"kXmlXmlab $fLabelOptic"namespace"kXmlXmlab$fLabelOptic"name"kXmlXmlab $fLabelOptic"attribute"kXmlXmlab,$fLabelOptic"responses"kResponsesResponsesab*$fLabelOptic"default"kResponsesResponsesab'$fLabelOptic"schema"kResponseResponseab($fLabelOptic"headers"kResponseResponseab)$fLabelOptic"examples"kResponseResponseab,$fLabelOptic"description"kResponseResponseab1$fLabelOptic"type"kSecuritySchemeSecuritySchemeab8$fLabelOptic"description"kSecuritySchemeSecuritySchemeab,$fLabelOptic"url"kExternalDocsExternalDocsab4$fLabelOptic"description"kExternalDocsExternalDocsab8$fLabelOptic"_ParamOther"kParamAnySchemaParamAnySchemaab7$fLabelOptic"_ParamBody"kParamAnySchemaParamAnySchemaab$fLabelOptic"_SecuritySchemeOAuth2"kSecuritySchemeTypeSecuritySchemeTypeab$fLabelOptic"_SecuritySchemeApiKey"kSecuritySchemeTypeSecuritySchemeTypeab$fLabelOptic"_SecuritySchemeBasic"kSecuritySchemeTypeSecuritySchemeTypeab$fLabelOptic"multipleOf"A_LensParamOtherSchemaParamOtherSchemaab6$fLabelOptic"multipleOf"A_LensNamedSchemaNamedSchemaab,$fLabelOptic"multipleOf"A_LensSchemaSchemaab,$fLabelOptic"multipleOf"A_LensHeaderHeaderab:$fLabelOptic"enum"A_LensParamOtherSchemaParamOtherSchemaab0$fLabelOptic"enum"A_LensNamedSchemaNamedSchemaab&$fLabelOptic"enum"A_LensSchemaSchemaab&$fLabelOptic"enum"A_LensHeaderHeaderab$fLabelOptic"uniqueItems"A_LensParamOtherSchemaParamOtherSchemaab7$fLabelOptic"uniqueItems"A_LensNamedSchemaNamedSchemaab-$fLabelOptic"uniqueItems"A_LensSchemaSchemaab-$fLabelOptic"uniqueItems"A_LensHeaderHeaderab>$fLabelOptic"minItems"A_LensParamOtherSchemaParamOtherSchemaab4$fLabelOptic"minItems"A_LensNamedSchemaNamedSchemaab*$fLabelOptic"minItems"A_LensSchemaSchemaab*$fLabelOptic"minItems"A_LensHeaderHeaderab>$fLabelOptic"maxItems"A_LensParamOtherSchemaParamOtherSchemaab4$fLabelOptic"maxItems"A_LensNamedSchemaNamedSchemaab*$fLabelOptic"maxItems"A_LensSchemaSchemaab*$fLabelOptic"maxItems"A_LensHeaderHeaderab=$fLabelOptic"pattern"A_LensParamOtherSchemaParamOtherSchemaab3$fLabelOptic"pattern"A_LensNamedSchemaNamedSchemaab)$fLabelOptic"pattern"A_LensSchemaSchemaab)$fLabelOptic"pattern"A_LensHeaderHeaderab?$fLabelOptic"minLength"A_LensParamOtherSchemaParamOtherSchemaab5$fLabelOptic"minLength"A_LensNamedSchemaNamedSchemaab+$fLabelOptic"minLength"A_LensSchemaSchemaab+$fLabelOptic"minLength"A_LensHeaderHeaderab?$fLabelOptic"maxLength"A_LensParamOtherSchemaParamOtherSchemaab5$fLabelOptic"maxLength"A_LensNamedSchemaNamedSchemaab+$fLabelOptic"maxLength"A_LensSchemaSchemaab+$fLabelOptic"maxLength"A_LensHeaderHeaderab$fLabelOptic"exclusiveMinimum"A_LensParamOtherSchemaParamOtherSchemaab<$fLabelOptic"exclusiveMinimum"A_LensNamedSchemaNamedSchemaab2$fLabelOptic"exclusiveMinimum"A_LensSchemaSchemaab2$fLabelOptic"exclusiveMinimum"A_LensHeaderHeaderab=$fLabelOptic"minimum"A_LensParamOtherSchemaParamOtherSchemaab3$fLabelOptic"minimum"A_LensNamedSchemaNamedSchemaab)$fLabelOptic"minimum"A_LensSchemaSchemaab)$fLabelOptic"minimum"A_LensHeaderHeaderab$fLabelOptic"exclusiveMaximum"A_LensParamOtherSchemaParamOtherSchemaab<$fLabelOptic"exclusiveMaximum"A_LensNamedSchemaNamedSchemaab2$fLabelOptic"exclusiveMaximum"A_LensSchemaSchemaab2$fLabelOptic"exclusiveMaximum"A_LensHeaderHeaderab=$fLabelOptic"maximum"A_LensParamOtherSchemaParamOtherSchemaab3$fLabelOptic"maximum"A_LensNamedSchemaNamedSchemaab)$fLabelOptic"maximum"A_LensSchemaSchemaab)$fLabelOptic"maximum"A_LensHeaderHeaderab;$fLabelOptic"items"A_LensParamOtherSchemaParamOtherSchemaab1$fLabelOptic"items"A_LensNamedSchemaNamedSchemaab'$fLabelOptic"items"A_LensSchemaSchemaab'$fLabelOptic"items"A_LensHeaderHeaderab<$fLabelOptic"format"A_LensParamOtherSchemaParamOtherSchemaab2$fLabelOptic"format"A_LensNamedSchemaNamedSchemaab($fLabelOptic"format"A_LensSchemaSchemaab($fLabelOptic"format"A_LensHeaderHeaderab=$fLabelOptic"default"A_LensParamOtherSchemaParamOtherSchemaab3$fLabelOptic"default"A_LensNamedSchemaNamedSchemaab)$fLabelOptic"default"A_LensSchemaSchemaab)$fLabelOptic"default"A_LensHeaderHeaderab:$fLabelOptic"type"A_LensParamOtherSchemaParamOtherSchemaab0$fLabelOptic"type"A_LensNamedSchemaNamedSchemaab&$fLabelOptic"type"A_LensSchemaSchemaab&$fLabelOptic"type"A_LensHeaderHeaderab7$fLabelOptic"paramSchema"A_LensNamedSchemaNamedSchemaab$fLabelOptic"_SwaggerItemsPrimitive"A_ReviewSwaggerItemsSwaggerItemsab$fLabelOptic"_SwaggerItemsObject"A_ReviewSwaggerItemsSwaggerItemsab$fLabelOptic"_SwaggerItemsArray"A_ReviewSwaggerItemsSwaggerItemsab,$fLabelOptic"_Inline"kReferencedReferencedab)$fLabelOptic"_Ref"kReferencedReferencedab SchemaOptionsfieldLabelModifierconstructorTagModifierdatatypeNameModifierallNullaryToStringTagunwrapUnaryRecordsdefaultSchemaOptionsfromAesonOptionsProxy3GEnumParamSchemagenumParamSchemaGToParamSchemagtoParamSchemaToParamSchemaByteStringError ToParamSchema toParamSchemabinaryParamSchemabyteParamSchemapasswordParamSchematoParamSchemaBoundedIntegraltimeParamSchemagenericToParamSchema$fGToParamSchemaM1$fGToParamSchemaM10$fGToParamSchemaK1$fToParamSchemaUUID$fToParamSchema()$fToParamSchemaHashSet$fToParamSchemaSet$fToParamSchemaVector$fToParamSchemaVector0$fToParamSchemaVector1$fToParamSchemaVector2$fToParamSchema[]$fToParamSchemaIdentity$fToParamSchemaDual$fToParamSchemaLast$fToParamSchemaFirst$fToParamSchemaProduct$fToParamSchemaSum$fToParamSchemaAny$fToParamSchemaAll$fToParamSchemaSetCookie$fToParamSchemaVersion$fToParamSchemaText$fToParamSchemaText0$fToParamSchemaNominalDiffTime$fToParamSchemaUTCTime$fToParamSchemaZonedTime$fToParamSchemaLocalTime$fToParamSchemaTimeOfDay$fToParamSchemaDay$fToParamSchemaFloat$fToParamSchemaDouble$fToParamSchemaFixed$fToParamSchemaScientific$fToParamSchemaChar$fToParamSchemaWord64$fToParamSchemaWord32$fToParamSchemaWord16$fToParamSchemaWord8$fToParamSchemaWord$fToParamSchemaInt64$fToParamSchemaInt32$fToParamSchemaInt16$fToParamSchemaInt8$fToParamSchemaInt$fToParamSchemaNatural$fToParamSchemaInteger$fToParamSchemaBool$fToParamSchema[]0$fToParamSchemaByteString$fToParamSchemaByteString0$fGEnumParamSchema:+:$fGToParamSchema:+:$fGToParamSchemaM11$fGEnumParamSchemaM1Proxy2 GSumToSchema gsumToSchema AllNullaryToSchemaByteStringError GToSchemagdeclareNamedSchemaToSchemadeclareNamedSchemaunnamednamedplainunnamerename declareSchema toNamedSchema schemaNametoSchema toSchemaRefdeclareSchemaRefinlineSchemasWhen inlineSchemasinlineAllSchemastoInlinedSchemainlineNonRecursiveSchemas binarySchema byteSchemapasswordSchema sketchSchemasketchStrictSchema timeSchematoSchemaBoundedIntegral#genericToNamedSchemaBoundedIntegral genericDeclareNamedSchemaNewtype"declareSchemaBoundedEnumKeyMappingtoSchemaBoundedEnumKeyMappinggenericDeclareSchemagenericDeclareNamedSchema genericDeclareSchemaUnrestricted%genericDeclareNamedSchemaUnrestrictedgenericNameSchemagdatatypeSchemaNameparamSchemaToNamedSchemaparamSchemaToSchema nullarySchemagtoNamedSchemagdeclareSchemagdeclareSchemaRef appendItemwithFieldSchemagdeclareNamedSumSchemagsumConToSchemaWithgsumConToSchema $fGToSchemaM1$fGToSchemaM10$fGToSchemaM11$fGToSchemaM12$fGToSchema:*: $fGToSchemaK1$fGToSchemaK10$fToSchemaIdentity$fToSchemaDual$fToSchemaLast$fToSchemaFirst$fToSchemaProduct $fToSchemaSum $fToSchemaAny $fToSchemaAll$fToSchemaNonEmpty$fToSchemaHashSet $fToSchemaSet$fToSchemaVector$fToSchemaVector0$fToSchemaVector1$fToSchemaVector2$fToSchemaKeyMap$fToSchemaHashMap $fToSchemaMap$fToSchemaIntMap$fToSchemaIntSet$fToSchemaVersion$fToSchemaText$fToSchemaText0$fToSchemaUTCTime$fToSchemaNominalDiffTime$fToSchemaZonedTime$fToSchemaLocalTime $fToSchemaDay$fToSchema(,,,,,,)$fToSchema(,,,,,)$fToSchema(,,,,)$fToSchema(,,,)$fToSchema(,,) $fToSchema(,)$fToSchemaUUID $fToSchema()$fToSchemaEither$fToSchemaMaybe$fToSchemaFixed$fToSchemaFloat$fToSchemaDouble$fToSchemaScientific$fToSchemaChar$fToSchemaWord64$fToSchemaWord32$fToSchemaWord16$fToSchemaWord8$fToSchemaWord$fToSchemaInt64$fToSchemaInt32$fToSchemaInt16$fToSchemaInt8 $fToSchemaInt$fToSchemaNatural$fToSchemaInteger$fToSchemaBool $fToSchema[] $fToSchema[]0$fToSchemaTimeOfDay$fToSchemaByteString$fToSchemaByteString0$fGSumToSchemaM1$fGSumToSchemaM10$fGSumToSchemaM11$fGSumToSchema:+:$fGToSchema:+:$fGToSchemaM13$fGToSchemaM14 prependPath allOperations operationsOf applyTags applyTagsFordeclareResponse setResponsesetResponseWithsetResponseForsetResponseForWith Validation runValidationConfigconfigPatternCheckerconfigDefinitionsResultFailedPassedValidationErrorvalidatePrettyToJSONvalidateToJSON validateToJSONWithPatternCheckerrenderValidationErrors validateJSONvalidateJSONWithPatternChecker defaultConfig withConfig withSchemainvalidvalid checkMissingchecksubsub_withRefvalidateWithSchemaRefvalidateWithSchemavalidateWithParamSchemavalidateIntegervalidateNumbervalidateString validateArrayvalidateObject validateEnuminferSchemaTypesinferParamSchemaTypesvalidateSchemaTypevalidateParamSchemaTypeshowType $fMonadResult$fAlternativeResult$fApplicativeResult$fMonadValidation$fChoiceValidation$fProfunctorValidation$fAlternativeValidation$fApplicativeValidation$fFunctorValidation $fEqResult $fShowResult$fFunctorResult schemaGengenValuevalidateFromJSONbaseGHC.Basefmapghc-prim GHC.TypesTruesn-2.0.3.0-fc773894Data.Aeson.Types.InternalOptionsomitNothingFields sumEncodingtagSingleConstructors text-1.2.5.0Data.Text.InternalText Data.Text.Lazy.Builder.RealFloatFPFormatGHC.EnumBoundedGHC.RealIntegralcontainers-0.6.5.1Data.Map.InternalMapnrdrd-cntnrs-0.2.16.0-7c9ddab5Data.HashMap.InternalHashMap GHC.GenericsGenericData.Aeson.Types.ToJSONToJSONEnum ToJSONKeyTextToJSONKeyValuesn-prtty-0.8.9-4d890ccfData.Aeson.Encode.Pretty encodePrettyValueGHC.Errerror