From 4fa5196eb113f96ef44e0c2b0ccc83e0d5afd15e Mon Sep 17 00:00:00 2001 From: Jon Schoning Date: Fri, 27 May 2022 21:12:23 -0500 Subject: [PATCH] [haskell-http-client] relax Aeson constraint to allow Aeson 1 --- .../haskell-http-client/Core.mustache | 5 + .../haskell-http-client.cabal.mustache | 2 +- .../tests/Instances.mustache | 8 +- .../docs/OpenAPIPetstore-Core.html | 2 +- .../docs/OpenAPIPetstore-MimeTypes.html | 2 +- .../docs/src/OpenAPIPetstore.Core.html | 1107 +++++++++-------- .../example-app/openapi-petstore-app.cabal | 2 +- .../example-app/package.yaml | 2 +- .../lib/OpenAPIPetstore/Core.hs | 5 + .../openapi-petstore.cabal | 2 +- .../tests-integration/package.yaml | 2 +- .../haskell-http-client/tests/Instances.hs | 8 +- 12 files changed, 585 insertions(+), 562 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/Core.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/Core.mustache index ddd07b719218..f88ff04016e9 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/Core.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/Core.mustache @@ -14,6 +14,7 @@ Module : {{baseModule}}.Core {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} module {{baseModule}}.Core where @@ -419,7 +420,11 @@ _applyAuthMethods req config@({{configType}} {configAuthMethods = as}) = -- * Utils -- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON) +#if MIN_VERSION_aeson(2,0,0) _omitNulls :: [(A.Key, A.Value)] -> A.Value +#else +_omitNulls :: [(Text, A.Value)] -> A.Value +#endif _omitNulls = A.object . P.filter notNull where notNull (_, A.Null) = False diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/haskell-http-client.cabal.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/haskell-http-client.cabal.mustache index c5b3d8c19a24..f8cc63327238 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/haskell-http-client.cabal.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/haskell-http-client.cabal.mustache @@ -39,7 +39,7 @@ library lib ghc-options: -Wall -funbox-strict-fields build-depends: - aeson >=2.0 && <3.0 + aeson >=1.0 && <3.0 , base >=4.7 && <5.0 , base64-bytestring >1.0 && <2.0 , bytestring >=0.10.0 diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/tests/Instances.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/tests/Instances.mustache index b75ddeca6fbf..851982fffb77 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/tests/Instances.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/tests/Instances.mustache @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-unused-matches #-} module Instances where @@ -53,9 +54,12 @@ instance Arbitrary Date where arbitrary = Date <$> arbitrary shrink (Date xs) = Date <$> shrink xs +#if MIN_VERSION_aeson(2,0,0) +#else -- | A naive Arbitrary instance for A.Value: --- instance Arbitrary A.Value where --- arbitrary = arbitraryValue +instance Arbitrary A.Value where + arbitrary = arbitraryValue +#endif arbitraryValue :: Gen A.Value arbitraryValue = diff --git a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Core.html b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Core.html index a5d3d1d0a0f0..b7788fb21006 100644 --- a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Core.html +++ b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-Core.html @@ -1 +1 @@ -OpenAPIPetstore.Core
openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenAPIPetstore.Core

Description

 
Synopsis

OpenAPIPetstoreConfig

data OpenAPIPetstoreConfig Source #

 

Constructors

OpenAPIPetstoreConfig 

Fields

Instances

Instances details
Show OpenAPIPetstoreConfig Source #

display the config

Instance details

Defined in OpenAPIPetstore.Core

newConfig :: IO OpenAPIPetstoreConfig Source #

constructs a default OpenAPIPetstoreConfig

configHost:

http://petstore.swagger.io:80/v2

configUserAgent:

"openapi-petstore/0.1.0.0"

addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig Source #

updates config use AuthMethod on matching requests

withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig Source #

updates the config to use stdout logging

withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig Source #

updates the config to use stderr logging

withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig Source #

updates the config to disable logging

OpenAPIPetstoreRequest

data OpenAPIPetstoreRequest req contentType res accept Source #

Represents a request.

Type Variables:

  • req - request operation
  • contentType - MimeType associated with request body
  • res - response model
  • accept - MimeType associated with response body

Constructors

OpenAPIPetstoreRequest 

Fields

Instances

Instances details
Show (OpenAPIPetstoreRequest req contentType res accept) Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

showsPrec :: Int -> OpenAPIPetstoreRequest req contentType res accept -> ShowS #

show :: OpenAPIPetstoreRequest req contentType res accept -> String #

showList :: [OpenAPIPetstoreRequest req contentType res accept] -> ShowS #

rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Method Source #

rMethod Lens

rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [ByteString] Source #

rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params Source #

rParams Lens

rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [TypeRep] Source #

rParams Lens

HasBodyParam

class HasBodyParam req param where Source #

Designates the body parameter of a request

Minimal complete definition

Nothing

Methods

setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept Source #

Instances

Instances details
HasBodyParam Op123testSpecialTags Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Methods

setBodyParam :: (Consumes Op123testSpecialTags contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept -> Client -> OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept Source #

HasBodyParam CreateXmlItem XmlItem Source #

Body Param XmlItem - XmlItem Body

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) => OpenAPIPetstoreRequest CreateXmlItem contentType res accept -> XmlItem -> OpenAPIPetstoreRequest CreateXmlItem contentType res accept Source #

HasBodyParam FakeOuterBooleanSerialize BodyBool Source #

Body Param "body" - Input boolean as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterCompositeSerialize OuterComposite Source #

Body Param "body" - Input composite as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterNumberSerialize BodyDouble Source #

Body Param "body" - Input number as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterStringSerialize BodyText Source #

Body Param "body" - Input string as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestBodyWithFileSchema FileSchemaTestClass Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestBodyWithQueryParams User Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes TestClientModel contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClientModel contentType res accept -> Client -> OpenAPIPetstoreRequest TestClientModel contentType res accept Source #

HasBodyParam TestInlineAdditionalProperties ParamMapMapStringText Source #

Body Param "param" - request body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Methods

setBodyParam :: (Consumes TestClassname contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClassname contentType res accept -> Client -> OpenAPIPetstoreRequest TestClassname contentType res accept Source #

HasBodyParam AddPet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes AddPet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest AddPet contentType res accept -> Pet -> OpenAPIPetstoreRequest AddPet contentType res accept Source #

HasBodyParam UpdatePet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes UpdatePet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest UpdatePet contentType res accept -> Pet -> OpenAPIPetstoreRequest UpdatePet contentType res accept Source #

HasBodyParam PlaceOrder Order Source #

Body Param "body" - order placed for purchasing the pet

Instance details

Defined in OpenAPIPetstore.API.Store

Methods

setBodyParam :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => OpenAPIPetstoreRequest PlaceOrder contentType res accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType res accept Source #

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes CreateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest CreateUser contentType res accept -> User -> OpenAPIPetstoreRequest CreateUser contentType res accept Source #

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes UpdateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest UpdateUser contentType res accept -> User -> OpenAPIPetstoreRequest UpdateUser contentType res accept Source #

HasOptionalParam

class HasOptionalParam req param where Source #

Designates the optional parameters of a request

Minimal complete definition

applyOptionalParam | (-&-)

Methods

applyOptionalParam :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept Source #

Apply an optional parameter to a request

(-&-) :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept infixl 2 Source #

infix operator / alias for addOptionalParam

Instances

Instances details
HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamBinary Source #

Optional Param "binary" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamDateTime Source #

Optional Param "dateTime" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamFloat Source #

Optional Param "float" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamInteger Source #

Optional Param "integer" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamString Source #

Optional Param "string" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumFormString Source #

Optional Param "enum_form_string" - Form parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumFormStringArray Source #

Optional Param "enum_form_string_array" - Form parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumHeaderString Source #

Optional Param "enum_header_string" - Header parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumHeaderStringArray Source #

Optional Param "enum_header_string_array" - Header parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

Optional Param "enum_query_double" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryInteger Source #

Optional Param "enum_query_integer" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryString Source #

Optional Param "enum_query_string" - Query parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryStringArray Source #

Optional Param "enum_query_string_array" - Query parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters BooleanGroup Source #

Optional Param "boolean_group" - Boolean in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters Int64Group Source #

Optional Param "int64_group" - Integer in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters StringGroup Source #

Optional Param "string_group" - String in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam DeletePet ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UploadFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UploadFile File2 Source #

Optional Param "file" - file to upload

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

data Params Source #

Request Params

Constructors

Params 

Fields

Instances

Instances details
Show Params Source # 
Instance details

Defined in OpenAPIPetstore.Core

data ParamBody Source #

Request Body

Instances

Instances details
Show ParamBody Source # 
Instance details

Defined in OpenAPIPetstore.Core

OpenAPIPetstoreRequest Utils

_mkRequest Source #

Arguments

:: Method

Method

-> [ByteString]

Endpoint

-> OpenAPIPetstoreRequest req contentType res accept

req: Request Type, res: Response Type

setHeader :: OpenAPIPetstoreRequest req contentType res accept -> [Header] -> OpenAPIPetstoreRequest req contentType res accept Source #

addHeader :: OpenAPIPetstoreRequest req contentType res accept -> [Header] -> OpenAPIPetstoreRequest req contentType res accept Source #

removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] -> OpenAPIPetstoreRequest req contentType res accept Source #

_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept Source #

_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept Source #

setQuery :: OpenAPIPetstoreRequest req contentType res accept -> [QueryItem] -> OpenAPIPetstoreRequest req contentType res accept Source #

addQuery :: OpenAPIPetstoreRequest req contentType res accept -> [QueryItem] -> OpenAPIPetstoreRequest req contentType res accept Source #

addForm :: OpenAPIPetstoreRequest req contentType res accept -> Form -> OpenAPIPetstoreRequest req contentType res accept Source #

_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> Part -> OpenAPIPetstoreRequest req contentType res accept Source #

_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept Source #

_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept Source #

_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept Source #

Params Utils

toPath :: ToHttpApiData a => a -> ByteString Source #

toHeader :: ToHttpApiData a => (HeaderName, a) -> [Header] Source #

toForm :: ToHttpApiData v => (ByteString, v) -> Form Source #

toQuery :: ToHttpApiData a => (ByteString, Maybe a) -> [QueryItem] Source #

toPartialEscapeQuery :: ByteString -> Query -> PartialEscapeQuery Source #

OpenAPI CollectionFormat Utils

data CollectionFormat Source #

Determines the format of the array if type array is used.

Constructors

CommaSeparated

CSV format for multiple parameters.

SpaceSeparated

Also called SSV

TabSeparated

Also called TSV

PipeSeparated

`value1|value2|value2`

MultiParamArray

Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" (Query) or "formData" (Form)

toHeaderColl :: ToHttpApiData a => CollectionFormat -> (HeaderName, [a]) -> [Header] Source #

toFormColl :: ToHttpApiData v => CollectionFormat -> (ByteString, [v]) -> Form Source #

toQueryColl :: ToHttpApiData a => CollectionFormat -> (ByteString, Maybe [a]) -> Query Source #

_toColl :: Traversable f => CollectionFormat -> (f a -> [(b, ByteString)]) -> f [a] -> [(b, ByteString)] Source #

_toCollA :: (Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t ByteString)]) -> f (t [a]) -> [(b, t ByteString)] Source #

_toCollA' :: (Monoid c, Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] Source #

AuthMethods

class Typeable a => AuthMethod a where Source #

Provides a method to apply auth methods to requests

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> a -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

Instances

Instances details
AuthMethod AnyAuthMethod Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AnyAuthMethod -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthApiKeyApiKey Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthApiKeyApiKey -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthApiKeyApiKeyQuery Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthApiKeyApiKeyQuery -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthBasicHttpBasicTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthBasicHttpBasicTest -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthOAuthPetstoreAuth Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthOAuthPetstoreAuth -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

data AnyAuthMethod Source #

An existential wrapper for any AuthMethod

Constructors

forall a.AuthMethod a => AnyAuthMethod a 

Instances

Instances details
AuthMethod AnyAuthMethod Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AnyAuthMethod -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

_applyAuthMethods :: OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreConfig -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

apply all matching AuthMethods in config to request

Utils

_omitNulls :: [(Key, Value)] -> Value Source #

Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON)

_toFormItem :: (ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) Source #

Encodes fields using WH.toQueryParam

_emptyToNothing :: Maybe String -> Maybe String Source #

Collapse (Just "") to Nothing

_memptyToNothing :: (Monoid a, Eq a) => Maybe a -> Maybe a Source #

Collapse (Just mempty) to Nothing

DateTime Formatting

newtype DateTime Source #

Constructors

DateTime 

Fields

Instances

Instances details
FromJSON DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser DateTime

parseJSONList :: Value -> Parser [DateTime]

ToJSON DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: DateTime -> Value

toEncoding :: DateTime -> Encoding

toJSONList :: [DateTime] -> Value

toEncodingList :: [DateTime] -> Encoding

Data DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DateTime -> c DateTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DateTime #

toConstr :: DateTime -> Constr #

dataTypeOf :: DateTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DateTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DateTime) #

gmapT :: (forall b. Data b => b -> b) -> DateTime -> DateTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DateTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DateTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> DateTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DateTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

Show DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: DateTime -> () #

Eq DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Ord DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

FromHttpApiData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readDateTime :: (MonadFail m, Alternative m) => String -> m DateTime Source #

_parseISO8601

_showDateTime :: (t ~ UTCTime, FormatTime t) => t -> String Source #

TI.formatISO8601Millis

_parseISO8601 :: (ParseTime t, MonadFail m, Alternative m) => String -> m t Source #

parse an ISO8601 date-time string

Date Formatting

newtype Date Source #

Constructors

Date 

Fields

Instances

Instances details
FromJSON Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser Date

parseJSONList :: Value -> Parser [Date]

ToJSON Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: Date -> Value

toEncoding :: Date -> Encoding

toJSONList :: [Date] -> Value

toEncodingList :: [Date] -> Encoding

Data Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Date -> c Date #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Date #

toConstr :: Date -> Constr #

dataTypeOf :: Date -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Date) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date) #

gmapT :: (forall b. Data b => b -> b) -> Date -> Date #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r #

gmapQ :: (forall d. Data d => d -> u) -> Date -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Date -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Date -> m Date #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date #

Enum Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

succ :: Date -> Date #

pred :: Date -> Date #

toEnum :: Int -> Date #

fromEnum :: Date -> Int #

enumFrom :: Date -> [Date] #

enumFromThen :: Date -> Date -> [Date] #

enumFromTo :: Date -> Date -> [Date] #

enumFromThenTo :: Date -> Date -> Date -> [Date] #

Ix Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

range :: (Date, Date) -> [Date] #

index :: (Date, Date) -> Date -> Int #

unsafeIndex :: (Date, Date) -> Date -> Int #

inRange :: (Date, Date) -> Date -> Bool #

rangeSize :: (Date, Date) -> Int #

unsafeRangeSize :: (Date, Date) -> Int #

Show Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

showsPrec :: Int -> Date -> ShowS #

show :: Date -> String #

showList :: [Date] -> ShowS #

NFData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: Date -> () #

Eq Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

(==) :: Date -> Date -> Bool #

(/=) :: Date -> Date -> Bool #

Ord Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

compare :: Date -> Date -> Ordering #

(<) :: Date -> Date -> Bool #

(<=) :: Date -> Date -> Bool #

(>) :: Date -> Date -> Bool #

(>=) :: Date -> Date -> Bool #

max :: Date -> Date -> Date #

min :: Date -> Date -> Date #

FromHttpApiData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readDate :: MonadFail m => String -> m Date Source #

TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"

_showDate :: FormatTime t => t -> String Source #

TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"

Byte/Binary Formatting

newtype ByteArray Source #

base64 encoded characters

Constructors

ByteArray 

Instances

Instances details
FromJSON ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser ByteArray

parseJSONList :: Value -> Parser [ByteArray]

ToJSON ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: ByteArray -> Value

toEncoding :: ByteArray -> Encoding

toJSONList :: [ByteArray] -> Value

toEncodingList :: [ByteArray] -> Encoding

Data ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteArray -> c ByteArray #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteArray #

toConstr :: ByteArray -> Constr #

dataTypeOf :: ByteArray -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteArray) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteArray) #

gmapT :: (forall b. Data b => b -> b) -> ByteArray -> ByteArray #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteArray -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteArray -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

Show ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: ByteArray -> () #

Eq ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Ord ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

FromHttpApiData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readByteArray :: MonadFail m => Text -> m ByteArray Source #

read base64 encoded characters

_showByteArray :: ByteArray -> Text Source #

show base64 encoded characters

newtype Binary Source #

any sequence of octets

Constructors

Binary 

Fields

Instances

Instances details
FromJSON Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser Binary

parseJSONList :: Value -> Parser [Binary]

ToJSON Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: Binary -> Value

toEncoding :: Binary -> Encoding

toJSONList :: [Binary] -> Value

toEncodingList :: [Binary] -> Encoding

Data Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Binary -> c Binary #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Binary #

toConstr :: Binary -> Constr #

dataTypeOf :: Binary -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Binary) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Binary) #

gmapT :: (forall b. Data b => b -> b) -> Binary -> Binary #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Binary -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Binary -> r #

gmapQ :: (forall d. Data d => d -> u) -> Binary -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Binary -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

Show Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: Binary -> () #

Eq Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

(==) :: Binary -> Binary -> Bool #

(/=) :: Binary -> Binary -> Bool #

Ord Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

FromHttpApiData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Lens Type Aliases

type Lens_' s a = Lens_ s s a a Source #

type Lens_ s t a b = forall (f :: Type -> Type). Functor f => (a -> f b) -> s -> f t Source #

\ No newline at end of file +OpenAPIPetstore.Core
openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenAPIPetstore.Core

Description

 
Synopsis

OpenAPIPetstoreConfig

data OpenAPIPetstoreConfig Source #

 

Constructors

OpenAPIPetstoreConfig 

Fields

Instances

Instances details
Show OpenAPIPetstoreConfig Source #

display the config

Instance details

Defined in OpenAPIPetstore.Core

newConfig :: IO OpenAPIPetstoreConfig Source #

constructs a default OpenAPIPetstoreConfig

configHost:

http://petstore.swagger.io:80/v2

configUserAgent:

"openapi-petstore/0.1.0.0"

addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig Source #

updates config use AuthMethod on matching requests

withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig Source #

updates the config to use stdout logging

withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig Source #

updates the config to use stderr logging

withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig Source #

updates the config to disable logging

OpenAPIPetstoreRequest

data OpenAPIPetstoreRequest req contentType res accept Source #

Represents a request.

Type Variables:

  • req - request operation
  • contentType - MimeType associated with request body
  • res - response model
  • accept - MimeType associated with response body

Constructors

OpenAPIPetstoreRequest 

Fields

Instances

Instances details
Show (OpenAPIPetstoreRequest req contentType res accept) Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

showsPrec :: Int -> OpenAPIPetstoreRequest req contentType res accept -> ShowS #

show :: OpenAPIPetstoreRequest req contentType res accept -> String #

showList :: [OpenAPIPetstoreRequest req contentType res accept] -> ShowS #

rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Method Source #

rMethod Lens

rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [ByteString] Source #

rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params Source #

rParams Lens

rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [TypeRep] Source #

rParams Lens

HasBodyParam

class HasBodyParam req param where Source #

Designates the body parameter of a request

Minimal complete definition

Nothing

Methods

setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept Source #

Instances

Instances details
HasBodyParam Op123testSpecialTags Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Methods

setBodyParam :: (Consumes Op123testSpecialTags contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept -> Client -> OpenAPIPetstoreRequest Op123testSpecialTags contentType res accept Source #

HasBodyParam CreateXmlItem XmlItem Source #

Body Param XmlItem - XmlItem Body

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) => OpenAPIPetstoreRequest CreateXmlItem contentType res accept -> XmlItem -> OpenAPIPetstoreRequest CreateXmlItem contentType res accept Source #

HasBodyParam FakeOuterBooleanSerialize BodyBool Source #

Body Param "body" - Input boolean as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterCompositeSerialize OuterComposite Source #

Body Param "body" - Input composite as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterNumberSerialize BodyDouble Source #

Body Param "body" - Input number as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam FakeOuterStringSerialize BodyText Source #

Body Param "body" - Input string as post body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestBodyWithFileSchema FileSchemaTestClass Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestBodyWithQueryParams User Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.Fake

Methods

setBodyParam :: (Consumes TestClientModel contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClientModel contentType res accept -> Client -> OpenAPIPetstoreRequest TestClientModel contentType res accept Source #

HasBodyParam TestInlineAdditionalProperties ParamMapMapStringText Source #

Body Param "param" - request body

Instance details

Defined in OpenAPIPetstore.API.Fake

HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Methods

setBodyParam :: (Consumes TestClassname contentType, MimeRender contentType Client) => OpenAPIPetstoreRequest TestClassname contentType res accept -> Client -> OpenAPIPetstoreRequest TestClassname contentType res accept Source #

HasBodyParam AddPet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes AddPet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest AddPet contentType res accept -> Pet -> OpenAPIPetstoreRequest AddPet contentType res accept Source #

HasBodyParam UpdatePet Pet Source #

Body Param "body" - Pet object that needs to be added to the store

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

setBodyParam :: (Consumes UpdatePet contentType, MimeRender contentType Pet) => OpenAPIPetstoreRequest UpdatePet contentType res accept -> Pet -> OpenAPIPetstoreRequest UpdatePet contentType res accept Source #

HasBodyParam PlaceOrder Order Source #

Body Param "body" - order placed for purchasing the pet

Instance details

Defined in OpenAPIPetstore.API.Store

Methods

setBodyParam :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => OpenAPIPetstoreRequest PlaceOrder contentType res accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType res accept Source #

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes CreateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest CreateUser contentType res accept -> User -> OpenAPIPetstoreRequest CreateUser contentType res accept Source #

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

Instance details

Defined in OpenAPIPetstore.API.User

HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Instance details

Defined in OpenAPIPetstore.API.User

Methods

setBodyParam :: (Consumes UpdateUser contentType, MimeRender contentType User) => OpenAPIPetstoreRequest UpdateUser contentType res accept -> User -> OpenAPIPetstoreRequest UpdateUser contentType res accept Source #

HasOptionalParam

class HasOptionalParam req param where Source #

Designates the optional parameters of a request

Minimal complete definition

applyOptionalParam | (-&-)

Methods

applyOptionalParam :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept Source #

Apply an optional parameter to a request

(-&-) :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept infixl 2 Source #

infix operator / alias for addOptionalParam

Instances

Instances details
HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamBinary Source #

Optional Param "binary" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamDateTime Source #

Optional Param "dateTime" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamFloat Source #

Optional Param "float" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamInteger Source #

Optional Param "integer" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters ParamString Source #

Optional Param "string" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumFormString Source #

Optional Param "enum_form_string" - Form parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumFormStringArray Source #

Optional Param "enum_form_string_array" - Form parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumHeaderString Source #

Optional Param "enum_header_string" - Header parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumHeaderStringArray Source #

Optional Param "enum_header_string_array" - Header parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

Optional Param "enum_query_double" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryInteger Source #

Optional Param "enum_query_integer" - Query parameter enum test (double)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryString Source #

Optional Param "enum_query_string" - Query parameter enum test (string)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestEnumParameters EnumQueryStringArray Source #

Optional Param "enum_query_string_array" - Query parameter enum test (string array)

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters BooleanGroup Source #

Optional Param "boolean_group" - Boolean in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters Int64Group Source #

Optional Param "int64_group" - Integer in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam TestGroupParameters StringGroup Source #

Optional Param "string_group" - String in group parameters

Instance details

Defined in OpenAPIPetstore.API.Fake

HasOptionalParam DeletePet ApiKey Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest DeletePet contentType res accept -> ApiKey -> OpenAPIPetstoreRequest DeletePet contentType res accept Source #

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UploadFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

HasOptionalParam UploadFile File2 Source #

Optional Param "file" - file to upload

Instance details

Defined in OpenAPIPetstore.API.Pet

Methods

applyOptionalParam :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: OpenAPIPetstoreRequest UploadFile contentType res accept -> File2 -> OpenAPIPetstoreRequest UploadFile contentType res accept Source #

HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata Source #

Optional Param "additionalMetadata" - Additional data to pass to server

Instance details

Defined in OpenAPIPetstore.API.Pet

data Params Source #

Request Params

Constructors

Params 

Fields

Instances

Instances details
Show Params Source # 
Instance details

Defined in OpenAPIPetstore.Core

data ParamBody Source #

Request Body

Instances

Instances details
Show ParamBody Source # 
Instance details

Defined in OpenAPIPetstore.Core

OpenAPIPetstoreRequest Utils

_mkRequest Source #

Arguments

:: Method

Method

-> [ByteString]

Endpoint

-> OpenAPIPetstoreRequest req contentType res accept

req: Request Type, res: Response Type

setHeader :: OpenAPIPetstoreRequest req contentType res accept -> [Header] -> OpenAPIPetstoreRequest req contentType res accept Source #

addHeader :: OpenAPIPetstoreRequest req contentType res accept -> [Header] -> OpenAPIPetstoreRequest req contentType res accept Source #

removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] -> OpenAPIPetstoreRequest req contentType res accept Source #

_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept Source #

_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept Source #

setQuery :: OpenAPIPetstoreRequest req contentType res accept -> [QueryItem] -> OpenAPIPetstoreRequest req contentType res accept Source #

addQuery :: OpenAPIPetstoreRequest req contentType res accept -> [QueryItem] -> OpenAPIPetstoreRequest req contentType res accept Source #

addForm :: OpenAPIPetstoreRequest req contentType res accept -> Form -> OpenAPIPetstoreRequest req contentType res accept Source #

_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> Part -> OpenAPIPetstoreRequest req contentType res accept Source #

_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept Source #

_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept Source #

_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept Source #

Params Utils

toPath :: ToHttpApiData a => a -> ByteString Source #

toHeader :: ToHttpApiData a => (HeaderName, a) -> [Header] Source #

toForm :: ToHttpApiData v => (ByteString, v) -> Form Source #

toQuery :: ToHttpApiData a => (ByteString, Maybe a) -> [QueryItem] Source #

toPartialEscapeQuery :: ByteString -> Query -> PartialEscapeQuery Source #

OpenAPI CollectionFormat Utils

data CollectionFormat Source #

Determines the format of the array if type array is used.

Constructors

CommaSeparated

CSV format for multiple parameters.

SpaceSeparated

Also called SSV

TabSeparated

Also called TSV

PipeSeparated

`value1|value2|value2`

MultiParamArray

Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" (Query) or "formData" (Form)

toHeaderColl :: ToHttpApiData a => CollectionFormat -> (HeaderName, [a]) -> [Header] Source #

toFormColl :: ToHttpApiData v => CollectionFormat -> (ByteString, [v]) -> Form Source #

toQueryColl :: ToHttpApiData a => CollectionFormat -> (ByteString, Maybe [a]) -> Query Source #

_toColl :: Traversable f => CollectionFormat -> (f a -> [(b, ByteString)]) -> f [a] -> [(b, ByteString)] Source #

_toCollA :: (Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t ByteString)]) -> f (t [a]) -> [(b, t ByteString)] Source #

_toCollA' :: (Monoid c, Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] Source #

AuthMethods

class Typeable a => AuthMethod a where Source #

Provides a method to apply auth methods to requests

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> a -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

Instances

Instances details
AuthMethod AnyAuthMethod Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AnyAuthMethod -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthApiKeyApiKey Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthApiKeyApiKey -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthApiKeyApiKeyQuery Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthApiKeyApiKeyQuery -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthBasicHttpBasicTest Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthBasicHttpBasicTest -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

AuthMethod AuthOAuthPetstoreAuth Source # 
Instance details

Defined in OpenAPIPetstore.Model

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AuthOAuthPetstoreAuth -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

data AnyAuthMethod Source #

An existential wrapper for any AuthMethod

Constructors

forall a.AuthMethod a => AnyAuthMethod a 

Instances

Instances details
AuthMethod AnyAuthMethod Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

applyAuthMethod :: OpenAPIPetstoreConfig -> AnyAuthMethod -> OpenAPIPetstoreRequest req contentType res accept -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

_applyAuthMethods :: OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreConfig -> IO (OpenAPIPetstoreRequest req contentType res accept) Source #

apply all matching AuthMethods in config to request

Utils

_omitNulls :: [(Key, Value)] -> Value Source #

Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON)

_toFormItem :: (ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) Source #

Encodes fields using WH.toQueryParam

_emptyToNothing :: Maybe String -> Maybe String Source #

Collapse (Just "") to Nothing

_memptyToNothing :: (Monoid a, Eq a) => Maybe a -> Maybe a Source #

Collapse (Just mempty) to Nothing

DateTime Formatting

newtype DateTime Source #

Constructors

DateTime 

Fields

Instances

Instances details
FromJSON DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser DateTime

parseJSONList :: Value -> Parser [DateTime]

ToJSON DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: DateTime -> Value

toEncoding :: DateTime -> Encoding

toJSONList :: [DateTime] -> Value

toEncodingList :: [DateTime] -> Encoding

Data DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DateTime -> c DateTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DateTime #

toConstr :: DateTime -> Constr #

dataTypeOf :: DateTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DateTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DateTime) #

gmapT :: (forall b. Data b => b -> b) -> DateTime -> DateTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DateTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DateTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> DateTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DateTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DateTime -> m DateTime #

Show DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: DateTime -> () #

Eq DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

Ord DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

FromHttpApiData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readDateTime :: (MonadFail m, Alternative m) => String -> m DateTime Source #

_parseISO8601

_showDateTime :: (t ~ UTCTime, FormatTime t) => t -> String Source #

TI.formatISO8601Millis

_parseISO8601 :: (ParseTime t, MonadFail m, Alternative m) => String -> m t Source #

parse an ISO8601 date-time string

Date Formatting

newtype Date Source #

Constructors

Date 

Fields

Instances

Instances details
FromJSON Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser Date

parseJSONList :: Value -> Parser [Date]

ToJSON Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: Date -> Value

toEncoding :: Date -> Encoding

toJSONList :: [Date] -> Value

toEncodingList :: [Date] -> Encoding

Data Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Date -> c Date #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Date #

toConstr :: Date -> Constr #

dataTypeOf :: Date -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Date) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date) #

gmapT :: (forall b. Data b => b -> b) -> Date -> Date #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r #

gmapQ :: (forall d. Data d => d -> u) -> Date -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Date -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Date -> m Date #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date #

Enum Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

succ :: Date -> Date #

pred :: Date -> Date #

toEnum :: Int -> Date #

fromEnum :: Date -> Int #

enumFrom :: Date -> [Date] #

enumFromThen :: Date -> Date -> [Date] #

enumFromTo :: Date -> Date -> [Date] #

enumFromThenTo :: Date -> Date -> Date -> [Date] #

Ix Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

range :: (Date, Date) -> [Date] #

index :: (Date, Date) -> Date -> Int #

unsafeIndex :: (Date, Date) -> Date -> Int #

inRange :: (Date, Date) -> Date -> Bool #

rangeSize :: (Date, Date) -> Int #

unsafeRangeSize :: (Date, Date) -> Int #

Show Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

showsPrec :: Int -> Date -> ShowS #

show :: Date -> String #

showList :: [Date] -> ShowS #

NFData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: Date -> () #

Eq Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

(==) :: Date -> Date -> Bool #

(/=) :: Date -> Date -> Bool #

Ord Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

compare :: Date -> Date -> Ordering #

(<) :: Date -> Date -> Bool #

(<=) :: Date -> Date -> Bool #

(>) :: Date -> Date -> Bool #

(>=) :: Date -> Date -> Bool #

max :: Date -> Date -> Date #

min :: Date -> Date -> Date #

FromHttpApiData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readDate :: MonadFail m => String -> m Date Source #

TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"

_showDate :: FormatTime t => t -> String Source #

TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"

Byte/Binary Formatting

newtype ByteArray Source #

base64 encoded characters

Constructors

ByteArray 

Instances

Instances details
FromJSON ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser ByteArray

parseJSONList :: Value -> Parser [ByteArray]

ToJSON ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: ByteArray -> Value

toEncoding :: ByteArray -> Encoding

toJSONList :: [ByteArray] -> Value

toEncodingList :: [ByteArray] -> Encoding

Data ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteArray -> c ByteArray #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteArray #

toConstr :: ByteArray -> Constr #

dataTypeOf :: ByteArray -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteArray) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteArray) #

gmapT :: (forall b. Data b => b -> b) -> ByteArray -> ByteArray #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteArray -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteArray -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

Show ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: ByteArray -> () #

Eq ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

Ord ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

FromHttpApiData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

_readByteArray :: MonadFail m => Text -> m ByteArray Source #

read base64 encoded characters

_showByteArray :: ByteArray -> Text Source #

show base64 encoded characters

newtype Binary Source #

any sequence of octets

Constructors

Binary 

Fields

Instances

Instances details
FromJSON Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

parseJSON :: Value -> Parser Binary

parseJSONList :: Value -> Parser [Binary]

ToJSON Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

toJSON :: Binary -> Value

toEncoding :: Binary -> Encoding

toJSONList :: [Binary] -> Value

toEncodingList :: [Binary] -> Encoding

Data Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Binary -> c Binary #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Binary #

toConstr :: Binary -> Constr #

dataTypeOf :: Binary -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Binary) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Binary) #

gmapT :: (forall b. Data b => b -> b) -> Binary -> Binary #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Binary -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Binary -> r #

gmapQ :: (forall d. Data d => d -> u) -> Binary -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Binary -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Binary -> m Binary #

Show Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

NFData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

rnf :: Binary -> () #

Eq Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Methods

(==) :: Binary -> Binary -> Bool #

(/=) :: Binary -> Binary -> Bool #

Ord Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

FromHttpApiData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

ToHttpApiData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

Lens Type Aliases

type Lens_' s a = Lens_ s s a a Source #

type Lens_ s t a b = forall (f :: Type -> Type). Functor f => (a -> f b) -> s -> f t Source #

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-MimeTypes.html b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-MimeTypes.html index 668fc4c78fbe..e880aebd5079 100644 --- a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-MimeTypes.html +++ b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-MimeTypes.html @@ -1 +1 @@ -OpenAPIPetstore.MimeTypes
openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenAPIPetstore.MimeTypes

Description

 

ContentType MimeType

data ContentType a Source #

Constructors

MimeType a => ContentType 

Fields

Accept MimeType

data Accept a Source #

Constructors

MimeType a => Accept 

Fields

Consumes Class

class MimeType mtype => Consumes req mtype Source #

Instances

Instances details
Consumes Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Consumes CreateXmlItem MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterBooleanSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterCompositeSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterNumberSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterStringSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithFileSchema MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithQueryParams MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEndpointParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEnumParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestJsonFormData MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Consumes AddPet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFileWithRequiredFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

MimeType mtype => Consumes PlaceOrder mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Store

MimeType mtype => Consumes CreateUser mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUsersWithArrayInput mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUsersWithListInput mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes UpdateUser mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

Produces Class

class MimeType mtype => Produces req mtype Source #

Instances

Instances details
Produces Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Produces CreateXmlItem MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterBooleanSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterCompositeSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterNumberSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterStringSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithFileSchema MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithQueryParams MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEndpointParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEnumParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestGroupParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestInlineAdditionalProperties MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestJsonFormData MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestQueryParameterCollectionFormat MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Produces AddPet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeletePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePetWithForm MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFileWithRequiredFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces CreateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithArrayInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithListInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces LogoutUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces UpdateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Default Mime Types

data MimeJSON Source #

Constructors

MimeJSON 

Instances

Instances details
MimeType MimeJSON Source #
application/json; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeJSON -> [MediaType] Source #

mimeType :: Proxy MimeJSON -> Maybe MediaType Source #

mimeType' :: MimeJSON -> Maybe MediaType Source #

mimeTypes' :: MimeJSON -> [MediaType] Source #

Consumes Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Consumes TestBodyWithFileSchema MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithQueryParams MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Consumes AddPet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

ToJSON a => MimeRender MimeJSON a Source #

encode

Instance details

Defined in OpenAPIPetstore.MimeTypes

FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
Instance details

Defined in OpenAPIPetstore.MimeTypes

Produces Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Produces TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Produces FindPetsByStatus MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFileWithRequiredFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetUserByName MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

data MimeXML Source #

Constructors

MimeXML 

Instances

Instances details
MimeType MimeXML Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeXML -> [MediaType] Source #

mimeType :: Proxy MimeXML -> Maybe MediaType Source #

mimeType' :: MimeXML -> Maybe MediaType Source #

mimeTypes' :: MimeXML -> [MediaType] Source #

Consumes CreateXmlItem MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes AddPet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetUserByName MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

data MimePlainText Source #

Constructors

MimePlainText 

Instances

Instances details
MimeType MimePlainText Source #
text/plain; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimePlainText -> [MediaType] Source #

mimeType :: Proxy MimePlainText -> Maybe MediaType Source #

mimeType' :: MimePlainText -> Maybe MediaType Source #

mimeTypes' :: MimePlainText -> [MediaType] Source #

MimeRender MimePlainText ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeFormUrlEncoded Source #

Constructors

MimeFormUrlEncoded 

Instances

Instances details
MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes TestEndpointParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEnumParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestJsonFormData MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Pet

ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeMultipartFormData Source #

Constructors

MimeMultipartFormData 

Instances

Instances details
MimeType MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFileWithRequiredFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

MimeRender MimeMultipartFormData ByteString Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Kind Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData Text Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData String Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Integer Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Bool Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Char Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Double Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Float Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Int Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeOctetStream Source #

Constructors

MimeOctetStream 

Instances

Instances details
MimeType MimeOctetStream Source #
application/octet-stream
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeNoContent Source #

Constructors

MimeNoContent 

Instances

Instances details
MimeType MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeNoContent -> [MediaType] Source #

mimeType :: Proxy MimeNoContent -> Maybe MediaType Source #

mimeType' :: MimeNoContent -> Maybe MediaType Source #

mimeTypes' :: MimeNoContent -> [MediaType] Source #

MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

Produces CreateXmlItem MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithFileSchema MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithQueryParams MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEndpointParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEnumParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestGroupParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestInlineAdditionalProperties MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestJsonFormData MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestQueryParameterCollectionFormat MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces AddPet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeletePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePetWithForm MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

Produces CreateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithArrayInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithListInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces LogoutUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces UpdateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

data MimeAny Source #

Constructors

MimeAny 

Instances

Instances details
MimeType MimeAny Source #
"*/*"
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeAny -> [MediaType] Source #

mimeType :: Proxy MimeAny -> Maybe MediaType Source #

mimeType' :: MimeAny -> Maybe MediaType Source #

mimeTypes' :: MimeAny -> [MediaType] Source #

data NoContent Source #

A type for responses without content-body.

Constructors

NoContent 

MimeType Class

class Typeable mtype => MimeType mtype where Source #

Minimal complete definition

mimeType | mimeTypes

Methods

mimeTypes :: Proxy mtype -> [MediaType] Source #

mimeType :: Proxy mtype -> Maybe MediaType Source #

mimeType' :: mtype -> Maybe MediaType Source #

mimeTypes' :: mtype -> [MediaType] Source #

Instances

Instances details
MimeType MimeAny Source #
"*/*"
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeAny -> [MediaType] Source #

mimeType :: Proxy MimeAny -> Maybe MediaType Source #

mimeType' :: MimeAny -> Maybe MediaType Source #

mimeTypes' :: MimeAny -> [MediaType] Source #

MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeJSON Source #
application/json; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeJSON -> [MediaType] Source #

mimeType :: Proxy MimeJSON -> Maybe MediaType Source #

mimeType' :: MimeJSON -> Maybe MediaType Source #

mimeTypes' :: MimeJSON -> [MediaType] Source #

MimeType MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeNoContent -> [MediaType] Source #

mimeType :: Proxy MimeNoContent -> Maybe MediaType Source #

mimeType' :: MimeNoContent -> Maybe MediaType Source #

mimeTypes' :: MimeNoContent -> [MediaType] Source #

MimeType MimeOctetStream Source #
application/octet-stream
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimePlainText Source #
text/plain; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimePlainText -> [MediaType] Source #

mimeType :: Proxy MimePlainText -> Maybe MediaType Source #

mimeType' :: MimePlainText -> Maybe MediaType Source #

mimeTypes' :: MimePlainText -> [MediaType] Source #

MimeType MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeTextXml -> [MediaType] Source #

mimeType :: Proxy MimeTextXml -> Maybe MediaType Source #

mimeType' :: MimeTextXml -> Maybe MediaType Source #

mimeTypes' :: MimeTextXml -> [MediaType] Source #

MimeType MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeXML Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeXML -> [MediaType] Source #

mimeType :: Proxy MimeXML -> Maybe MediaType Source #

mimeType' :: MimeXML -> Maybe MediaType Source #

mimeTypes' :: MimeXML -> [MediaType] Source #

MimeType MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender Class

class MimeType mtype => MimeRender mtype x where Source #

Minimal complete definition

mimeRender

Methods

mimeRender :: Proxy mtype -> x -> ByteString Source #

mimeRender' :: mtype -> x -> ByteString Source #

Instances

Instances details
ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

ToJSON a => MimeRender MimeJSON a Source #

encode

Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData ByteString Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Kind Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData Text Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData String Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Integer Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Bool Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Char Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Double Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Float Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Int Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender Class

class MimeType mtype => MimeUnrender mtype o where Source #

Minimal complete definition

mimeUnrender

Instances

Instances details
FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

Custom Mime Types

MimeXmlCharsetutf16

data MimeXmlCharsetutf16 Source #

Constructors

MimeXmlCharsetutf16 

Instances

Instances details
MimeType MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeXmlCharsetutf8

data MimeXmlCharsetutf8 Source #

Constructors

MimeXmlCharsetutf8 

Instances

Instances details
MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXml

data MimeTextXml Source #

Constructors

MimeTextXml 

Instances

Instances details
MimeType MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeTextXml -> [MediaType] Source #

mimeType :: Proxy MimeTextXml -> Maybe MediaType Source #

mimeType' :: MimeTextXml -> Maybe MediaType Source #

mimeTypes' :: MimeTextXml -> [MediaType] Source #

Consumes CreateXmlItem MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXmlCharsetutf16

data MimeTextXmlCharsetutf16 Source #

Instances

Instances details
MimeType MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXmlCharsetutf8

data MimeTextXmlCharsetutf8 Source #

Instances

Instances details
MimeType MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

\ No newline at end of file +OpenAPIPetstore.MimeTypes
openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenAPIPetstore.MimeTypes

Description

 

ContentType MimeType

data ContentType a Source #

Constructors

MimeType a => ContentType 

Fields

Accept MimeType

data Accept a Source #

Constructors

MimeType a => Accept 

Fields

Consumes Class

class MimeType mtype => Consumes req mtype Source #

Instances

Instances details
Consumes Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Consumes CreateXmlItem MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes CreateXmlItem MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterBooleanSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterCompositeSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterNumberSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Consumes FakeOuterStringSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithFileSchema MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithQueryParams MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEndpointParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEnumParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestJsonFormData MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Consumes AddPet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes AddPet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFileWithRequiredFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

MimeType mtype => Consumes PlaceOrder mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Store

MimeType mtype => Consumes CreateUser mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUsersWithArrayInput mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes CreateUsersWithListInput mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

MimeType mtype => Consumes UpdateUser mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.User

Produces Class

class MimeType mtype => Produces req mtype Source #

Instances

Instances details
Produces Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Produces CreateXmlItem MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterBooleanSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterCompositeSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterNumberSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeType mtype => Produces FakeOuterStringSerialize mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithFileSchema MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithQueryParams MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEndpointParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEnumParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestGroupParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestInlineAdditionalProperties MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestJsonFormData MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestQueryParameterCollectionFormat MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Produces AddPet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeletePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePetWithForm MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFileWithRequiredFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces CreateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithArrayInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithListInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces GetUserByName MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces LogoutUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces UpdateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Default Mime Types

data MimeJSON Source #

Constructors

MimeJSON 

Instances

Instances details
MimeType MimeJSON Source #
application/json; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeJSON -> [MediaType] Source #

mimeType :: Proxy MimeJSON -> Maybe MediaType Source #

mimeType' :: MimeJSON -> Maybe MediaType Source #

mimeTypes' :: MimeJSON -> [MediaType] Source #

Consumes Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Consumes TestBodyWithFileSchema MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestBodyWithQueryParams MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Consumes AddPet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

ToJSON a => MimeRender MimeJSON a Source #

encode

Instance details

Defined in OpenAPIPetstore.MimeTypes

FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
Instance details

Defined in OpenAPIPetstore.MimeTypes

Produces Op123testSpecialTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.AnotherFake

Produces TestClientModel MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestClassname MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.FakeClassnameTags123

Produces FindPetsByStatus MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UploadFileWithRequiredFile MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetUserByName MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.User

data MimeXML Source #

Constructors

MimeXML 

Instances

Instances details
MimeType MimeXML Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeXML -> [MediaType] Source #

mimeType :: Proxy MimeXML -> Maybe MediaType Source #

mimeType' :: MimeXML -> Maybe MediaType Source #

mimeTypes' :: MimeXML -> [MediaType] Source #

Consumes CreateXmlItem MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes AddPet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UpdatePet MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByStatus MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces FindPetsByTags MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetPetById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetUserByName MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

Produces LoginUser MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.User

data MimePlainText Source #

Constructors

MimePlainText 

Instances

Instances details
MimeType MimePlainText Source #
text/plain; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimePlainText -> [MediaType] Source #

mimeType :: Proxy MimePlainText -> Maybe MediaType Source #

mimeType' :: MimePlainText -> Maybe MediaType Source #

mimeTypes' :: MimePlainText -> [MediaType] Source #

MimeRender MimePlainText ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeFormUrlEncoded Source #

Constructors

MimeFormUrlEncoded 

Instances

Instances details
MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes TestEndpointParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestEnumParameters MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes TestJsonFormData MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Fake

Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.API.Pet

ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeMultipartFormData Source #

Constructors

MimeMultipartFormData 

Instances

Instances details
MimeType MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

Consumes UploadFileWithRequiredFile MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.API.Pet

MimeRender MimeMultipartFormData ByteString Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Kind Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData Text Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData String Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Integer Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Bool Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Char Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Double Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Float Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Int Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeOctetStream Source #

Constructors

MimeOctetStream 

Instances

Instances details
MimeType MimeOctetStream Source #
application/octet-stream
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

data MimeNoContent Source #

Constructors

MimeNoContent 

Instances

Instances details
MimeType MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeNoContent -> [MediaType] Source #

mimeType :: Proxy MimeNoContent -> Maybe MediaType Source #

mimeType' :: MimeNoContent -> Maybe MediaType Source #

mimeTypes' :: MimeNoContent -> [MediaType] Source #

MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

Produces CreateXmlItem MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithFileSchema MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestBodyWithQueryParams MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEndpointParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestEnumParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestGroupParameters MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestInlineAdditionalProperties MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestJsonFormData MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces TestQueryParameterCollectionFormat MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Fake

Produces AddPet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeletePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePet MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces UpdatePetWithForm MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Pet

Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

Produces CreateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithArrayInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces CreateUsersWithListInput MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces DeleteUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces LogoutUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

Produces UpdateUser MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.User

data MimeAny Source #

Constructors

MimeAny 

Instances

Instances details
MimeType MimeAny Source #
"*/*"
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeAny -> [MediaType] Source #

mimeType :: Proxy MimeAny -> Maybe MediaType Source #

mimeType' :: MimeAny -> Maybe MediaType Source #

mimeTypes' :: MimeAny -> [MediaType] Source #

data NoContent Source #

A type for responses without content-body.

Constructors

NoContent 

MimeType Class

class Typeable mtype => MimeType mtype where Source #

Minimal complete definition

mimeType | mimeTypes

Methods

mimeTypes :: Proxy mtype -> [MediaType] Source #

mimeType :: Proxy mtype -> Maybe MediaType Source #

mimeType' :: mtype -> Maybe MediaType Source #

mimeTypes' :: mtype -> [MediaType] Source #

Instances

Instances details
MimeType MimeAny Source #
"*/*"
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeAny -> [MediaType] Source #

mimeType :: Proxy MimeAny -> Maybe MediaType Source #

mimeType' :: MimeAny -> Maybe MediaType Source #

mimeTypes' :: MimeAny -> [MediaType] Source #

MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeJSON Source #
application/json; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeJSON -> [MediaType] Source #

mimeType :: Proxy MimeJSON -> Maybe MediaType Source #

mimeType' :: MimeJSON -> Maybe MediaType Source #

mimeTypes' :: MimeJSON -> [MediaType] Source #

MimeType MimeMultipartFormData Source #
multipart/form-data
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeNoContent -> [MediaType] Source #

mimeType :: Proxy MimeNoContent -> Maybe MediaType Source #

mimeType' :: MimeNoContent -> Maybe MediaType Source #

mimeTypes' :: MimeNoContent -> [MediaType] Source #

MimeType MimeOctetStream Source #
application/octet-stream
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimePlainText Source #
text/plain; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimePlainText -> [MediaType] Source #

mimeType :: Proxy MimePlainText -> Maybe MediaType Source #

mimeType' :: MimePlainText -> Maybe MediaType Source #

mimeTypes' :: MimePlainText -> [MediaType] Source #

MimeType MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeTextXml -> [MediaType] Source #

mimeType :: Proxy MimeTextXml -> Maybe MediaType Source #

mimeType' :: MimeTextXml -> Maybe MediaType Source #

mimeTypes' :: MimeTextXml -> [MediaType] Source #

MimeType MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeXML Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeXML -> [MediaType] Source #

mimeType :: Proxy MimeXML -> Maybe MediaType Source #

mimeType' :: MimeXML -> Maybe MediaType Source #

mimeTypes' :: MimeXML -> [MediaType] Source #

MimeType MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender Class

class MimeType mtype => MimeRender mtype x where Source #

Minimal complete definition

mimeRender

Methods

mimeRender :: Proxy mtype -> x -> ByteString Source #

mimeRender' :: mtype -> x -> ByteString Source #

Instances

Instances details
ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

ToJSON a => MimeRender MimeJSON a Source #

encode

Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData ByteString Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Binary Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData ByteArray Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData Date Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData DateTime Source # 
Instance details

Defined in OpenAPIPetstore.Core

MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumFormStringArray Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumNumber Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'EnumString Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Inner Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'JustSymbol Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Kind Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData E'Status2 Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData EnumClass Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData OuterEnum Source # 
Instance details

Defined in OpenAPIPetstore.Model

MimeRender MimeMultipartFormData Text Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData String Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Integer Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Bool Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Char Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Double Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Float Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeMultipartFormData Int Source # 
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimeOctetStream String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText ByteString Source #
P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeRender MimePlainText String Source #
BCL.pack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender Class

class MimeType mtype => MimeUnrender mtype o where Source #

Minimal complete definition

mimeUnrender

Instances

Instances details
FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
Instance details

Defined in OpenAPIPetstore.MimeTypes

FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
Instance details

Defined in OpenAPIPetstore.MimeTypes

MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
Instance details

Defined in OpenAPIPetstore.MimeTypes

Custom Mime Types

MimeXmlCharsetutf16

data MimeXmlCharsetutf16 Source #

Constructors

MimeXmlCharsetutf16 

Instances

Instances details
MimeType MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeXmlCharsetutf16 Source #
application/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeXmlCharsetutf8

data MimeXmlCharsetutf8 Source #

Constructors

MimeXmlCharsetutf8 

Instances

Instances details
MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXml

data MimeTextXml Source #

Constructors

MimeTextXml 

Instances

Instances details
MimeType MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.MimeTypes

Methods

mimeTypes :: Proxy MimeTextXml -> [MediaType] Source #

mimeType :: Proxy MimeTextXml -> Maybe MediaType Source #

mimeType' :: MimeTextXml -> Maybe MediaType Source #

mimeTypes' :: MimeTextXml -> [MediaType] Source #

Consumes CreateXmlItem MimeTextXml Source #
text/xml
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXmlCharsetutf16

data MimeTextXmlCharsetutf16 Source #

Instances

Instances details
MimeType MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeTextXmlCharsetutf16 Source #
text/xml; charset=utf-16
Instance details

Defined in OpenAPIPetstore.API.Fake

MimeTextXmlCharsetutf8

data MimeTextXmlCharsetutf8 Source #

Instances

Instances details
MimeType MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.MimeTypes

Consumes CreateXmlItem MimeTextXmlCharsetutf8 Source #
text/xml; charset=utf-8
Instance details

Defined in OpenAPIPetstore.API.Fake

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Core.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Core.html index 3d6eea878e37..500a2cb9312c 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Core.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.Core.html @@ -23,110 +23,111 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} -{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} - -module OpenAPIPetstore.Core where - -import OpenAPIPetstore.MimeTypes -import OpenAPIPetstore.Logging - -import qualified Control.Arrow as P (left) -import qualified Control.DeepSeq as NF -import qualified Control.Exception.Safe as E -import qualified Data.Aeson as A -import qualified Data.ByteString as B -import qualified Data.ByteString.Base64.Lazy as BL64 -import qualified Data.ByteString.Builder as BB -import qualified Data.ByteString.Char8 as BC -import qualified Data.ByteString.Lazy as BL -import qualified Data.ByteString.Lazy.Char8 as BCL -import qualified Data.CaseInsensitive as CI -import qualified Data.Data as P (Data, Typeable, TypeRep, typeRep) -import qualified Data.Foldable as P -import qualified Data.Ix as P -import qualified Data.Kind as K (Type) -import qualified Data.Maybe as P -import qualified Data.Proxy as P (Proxy(..)) -import qualified Data.Text as T -import qualified Data.Text.Encoding as T -import qualified Data.Time as TI -import qualified Data.Time.ISO8601 as TI -import qualified GHC.Base as P (Alternative) -import qualified Lens.Micro as L -import qualified Network.HTTP.Client.MultipartFormData as NH -import qualified Network.HTTP.Types as NH -import qualified Prelude as P -import qualified Text.Printf as T -import qualified Web.FormUrlEncoded as WH -import qualified Web.HttpApiData as WH - -import Control.Applicative ((<|>)) -import Control.Applicative (Alternative) -import Control.Monad.Fail (MonadFail) -import Data.Function ((&)) -import Data.Foldable(foldlM) -import Data.Monoid ((<>)) -import Data.Text (Text) -import Prelude (($), (.), (&&), (<$>), (<*>), Maybe(..), Bool(..), Char, String, fmap, mempty, pure, return, show, IO, Monad, Functor, maybe) - --- * OpenAPIPetstoreConfig - --- | -data OpenAPIPetstoreConfig = OpenAPIPetstoreConfig - { OpenAPIPetstoreConfig -> ByteString +{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module OpenAPIPetstore.Core where + +import OpenAPIPetstore.MimeTypes +import OpenAPIPetstore.Logging + +import qualified Control.Arrow as P (left) +import qualified Control.DeepSeq as NF +import qualified Control.Exception.Safe as E +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Base64.Lazy as BL64 +import qualified Data.ByteString.Builder as BB +import qualified Data.ByteString.Char8 as BC +import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Lazy.Char8 as BCL +import qualified Data.CaseInsensitive as CI +import qualified Data.Data as P (Data, Typeable, TypeRep, typeRep) +import qualified Data.Foldable as P +import qualified Data.Ix as P +import qualified Data.Kind as K (Type) +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Time as TI +import qualified Data.Time.ISO8601 as TI +import qualified GHC.Base as P (Alternative) +import qualified Lens.Micro as L +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Types as NH +import qualified Prelude as P +import qualified Text.Printf as T +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Control.Applicative ((<|>)) +import Control.Applicative (Alternative) +import Control.Monad.Fail (MonadFail) +import Data.Function ((&)) +import Data.Foldable(foldlM) +import Data.Monoid ((<>)) +import Data.Text (Text) +import Prelude (($), (.), (&&), (<$>), (<*>), Maybe(..), Bool(..), Char, String, fmap, mempty, pure, return, show, IO, Monad, Functor, maybe) + +-- * OpenAPIPetstoreConfig + +-- | +data OpenAPIPetstoreConfig = OpenAPIPetstoreConfig + { OpenAPIPetstoreConfig -> ByteString configHost :: BCL.ByteString -- ^ host supplied in the Request - , OpenAPIPetstoreConfig -> Text + , OpenAPIPetstoreConfig -> Text configUserAgent :: Text -- ^ user-agent supplied in the Request - , OpenAPIPetstoreConfig -> LogExecWithContext + , OpenAPIPetstoreConfig -> LogExecWithContext configLogExecWithContext :: LogExecWithContext -- ^ Run a block using a Logger instance - , OpenAPIPetstoreConfig -> LogContext + , OpenAPIPetstoreConfig -> LogContext configLogContext :: LogContext -- ^ Configures the logger - , OpenAPIPetstoreConfig -> [AnyAuthMethod] + , OpenAPIPetstoreConfig -> [AnyAuthMethod] configAuthMethods :: [AnyAuthMethod] -- ^ List of configured auth methods - , OpenAPIPetstoreConfig -> Bool + , OpenAPIPetstoreConfig -> Bool configValidateAuthMethods :: Bool -- ^ throw exceptions if auth methods are not configured - , OpenAPIPetstoreConfig -> ByteString + , OpenAPIPetstoreConfig -> ByteString configQueryExtraUnreserved :: B.ByteString -- ^ Configures additional querystring characters which must not be URI encoded, e.g. '+' or ':' - } - --- | display the config -instance P.Show OpenAPIPetstoreConfig where - show :: OpenAPIPetstoreConfig -> String + } + +-- | display the config +instance P.Show OpenAPIPetstoreConfig where + show :: OpenAPIPetstoreConfig -> String show OpenAPIPetstoreConfig c = - String -> String -> ShowS + String -> String -> ShowS forall r. PrintfType r => String -> r T.printf - String + String "{ configHost = %v, configUserAgent = %v, ..}" - (ByteString -> String + (ByteString -> String forall a. Show a => a -> String show (OpenAPIPetstoreConfig -> ByteString configHost OpenAPIPetstoreConfig c)) - (Text -> String + (Text -> String forall a. Show a => a -> String show (OpenAPIPetstoreConfig -> Text configUserAgent OpenAPIPetstoreConfig c)) - --- | constructs a default OpenAPIPetstoreConfig --- --- configHost: --- --- @http://petstore.swagger.io:80/v2@ --- --- configUserAgent: --- --- @"openapi-petstore/0.1.0.0"@ --- -newConfig :: IO OpenAPIPetstoreConfig -newConfig :: IO OpenAPIPetstoreConfig + +-- | constructs a default OpenAPIPetstoreConfig +-- +-- configHost: +-- +-- @http://petstore.swagger.io:80/v2@ +-- +-- configUserAgent: +-- +-- @"openapi-petstore/0.1.0.0"@ +-- +newConfig :: IO OpenAPIPetstoreConfig +newConfig :: IO OpenAPIPetstoreConfig newConfig = do - LogContext + LogContext logCxt <- IO LogContext initLogContext - OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig + OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig forall (m :: * -> *) a. Monad m => a -> m a return (OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig) -> OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig @@ -140,31 +141,31 @@ -> ByteString -> OpenAPIPetstoreConfig OpenAPIPetstoreConfig - { configHost :: ByteString + { configHost :: ByteString configHost = ByteString "http://petstore.swagger.io:80/v2" - , configUserAgent :: Text + , configUserAgent :: Text configUserAgent = Text "openapi-petstore/0.1.0.0" - , configLogExecWithContext :: LogExecWithContext + , configLogExecWithContext :: LogExecWithContext configLogExecWithContext = LogExecWithContext runDefaultLogExecWithContext - , configLogContext :: LogContext + , configLogContext :: LogContext configLogContext = LogContext logCxt - , configAuthMethods :: [AnyAuthMethod] + , configAuthMethods :: [AnyAuthMethod] configAuthMethods = [] - , configValidateAuthMethods :: Bool + , configValidateAuthMethods :: Bool configValidateAuthMethods = Bool True - , configQueryExtraUnreserved :: ByteString + , configQueryExtraUnreserved :: ByteString configQueryExtraUnreserved = ByteString "" - } - --- | updates config use AuthMethod on matching requests -addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig -addAuthMethod :: forall auth. + } + +-- | updates config use AuthMethod on matching requests +addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig +addAuthMethod :: forall auth. AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig addAuthMethod config :: OpenAPIPetstoreConfig @@ -172,7 +173,7 @@ configAuthMethods = [AnyAuthMethod] as} auth a = - OpenAPIPetstoreConfig + OpenAPIPetstoreConfig config { configAuthMethods :: [AnyAuthMethod] configAuthMethods = auth -> AnyAuthMethod forall a. AuthMethod a => a -> AnyAuthMethod @@ -181,18 +182,18 @@ forall a. a -> [a] -> [a] : [AnyAuthMethod] as} - --- | updates the config to use stdout logging -withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig -withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig + +-- | updates the config to use stdout logging +withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig +withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig withStdoutLogging OpenAPIPetstoreConfig p = do - LogContext + LogContext logCxt <- LogContext -> IO LogContext stdoutLoggingContext (OpenAPIPetstoreConfig -> LogContext configLogContext OpenAPIPetstoreConfig p) - OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig + OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig forall (m :: * -> *) a. Monad m => a -> m a return (OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig) -> OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig @@ -203,18 +204,18 @@ stdoutLoggingExec, configLogContext :: LogContext configLogContext = LogContext logCxt } - --- | updates the config to use stderr logging -withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig -withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig + +-- | updates the config to use stderr logging +withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig +withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig withStderrLogging OpenAPIPetstoreConfig p = do - LogContext + LogContext logCxt <- LogContext -> IO LogContext stderrLoggingContext (OpenAPIPetstoreConfig -> LogContext configLogContext OpenAPIPetstoreConfig p) - OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig + OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig forall (m :: * -> *) a. Monad m => a -> m a return (OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig) -> OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig @@ -225,41 +226,41 @@ stderrLoggingExec, configLogContext :: LogContext configLogContext = LogContext logCxt } - --- | updates the config to disable logging -withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig -withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig + +-- | updates the config to disable logging +withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig +withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig withNoLogging OpenAPIPetstoreConfig p = OpenAPIPetstoreConfig p { configLogExecWithContext :: LogExecWithContext configLogExecWithContext = LogExecWithContext runNullLogExec} - --- * OpenAPIPetstoreRequest - --- | Represents a request. --- --- Type Variables: --- --- * req - request operation --- * contentType - 'MimeType' associated with request body --- * res - response model --- * accept - 'MimeType' associated with response body -data OpenAPIPetstoreRequest req contentType res accept = OpenAPIPetstoreRequest - { forall req contentType res accept. + +-- * OpenAPIPetstoreRequest + +-- | Represents a request. +-- +-- Type Variables: +-- +-- * req - request operation +-- * contentType - 'MimeType' associated with request body +-- * res - response model +-- * accept - 'MimeType' associated with response body +data OpenAPIPetstoreRequest req contentType res accept = OpenAPIPetstoreRequest + { forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> ByteString rMethod :: NH.Method -- ^ Method of OpenAPIPetstoreRequest - , forall req contentType res accept. + , forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> [ByteString] rUrlPath :: [BCL.ByteString] -- ^ Endpoint of OpenAPIPetstoreRequest - , forall req contentType res accept. + , forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> Params rParams :: Params -- ^ params of OpenAPIPetstoreRequest - , forall req contentType res accept. + , forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> [TypeRep] rAuthTypes :: [P.TypeRep] -- ^ types of auth methods - } - deriving (Int -> OpenAPIPetstoreRequest req contentType res accept -> ShowS + } + deriving (Int -> OpenAPIPetstoreRequest req contentType res accept -> ShowS [OpenAPIPetstoreRequest req contentType res accept] -> ShowS OpenAPIPetstoreRequest req contentType res accept -> String (Int -> OpenAPIPetstoreRequest req contentType res accept -> ShowS) @@ -284,10 +285,10 @@ $cshowsPrec :: forall req contentType res accept. Int -> OpenAPIPetstoreRequest req contentType res accept -> ShowS P.Show) - --- | 'rMethod' Lens -rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) NH.Method -rMethodL :: forall req contentType res accept. + +-- | 'rMethod' Lens +rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) NH.Method +rMethodL :: forall req contentType res accept. Lens_' (OpenAPIPetstoreRequest req contentType res accept) ByteString rMethodL ByteString -> f ByteString @@ -333,11 +334,11 @@ <$> ByteString -> f ByteString f ByteString rMethod -{-# INLINE rMethodL #-} - --- | 'rUrlPath' Lens -rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [BCL.ByteString] -rUrlPathL :: forall req contentType res accept. +{-# INLINE rMethodL #-} + +-- | 'rUrlPath' Lens +rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [BCL.ByteString] +rUrlPathL :: forall req contentType res accept. Lens_' (OpenAPIPetstoreRequest req contentType res accept) [ByteString] rUrlPathL [ByteString] -> f [ByteString] @@ -383,11 +384,11 @@ <$> [ByteString] -> f [ByteString] f [ByteString] rUrlPath -{-# INLINE rUrlPathL #-} - --- | 'rParams' Lens -rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params -rParamsL :: forall req contentType res accept. +{-# INLINE rUrlPathL #-} + +-- | 'rParams' Lens +rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params +rParamsL :: forall req contentType res accept. Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params rParamsL Params -> f Params f OpenAPIPetstoreRequest{[TypeRep] @@ -432,11 +433,11 @@ <$> Params -> f Params f Params rParams -{-# INLINE rParamsL #-} - --- | 'rParams' Lens -rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [P.TypeRep] -rAuthTypesL :: forall req contentType res accept. +{-# INLINE rParamsL #-} + +-- | 'rParams' Lens +rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [P.TypeRep] +rAuthTypesL :: forall req contentType res accept. Lens_' (OpenAPIPetstoreRequest req contentType res accept) [TypeRep] rAuthTypesL [TypeRep] -> f [TypeRep] @@ -482,17 +483,17 @@ <$> [TypeRep] -> f [TypeRep] f [TypeRep] rAuthTypes -{-# INLINE rAuthTypesL #-} - --- * HasBodyParam - --- | Designates the body parameter of a request -class HasBodyParam req param where - setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept - setBodyParam OpenAPIPetstoreRequest req contentType res accept +{-# INLINE rAuthTypesL #-} + +-- * HasBodyParam + +-- | Designates the body parameter of a request +class HasBodyParam req param where + setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept + setBodyParam OpenAPIPetstoreRequest req contentType res accept req param xs = - OpenAPIPetstoreRequest req contentType res accept + OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept forall req contentType res accept. @@ -517,47 +518,47 @@ OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept _setContentTypeHeader - --- * HasOptionalParam - --- | Designates the optional parameters of a request -class HasOptionalParam req param where - {-# MINIMAL applyOptionalParam | (-&-) #-} - - -- | Apply an optional parameter to a request - applyOptionalParam :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept - applyOptionalParam = OpenAPIPetstoreRequest req contentType res accept + +-- * HasOptionalParam + +-- | Designates the optional parameters of a request +class HasOptionalParam req param where + {-# MINIMAL applyOptionalParam | (-&-) #-} + + -- | Apply an optional parameter to a request + applyOptionalParam :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept + applyOptionalParam = OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept forall req param contentType res accept. HasOptionalParam req param => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept (-&-) - {-# INLINE applyOptionalParam #-} - - -- | infix operator \/ alias for 'addOptionalParam' - (-&-) :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept - (-&-) = OpenAPIPetstoreRequest req contentType res accept + {-# INLINE applyOptionalParam #-} + + -- | infix operator \/ alias for 'addOptionalParam' + (-&-) :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept + (-&-) = OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept forall req param contentType res accept. HasOptionalParam req param => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept applyOptionalParam - {-# INLINE (-&-) #-} - -infixl 2 -&- - --- | Request Params -data Params = Params - { Params -> Query + {-# INLINE (-&-) #-} + +infixl 2 -&- + +-- | Request Params +data Params = Params + { Params -> Query paramsQuery :: NH.Query - , Params -> RequestHeaders + , Params -> RequestHeaders paramsHeaders :: NH.RequestHeaders - , Params -> ParamBody + , Params -> ParamBody paramsBody :: ParamBody - } - deriving (Int -> Params -> ShowS + } + deriving (Int -> Params -> ShowS [Params] -> ShowS Params -> String (Int -> Params -> ShowS) @@ -571,10 +572,10 @@ showsPrec :: Int -> Params -> ShowS $cshowsPrec :: Int -> Params -> ShowS P.Show) - --- | 'paramsQuery' Lens -paramsQueryL :: Lens_' Params NH.Query -paramsQueryL :: Lens_' Params Query + +-- | 'paramsQuery' Lens +paramsQueryL :: Lens_' Params NH.Query +paramsQueryL :: Lens_' Params Query paramsQueryL Query -> f Query f Params{Query RequestHeaders @@ -601,11 +602,11 @@ <$> Query -> f Query f Query paramsQuery -{-# INLINE paramsQueryL #-} - --- | 'paramsHeaders' Lens -paramsHeadersL :: Lens_' Params NH.RequestHeaders -paramsHeadersL :: Lens_' Params RequestHeaders +{-# INLINE paramsQueryL #-} + +-- | 'paramsHeaders' Lens +paramsHeadersL :: Lens_' Params NH.RequestHeaders +paramsHeadersL :: Lens_' Params RequestHeaders paramsHeadersL RequestHeaders -> f RequestHeaders f Params{Query RequestHeaders @@ -632,11 +633,11 @@ <$> RequestHeaders -> f RequestHeaders f RequestHeaders paramsHeaders -{-# INLINE paramsHeadersL #-} - --- | 'paramsBody' Lens -paramsBodyL :: Lens_' Params ParamBody -paramsBodyL :: Lens_' Params ParamBody +{-# INLINE paramsHeadersL #-} + +-- | 'paramsBody' Lens +paramsBodyL :: Lens_' Params ParamBody +paramsBodyL :: Lens_' Params ParamBody paramsBodyL ParamBody -> f ParamBody f Params{Query RequestHeaders @@ -663,16 +664,16 @@ <$> ParamBody -> f ParamBody f ParamBody paramsBody -{-# INLINE paramsBodyL #-} - --- | Request Body -data ParamBody - = ParamBodyNone - | ParamBodyB B.ByteString - | ParamBodyBL BL.ByteString - | ParamBodyFormUrlEncoded WH.Form - | ParamBodyMultipartFormData [NH.Part] - deriving (Int -> ParamBody -> ShowS +{-# INLINE paramsBodyL #-} + +-- | Request Body +data ParamBody + = ParamBodyNone + | ParamBodyB B.ByteString + | ParamBodyBL BL.ByteString + | ParamBodyFormUrlEncoded WH.Form + | ParamBodyMultipartFormData [NH.Part] + deriving (Int -> ParamBody -> ShowS [ParamBody] -> ShowS ParamBody -> String (Int -> ParamBody -> ShowS) @@ -688,13 +689,13 @@ showsPrec :: Int -> ParamBody -> ShowS $cshowsPrec :: Int -> ParamBody -> ShowS P.Show) - --- ** OpenAPIPetstoreRequest Utils - -_mkRequest :: NH.Method -- ^ Method - -> [BCL.ByteString] -- ^ Endpoint - -> OpenAPIPetstoreRequest req contentType res accept -- ^ req: Request Type, res: Response Type -_mkRequest :: forall req contentType res accept. + +-- ** OpenAPIPetstoreRequest Utils + +_mkRequest :: NH.Method -- ^ Method + -> [BCL.ByteString] -- ^ Endpoint + -> OpenAPIPetstoreRequest req contentType res accept -- ^ req: Request Type, res: Response Type +_mkRequest :: forall req contentType res accept. ByteString -> [ByteString] -> OpenAPIPetstoreRequest req contentType res accept @@ -715,25 +716,25 @@ m [ByteString] u Params _mkParams [] - -_mkParams :: Params -_mkParams :: Params + +_mkParams :: Params +_mkParams :: Params _mkParams = Query -> RequestHeaders -> ParamBody -> Params Params [] [] ParamBody ParamBodyNone - -setHeader :: - OpenAPIPetstoreRequest req contentType res accept - -> [NH.Header] - -> OpenAPIPetstoreRequest req contentType res accept -setHeader :: forall req contentType res accept. + +setHeader :: + OpenAPIPetstoreRequest req contentType res accept + -> [NH.Header] + -> OpenAPIPetstoreRequest req contentType res accept +setHeader :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> RequestHeaders -> OpenAPIPetstoreRequest req contentType res accept setHeader OpenAPIPetstoreRequest req contentType res accept req RequestHeaders header = - OpenAPIPetstoreRequest req contentType res accept + OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] -> OpenAPIPetstoreRequest req contentType res accept @@ -748,7 +749,7 @@ forall a b. (a, b) -> a P.fst RequestHeaders header - OpenAPIPetstoreRequest req contentType res accept + OpenAPIPetstoreRequest req contentType res accept -> (OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept) -> OpenAPIPetstoreRequest req contentType res accept @@ -762,12 +763,12 @@ -> OpenAPIPetstoreRequest req contentType res accept `addHeader` RequestHeaders header) - -addHeader :: - OpenAPIPetstoreRequest req contentType res accept - -> [NH.Header] - -> OpenAPIPetstoreRequest req contentType res accept -addHeader :: forall req contentType res accept. + +addHeader :: + OpenAPIPetstoreRequest req contentType res accept + -> [NH.Header] + -> OpenAPIPetstoreRequest req contentType res accept +addHeader :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> RequestHeaders -> OpenAPIPetstoreRequest req contentType res accept @@ -806,23 +807,23 @@ forall a. [a] -> [a] -> [a] P.++) OpenAPIPetstoreRequest req contentType res accept req - -removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [NH.HeaderName] -> OpenAPIPetstoreRequest req contentType res accept -removeHeader :: forall req contentType res accept. + +removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [NH.HeaderName] -> OpenAPIPetstoreRequest req contentType res accept +removeHeader :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] -> OpenAPIPetstoreRequest req contentType res accept removeHeader OpenAPIPetstoreRequest req contentType res accept req [HeaderName] header = - OpenAPIPetstoreRequest req contentType res accept + OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> (OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept) -> OpenAPIPetstoreRequest req contentType res accept forall a b. a -> (a -> b) -> b & - ASetter + ASetter (OpenAPIPetstoreRequest req contentType res accept) (OpenAPIPetstoreRequest req contentType res accept) RequestHeaders @@ -832,7 +833,7 @@ -> OpenAPIPetstoreRequest req contentType res accept forall s t a b. ASetter s t a b -> (a -> b) -> s -> t L.over - ((Params -> Identity Params) + ((Params -> Identity Params) -> OpenAPIPetstoreRequest req contentType res accept -> Identity (OpenAPIPetstoreRequest req contentType res accept) forall req contentType res accept. @@ -852,7 +853,7 @@ -> Params -> Identity Params Lens_' Params RequestHeaders paramsHeadersL) - (((HeaderName, ByteString) -> Bool) + (((HeaderName, ByteString) -> Bool) -> RequestHeaders -> RequestHeaders forall a. (a -> Bool) -> [a] -> [a] P.filter (\(HeaderName, ByteString) @@ -867,8 +868,8 @@ forall s. FoldCase s => s -> CI s CI.mk [HeaderName] header)) - where - cifst :: (HeaderName, b) -> CI HeaderName + where + cifst :: (HeaderName, b) -> CI HeaderName cifst = HeaderName -> CI HeaderName forall s. FoldCase s => s -> CI s CI.mk (HeaderName -> CI HeaderName) @@ -879,21 +880,21 @@ . (HeaderName, b) -> HeaderName forall a b. (a, b) -> a P.fst - -_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept -_setContentTypeHeader :: forall req contentType res accept. + +_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept +_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept _setContentTypeHeader OpenAPIPetstoreRequest req contentType res accept req = - case Proxy contentType -> Maybe MediaType + case Proxy contentType -> Maybe MediaType forall mtype. MimeType mtype => Proxy mtype -> Maybe MediaType mimeType (Proxy contentType forall {k} (t :: k). Proxy t P.Proxy :: P.Proxy contentType) of - Just MediaType + Just MediaType m -> OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> RequestHeaders @@ -910,7 +911,7 @@ forall a. Show a => a -> String P.show MediaType m)] - Maybe MediaType + Maybe MediaType Nothing -> OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] @@ -921,20 +922,20 @@ -> OpenAPIPetstoreRequest req contentType res accept `removeHeader` [HeaderName "content-type"] - -_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept -_setAcceptHeader :: forall req contentType res accept. + +_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept +_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept _setAcceptHeader OpenAPIPetstoreRequest req contentType res accept req = - case Proxy accept -> Maybe MediaType + case Proxy accept -> Maybe MediaType forall mtype. MimeType mtype => Proxy mtype -> Maybe MediaType mimeType (Proxy accept forall {k} (t :: k). Proxy t P.Proxy :: P.Proxy accept) of - Just MediaType + Just MediaType m -> OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> RequestHeaders @@ -951,7 +952,7 @@ forall a. Show a => a -> String P.show MediaType m)] - Maybe MediaType + Maybe MediaType Nothing -> OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> [HeaderName] @@ -962,25 +963,25 @@ -> OpenAPIPetstoreRequest req contentType res accept `removeHeader` [HeaderName "accept"] - -setQuery :: - OpenAPIPetstoreRequest req contentType res accept - -> [NH.QueryItem] - -> OpenAPIPetstoreRequest req contentType res accept -setQuery :: forall req contentType res accept. + +setQuery :: + OpenAPIPetstoreRequest req contentType res accept + -> [NH.QueryItem] + -> OpenAPIPetstoreRequest req contentType res accept +setQuery :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> Query -> OpenAPIPetstoreRequest req contentType res accept setQuery OpenAPIPetstoreRequest req contentType res accept req Query query = - OpenAPIPetstoreRequest req contentType res accept + OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> (OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept) -> OpenAPIPetstoreRequest req contentType res accept forall a b. a -> (a -> b) -> b & - ASetter + ASetter (OpenAPIPetstoreRequest req contentType res accept) (OpenAPIPetstoreRequest req contentType res accept) Query @@ -990,7 +991,7 @@ -> OpenAPIPetstoreRequest req contentType res accept forall s t a b. ASetter s t a b -> (a -> b) -> s -> t L.over - ((Params -> Identity Params) + ((Params -> Identity Params) -> OpenAPIPetstoreRequest req contentType res accept -> Identity (OpenAPIPetstoreRequest req contentType res accept) forall req contentType res accept. @@ -1008,7 +1009,7 @@ . (Query -> Identity Query) -> Params -> Identity Params Lens_' Params Query paramsQueryL) - (((ByteString, Maybe ByteString) -> Bool) -> Query -> Query + (((ByteString, Maybe ByteString) -> Bool) -> Query -> Query forall a. (a -> Bool) -> [a] -> [a] P.filter (\(ByteString, Maybe ByteString) q -> (ByteString, Maybe ByteString) -> HeaderName @@ -1028,15 +1029,15 @@ -> OpenAPIPetstoreRequest req contentType res accept forall a b. a -> (a -> b) -> b & - (OpenAPIPetstoreRequest req contentType res accept + (OpenAPIPetstoreRequest req contentType res accept -> Query -> OpenAPIPetstoreRequest req contentType res accept forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> Query -> OpenAPIPetstoreRequest req contentType res accept `addQuery` Query query) - where - cifst :: (ByteString, b) -> HeaderName + where + cifst :: (ByteString, b) -> HeaderName cifst = ByteString -> HeaderName forall s. FoldCase s => s -> CI s CI.mk (ByteString -> HeaderName) @@ -1045,12 +1046,12 @@ . (ByteString, b) -> ByteString forall a b. (a, b) -> a P.fst - -addQuery :: - OpenAPIPetstoreRequest req contentType res accept - -> [NH.QueryItem] - -> OpenAPIPetstoreRequest req contentType res accept -addQuery :: forall req contentType res accept. + +addQuery :: + OpenAPIPetstoreRequest req contentType res accept + -> [NH.QueryItem] + -> OpenAPIPetstoreRequest req contentType res accept +addQuery :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> Query -> OpenAPIPetstoreRequest req contentType res accept addQuery OpenAPIPetstoreRequest req contentType res accept @@ -1091,29 +1092,29 @@ query Query -> Query -> Query forall a. [a] -> [a] -> [a] P.++) - -addForm :: OpenAPIPetstoreRequest req contentType res accept -> WH.Form -> OpenAPIPetstoreRequest req contentType res accept -addForm :: forall req contentType res accept. + +addForm :: OpenAPIPetstoreRequest req contentType res accept -> WH.Form -> OpenAPIPetstoreRequest req contentType res accept +addForm :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> Form -> OpenAPIPetstoreRequest req contentType res accept addForm OpenAPIPetstoreRequest req contentType res accept req Form newform = - let form :: Form + let form :: Form form = case Params -> ParamBody paramsBody (OpenAPIPetstoreRequest req contentType res accept -> Params forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> Params rParams OpenAPIPetstoreRequest req contentType res accept req) of - ParamBodyFormUrlEncoded Form + ParamBodyFormUrlEncoded Form _form -> Form _form - ParamBody + ParamBody _ -> Form forall a. Monoid a => a mempty - in OpenAPIPetstoreRequest req contentType res accept + in OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> (OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept) @@ -1151,27 +1152,27 @@ forall a. Semigroup a => a -> a -> a <> Form form)) - -_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> NH.Part -> OpenAPIPetstoreRequest req contentType res accept -_addMultiFormPart :: forall req contentType res accept. + +_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> NH.Part -> OpenAPIPetstoreRequest req contentType res accept +_addMultiFormPart :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> Part -> OpenAPIPetstoreRequest req contentType res accept _addMultiFormPart OpenAPIPetstoreRequest req contentType res accept req Part newpart = - let parts :: [Part] + let parts :: [Part] parts = case Params -> ParamBody paramsBody (OpenAPIPetstoreRequest req contentType res accept -> Params forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> Params rParams OpenAPIPetstoreRequest req contentType res accept req) of - ParamBodyMultipartFormData [Part] + ParamBodyMultipartFormData [Part] _parts -> [Part] _parts - ParamBody + ParamBody _ -> [] - in OpenAPIPetstoreRequest req contentType res accept + in OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> (OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept) @@ -1209,15 +1210,15 @@ forall a. a -> [a] -> [a] : [Part] parts)) - -_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> B.ByteString -> OpenAPIPetstoreRequest req contentType res accept -_setBodyBS :: forall req contentType res accept. + +_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> B.ByteString -> OpenAPIPetstoreRequest req contentType res accept +_setBodyBS :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept _setBodyBS OpenAPIPetstoreRequest req contentType res accept req ByteString body = - OpenAPIPetstoreRequest req contentType res accept + OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> (OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept) @@ -1252,15 +1253,15 @@ paramsBodyL) (ByteString -> ParamBody ParamBodyB ByteString body) - -_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> BL.ByteString -> OpenAPIPetstoreRequest req contentType res accept -_setBodyLBS :: forall req contentType res accept. + +_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> BL.ByteString -> OpenAPIPetstoreRequest req contentType res accept +_setBodyLBS :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> ByteString -> OpenAPIPetstoreRequest req contentType res accept _setBodyLBS OpenAPIPetstoreRequest req contentType res accept req ByteString body = - OpenAPIPetstoreRequest req contentType res accept + OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> (OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept) @@ -1295,9 +1296,9 @@ paramsBodyL) (ByteString -> ParamBody ParamBodyBL ByteString body) - -_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> P.Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept -_hasAuthType :: forall authMethod req contentType res accept. + +_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> P.Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept +_hasAuthType :: forall authMethod req contentType res accept. AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> Proxy authMethod @@ -1305,7 +1306,7 @@ _hasAuthType OpenAPIPetstoreRequest req contentType res accept req Proxy authMethod proxy = - OpenAPIPetstoreRequest req contentType res accept + OpenAPIPetstoreRequest req contentType res accept req OpenAPIPetstoreRequest req contentType res accept -> (OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept) @@ -1336,22 +1337,22 @@ proxy TypeRep -> [TypeRep] -> [TypeRep] forall a. a -> [a] -> [a] :) - --- ** Params Utils - -toPath - :: WH.ToHttpApiData a - => a -> BCL.ByteString -toPath :: forall a. ToHttpApiData a => a -> ByteString + +-- ** Params Utils + +toPath + :: WH.ToHttpApiData a + => a -> BCL.ByteString +toPath :: forall a. ToHttpApiData a => a -> ByteString toPath = Builder -> ByteString BB.toLazyByteString (Builder -> ByteString) -> (a -> Builder) -> a -> ByteString forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> Builder forall a. ToHttpApiData a => a -> Builder WH.toEncodedUrlPiece - -toHeader :: WH.ToHttpApiData a => (NH.HeaderName, a) -> [NH.Header] -toHeader :: forall a. ToHttpApiData a => (HeaderName, a) -> RequestHeaders + +toHeader :: WH.ToHttpApiData a => (NH.HeaderName, a) -> [NH.Header] +toHeader :: forall a. ToHttpApiData a => (HeaderName, a) -> RequestHeaders toHeader (HeaderName, a) x = [(a -> ByteString) -> (HeaderName, a) -> (HeaderName, ByteString) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -1359,9 +1360,9 @@ forall a. ToHttpApiData a => a -> ByteString WH.toHeader (HeaderName, a) x] - -toForm :: WH.ToHttpApiData v => (BC.ByteString, v) -> WH.Form -toForm :: forall v. ToHttpApiData v => (ByteString, v) -> Form + +toForm :: WH.ToHttpApiData v => (BC.ByteString, v) -> WH.Form +toForm :: forall v. ToHttpApiData v => (ByteString, v) -> Form toForm (ByteString k,v v) = [(String, v)] -> Form @@ -1370,9 +1371,9 @@ BC.unpack ByteString k,v v)] - -toQuery :: WH.ToHttpApiData a => (BC.ByteString, Maybe a) -> [NH.QueryItem] -toQuery :: forall a. ToHttpApiData a => (ByteString, Maybe a) -> Query + +toQuery :: WH.ToHttpApiData a => (BC.ByteString, Maybe a) -> [NH.QueryItem] +toQuery :: forall a. ToHttpApiData a => (ByteString, Maybe a) -> Query toQuery (ByteString, Maybe a) x = [((Maybe a -> Maybe ByteString) -> (ByteString, Maybe a) -> (ByteString, Maybe ByteString) @@ -1389,16 +1390,16 @@ fmap) a -> ByteString toQueryParam (ByteString, Maybe a) x] - where toQueryParam :: a -> ByteString + where toQueryParam :: a -> ByteString toQueryParam = Text -> ByteString T.encodeUtf8 (Text -> ByteString) -> (a -> Text) -> a -> ByteString forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> Text forall a. ToHttpApiData a => a -> Text WH.toQueryParam - -toPartialEscapeQuery :: B.ByteString -> NH.Query -> NH.PartialEscapeQuery -toPartialEscapeQuery :: ByteString -> Query -> PartialEscapeQuery + +toPartialEscapeQuery :: B.ByteString -> NH.Query -> NH.PartialEscapeQuery +toPartialEscapeQuery :: ByteString -> Query -> PartialEscapeQuery toPartialEscapeQuery ByteString extraUnreserved Query query = ((ByteString, Maybe ByteString) -> (ByteString, [EscapeItem])) @@ -1414,8 +1415,8 @@ go Maybe ByteString v)) Query query - where go :: B.ByteString -> [NH.EscapeItem] - go :: ByteString -> [EscapeItem] + where go :: B.ByteString -> [NH.EscapeItem] + go :: ByteString -> [EscapeItem] go ByteString v = ByteString v ByteString -> (ByteString -> [ByteString]) -> [ByteString] @@ -1431,7 +1432,7 @@ b Word8 -> ByteString -> Bool `B.notElem` ByteString extraUnreserved) - [ByteString] -> ([ByteString] -> [EscapeItem]) -> [EscapeItem] + [ByteString] -> ([ByteString] -> [EscapeItem]) -> [EscapeItem] forall a b. a -> (a -> b) -> b & (ByteString -> EscapeItem) -> [ByteString] -> [EscapeItem] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -1441,31 +1442,31 @@ xs then ByteString -> EscapeItem NH.QN ByteString xs - else if ByteString -> Word8 + else if ByteString -> Word8 B.head ByteString xs Word8 -> ByteString -> Bool `B.elem` ByteString extraUnreserved - then ByteString -> EscapeItem + then ByteString -> EscapeItem NH.QN ByteString xs -- Not Encoded - else ByteString -> EscapeItem + else ByteString -> EscapeItem NH.QE ByteString xs -- Encoded - ) - --- *** OpenAPI `CollectionFormat` Utils - --- | Determines the format of the array if type array is used. -data CollectionFormat - = CommaSeparated -- ^ CSV format for multiple parameters. - | SpaceSeparated -- ^ Also called "SSV" - | TabSeparated -- ^ Also called "TSV" - | PipeSeparated -- ^ `value1|value2|value2` - | MultiParamArray -- ^ Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" ('NH.Query') or "formData" ('WH.Form') - -toHeaderColl :: WH.ToHttpApiData a => CollectionFormat -> (NH.HeaderName, [a]) -> [NH.Header] -toHeaderColl :: forall a. + ) + +-- *** OpenAPI `CollectionFormat` Utils + +-- | Determines the format of the array if type array is used. +data CollectionFormat + = CommaSeparated -- ^ CSV format for multiple parameters. + | SpaceSeparated -- ^ Also called "SSV" + | TabSeparated -- ^ Also called "TSV" + | PipeSeparated -- ^ `value1|value2|value2` + | MultiParamArray -- ^ Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" ('NH.Query') or "formData" ('WH.Form') + +toHeaderColl :: WH.ToHttpApiData a => CollectionFormat -> (NH.HeaderName, [a]) -> [NH.Header] +toHeaderColl :: forall a. ToHttpApiData a => CollectionFormat -> (HeaderName, [a]) -> RequestHeaders toHeaderColl CollectionFormat @@ -1483,9 +1484,9 @@ forall a. ToHttpApiData a => (HeaderName, a) -> RequestHeaders toHeader (HeaderName, [a]) xs - -toFormColl :: WH.ToHttpApiData v => CollectionFormat -> (BC.ByteString, [v]) -> WH.Form -toFormColl :: forall v. + +toFormColl :: WH.ToHttpApiData v => CollectionFormat -> (BC.ByteString, [v]) -> WH.Form +toFormColl :: forall v. ToHttpApiData v => CollectionFormat -> (ByteString, [v]) -> Form toFormColl CollectionFormat @@ -1519,8 +1520,8 @@ forall {s} {b}. FoldCase s => (s, b) -> (CI s, b) pack (ByteString, [v]) xs - where - pack :: (s, b) -> (CI s, b) + where + pack :: (s, b) -> (CI s, b) pack (s k,b v) = (s -> CI s @@ -1528,7 +1529,7 @@ CI.mk s k, b v) - unpack :: (HeaderName, ByteString) -> (String, String) + unpack :: (HeaderName, ByteString) -> (String, String) unpack (HeaderName k,ByteString v) = (ByteString -> String @@ -1538,9 +1539,9 @@ k), ByteString -> String BC.unpack ByteString v) - -toQueryColl :: WH.ToHttpApiData a => CollectionFormat -> (BC.ByteString, Maybe [a]) -> NH.Query -toQueryColl :: forall a. + +toQueryColl :: WH.ToHttpApiData a => CollectionFormat -> (BC.ByteString, Maybe [a]) -> NH.Query +toQueryColl :: forall a. ToHttpApiData a => CollectionFormat -> (ByteString, Maybe [a]) -> Query toQueryColl CollectionFormat @@ -1560,9 +1561,9 @@ forall a. ToHttpApiData a => (ByteString, Maybe a) -> Query toQuery (ByteString, Maybe [a]) xs - -_toColl :: P.Traversable f => CollectionFormat -> (f a -> [(b, BC.ByteString)]) -> f [a] -> [(b, BC.ByteString)] -_toColl :: forall (f :: * -> *) a b. + +_toColl :: P.Traversable f => CollectionFormat -> (f a -> [(b, BC.ByteString)]) -> f [a] -> [(b, BC.ByteString)] +_toColl :: forall (f :: * -> *) a b. Traversable f => CollectionFormat -> (f a -> [(b, ByteString)]) -> f [a] -> [(b, ByteString)] @@ -1598,7 +1599,7 @@ forall a. a -> Maybe a Just f [a] xs)) - where fencode :: f (Maybe a) -> [(b, Maybe ByteString)] + where fencode :: f (Maybe a) -> [(b, Maybe ByteString)] fencode = ((b, ByteString) -> (b, Maybe ByteString)) -> [(b, ByteString)] -> [(b, Maybe ByteString)] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -1621,10 +1622,10 @@ fmap Maybe a -> a forall a. HasCallStack => Maybe a -> a P.fromJust - {-# INLINE fencode #-} - -_toCollA :: (P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t BC.ByteString)]) -> f (t [a]) -> [(b, t BC.ByteString)] -_toCollA :: forall (f :: * -> *) (t :: * -> *) a b. + {-# INLINE fencode #-} + +_toCollA :: (P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t BC.ByteString)]) -> f (t [a]) -> [(b, t BC.ByteString)] +_toCollA :: forall (f :: * -> *) (t :: * -> *) a b. (Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t ByteString)]) @@ -1650,9 +1651,9 @@ encode Char -> ByteString BC.singleton f (t [a]) xs - -_toCollA' :: (P.Monoid c, P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] -_toCollA' :: forall c (f :: * -> *) (t :: * -> *) a b. + +_toCollA' :: (P.Monoid c, P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] +_toCollA' :: forall c (f :: * -> *) (t :: * -> *) a b. (Monoid c, Traversable f, Traversable t, Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) @@ -1665,34 +1666,34 @@ one f (t [a]) xs = case CollectionFormat c of - CollectionFormat + CollectionFormat CommaSeparated -> c -> [(b, t c)] go (Char -> c one Char ',') - CollectionFormat + CollectionFormat SpaceSeparated -> c -> [(b, t c)] go (Char -> c one Char ' ') - CollectionFormat + CollectionFormat TabSeparated -> c -> [(b, t c)] go (Char -> c one Char '\t') - CollectionFormat + CollectionFormat PipeSeparated -> c -> [(b, t c)] go (Char -> c one Char '|') - CollectionFormat + CollectionFormat MultiParamArray -> [(b, t c)] expandList - where - go :: c -> [(b, t c)] + where + go :: c -> [(b, t c)] go c sep = - [((b, t c) -> (b, t c) -> (b, t c)) -> [(b, t c)] -> (b, t c) + [((b, t c) -> (b, t c) -> (b, t c)) -> [(b, t c)] -> (b, t c) forall (t :: * -> *) a. Foldable t => (a -> a -> a) -> t a -> a P.foldl1 (\(b sk, t c @@ -1716,7 +1717,7 @@ <|> t c v)) [(b, t c)] expandList] - combine :: a -> a -> a -> a + combine :: a -> a -> a -> a combine a sep a x a @@ -1728,7 +1729,7 @@ forall a. Semigroup a => a -> a -> a <> a y - expandList :: [(b, t c)] + expandList :: [(b, t c)] expandList = ((f (t a) -> [(b, t c)]) -> [f (t a)] -> [(b, t c)] forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b] P.concatMap f (t a) -> [(b, t c)] @@ -1753,25 +1754,25 @@ forall (t :: * -> *) a. Foldable t => t a -> [a] P.toList) f (t [a]) xs - {-# INLINE go #-} - {-# INLINE expandList #-} - {-# INLINE combine #-} - --- * AuthMethods - --- | Provides a method to apply auth methods to requests -class P.Typeable a => - AuthMethod a where - applyAuthMethod - :: OpenAPIPetstoreConfig - -> a - -> OpenAPIPetstoreRequest req contentType res accept - -> IO (OpenAPIPetstoreRequest req contentType res accept) - --- | An existential wrapper for any AuthMethod -data AnyAuthMethod = forall a. AuthMethod a => AnyAuthMethod a deriving (P.Typeable) - -instance AuthMethod AnyAuthMethod where applyAuthMethod :: forall req contentType res accept. + {-# INLINE go #-} + {-# INLINE expandList #-} + {-# INLINE combine #-} + +-- * AuthMethods + +-- | Provides a method to apply auth methods to requests +class P.Typeable a => + AuthMethod a where + applyAuthMethod + :: OpenAPIPetstoreConfig + -> a + -> OpenAPIPetstoreRequest req contentType res accept + -> IO (OpenAPIPetstoreRequest req contentType res accept) + +-- | An existential wrapper for any AuthMethod +data AnyAuthMethod = forall a. AuthMethod a => AnyAuthMethod a deriving (P.Typeable) + +instance AuthMethod AnyAuthMethod where applyAuthMethod :: forall req contentType res accept. OpenAPIPetstoreConfig -> AnyAuthMethod -> OpenAPIPetstoreRequest req contentType res accept @@ -1793,9 +1794,9 @@ config a a OpenAPIPetstoreRequest req contentType res accept req - --- | indicates exceptions related to AuthMethods -data AuthMethodException = AuthMethodException String deriving (Int -> AuthMethodException -> ShowS + +-- | indicates exceptions related to AuthMethods +data AuthMethodException = AuthMethodException String deriving (Int -> AuthMethodException -> ShowS [AuthMethodException] -> ShowS AuthMethodException -> String (Int -> AuthMethodException -> ShowS) @@ -1811,15 +1812,15 @@ showsPrec :: Int -> AuthMethodException -> ShowS $cshowsPrec :: Int -> AuthMethodException -> ShowS P.Show, P.Typeable) - -instance E.Exception AuthMethodException - --- | apply all matching AuthMethods in config to request -_applyAuthMethods - :: OpenAPIPetstoreRequest req contentType res accept - -> OpenAPIPetstoreConfig - -> IO (OpenAPIPetstoreRequest req contentType res accept) -_applyAuthMethods :: forall req contentType res accept. + +instance E.Exception AuthMethodException + +-- | apply all matching AuthMethods in config to request +_applyAuthMethods + :: OpenAPIPetstoreRequest req contentType res accept + -> OpenAPIPetstoreConfig + -> IO (OpenAPIPetstoreRequest req contentType res accept) +_applyAuthMethods :: forall req contentType res accept. OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreConfig -> IO (OpenAPIPetstoreRequest req contentType res accept) @@ -1828,7 +1829,7 @@ config@(OpenAPIPetstoreConfig {configAuthMethods :: OpenAPIPetstoreConfig -> [AnyAuthMethod] configAuthMethods = [AnyAuthMethod] as}) = - (OpenAPIPetstoreRequest req contentType res accept + (OpenAPIPetstoreRequest req contentType res accept -> AnyAuthMethod -> IO (OpenAPIPetstoreRequest req contentType res accept)) -> OpenAPIPetstoreRequest req contentType res accept @@ -1843,8 +1844,8 @@ go OpenAPIPetstoreRequest req contentType res accept req [AnyAuthMethod] as - where - go :: OpenAPIPetstoreRequest req contentType res accept + where + go :: OpenAPIPetstoreRequest req contentType res accept -> AnyAuthMethod -> IO (OpenAPIPetstoreRequest req contentType res accept) go OpenAPIPetstoreRequest req contentType res accept @@ -1863,12 +1864,16 @@ config a a OpenAPIPetstoreRequest req contentType res accept r - --- * Utils - --- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON) -_omitNulls :: [(A.Key, A.Value)] -> A.Value -_omitNulls :: [(Key, Value)] -> Value + +-- * Utils + +-- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON) +#if MIN_VERSION_aeson(2,0,0) +_omitNulls :: [(A.Key, A.Value)] -> A.Value +#else +_omitNulls :: [(Text, A.Value)] -> A.Value +#endif +_omitNulls :: [(Key, Value)] -> Value _omitNulls = [(Key, Value)] -> Value A.object ([(Key, Value)] -> Value) -> ([(Key, Value)] -> [(Key, Value)]) -> [(Key, Value)] -> Value @@ -1878,19 +1883,19 @@ P.filter (Key, Value) -> Bool forall {a}. (a, Value) -> Bool notNull - where - notNull :: (a, Value) -> Bool + where + notNull :: (a, Value) -> Bool notNull (a _, Value A.Null) = Bool False - notNull (a, Value) + notNull (a, Value) _ = Bool True - --- | Encodes fields using WH.toQueryParam -_toFormItem :: (WH.ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) -_toFormItem :: forall a (f :: * -> *) t. + +-- | Encodes fields using WH.toQueryParam +_toFormItem :: (WH.ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) +_toFormItem :: forall a (f :: * -> *) t. (ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) _toFormItem t @@ -1908,22 +1913,22 @@ forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> f a x - --- | Collapse (Just "") to Nothing -_emptyToNothing :: Maybe String -> Maybe String -_emptyToNothing :: Maybe String -> Maybe String + +-- | Collapse (Just "") to Nothing +_emptyToNothing :: Maybe String -> Maybe String +_emptyToNothing :: Maybe String -> Maybe String _emptyToNothing (Just String "") = Maybe String forall a. Maybe a Nothing -_emptyToNothing Maybe String +_emptyToNothing Maybe String x = Maybe String x -{-# INLINE _emptyToNothing #-} - --- | Collapse (Just mempty) to Nothing -_memptyToNothing :: (P.Monoid a, P.Eq a) => Maybe a -> Maybe a -_memptyToNothing :: forall a. (Monoid a, Eq a) => Maybe a -> Maybe a +{-# INLINE _emptyToNothing #-} + +-- | Collapse (Just mempty) to Nothing +_memptyToNothing :: (P.Monoid a, P.Eq a) => Maybe a -> Maybe a +_memptyToNothing :: forall a. (Monoid a, Eq a) => Maybe a -> Maybe a _memptyToNothing (Just a x) | a x a -> a -> Bool @@ -1933,16 +1938,16 @@ P.mempty = Maybe a forall a. Maybe a Nothing -_memptyToNothing Maybe a +_memptyToNothing Maybe a x = Maybe a x -{-# INLINE _memptyToNothing #-} - --- * DateTime Formatting - -newtype DateTime = DateTime { DateTime -> UTCTime +{-# INLINE _memptyToNothing #-} + +-- * DateTime Formatting + +newtype DateTime = DateTime { DateTime -> UTCTime unDateTime :: TI.UTCTime } - deriving (DateTime -> DateTime -> Bool + deriving (DateTime -> DateTime -> Bool (DateTime -> DateTime -> Bool) -> (DateTime -> DateTime -> Bool) -> Eq DateTime forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -2154,8 +2159,8 @@ rnf :: DateTime -> () $crnf :: DateTime -> () NF.NFData) -instance A.FromJSON DateTime where - parseJSON :: Value -> Parser DateTime +instance A.FromJSON DateTime where + parseJSON :: Value -> Parser DateTime parseJSON = String -> (Text -> Parser DateTime) -> Value -> Parser DateTime forall a. String -> (Text -> Parser a) -> Value -> Parser a A.withText String @@ -2168,8 +2173,8 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . Text -> String T.unpack) -instance A.ToJSON DateTime where - toJSON :: DateTime -> Value +instance A.ToJSON DateTime where + toJSON :: DateTime -> Value toJSON (DateTime UTCTime t) = String -> Value forall a. ToJSON a => a -> Value @@ -2177,8 +2182,8 @@ forall t. (t ~ UTCTime, FormatTime t) => t -> String _showDateTime UTCTime t) -instance WH.FromHttpApiData DateTime where - parseUrlPiece :: Text -> Either Text DateTime +instance WH.FromHttpApiData DateTime where + parseUrlPiece :: Text -> Either Text DateTime parseUrlPiece = Either Text DateTime -> (DateTime -> Either Text DateTime) -> Maybe DateTime @@ -2201,36 +2206,36 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . Text -> String T.unpack -instance WH.ToHttpApiData DateTime where - toUrlPiece :: DateTime -> Text +instance WH.ToHttpApiData DateTime where + toUrlPiece :: DateTime -> Text toUrlPiece (DateTime UTCTime t) = String -> Text T.pack (UTCTime -> String forall t. (t ~ UTCTime, FormatTime t) => t -> String _showDateTime UTCTime t) -instance P.Show DateTime where - show :: DateTime -> String +instance P.Show DateTime where + show :: DateTime -> String show (DateTime UTCTime t) = UTCTime -> String forall t. (t ~ UTCTime, FormatTime t) => t -> String _showDateTime UTCTime t -instance MimeRender MimeMultipartFormData DateTime where - mimeRender :: Proxy MimeMultipartFormData -> DateTime -> ByteString +instance MimeRender MimeMultipartFormData DateTime where + mimeRender :: Proxy MimeMultipartFormData -> DateTime -> ByteString mimeRender Proxy MimeMultipartFormData _ = DateTime -> ByteString forall a. ToHttpApiData a => a -> ByteString mimeRenderDefaultMultipartFormData - --- | @_parseISO8601@ -_readDateTime :: (MonadFail m, Alternative m) => String -> m DateTime -_readDateTime :: forall (m :: * -> *). + +-- | @_parseISO8601@ +_readDateTime :: (MonadFail m, Alternative m) => String -> m DateTime +_readDateTime :: forall (m :: * -> *). (MonadFail m, Alternative m) => String -> m DateTime _readDateTime String s = - UTCTime -> DateTime + UTCTime -> DateTime DateTime (UTCTime -> DateTime) -> m UTCTime -> m DateTime forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> String -> m UTCTime @@ -2239,32 +2244,32 @@ String -> m t _parseISO8601 String s -{-# INLINE _readDateTime #-} - --- | @TI.formatISO8601Millis@ -_showDateTime :: (t ~ TI.UTCTime, TI.FormatTime t) => t -> String -_showDateTime :: forall t. (t ~ UTCTime, FormatTime t) => t -> String +{-# INLINE _readDateTime #-} + +-- | @TI.formatISO8601Millis@ +_showDateTime :: (t ~ TI.UTCTime, TI.FormatTime t) => t -> String +_showDateTime :: forall t. (t ~ UTCTime, FormatTime t) => t -> String _showDateTime = - t -> String + t -> String UTCTime -> String TI.formatISO8601Millis -{-# INLINE _showDateTime #-} - --- | parse an ISO8601 date-time string -_parseISO8601 :: (TI.ParseTime t, MonadFail m, Alternative m) => String -> m t -_parseISO8601 :: forall t (m :: * -> *). +{-# INLINE _showDateTime #-} + +-- | parse an ISO8601 date-time string +_parseISO8601 :: (TI.ParseTime t, MonadFail m, Alternative m) => String -> m t +_parseISO8601 :: forall t (m :: * -> *). (ParseTime t, MonadFail m, Alternative m) => String -> m t _parseISO8601 String t = - [m t] -> m t + [m t] -> m t forall (t :: * -> *) (f :: * -> *) a. (Foldable t, Alternative f) => t (f a) -> f a P.asum ([m t] -> m t) -> [m t] -> m t forall a b. (a -> b) -> a -> b $ - (String -> String -> m t) -> String -> String -> m t + (String -> String -> m t) -> String -> String -> m t forall a b c. (a -> b -> c) -> b -> a -> c P.flip (Bool -> TimeLocale -> String -> String -> m t forall (m :: * -> *) t. @@ -2276,17 +2281,17 @@ t (String -> m t) -> [String] -> [m t] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> - [String + [String "%FT%T%QZ", String "%FT%T%Q%z", String "%FT%T%Q%Z"] -{-# INLINE _parseISO8601 #-} - --- * Date Formatting - -newtype Date = Date { Date -> Day +{-# INLINE _parseISO8601 #-} + +-- * Date Formatting + +newtype Date = Date { Date -> Day unDate :: TI.Day } - deriving (Int -> Date + deriving (Int -> Date Date -> Int Date -> [Date] Date -> Date @@ -2564,8 +2569,8 @@ rnf :: Date -> () $crnf :: Date -> () NF.NFData) -instance A.FromJSON Date where - parseJSON :: Value -> Parser Date +instance A.FromJSON Date where + parseJSON :: Value -> Parser Date parseJSON = String -> (Text -> Parser Date) -> Value -> Parser Date forall a. String -> (Text -> Parser a) -> Value -> Parser a A.withText String @@ -2575,8 +2580,8 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . Text -> String T.unpack) -instance A.ToJSON Date where - toJSON :: Date -> Value +instance A.ToJSON Date where + toJSON :: Date -> Value toJSON (Date Day t) = String -> Value forall a. ToJSON a => a -> Value @@ -2584,8 +2589,8 @@ forall t. FormatTime t => t -> String _showDate Day t) -instance WH.FromHttpApiData Date where - parseUrlPiece :: Text -> Either Text Date +instance WH.FromHttpApiData Date where + parseUrlPiece :: Text -> Either Text Date parseUrlPiece = Either Text Date -> (Date -> Either Text Date) -> Maybe Date -> Either Text Date forall b a. b -> (a -> b) -> Maybe a -> b @@ -2603,31 +2608,31 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . Text -> String T.unpack -instance WH.ToHttpApiData Date where - toUrlPiece :: Date -> Text +instance WH.ToHttpApiData Date where + toUrlPiece :: Date -> Text toUrlPiece (Date Day t) = String -> Text T.pack (Day -> String forall t. FormatTime t => t -> String _showDate Day t) -instance P.Show Date where - show :: Date -> String +instance P.Show Date where + show :: Date -> String show (Date Day t) = Day -> String forall t. FormatTime t => t -> String _showDate Day t -instance MimeRender MimeMultipartFormData Date where - mimeRender :: Proxy MimeMultipartFormData -> Date -> ByteString +instance MimeRender MimeMultipartFormData Date where + mimeRender :: Proxy MimeMultipartFormData -> Date -> ByteString mimeRender Proxy MimeMultipartFormData _ = Date -> ByteString forall a. ToHttpApiData a => a -> ByteString mimeRenderDefaultMultipartFormData - --- | @TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"@ -_readDate :: MonadFail m => String -> m Date -_readDate :: forall (m :: * -> *). MonadFail m => String -> m Date + +-- | @TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"@ +_readDate :: MonadFail m => String -> m Date +_readDate :: forall (m :: * -> *). MonadFail m => String -> m Date _readDate String s = Day -> Date Date (Day -> Date) -> m Day -> m Date @@ -2641,26 +2646,26 @@ TI.defaultTimeLocale String "%Y-%m-%d" String s -{-# INLINE _readDate #-} - --- | @TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"@ -_showDate :: TI.FormatTime t => t -> String -_showDate :: forall t. FormatTime t => t -> String +{-# INLINE _readDate #-} + +-- | @TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"@ +_showDate :: TI.FormatTime t => t -> String +_showDate :: forall t. FormatTime t => t -> String _showDate = - TimeLocale -> String -> t -> String + TimeLocale -> String -> t -> String forall t. FormatTime t => TimeLocale -> String -> t -> String TI.formatTime TimeLocale TI.defaultTimeLocale String "%Y-%m-%d" -{-# INLINE _showDate #-} - --- * Byte/Binary Formatting - - --- | base64 encoded characters -newtype ByteArray = ByteArray { ByteArray -> ByteString +{-# INLINE _showDate #-} + +-- * Byte/Binary Formatting + + +-- | base64 encoded characters +newtype ByteArray = ByteArray { ByteArray -> ByteString unByteArray :: BL.ByteString } - deriving (ByteArray -> ByteArray -> Bool + deriving (ByteArray -> ByteArray -> Bool (ByteArray -> ByteArray -> Bool) -> (ByteArray -> ByteArray -> Bool) -> Eq ByteArray forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -2873,25 +2878,25 @@ rnf :: ByteArray -> () $crnf :: ByteArray -> () NF.NFData) - -instance A.FromJSON ByteArray where - parseJSON :: Value -> Parser ByteArray + +instance A.FromJSON ByteArray where + parseJSON :: Value -> Parser ByteArray parseJSON = String -> (Text -> Parser ByteArray) -> Value -> Parser ByteArray forall a. String -> (Text -> Parser a) -> Value -> Parser a A.withText String "ByteArray" Text -> Parser ByteArray forall (m :: * -> *). MonadFail m => Text -> m ByteArray _readByteArray -instance A.ToJSON ByteArray where - toJSON :: ByteArray -> Value +instance A.ToJSON ByteArray where + toJSON :: ByteArray -> Value toJSON = Text -> Value forall a. ToJSON a => a -> Value A.toJSON (Text -> Value) -> (ByteArray -> Text) -> ByteArray -> Value forall b c a. (b -> c) -> (a -> b) -> a -> c . ByteArray -> Text _showByteArray -instance WH.FromHttpApiData ByteArray where - parseUrlPiece :: Text -> Either Text ByteArray +instance WH.FromHttpApiData ByteArray where + parseUrlPiece :: Text -> Either Text ByteArray parseUrlPiece = Either Text ByteArray -> (ByteArray -> Either Text ByteArray) -> Maybe ByteArray @@ -2908,27 +2913,27 @@ . Text -> Maybe ByteArray forall (m :: * -> *). MonadFail m => Text -> m ByteArray _readByteArray -instance WH.ToHttpApiData ByteArray where - toUrlPiece :: ByteArray -> Text +instance WH.ToHttpApiData ByteArray where + toUrlPiece :: ByteArray -> Text toUrlPiece = ByteArray -> Text _showByteArray -instance P.Show ByteArray where - show :: ByteArray -> String +instance P.Show ByteArray where + show :: ByteArray -> String show = Text -> String T.unpack (Text -> String) -> (ByteArray -> Text) -> ByteArray -> String forall b c a. (b -> c) -> (a -> b) -> a -> c . ByteArray -> Text _showByteArray -instance MimeRender MimeMultipartFormData ByteArray where - mimeRender :: Proxy MimeMultipartFormData -> ByteArray -> ByteString +instance MimeRender MimeMultipartFormData ByteArray where + mimeRender :: Proxy MimeMultipartFormData -> ByteArray -> ByteString mimeRender Proxy MimeMultipartFormData _ = ByteArray -> ByteString forall a. ToHttpApiData a => a -> ByteString mimeRenderDefaultMultipartFormData - --- | read base64 encoded characters -_readByteArray :: MonadFail m => Text -> m ByteArray -_readByteArray :: forall (m :: * -> *). MonadFail m => Text -> m ByteArray + +-- | read base64 encoded characters +_readByteArray :: MonadFail m => Text -> m ByteArray +_readByteArray :: forall (m :: * -> *). MonadFail m => Text -> m ByteArray _readByteArray = (String -> m ByteArray) -> (ByteString -> m ByteArray) -> Either String ByteString @@ -2955,11 +2960,11 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . Text -> ByteString T.encodeUtf8 -{-# INLINE _readByteArray #-} - --- | show base64 encoded characters -_showByteArray :: ByteArray -> Text -_showByteArray :: ByteArray -> Text +{-# INLINE _readByteArray #-} + +-- | show base64 encoded characters +_showByteArray :: ByteArray -> Text +_showByteArray :: ByteArray -> Text _showByteArray = ByteString -> Text T.decodeUtf8 (ByteString -> Text) -> (ByteArray -> ByteString) -> ByteArray -> Text @@ -2974,12 +2979,12 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . ByteArray -> ByteString unByteArray -{-# INLINE _showByteArray #-} - --- | any sequence of octets -newtype Binary = Binary { Binary -> ByteString +{-# INLINE _showByteArray #-} + +-- | any sequence of octets +newtype Binary = Binary { Binary -> ByteString unBinary :: BL.ByteString } - deriving (Binary -> Binary -> Bool + deriving (Binary -> Binary -> Bool (Binary -> Binary -> Bool) -> (Binary -> Binary -> Bool) -> Eq Binary forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -3185,25 +3190,25 @@ rnf :: Binary -> () $crnf :: Binary -> () NF.NFData) - -instance A.FromJSON Binary where - parseJSON :: Value -> Parser Binary + +instance A.FromJSON Binary where + parseJSON :: Value -> Parser Binary parseJSON = String -> (Text -> Parser Binary) -> Value -> Parser Binary forall a. String -> (Text -> Parser a) -> Value -> Parser a A.withText String "Binary" Text -> Parser Binary forall (m :: * -> *). MonadFail m => Text -> m Binary _readBinaryBase64 -instance A.ToJSON Binary where - toJSON :: Binary -> Value +instance A.ToJSON Binary where + toJSON :: Binary -> Value toJSON = Text -> Value forall a. ToJSON a => a -> Value A.toJSON (Text -> Value) -> (Binary -> Text) -> Binary -> Value forall b c a. (b -> c) -> (a -> b) -> a -> c . Binary -> Text _showBinaryBase64 -instance WH.FromHttpApiData Binary where - parseUrlPiece :: Text -> Either Text Binary +instance WH.FromHttpApiData Binary where + parseUrlPiece :: Text -> Either Text Binary parseUrlPiece = Either Text Binary -> (Binary -> Either Text Binary) -> Maybe Binary @@ -3220,25 +3225,25 @@ . Text -> Maybe Binary forall (m :: * -> *). MonadFail m => Text -> m Binary _readBinaryBase64 -instance WH.ToHttpApiData Binary where - toUrlPiece :: Binary -> Text +instance WH.ToHttpApiData Binary where + toUrlPiece :: Binary -> Text toUrlPiece = Binary -> Text _showBinaryBase64 -instance P.Show Binary where - show :: Binary -> String +instance P.Show Binary where + show :: Binary -> String show = Text -> String T.unpack (Text -> String) -> (Binary -> Text) -> Binary -> String forall b c a. (b -> c) -> (a -> b) -> a -> c . Binary -> Text _showBinaryBase64 -instance MimeRender MimeMultipartFormData Binary where - mimeRender :: Proxy MimeMultipartFormData -> Binary -> ByteString +instance MimeRender MimeMultipartFormData Binary where + mimeRender :: Proxy MimeMultipartFormData -> Binary -> ByteString mimeRender Proxy MimeMultipartFormData _ = Binary -> ByteString unBinary - -_readBinaryBase64 :: MonadFail m => Text -> m Binary -_readBinaryBase64 :: forall (m :: * -> *). MonadFail m => Text -> m Binary + +_readBinaryBase64 :: MonadFail m => Text -> m Binary +_readBinaryBase64 :: forall (m :: * -> *). MonadFail m => Text -> m Binary _readBinaryBase64 = (String -> m Binary) -> (ByteString -> m Binary) -> Either String ByteString -> m Binary forall a c b. (a -> c) -> (b -> c) -> Either a b -> c @@ -3263,10 +3268,10 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . Text -> ByteString T.encodeUtf8 -{-# INLINE _readBinaryBase64 #-} - -_showBinaryBase64 :: Binary -> Text -_showBinaryBase64 :: Binary -> Text +{-# INLINE _readBinaryBase64 #-} + +_showBinaryBase64 :: Binary -> Text +_showBinaryBase64 :: Binary -> Text _showBinaryBase64 = ByteString -> Text T.decodeUtf8 (ByteString -> Text) -> (Binary -> ByteString) -> Binary -> Text forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -3280,10 +3285,10 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . Binary -> ByteString unBinary -{-# INLINE _showBinaryBase64 #-} - --- * Lens Type Aliases - -type Lens_' s a = Lens_ s s a a -type Lens_ s t a b = forall (f :: K.Type -> K.Type). Functor f => (a -> f b) -> s -> f t - \ No newline at end of file +{-# INLINE _showBinaryBase64 #-} + +-- * Lens Type Aliases + +type Lens_' s a = Lens_ s s a a +type Lens_ s t a b = forall (f :: K.Type -> K.Type). Functor f => (a -> f b) -> s -> f t + \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/example-app/openapi-petstore-app.cabal b/samples/client/petstore/haskell-http-client/example-app/openapi-petstore-app.cabal index cdef6063b76a..cc77ed51db6d 100644 --- a/samples/client/petstore/haskell-http-client/example-app/openapi-petstore-app.cabal +++ b/samples/client/petstore/haskell-http-client/example-app/openapi-petstore-app.cabal @@ -24,7 +24,7 @@ executable openapi-petstore-app Paths_openapi_petstore_app ghc-options: -Wall build-depends: - aeson >=2.0 && <3.0 + aeson >=1.0 && <3.0 , base >=4.7 && <5.0 , bytestring >=0.10.0 && <0.11 , case-insensitive diff --git a/samples/client/petstore/haskell-http-client/example-app/package.yaml b/samples/client/petstore/haskell-http-client/example-app/package.yaml index f181c010c96a..f77b8616c2e7 100644 --- a/samples/client/petstore/haskell-http-client/example-app/package.yaml +++ b/samples/client/petstore/haskell-http-client/example-app/package.yaml @@ -19,7 +19,7 @@ dependencies: - mtl >=2.2.1 - unordered-containers - containers >=0.5.0.0 && <0.8 -- aeson >=2.0 && <3.0 +- aeson >=1.0 && <3.0 - bytestring >=0.10.0 && <0.11 - http-types >=0.8 && <0.13 - http-client >=0.5 && <0.8 diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs index 3a30cf046e96..50e8f41427eb 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs @@ -23,6 +23,7 @@ Module : OpenAPIPetstore.Core {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} module OpenAPIPetstore.Core where @@ -428,7 +429,11 @@ _applyAuthMethods req config@(OpenAPIPetstoreConfig {configAuthMethods = as}) = -- * Utils -- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON) +#if MIN_VERSION_aeson(2,0,0) _omitNulls :: [(A.Key, A.Value)] -> A.Value +#else +_omitNulls :: [(Text, A.Value)] -> A.Value +#endif _omitNulls = A.object . P.filter notNull where notNull (_, A.Null) = False diff --git a/samples/client/petstore/haskell-http-client/openapi-petstore.cabal b/samples/client/petstore/haskell-http-client/openapi-petstore.cabal index 8955fd7aed19..25134dc74b01 100644 --- a/samples/client/petstore/haskell-http-client/openapi-petstore.cabal +++ b/samples/client/petstore/haskell-http-client/openapi-petstore.cabal @@ -35,7 +35,7 @@ library lib ghc-options: -Wall -funbox-strict-fields build-depends: - aeson >=2.0 && <3.0 + aeson >=1.0 && <3.0 , base >=4.7 && <5.0 , base64-bytestring >1.0 && <2.0 , bytestring >=0.10.0 diff --git a/samples/client/petstore/haskell-http-client/tests-integration/package.yaml b/samples/client/petstore/haskell-http-client/tests-integration/package.yaml index dfea41b6a06c..b2c4a5e93754 100644 --- a/samples/client/petstore/haskell-http-client/tests-integration/package.yaml +++ b/samples/client/petstore/haskell-http-client/tests-integration/package.yaml @@ -19,7 +19,7 @@ dependencies: - mtl >=2.2.1 - unordered-containers - containers >=0.5.0.0 && <0.7 -- aeson >=2.0 && <3.0 +- aeson >=1.0 && <3.0 - bytestring >=0.10.0 - http-types >=0.8 && <0.13 - http-client >=0.5 && <0.8 diff --git a/samples/client/petstore/haskell-http-client/tests/Instances.hs b/samples/client/petstore/haskell-http-client/tests/Instances.hs index aeb0f9b771e5..dd4b65d938e3 100644 --- a/samples/client/petstore/haskell-http-client/tests/Instances.hs +++ b/samples/client/petstore/haskell-http-client/tests/Instances.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-unused-matches #-} module Instances where @@ -52,9 +53,12 @@ instance Arbitrary Date where arbitrary = Date <$> arbitrary shrink (Date xs) = Date <$> shrink xs +#if MIN_VERSION_aeson(2,0,0) +#else -- | A naive Arbitrary instance for A.Value: --- instance Arbitrary A.Value where --- arbitrary = arbitraryValue +instance Arbitrary A.Value where + arbitrary = arbitraryValue +#endif arbitraryValue :: Gen A.Value arbitraryValue =