diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/HaskellHttpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/HaskellHttpClientCodegen.java index 26dac3f2048..c503ce3cb62 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/HaskellHttpClientCodegen.java @@ -66,6 +66,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC static final String MEDIA_TYPE = "mediaType"; static final String MIME_NO_CONTENT = "MimeNoContent"; + static final String MIME_ANY = "MimeAny"; // vendor extensions static final String X_ALL_UNIQUE_PARAMS = "x-allUniqueParams"; @@ -215,7 +216,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC knownMimeDataTypes.put("application/octet-stream", "MimeOctetStream"); knownMimeDataTypes.put("multipart/form-data", "MimeMultipartFormData"); knownMimeDataTypes.put("text/plain", "MimePlainText"); - knownMimeDataTypes.put("*/*", "MimeAny"); + knownMimeDataTypes.put("*/*", MIME_ANY); importMapping.clear(); @@ -235,7 +236,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC cliOptions.add(CliOption.newBoolean(PROP_GENERATE_MODEL_CONSTRUCTORS, "Generate smart constructors (only supply required fields) for models").defaultValue(Boolean.TRUE.toString())); cliOptions.add(CliOption.newBoolean(PROP_GENERATE_ENUMS, "Generate specific datatypes for swagger enums").defaultValue(Boolean.TRUE.toString())); cliOptions.add(CliOption.newBoolean(PROP_GENERATE_FORM_URLENCODED_INSTANCES, "Generate FromForm/ToForm instances for models that are used by operations that produce or consume application/x-www-form-urlencoded").defaultValue(Boolean.TRUE.toString())); - cliOptions.add(CliOption.newBoolean(PROP_INLINE_MIME_TYPES, "Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option").defaultValue(Boolean.FALSE.toString())); + cliOptions.add(CliOption.newBoolean(PROP_INLINE_MIME_TYPES, "Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option").defaultValue(Boolean.TRUE.toString())); cliOptions.add(CliOption.newString(PROP_MODEL_DERIVING, "Additional classes to include in the deriving() clause of Models")); @@ -385,7 +386,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC if (additionalProperties.containsKey(PROP_INLINE_MIME_TYPES)) { setInlineMimeTypes(convertPropertyToBoolean(PROP_INLINE_MIME_TYPES)); } else { - setInlineMimeTypes(false); + setInlineMimeTypes(true); } if (additionalProperties.containsKey(PROP_GENERATE_LENSES)) { @@ -836,7 +837,9 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC private void processInlineConsumesContentType(CodegenOperation op, Map m) { if (op.vendorExtensions.containsKey(X_INLINE_CONTENT_TYPE)) return; if ((boolean) additionalProperties.get(PROP_INLINE_MIME_TYPES) - && op.consumes.size() == 1) { + && op.consumes.size() == 1 + && op.consumes.get(0).get(X_MEDIA_DATA_TYPE) != MIME_ANY + && op.consumes.get(0).get(X_MEDIA_DATA_TYPE) != MIME_NO_CONTENT) { op.vendorExtensions.put(X_INLINE_CONTENT_TYPE, m); for (CodegenParameter param : op.allParams) { if (param.isBodyParam && param.required) { @@ -848,7 +851,9 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC private void processInlineProducesContentType(CodegenOperation op, Map m) { if ((boolean) additionalProperties.get(PROP_INLINE_MIME_TYPES) - && op.produces.size() == 1) { + && op.produces.size() == 1 + && op.produces.get(0).get(X_MEDIA_DATA_TYPE) != MIME_ANY + && op.produces.get(0).get(X_MEDIA_DATA_TYPE) != MIME_NO_CONTENT) { op.vendorExtensions.put(X_INLINE_ACCEPT, m); } } diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/README.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/README.mustache index 68923d3569c..d40b15fddc1 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/README.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/README.mustache @@ -1,6 +1,6 @@ -## Swagger Auto-Generated [http-client](https://www.stackage.org/lts-9.0/package/http-client-0.5.7.0) Bindings to `{{baseModule}}` +## Swagger Auto-Generated [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) Bindings to `{{appName}}` -The library in `lib` provides auto-generated-from-Swagger [http-client](https://www.stackage.org/lts-9.0/package/http-client-0.5.7.0) bindings to the {{baseModule}} API. +The library in `lib` provides auto-generated-from-Swagger [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) bindings to the {{appName}} API. Targeted swagger version: {{swaggerVersion}} @@ -71,7 +71,7 @@ These options allow some customization of the code generation process. | generateFormUrlEncodedInstances | Generate FromForm/ToForm instances for models used by x-www-form-urlencoded operations (model fields must be primitive types) | true | {{{generateFormUrlEncodedInstances}}} | | generateLenses | Generate Lens optics for Models | true | {{{generateLenses}}} | | generateModelConstructors | Generate smart constructors (only supply required fields) for models | true | {{{generateModelConstructors}}} | -| inlineMimeTypes | Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option | false | {{{inlineMimeTypes}}} | +| inlineMimeTypes | Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option | true | {{{inlineMimeTypes}}} | | modelDeriving | Additional classes to include in the deriving() clause of Models | | {{{modelDeriving}}} | | requestType | Set the name of the type used to generate requests | | {{{requestType}}} | | strictFields | Add strictness annotations to all model fields | true | {{{x-strictFields}}} | diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/haskell-http-client.cabal.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/haskell-http-client.cabal.mustache index 3bffa485a03..3cda661d060 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/haskell-http-client.cabal.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/haskell-http-client.cabal.mustache @@ -48,7 +48,7 @@ library , http-client >=0.5 && <0.6 , http-client-tls , http-media >= 0.4 && < 0.8 - , http-types >=0.8 && <0.12 + , http-types >=0.8 && <0.13 , iso8601-time >=0.1.3 && <0.2.0 , microlens >= 0.4.3 && <0.5 , mtl >=2.2.1 @@ -56,7 +56,7 @@ library , random >=1.1 , safe-exceptions <0.2 , text >=0.11 && <1.3 - , time >=1.5 && <1.9 + , time >=1.5 && <1.10 , transformers >=0.4.0.0 , unordered-containers , vector >=0.10.9 && <0.13 diff --git a/samples/client/petstore/haskell-http-client/README.md b/samples/client/petstore/haskell-http-client/README.md index c7e6b2355fe..cdf1b0321a8 100644 --- a/samples/client/petstore/haskell-http-client/README.md +++ b/samples/client/petstore/haskell-http-client/README.md @@ -1,6 +1,6 @@ -## Swagger Auto-Generated [http-client](https://www.stackage.org/lts-9.0/package/http-client-0.5.7.0) Bindings to `SwaggerPetstore` +## Swagger Auto-Generated [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) Bindings to `Swagger Petstore` -The library in `lib` provides auto-generated-from-Swagger [http-client](https://www.stackage.org/lts-9.0/package/http-client-0.5.7.0) bindings to the SwaggerPetstore API. +The library in `lib` provides auto-generated-from-Swagger [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) bindings to the Swagger Petstore API. Targeted swagger version: 2.0 @@ -71,7 +71,7 @@ These options allow some customization of the code generation process. | generateFormUrlEncodedInstances | Generate FromForm/ToForm instances for models used by x-www-form-urlencoded operations (model fields must be primitive types) | true | true | | generateLenses | Generate Lens optics for Models | true | true | | generateModelConstructors | Generate smart constructors (only supply required fields) for models | true | true | -| inlineMimeTypes | Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option | false | false | +| inlineMimeTypes | Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option | true | true | | modelDeriving | Additional classes to include in the deriving() clause of Models | | | | requestType | Set the name of the type used to generate requests | | SwaggerPetstoreRequest | | strictFields | Add strictness annotations to all model fields | true | true | diff --git a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-AnotherFake.html b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-AnotherFake.html index 7763cb96b28..7bd4ba99976 100644 --- a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-AnotherFake.html +++ b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-AnotherFake.html @@ -1,4 +1,4 @@ SwaggerPetstore.API.AnotherFake

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.AnotherFake

Description

 

Synopsis

Operations

AnotherFake

testSpecialTags

testSpecialTags Source #

Arguments

:: (Consumes TestSpecialTags contentType, MimeRender contentType Client) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Client

"body" - client model

-> SwaggerPetstoreRequest TestSpecialTags contentType Client accept 
PATCH /another-fake/dummy

To test special tags

To test special tags

data TestSpecialTags Source #

Instances

Produces TestSpecialTags MimeJSON Source #
application/json
Consumes TestSpecialTags MimeJSON Source #
application/json
HasBodyParam TestSpecialTags Client Source #

Body Param "body" - client model

Methods

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

\ No newline at end of file +

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.AnotherFake

Description

 

Operations

AnotherFake

testSpecialTags

testSpecialTags Source #

PATCH /another-fake/dummy

To test special tags

To test special tags

data TestSpecialTags Source #

Instances

Produces TestSpecialTags MimeJSON Source #
application/json
Consumes TestSpecialTags MimeJSON Source #
application/json
HasBodyParam TestSpecialTags Client Source #

Body Param "body" - client model

Methods

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

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Fake.html b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Fake.html index fbf388e823c..9b08fe118fb 100644 --- a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Fake.html +++ b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Fake.html @@ -1,4 +1,4 @@ SwaggerPetstore.API.Fake

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.Fake

Description

 

Synopsis

Operations

Fake

fakeOuterBooleanSerialize

fakeOuterBooleanSerialize Source #

Arguments

:: Consumes FakeOuterBooleanSerialize contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest FakeOuterBooleanSerialize contentType OuterBoolean accept 
POST /fake/outer/boolean

Test serialization of outer boolean types

fakeOuterCompositeSerialize

fakeOuterCompositeSerialize Source #

Arguments

:: Consumes FakeOuterCompositeSerialize contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept 
POST /fake/outer/composite

Test serialization of object with outer number type

fakeOuterNumberSerialize

fakeOuterNumberSerialize Source #

Arguments

:: Consumes FakeOuterNumberSerialize contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest FakeOuterNumberSerialize contentType OuterNumber accept 
POST /fake/outer/number

Test serialization of outer number types

fakeOuterStringSerialize

fakeOuterStringSerialize Source #

Arguments

:: Consumes FakeOuterStringSerialize contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest FakeOuterStringSerialize contentType OuterString accept 
POST /fake/outer/string

Test serialization of outer string types

testClientModel

testClientModel Source #

Arguments

:: (Consumes TestClientModel contentType, MimeRender contentType Client) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Client

"body" - client model

-> SwaggerPetstoreRequest TestClientModel contentType Client accept 
PATCH /fake

To test "client" model

To test "client" model

data TestClientModel Source #

Instances

Produces TestClientModel MimeJSON Source #
application/json
Consumes TestClientModel MimeJSON Source #
application/json
HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Methods

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

testEndpointParameters

testEndpointParameters Source #

Arguments

:: Consumes TestEndpointParameters contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Number

"number" - None

-> ParamDouble

"double" - None

-> PatternWithoutDelimiter

"patternWithoutDelimiter" - None

-> Byte

"byte" - None

-> SwaggerPetstoreRequest TestEndpointParameters contentType res accept 
POST /fake

Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트

Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트

AuthMethod: AuthBasicHttpBasicTest

Note: Has Produces instances, but no response schema

data TestEndpointParameters Source #

Instances

Produces TestEndpointParameters MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Produces TestEndpointParameters MimeJsonCharsetutf8 Source #
application/json; charset=utf-8
Consumes TestEndpointParameters MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Consumes TestEndpointParameters MimeJsonCharsetutf8 Source #
application/json; charset=utf-8
HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

HasOptionalParam TestEndpointParameters ParamString Source #

Optional Param "string" - None

HasOptionalParam TestEndpointParameters ParamInteger Source #

Optional Param "integer" - None

HasOptionalParam TestEndpointParameters ParamFloat Source #

Optional Param "float" - None

HasOptionalParam TestEndpointParameters ParamDateTime Source #

Optional Param "dateTime" - None

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

HasOptionalParam TestEndpointParameters ParamBinary Source #

Optional Param "binary" - None

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

testEnumParameters

testEnumParameters Source #

Arguments

:: Consumes TestEnumParameters contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest TestEnumParameters contentType res accept 
GET /fake

To test enum parameters

To test enum parameters

Note: Has Produces instances, but no response schema

data TestEnumParameters Source #

Instances

MimeType mtype => Produces TestEnumParameters mtype Source #
*/*
MimeType mtype => Consumes TestEnumParameters mtype Source #
*/*
HasOptionalParam TestEnumParameters EnumQueryStringArray Source #

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

HasOptionalParam TestEnumParameters EnumQueryString Source #

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

HasOptionalParam TestEnumParameters EnumQueryInteger Source #

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

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

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

HasOptionalParam TestEnumParameters EnumHeaderStringArray Source #

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

HasOptionalParam TestEnumParameters EnumHeaderString Source #

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

HasOptionalParam TestEnumParameters EnumFormStringArray Source #

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

HasOptionalParam TestEnumParameters EnumFormString Source #

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

testInlineAdditionalProperties

testInlineAdditionalProperties Source #

Arguments

:: (Consumes TestInlineAdditionalProperties contentType, MimeRender contentType Value) 
=> ContentType contentType

request content-type (MimeType)

-> Value

"param" - request body

-> SwaggerPetstoreRequest TestInlineAdditionalProperties contentType NoContent MimeNoContent 
POST /fake/inline-additionalProperties

test inline additionalProperties

testJsonFormData

testJsonFormData Source #

Arguments

:: Consumes TestJsonFormData contentType 
=> ContentType contentType

request content-type (MimeType)

-> Param

"param" - field1

-> Param2

"param2" - field2

-> SwaggerPetstoreRequest TestJsonFormData contentType NoContent MimeNoContent 
GET /fake/jsonFormData

test json serialization of form data

\ No newline at end of file +

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.Fake

Description

 

Synopsis

Operations

Fake

fakeOuterBooleanSerialize

fakeOuterBooleanSerialize Source #

Arguments

:: Consumes FakeOuterBooleanSerialize contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest FakeOuterBooleanSerialize contentType OuterBoolean accept 
POST /fake/outer/boolean

Test serialization of outer boolean types

fakeOuterCompositeSerialize

fakeOuterCompositeSerialize Source #

Arguments

:: Consumes FakeOuterCompositeSerialize contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept 
POST /fake/outer/composite

Test serialization of object with outer number type

fakeOuterNumberSerialize

fakeOuterNumberSerialize Source #

Arguments

:: Consumes FakeOuterNumberSerialize contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest FakeOuterNumberSerialize contentType OuterNumber accept 
POST /fake/outer/number

Test serialization of outer number types

fakeOuterStringSerialize

fakeOuterStringSerialize Source #

Arguments

:: Consumes FakeOuterStringSerialize contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest FakeOuterStringSerialize contentType OuterString accept 
POST /fake/outer/string

Test serialization of outer string types

testClientModel

testClientModel Source #

PATCH /fake

To test "client" model

To test "client" model

data TestClientModel Source #

Instances

Produces TestClientModel MimeJSON Source #
application/json
Consumes TestClientModel MimeJSON Source #
application/json
HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Methods

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

testEndpointParameters

testEndpointParameters Source #

Arguments

:: Consumes TestEndpointParameters contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Number

"number" - None

-> ParamDouble

"double" - None

-> PatternWithoutDelimiter

"patternWithoutDelimiter" - None

-> Byte

"byte" - None

-> SwaggerPetstoreRequest TestEndpointParameters contentType res accept 
POST /fake

Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트

Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트

AuthMethod: AuthBasicHttpBasicTest

Note: Has Produces instances, but no response schema

data TestEndpointParameters Source #

Instances

Produces TestEndpointParameters MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Produces TestEndpointParameters MimeJsonCharsetutf8 Source #
application/json; charset=utf-8
Consumes TestEndpointParameters MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Consumes TestEndpointParameters MimeJsonCharsetutf8 Source #
application/json; charset=utf-8
HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

HasOptionalParam TestEndpointParameters ParamString Source #

Optional Param "string" - None

HasOptionalParam TestEndpointParameters ParamInteger Source #

Optional Param "integer" - None

HasOptionalParam TestEndpointParameters ParamFloat Source #

Optional Param "float" - None

HasOptionalParam TestEndpointParameters ParamDateTime Source #

Optional Param "dateTime" - None

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

HasOptionalParam TestEndpointParameters ParamBinary Source #

Optional Param "binary" - None

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

testEnumParameters

testEnumParameters Source #

Arguments

:: Consumes TestEnumParameters contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest TestEnumParameters contentType res accept 
GET /fake

To test enum parameters

To test enum parameters

Note: Has Produces instances, but no response schema

data TestEnumParameters Source #

Instances

MimeType mtype => Produces TestEnumParameters mtype Source #
*/*
MimeType mtype => Consumes TestEnumParameters mtype Source #
*/*
HasOptionalParam TestEnumParameters EnumQueryStringArray Source #

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

HasOptionalParam TestEnumParameters EnumQueryString Source #

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

HasOptionalParam TestEnumParameters EnumQueryInteger Source #

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

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

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

HasOptionalParam TestEnumParameters EnumHeaderStringArray Source #

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

HasOptionalParam TestEnumParameters EnumHeaderString Source #

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

HasOptionalParam TestEnumParameters EnumFormStringArray Source #

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

HasOptionalParam TestEnumParameters EnumFormString Source #

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

testInlineAdditionalProperties

testJsonFormData

testJsonFormData Source #

GET /fake/jsonFormData

test json serialization of form data

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-FakeClassnameTags123.html b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-FakeClassnameTags123.html index fe65b297a43..dc5ce60c299 100644 --- a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-FakeClassnameTags123.html +++ b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-FakeClassnameTags123.html @@ -1,4 +1,4 @@ SwaggerPetstore.API.FakeClassnameTags123

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.FakeClassnameTags123

Description

 

Synopsis

Operations

FakeClassnameTags123

testClassname

testClassname Source #

Arguments

:: (Consumes TestClassname contentType, MimeRender contentType Client) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Client

"body" - client model

-> SwaggerPetstoreRequest TestClassname contentType Client accept 
PATCH /fake_classname_test

To test class name in snake case

AuthMethod: AuthApiKeyApiKeyQuery

data TestClassname Source #

Instances

Produces TestClassname MimeJSON Source #
application/json
Consumes TestClassname MimeJSON Source #
application/json
HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Methods

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

\ No newline at end of file +

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.FakeClassnameTags123

Description

 

Operations

FakeClassnameTags123

testClassname

testClassname Source #

PATCH /fake_classname_test

To test class name in snake case

AuthMethod: AuthApiKeyApiKeyQuery

data TestClassname Source #

Instances

Produces TestClassname MimeJSON Source #
application/json
Consumes TestClassname MimeJSON Source #
application/json
HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Methods

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

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Pet.html b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Pet.html index 202d9dc05f1..c380866f88b 100644 --- a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Pet.html +++ b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Pet.html @@ -1,4 +1,4 @@ SwaggerPetstore.API.Pet

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.Pet

Description

 

Synopsis

Operations

Pet

addPet

addPet Source #

Arguments

:: (Consumes AddPet contentType, MimeRender contentType Pet) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Pet

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

-> SwaggerPetstoreRequest AddPet contentType res accept 
POST /pet

Add a new pet to the store

AuthMethod: AuthOAuthPetstoreAuth

Note: Has Produces instances, but no response schema

data AddPet Source #

Instances

Produces AddPet MimeXML Source #
application/xml
Produces AddPet MimeJSON Source #
application/json
Consumes AddPet MimeXML Source #
application/xml
Consumes AddPet MimeJSON Source #
application/json
HasBodyParam AddPet Pet Source #

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

Methods

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

deletePet

deletePet Source #

Arguments

:: Accept accept

request accept (MimeType)

-> PetId

"petId" - Pet id to delete

-> SwaggerPetstoreRequest DeletePet MimeNoContent res accept 
DELETE /pet/{petId}

Deletes a pet

AuthMethod: AuthOAuthPetstoreAuth

Note: Has Produces instances, but no response schema

data DeletePet Source #

Instances

findPetsByStatus

findPetsByStatus Source #

Arguments

:: Accept accept

request accept (MimeType)

-> Status

"status" - Status values that need to be considered for filter

-> SwaggerPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept 
GET /pet/findByStatus

Finds Pets by status

Multiple status values can be provided with comma separated strings

AuthMethod: AuthOAuthPetstoreAuth

findPetsByTags

findPetsByTags Source #

Arguments

:: Accept accept

request accept (MimeType)

-> Tags

"tags" - Tags to filter by

-> SwaggerPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept 

Deprecated:

GET /pet/findByTags

Finds Pets by tags

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

AuthMethod: AuthOAuthPetstoreAuth

getPetById

getPetById Source #

Arguments

:: Accept accept

request accept (MimeType)

-> PetId

"petId" - ID of pet to return

-> SwaggerPetstoreRequest GetPetById MimeNoContent Pet accept 
GET /pet/{petId}

Find pet by ID

Returns a single pet

AuthMethod: AuthApiKeyApiKey

data GetPetById Source #

Instances

updatePet

updatePet Source #

Arguments

:: (Consumes UpdatePet contentType, MimeRender contentType Pet) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Pet

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

-> SwaggerPetstoreRequest UpdatePet contentType res accept 
PUT /pet

Update an existing pet

AuthMethod: AuthOAuthPetstoreAuth

Note: Has Produces instances, but no response schema

data UpdatePet Source #

Instances

Produces UpdatePet MimeXML Source #
application/xml
Produces UpdatePet MimeJSON Source #
application/json
Consumes UpdatePet MimeXML Source #
application/xml
Consumes UpdatePet MimeJSON Source #
application/json
HasBodyParam UpdatePet Pet Source #

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

Methods

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

updatePetWithForm

updatePetWithForm Source #

Arguments

:: Consumes UpdatePetWithForm contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> PetId

"petId" - ID of pet that needs to be updated

-> SwaggerPetstoreRequest UpdatePetWithForm contentType res accept 
POST /pet/{petId}

Updates a pet in the store with form data

AuthMethod: AuthOAuthPetstoreAuth

Note: Has Produces instances, but no response schema

data UpdatePetWithForm Source #

Instances

Produces UpdatePetWithForm MimeXML Source #
application/xml
Produces UpdatePetWithForm MimeJSON Source #
application/json
Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

uploadFile

uploadFile Source #

Arguments

:: Consumes UploadFile contentType 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> PetId

"petId" - ID of pet to update

-> SwaggerPetstoreRequest UploadFile contentType ApiResponse accept 
POST /pet/{petId}/uploadImage

uploads an image

AuthMethod: AuthOAuthPetstoreAuth

data UploadFile Source #

Instances

Produces UploadFile MimeJSON Source #
application/json
Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
HasOptionalParam UploadFile File Source #

Optional Param "file" - file to upload

Methods

applyOptionalParam :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

HasOptionalParam UploadFile AdditionalMetadata Source #

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

\ No newline at end of file +

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.Pet

Description

 

Operations

Pet

addPet

addPet Source #

Arguments

:: (Consumes AddPet contentType, MimeRender contentType Pet) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Pet

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

-> SwaggerPetstoreRequest AddPet contentType res accept 
POST /pet

Add a new pet to the store

AuthMethod: AuthOAuthPetstoreAuth

Note: Has Produces instances, but no response schema

data AddPet Source #

Instances

Produces AddPet MimeXML Source #
application/xml
Produces AddPet MimeJSON Source #
application/json
Consumes AddPet MimeXML Source #
application/xml
Consumes AddPet MimeJSON Source #
application/json
HasBodyParam AddPet Pet Source #

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

Methods

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

deletePet

deletePet Source #

Arguments

:: Accept accept

request accept (MimeType)

-> PetId

"petId" - Pet id to delete

-> SwaggerPetstoreRequest DeletePet MimeNoContent res accept 
DELETE /pet/{petId}

Deletes a pet

AuthMethod: AuthOAuthPetstoreAuth

Note: Has Produces instances, but no response schema

data DeletePet Source #

Instances

findPetsByStatus

findPetsByStatus Source #

Arguments

:: Accept accept

request accept (MimeType)

-> Status

"status" - Status values that need to be considered for filter

-> SwaggerPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept 
GET /pet/findByStatus

Finds Pets by status

Multiple status values can be provided with comma separated strings

AuthMethod: AuthOAuthPetstoreAuth

findPetsByTags

findPetsByTags Source #

Arguments

:: Accept accept

request accept (MimeType)

-> Tags

"tags" - Tags to filter by

-> SwaggerPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept 

Deprecated:

GET /pet/findByTags

Finds Pets by tags

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

AuthMethod: AuthOAuthPetstoreAuth

getPetById

getPetById Source #

Arguments

:: Accept accept

request accept (MimeType)

-> PetId

"petId" - ID of pet to return

-> SwaggerPetstoreRequest GetPetById MimeNoContent Pet accept 
GET /pet/{petId}

Find pet by ID

Returns a single pet

AuthMethod: AuthApiKeyApiKey

data GetPetById Source #

Instances

updatePet

updatePet Source #

Arguments

:: (Consumes UpdatePet contentType, MimeRender contentType Pet) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Pet

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

-> SwaggerPetstoreRequest UpdatePet contentType res accept 
PUT /pet

Update an existing pet

AuthMethod: AuthOAuthPetstoreAuth

Note: Has Produces instances, but no response schema

data UpdatePet Source #

Instances

Produces UpdatePet MimeXML Source #
application/xml
Produces UpdatePet MimeJSON Source #
application/json
Consumes UpdatePet MimeXML Source #
application/xml
Consumes UpdatePet MimeJSON Source #
application/json
HasBodyParam UpdatePet Pet Source #

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

Methods

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

updatePetWithForm

updatePetWithForm Source #

Arguments

:: Consumes UpdatePetWithForm MimeFormUrlEncoded 
=> Accept accept

request accept (MimeType)

-> PetId

"petId" - ID of pet that needs to be updated

-> SwaggerPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded res accept 
POST /pet/{petId}

Updates a pet in the store with form data

AuthMethod: AuthOAuthPetstoreAuth

Note: Has Produces instances, but no response schema

data UpdatePetWithForm Source #

Instances

Produces UpdatePetWithForm MimeXML Source #
application/xml
Produces UpdatePetWithForm MimeJSON Source #
application/json
Consumes UpdatePetWithForm MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

uploadFile

uploadFile Source #

POST /pet/{petId}/uploadImage

uploads an image

AuthMethod: AuthOAuthPetstoreAuth

data UploadFile Source #

Instances

Produces UploadFile MimeJSON Source #
application/json
Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data
HasOptionalParam UploadFile File Source #

Optional Param "file" - file to upload

Methods

applyOptionalParam :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

HasOptionalParam UploadFile AdditionalMetadata Source #

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

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Store.html b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Store.html index b442dd9fc03..d784e50a38f 100644 --- a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Store.html +++ b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-API-Store.html @@ -1,4 +1,4 @@ SwaggerPetstore.API.Store

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.Store

Description

 

Operations

Store

deleteOrder

deleteOrder Source #

Arguments

:: Accept accept

request accept (MimeType)

-> OrderIdText

"orderId" - ID of the order that needs to be deleted

-> SwaggerPetstoreRequest DeleteOrder MimeNoContent res accept 
DELETE /store/order/{order_id}

Delete purchase order by ID

For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

Note: Has Produces instances, but no response schema

data DeleteOrder Source #

Instances

getInventory

getInventory Source #

Arguments

:: Accept accept

request accept (MimeType)

-> SwaggerPetstoreRequest GetInventory MimeNoContent (Map String Int) accept 
GET /store/inventory

Returns pet inventories by status

Returns a map of status codes to quantities

AuthMethod: AuthApiKeyApiKey

data GetInventory Source #

Instances

getOrderById

getOrderById Source #

Arguments

:: Accept accept

request accept (MimeType)

-> OrderId

"orderId" - ID of pet that needs to be fetched

-> SwaggerPetstoreRequest GetOrderById MimeNoContent Order accept 
GET /store/order/{order_id}

Find purchase order by ID

For valid response try integer IDs with value 5 or 10. Other values will generated exceptions

placeOrder

placeOrder Source #

Arguments

:: (Consumes PlaceOrder contentType, MimeRender contentType Order) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Order

"body" - order placed for purchasing the pet

-> SwaggerPetstoreRequest PlaceOrder contentType Order accept 
POST /store/order

Place an order for a pet

data PlaceOrder Source #

Instances

Produces PlaceOrder MimeXML Source #
application/xml
Produces PlaceOrder MimeJSON Source #
application/json
HasBodyParam PlaceOrder Order Source #

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

Methods

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

\ No newline at end of file +

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.API.Store

Description

 

Operations

Store

deleteOrder

deleteOrder Source #

Arguments

:: Accept accept

request accept (MimeType)

-> OrderIdText

"orderId" - ID of the order that needs to be deleted

-> SwaggerPetstoreRequest DeleteOrder MimeNoContent res accept 
DELETE /store/order/{order_id}

Delete purchase order by ID

For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

Note: Has Produces instances, but no response schema

data DeleteOrder Source #

Instances

getInventory

getInventory :: SwaggerPetstoreRequest GetInventory MimeNoContent (Map String Int) MimeJSON Source #

GET /store/inventory

Returns pet inventories by status

Returns a map of status codes to quantities

AuthMethod: AuthApiKeyApiKey

data GetInventory Source #

Instances

getOrderById

getOrderById Source #

Arguments

:: Accept accept

request accept (MimeType)

-> OrderId

"orderId" - ID of pet that needs to be fetched

-> SwaggerPetstoreRequest GetOrderById MimeNoContent Order accept 
GET /store/order/{order_id}

Find purchase order by ID

For valid response try integer IDs with value 5 or 10. Other values will generated exceptions

placeOrder

placeOrder Source #

Arguments

:: (Consumes PlaceOrder contentType, MimeRender contentType Order) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Order

"body" - order placed for purchasing the pet

-> SwaggerPetstoreRequest PlaceOrder contentType Order accept 
POST /store/order

Place an order for a pet

data PlaceOrder Source #

Instances

Produces PlaceOrder MimeXML Source #
application/xml
Produces PlaceOrder MimeJSON Source #
application/json
HasBodyParam PlaceOrder Order Source #

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

Methods

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

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-Core.html b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-Core.html index adc3e741bf0..3fab17bc0b5 100644 --- a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-Core.html +++ b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-Core.html @@ -1,4 +1,4 @@ SwaggerPetstore.Core

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.Core

Description

 

Synopsis

SwaggerPetstoreConfig

data SwaggerPetstoreConfig Source #

Constructors

SwaggerPetstoreConfig 

Fields

newConfig :: IO SwaggerPetstoreConfig Source #

constructs a default SwaggerPetstoreConfig

configHost:

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

configUserAgent:

"swagger-petstore/0.1.0.0"

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

updates config use AuthMethod on matching requests

withStdoutLogging :: SwaggerPetstoreConfig -> IO SwaggerPetstoreConfig Source #

updates the config to use stdout logging

withStderrLogging :: SwaggerPetstoreConfig -> IO SwaggerPetstoreConfig Source #

updates the config to use stderr logging

withNoLogging :: SwaggerPetstoreConfig -> SwaggerPetstoreConfig Source #

updates the config to disable logging

SwaggerPetstoreRequest

data SwaggerPetstoreRequest 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

SwaggerPetstoreRequest 

Fields

Instances

Show (SwaggerPetstoreRequest req contentType res accept) Source # 

Methods

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

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

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

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

rMethod Lens

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

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

rParams Lens

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

rParams Lens

HasBodyParam

class HasBodyParam req param where Source #

Designates the body parameter of a request

Methods

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

Instances

HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Methods

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

HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Methods

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

HasBodyParam PlaceOrder Order Source #

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

Methods

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

HasBodyParam UpdatePet Pet Source #

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

Methods

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

HasBodyParam AddPet Pet Source #

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

Methods

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

HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Methods

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

HasBodyParam TestInlineAdditionalProperties Value Source #

Body Param "param" - request body

HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Methods

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

HasBodyParam FakeOuterStringSerialize OuterString Source #

Body Param "body" - Input string as post body

HasBodyParam FakeOuterNumberSerialize OuterNumber Source #

Body Param "body" - Input number as post body

HasBodyParam FakeOuterCompositeSerialize OuterComposite Source #

Body Param "body" - Input composite as post body

HasBodyParam FakeOuterBooleanSerialize OuterBoolean Source #

Body Param "body" - Input boolean as post body

HasBodyParam TestSpecialTags Client Source #

Body Param "body" - client model

Methods

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

HasOptionalParam

class HasOptionalParam req param where Source #

Designates the optional parameters of a request

Minimal complete definition

applyOptionalParam | (-&-)

Methods

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

Apply an optional parameter to a request

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

infix operator / alias for addOptionalParam

Instances

HasOptionalParam UploadFile File Source #

Optional Param "file" - file to upload

Methods

applyOptionalParam :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

HasOptionalParam UploadFile AdditionalMetadata Source #

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

HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

HasOptionalParam DeletePet ApiKey Source # 

Methods

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

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

HasOptionalParam TestEnumParameters EnumQueryStringArray Source #

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

HasOptionalParam TestEnumParameters EnumQueryString Source #

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

HasOptionalParam TestEnumParameters EnumQueryInteger Source #

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

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

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

HasOptionalParam TestEnumParameters EnumHeaderStringArray Source #

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

HasOptionalParam TestEnumParameters EnumHeaderString Source #

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

HasOptionalParam TestEnumParameters EnumFormStringArray Source #

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

HasOptionalParam TestEnumParameters EnumFormString Source #

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

HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

HasOptionalParam TestEndpointParameters ParamString Source #

Optional Param "string" - None

HasOptionalParam TestEndpointParameters ParamInteger Source #

Optional Param "integer" - None

HasOptionalParam TestEndpointParameters ParamFloat Source #

Optional Param "float" - None

HasOptionalParam TestEndpointParameters ParamDateTime Source #

Optional Param "dateTime" - None

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

HasOptionalParam TestEndpointParameters ParamBinary Source #

Optional Param "binary" - None

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

data Params Source #

Request Params

Instances

SwaggerPetstoreRequest Utils

_mkRequest Source #

Arguments

:: Method

Method

-> [ByteString]

Endpoint

-> SwaggerPetstoreRequest req contentType res accept

req: Request Type, res: Response Type

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

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

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

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

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

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

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

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

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

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

Params Utils

Swagger 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)

_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

Minimal complete definition

applyAuthMethod

Methods

applyAuthMethod :: SwaggerPetstoreConfig -> a -> SwaggerPetstoreRequest req contentType res accept -> IO (SwaggerPetstoreRequest req contentType res accept) Source #

data AnyAuthMethod Source #

An existential wrapper for any AuthMethod

Constructors

AuthMethod a => AnyAuthMethod a 

Instances

AuthMethod AnyAuthMethod Source # 

Methods

applyAuthMethod :: SwaggerPetstoreConfig -> AnyAuthMethod -> SwaggerPetstoreRequest req contentType res accept -> IO (SwaggerPetstoreRequest req contentType res accept) Source #

_applyAuthMethods :: SwaggerPetstoreRequest req contentType res accept -> SwaggerPetstoreConfig -> IO (SwaggerPetstoreRequest req contentType res accept) Source #

apply all matching AuthMethods in config to request

Utils

_omitNulls :: [(Text, 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

Eq DateTime Source # 
Data DateTime Source # 

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 :: (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 #

Ord DateTime Source # 
Show DateTime Source # 
ToJSON DateTime Source # 
FromJSON DateTime Source # 
NFData DateTime Source # 

Methods

rnf :: DateTime -> () #

ToHttpApiData DateTime Source # 
FromHttpApiData DateTime Source # 
FormatTime DateTime Source # 
ParseTime DateTime Source # 
MimeRender MimeMultipartFormData DateTime Source # 

_readDateTime :: (ParseTime t, Monad m, Alternative m) => String -> m t Source #

_parseISO8601

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

TI.formatISO8601Millis

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

parse an ISO8601 date-time string

Date Formatting

newtype Date Source #

Constructors

Date 

Fields

Instances

Enum Date Source # 

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] #

Eq Date Source # 

Methods

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

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

Data Date Source # 

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 :: (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 #

Ord Date Source # 

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 #

Show Date Source # 

Methods

showsPrec :: Int -> Date -> ShowS #

show :: Date -> String #

showList :: [Date] -> ShowS #

Ix Date Source # 

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

ToJSON Date Source # 
FromJSON Date Source # 
NFData Date Source # 

Methods

rnf :: Date -> () #

ToHttpApiData Date Source # 
FromHttpApiData Date Source # 
FormatTime Date Source # 
ParseTime Date Source # 

Methods

buildTime :: TimeLocale -> [(Char, String)] -> Maybe Date #

MimeRender MimeMultipartFormData Date Source # 

_readDate :: (ParseTime t, Monad m) => String -> m t 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

Eq ByteArray Source # 
Data ByteArray Source # 

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 :: (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 #

Ord ByteArray Source # 
Show ByteArray Source # 
ToJSON ByteArray Source # 
FromJSON ByteArray Source # 
NFData ByteArray Source # 

Methods

rnf :: ByteArray -> () #

ToHttpApiData ByteArray Source # 
FromHttpApiData ByteArray Source # 
MimeRender MimeMultipartFormData ByteArray Source # 

_readByteArray :: Monad 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

Eq Binary Source # 

Methods

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

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

Data Binary Source # 

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 :: (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 #

Ord Binary Source # 
Show Binary Source # 
ToJSON Binary Source # 
FromJSON Binary Source # 
NFData Binary Source # 

Methods

rnf :: Binary -> () #

ToHttpApiData Binary Source # 
FromHttpApiData Binary Source # 
MimeRender MimeMultipartFormData Binary Source # 

Lens Type Aliases

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

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

\ No newline at end of file +

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.Core

Description

 

Synopsis

SwaggerPetstoreConfig

data SwaggerPetstoreConfig Source #

Constructors

SwaggerPetstoreConfig 

Fields

newConfig :: IO SwaggerPetstoreConfig Source #

constructs a default SwaggerPetstoreConfig

configHost:

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

configUserAgent:

"swagger-petstore/0.1.0.0"

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

updates config use AuthMethod on matching requests

withStdoutLogging :: SwaggerPetstoreConfig -> IO SwaggerPetstoreConfig Source #

updates the config to use stdout logging

withStderrLogging :: SwaggerPetstoreConfig -> IO SwaggerPetstoreConfig Source #

updates the config to use stderr logging

withNoLogging :: SwaggerPetstoreConfig -> SwaggerPetstoreConfig Source #

updates the config to disable logging

SwaggerPetstoreRequest

data SwaggerPetstoreRequest 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

SwaggerPetstoreRequest 

Fields

Instances

Show (SwaggerPetstoreRequest req contentType res accept) Source # 

Methods

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

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

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

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

rMethod Lens

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

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

rParams Lens

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

rParams Lens

HasBodyParam

class HasBodyParam req param where Source #

Designates the body parameter of a request

Methods

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

Instances

HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Methods

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

HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Methods

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

HasBodyParam PlaceOrder Order Source #

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

Methods

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

HasBodyParam UpdatePet Pet Source #

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

Methods

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

HasBodyParam AddPet Pet Source #

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

Methods

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

HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Methods

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

HasBodyParam TestInlineAdditionalProperties Value Source #

Body Param "param" - request body

HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Methods

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

HasBodyParam FakeOuterStringSerialize OuterString Source #

Body Param "body" - Input string as post body

HasBodyParam FakeOuterNumberSerialize OuterNumber Source #

Body Param "body" - Input number as post body

HasBodyParam FakeOuterCompositeSerialize OuterComposite Source #

Body Param "body" - Input composite as post body

HasBodyParam FakeOuterBooleanSerialize OuterBoolean Source #

Body Param "body" - Input boolean as post body

HasBodyParam TestSpecialTags Client Source #

Body Param "body" - client model

Methods

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

HasOptionalParam

class HasOptionalParam req param where Source #

Designates the optional parameters of a request

Minimal complete definition

applyOptionalParam | (-&-)

Methods

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

Apply an optional parameter to a request

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

infix operator / alias for addOptionalParam

Instances

HasOptionalParam UploadFile File Source #

Optional Param "file" - file to upload

Methods

applyOptionalParam :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

HasOptionalParam UploadFile AdditionalMetadata Source #

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

HasOptionalParam UpdatePetWithForm StatusText Source #

Optional Param "status" - Updated status of the pet

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

HasOptionalParam DeletePet ApiKey Source # 

Methods

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

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

HasOptionalParam TestEnumParameters EnumQueryStringArray Source #

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

HasOptionalParam TestEnumParameters EnumQueryString Source #

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

HasOptionalParam TestEnumParameters EnumQueryInteger Source #

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

HasOptionalParam TestEnumParameters EnumQueryDouble Source #

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

HasOptionalParam TestEnumParameters EnumHeaderStringArray Source #

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

HasOptionalParam TestEnumParameters EnumHeaderString Source #

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

HasOptionalParam TestEnumParameters EnumFormStringArray Source #

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

HasOptionalParam TestEnumParameters EnumFormString Source #

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

HasOptionalParam TestEndpointParameters Password Source #

Optional Param "password" - None

HasOptionalParam TestEndpointParameters ParamString Source #

Optional Param "string" - None

HasOptionalParam TestEndpointParameters ParamInteger Source #

Optional Param "integer" - None

HasOptionalParam TestEndpointParameters ParamFloat Source #

Optional Param "float" - None

HasOptionalParam TestEndpointParameters ParamDateTime Source #

Optional Param "dateTime" - None

HasOptionalParam TestEndpointParameters ParamDate Source #

Optional Param "date" - None

HasOptionalParam TestEndpointParameters ParamBinary Source #

Optional Param "binary" - None

HasOptionalParam TestEndpointParameters Int64 Source #

Optional Param "int64" - None

HasOptionalParam TestEndpointParameters Int32 Source #

Optional Param "int32" - None

HasOptionalParam TestEndpointParameters Callback Source #

Optional Param "callback" - None

data Params Source #

Request Params

Instances

SwaggerPetstoreRequest Utils

_mkRequest Source #

Arguments

:: Method

Method

-> [ByteString]

Endpoint

-> SwaggerPetstoreRequest req contentType res accept

req: Request Type, res: Response Type

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

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

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

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

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

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

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

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

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

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

Params Utils

Swagger 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)

_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

Minimal complete definition

applyAuthMethod

Methods

applyAuthMethod :: SwaggerPetstoreConfig -> a -> SwaggerPetstoreRequest req contentType res accept -> IO (SwaggerPetstoreRequest req contentType res accept) Source #

data AnyAuthMethod Source #

An existential wrapper for any AuthMethod

Constructors

AuthMethod a => AnyAuthMethod a 

Instances

AuthMethod AnyAuthMethod Source # 

Methods

applyAuthMethod :: SwaggerPetstoreConfig -> AnyAuthMethod -> SwaggerPetstoreRequest req contentType res accept -> IO (SwaggerPetstoreRequest req contentType res accept) Source #

_applyAuthMethods :: SwaggerPetstoreRequest req contentType res accept -> SwaggerPetstoreConfig -> IO (SwaggerPetstoreRequest req contentType res accept) Source #

apply all matching AuthMethods in config to request

Utils

_omitNulls :: [(Text, 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

Eq DateTime Source # 
Data DateTime Source # 

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 :: (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 #

Ord DateTime Source # 
Show DateTime Source # 
ToJSON DateTime Source # 
FromJSON DateTime Source # 
NFData DateTime Source # 

Methods

rnf :: DateTime -> () #

ToHttpApiData DateTime Source # 
FromHttpApiData DateTime Source # 
FormatTime DateTime Source # 
ParseTime DateTime Source # 
MimeRender MimeMultipartFormData DateTime Source # 

_readDateTime :: (ParseTime t, Monad m, Alternative m) => String -> m t Source #

_parseISO8601

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

TI.formatISO8601Millis

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

parse an ISO8601 date-time string

Date Formatting

newtype Date Source #

Constructors

Date 

Fields

Instances

Enum Date Source # 

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] #

Eq Date Source # 

Methods

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

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

Data Date Source # 

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 :: (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 #

Ord Date Source # 

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 #

Show Date Source # 

Methods

showsPrec :: Int -> Date -> ShowS #

show :: Date -> String #

showList :: [Date] -> ShowS #

Ix Date Source # 

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

ToJSON Date Source # 
FromJSON Date Source # 
NFData Date Source # 

Methods

rnf :: Date -> () #

ToHttpApiData Date Source # 
FromHttpApiData Date Source # 
FormatTime Date Source # 
ParseTime Date Source # 

Methods

buildTime :: TimeLocale -> [(Char, String)] -> Maybe Date #

MimeRender MimeMultipartFormData Date Source # 

_readDate :: (ParseTime t, Monad m) => String -> m t 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

Eq ByteArray Source # 
Data ByteArray Source # 

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 :: (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 #

Ord ByteArray Source # 
Show ByteArray Source # 
ToJSON ByteArray Source # 
FromJSON ByteArray Source # 
NFData ByteArray Source # 

Methods

rnf :: ByteArray -> () #

ToHttpApiData ByteArray Source # 
FromHttpApiData ByteArray Source # 
MimeRender MimeMultipartFormData ByteArray Source # 

_readByteArray :: Monad 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

Eq Binary Source # 

Methods

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

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

Data Binary Source # 

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 :: (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 #

Ord Binary Source # 
Show Binary Source # 
ToJSON Binary Source # 
FromJSON Binary Source # 
NFData Binary Source # 

Methods

rnf :: Binary -> () #

ToHttpApiData Binary Source # 
FromHttpApiData Binary Source # 
MimeRender MimeMultipartFormData Binary Source # 

Lens Type Aliases

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

type Lens_ s t a b = forall (f :: * -> *). 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/SwaggerPetstore-MimeTypes.html b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-MimeTypes.html index 9dd84788368..f6fcd92ef30 100644 --- a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-MimeTypes.html +++ b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-MimeTypes.html @@ -1,4 +1,4 @@ SwaggerPetstore.MimeTypes

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.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

Produces Class

class MimeType mtype => Produces req mtype Source #

Instances

Produces UpdateUser MimeXML Source #
application/xml
Produces UpdateUser MimeJSON Source #
application/json
Produces LogoutUser MimeXML Source #
application/xml
Produces LogoutUser MimeJSON Source #
application/json
Produces LoginUser MimeXML Source #
application/xml
Produces LoginUser MimeJSON Source #
application/json
Produces GetUserByName MimeXML Source #
application/xml
Produces GetUserByName MimeJSON Source #
application/json
Produces DeleteUser MimeXML Source #
application/xml
Produces DeleteUser MimeJSON Source #
application/json
Produces CreateUsersWithListInput MimeXML Source #
application/xml
Produces CreateUsersWithListInput MimeJSON Source #
application/json
Produces CreateUsersWithArrayInput MimeXML Source #
application/xml
Produces CreateUsersWithArrayInput MimeJSON Source #
application/json
Produces CreateUser MimeXML Source #
application/xml
Produces CreateUser MimeJSON Source #
application/json
Produces PlaceOrder MimeXML Source #
application/xml
Produces PlaceOrder MimeJSON Source #
application/json
Produces GetOrderById MimeXML Source #
application/xml
Produces GetOrderById MimeJSON Source #
application/json
Produces GetInventory MimeJSON Source #
application/json
Produces DeleteOrder MimeXML Source #
application/xml
Produces DeleteOrder MimeJSON Source #
application/json
Produces UploadFile MimeJSON Source #
application/json
Produces UpdatePetWithForm MimeXML Source #
application/xml
Produces UpdatePetWithForm MimeJSON Source #
application/json
Produces UpdatePet MimeXML Source #
application/xml
Produces UpdatePet MimeJSON Source #
application/json
Produces GetPetById MimeXML Source #
application/xml
Produces GetPetById MimeJSON Source #
application/json
Produces FindPetsByTags MimeXML Source #
application/xml
Produces FindPetsByTags MimeJSON Source #
application/json
Produces FindPetsByStatus MimeXML Source #
application/xml
Produces FindPetsByStatus MimeJSON Source #
application/json
Produces DeletePet MimeXML Source #
application/xml
Produces DeletePet MimeJSON Source #
application/json
Produces AddPet MimeXML Source #
application/xml
Produces AddPet MimeJSON Source #
application/json
Produces TestClassname MimeJSON Source #
application/json
MimeType mtype => Produces TestEnumParameters mtype Source #
*/*
Produces TestEndpointParameters MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Produces TestEndpointParameters MimeJsonCharsetutf8 Source #
application/json; charset=utf-8
Produces TestClientModel MimeJSON Source #
application/json
Produces TestSpecialTags MimeJSON Source #
application/json

Default Mime Types

data MimeJSON Source #

Constructors

MimeJSON 

Instances

MimeType MimeJSON Source #
application/json; charset=utf-8
FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
ToJSON a => MimeRender MimeJSON a Source #

encode

Produces UpdateUser MimeJSON Source #
application/json
Produces LogoutUser MimeJSON Source #
application/json
Produces LoginUser MimeJSON Source #
application/json
Produces GetUserByName MimeJSON Source #
application/json
Produces DeleteUser MimeJSON Source #
application/json
Produces CreateUsersWithListInput MimeJSON Source #
application/json
Produces CreateUsersWithArrayInput MimeJSON Source #
application/json
Produces CreateUser MimeJSON Source #
application/json
Produces PlaceOrder MimeJSON Source #
application/json
Produces GetOrderById MimeJSON Source #
application/json
Produces GetInventory MimeJSON Source #
application/json
Produces DeleteOrder MimeJSON Source #
application/json
Produces UploadFile MimeJSON Source #
application/json
Produces UpdatePetWithForm MimeJSON Source #
application/json
Produces UpdatePet MimeJSON Source #
application/json
Produces GetPetById MimeJSON Source #
application/json
Produces FindPetsByTags MimeJSON Source #
application/json
Produces FindPetsByStatus MimeJSON Source #
application/json
Produces DeletePet MimeJSON Source #
application/json
Produces AddPet MimeJSON Source #
application/json
Produces TestClassname MimeJSON Source #
application/json
Produces TestClientModel MimeJSON Source #
application/json
Produces TestSpecialTags MimeJSON Source #
application/json
Consumes UpdatePet MimeJSON Source #
application/json
Consumes AddPet MimeJSON Source #
application/json
Consumes TestClassname MimeJSON Source #
application/json
Consumes TestJsonFormData MimeJSON Source #
application/json
Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Consumes TestClientModel MimeJSON Source #
application/json
Consumes TestSpecialTags MimeJSON Source #
application/json

data MimePlainText Source #

Constructors

MimePlainText 

Instances

MimeType MimePlainText Source #
text/plain; charset=utf-8
MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
MimeRender MimePlainText ByteString Source #
P.id
MimeRender MimePlainText String Source #
BCL.pack
MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8

data MimeMultipartFormData Source #

Constructors

MimeMultipartFormData 

Instances

MimeType MimeMultipartFormData Source #
multipart/form-data
MimeRender MimeMultipartFormData Bool Source # 
MimeRender MimeMultipartFormData Char Source # 
MimeRender MimeMultipartFormData Double Source # 
MimeRender MimeMultipartFormData Float Source # 
MimeRender MimeMultipartFormData Int Source # 
MimeRender MimeMultipartFormData Integer Source # 
MimeRender MimeMultipartFormData ByteString Source # 
MimeRender MimeMultipartFormData String Source # 
MimeRender MimeMultipartFormData Text Source # 
MimeRender MimeMultipartFormData Binary Source # 
MimeRender MimeMultipartFormData ByteArray Source # 
MimeRender MimeMultipartFormData Date Source # 
MimeRender MimeMultipartFormData DateTime Source # 
MimeRender MimeMultipartFormData OuterEnum Source # 
MimeRender MimeMultipartFormData EnumClass Source # 
MimeRender MimeMultipartFormData E'Status2 Source # 
MimeRender MimeMultipartFormData E'Status Source # 
MimeRender MimeMultipartFormData E'JustSymbol Source # 
MimeRender MimeMultipartFormData E'Inner2 Source # 
MimeRender MimeMultipartFormData E'Inner Source # 
MimeRender MimeMultipartFormData E'EnumString Source # 
MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
MimeRender MimeMultipartFormData E'EnumNumber Source # 
MimeRender MimeMultipartFormData E'EnumInteger Source # 
MimeRender MimeMultipartFormData E'EnumFormString Source # 
MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data

data MimeOctetStream Source #

Constructors

MimeOctetStream 

Instances

MimeType MimeOctetStream Source #
application/octet-stream
MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
MimeRender MimeOctetStream ByteString Source #
P.id
MimeRender MimeOctetStream String Source #
BCL.pack
MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8

MimeType Class

class Typeable mtype => MimeType mtype where Source #

Minimal complete definition

mimeType | mimeTypes

Instances

MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
MimeType MimeJsonCharsetutf8 Source #
application/json; charset=utf-8
MimeType MimeAny Source #
"*/*"
MimeType MimeNoContent Source # 
MimeType MimeOctetStream Source #
application/octet-stream
MimeType MimeMultipartFormData Source #
multipart/form-data
MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
MimeType MimePlainText Source #
text/plain; charset=utf-8
MimeType MimeXML Source #
application/xml; charset=utf-8
MimeType MimeJSON Source #
application/json; charset=utf-8

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

ToJSON a => MimeRender MimeJsonCharsetutf8 a Source # 
MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
MimeRender MimeOctetStream ByteString Source #
P.id
MimeRender MimeOctetStream String Source #
BCL.pack
MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
MimeRender MimeMultipartFormData Bool Source # 
MimeRender MimeMultipartFormData Char Source # 
MimeRender MimeMultipartFormData Double Source # 
MimeRender MimeMultipartFormData Float Source # 
MimeRender MimeMultipartFormData Int Source # 
MimeRender MimeMultipartFormData Integer Source # 
MimeRender MimeMultipartFormData ByteString Source # 
MimeRender MimeMultipartFormData String Source # 
MimeRender MimeMultipartFormData Text Source # 
MimeRender MimeMultipartFormData Binary Source # 
MimeRender MimeMultipartFormData ByteArray Source # 
MimeRender MimeMultipartFormData Date Source # 
MimeRender MimeMultipartFormData DateTime Source # 
MimeRender MimeMultipartFormData OuterEnum Source # 
MimeRender MimeMultipartFormData EnumClass Source # 
MimeRender MimeMultipartFormData E'Status2 Source # 
MimeRender MimeMultipartFormData E'Status Source # 
MimeRender MimeMultipartFormData E'JustSymbol Source # 
MimeRender MimeMultipartFormData E'Inner2 Source # 
MimeRender MimeMultipartFormData E'Inner Source # 
MimeRender MimeMultipartFormData E'EnumString Source # 
MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
MimeRender MimeMultipartFormData E'EnumNumber Source # 
MimeRender MimeMultipartFormData E'EnumInteger Source # 
MimeRender MimeMultipartFormData E'EnumFormString Source # 
MimeRender MimeMultipartFormData E'ArrayEnum Source # 
ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
MimeRender MimePlainText ByteString Source #
P.id
MimeRender MimePlainText String Source #
BCL.pack
MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
ToJSON a => MimeRender MimeJSON a Source #

encode

MimeUnrender Class

class MimeType mtype => MimeUnrender mtype o where Source #

Minimal complete definition

mimeUnrender

Instances

FromJSON a => MimeUnrender MimeJsonCharsetutf8 a Source # 
MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode

Custom Mime Types

MimeJsonCharsetutf8

MimeXmlCharsetutf8

\ No newline at end of file +

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.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

Produces Class

class MimeType mtype => Produces req mtype Source #

Instances

Produces UpdateUser MimeXML Source #
application/xml
Produces UpdateUser MimeJSON Source #
application/json
Produces LogoutUser MimeXML Source #
application/xml
Produces LogoutUser MimeJSON Source #
application/json
Produces LoginUser MimeXML Source #
application/xml
Produces LoginUser MimeJSON Source #
application/json
Produces GetUserByName MimeXML Source #
application/xml
Produces GetUserByName MimeJSON Source #
application/json
Produces DeleteUser MimeXML Source #
application/xml
Produces DeleteUser MimeJSON Source #
application/json
Produces CreateUsersWithListInput MimeXML Source #
application/xml
Produces CreateUsersWithListInput MimeJSON Source #
application/json
Produces CreateUsersWithArrayInput MimeXML Source #
application/xml
Produces CreateUsersWithArrayInput MimeJSON Source #
application/json
Produces CreateUser MimeXML Source #
application/xml
Produces CreateUser MimeJSON Source #
application/json
Produces PlaceOrder MimeXML Source #
application/xml
Produces PlaceOrder MimeJSON Source #
application/json
Produces GetOrderById MimeXML Source #
application/xml
Produces GetOrderById MimeJSON Source #
application/json
Produces GetInventory MimeJSON Source #
application/json
Produces DeleteOrder MimeXML Source #
application/xml
Produces DeleteOrder MimeJSON Source #
application/json
Produces UploadFile MimeJSON Source #
application/json
Produces UpdatePetWithForm MimeXML Source #
application/xml
Produces UpdatePetWithForm MimeJSON Source #
application/json
Produces UpdatePet MimeXML Source #
application/xml
Produces UpdatePet MimeJSON Source #
application/json
Produces GetPetById MimeXML Source #
application/xml
Produces GetPetById MimeJSON Source #
application/json
Produces FindPetsByTags MimeXML Source #
application/xml
Produces FindPetsByTags MimeJSON Source #
application/json
Produces FindPetsByStatus MimeXML Source #
application/xml
Produces FindPetsByStatus MimeJSON Source #
application/json
Produces DeletePet MimeXML Source #
application/xml
Produces DeletePet MimeJSON Source #
application/json
Produces AddPet MimeXML Source #
application/xml
Produces AddPet MimeJSON Source #
application/json
Produces TestClassname MimeJSON Source #
application/json
MimeType mtype => Produces TestEnumParameters mtype Source #
*/*
Produces TestEndpointParameters MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
Produces TestEndpointParameters MimeJsonCharsetutf8 Source #
application/json; charset=utf-8
Produces TestClientModel MimeJSON Source #
application/json
Produces TestSpecialTags MimeJSON Source #
application/json

Default Mime Types

data MimeJSON Source #

Constructors

MimeJSON 

Instances

MimeType MimeJSON Source #
application/json; charset=utf-8
FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode
ToJSON a => MimeRender MimeJSON a Source #

encode

Produces UpdateUser MimeJSON Source #
application/json
Produces LogoutUser MimeJSON Source #
application/json
Produces LoginUser MimeJSON Source #
application/json
Produces GetUserByName MimeJSON Source #
application/json
Produces DeleteUser MimeJSON Source #
application/json
Produces CreateUsersWithListInput MimeJSON Source #
application/json
Produces CreateUsersWithArrayInput MimeJSON Source #
application/json
Produces CreateUser MimeJSON Source #
application/json
Produces PlaceOrder MimeJSON Source #
application/json
Produces GetOrderById MimeJSON Source #
application/json
Produces GetInventory MimeJSON Source #
application/json
Produces DeleteOrder MimeJSON Source #
application/json
Produces UploadFile MimeJSON Source #
application/json
Produces UpdatePetWithForm MimeJSON Source #
application/json
Produces UpdatePet MimeJSON Source #
application/json
Produces GetPetById MimeJSON Source #
application/json
Produces FindPetsByTags MimeJSON Source #
application/json
Produces FindPetsByStatus MimeJSON Source #
application/json
Produces DeletePet MimeJSON Source #
application/json
Produces AddPet MimeJSON Source #
application/json
Produces TestClassname MimeJSON Source #
application/json
Produces TestClientModel MimeJSON Source #
application/json
Produces TestSpecialTags MimeJSON Source #
application/json
Consumes UpdatePet MimeJSON Source #
application/json
Consumes AddPet MimeJSON Source #
application/json
Consumes TestClassname MimeJSON Source #
application/json
Consumes TestJsonFormData MimeJSON Source #
application/json
Consumes TestInlineAdditionalProperties MimeJSON Source #
application/json
Consumes TestClientModel MimeJSON Source #
application/json
Consumes TestSpecialTags MimeJSON Source #
application/json

data MimePlainText Source #

Constructors

MimePlainText 

Instances

MimeType MimePlainText Source #
text/plain; charset=utf-8
MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
MimeRender MimePlainText ByteString Source #
P.id
MimeRender MimePlainText String Source #
BCL.pack
MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8

data MimeMultipartFormData Source #

Constructors

MimeMultipartFormData 

Instances

MimeType MimeMultipartFormData Source #
multipart/form-data
MimeRender MimeMultipartFormData Bool Source # 
MimeRender MimeMultipartFormData Char Source # 
MimeRender MimeMultipartFormData Double Source # 
MimeRender MimeMultipartFormData Float Source # 
MimeRender MimeMultipartFormData Int Source # 
MimeRender MimeMultipartFormData Integer Source # 
MimeRender MimeMultipartFormData ByteString Source # 
MimeRender MimeMultipartFormData String Source # 
MimeRender MimeMultipartFormData Text Source # 
MimeRender MimeMultipartFormData Binary Source # 
MimeRender MimeMultipartFormData ByteArray Source # 
MimeRender MimeMultipartFormData Date Source # 
MimeRender MimeMultipartFormData DateTime Source # 
MimeRender MimeMultipartFormData OuterEnum Source # 
MimeRender MimeMultipartFormData EnumClass Source # 
MimeRender MimeMultipartFormData E'Status2 Source # 
MimeRender MimeMultipartFormData E'Status Source # 
MimeRender MimeMultipartFormData E'JustSymbol Source # 
MimeRender MimeMultipartFormData E'Inner2 Source # 
MimeRender MimeMultipartFormData E'Inner Source # 
MimeRender MimeMultipartFormData E'EnumString Source # 
MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
MimeRender MimeMultipartFormData E'EnumNumber Source # 
MimeRender MimeMultipartFormData E'EnumInteger Source # 
MimeRender MimeMultipartFormData E'EnumFormString Source # 
MimeRender MimeMultipartFormData E'ArrayEnum Source # 
Consumes UploadFile MimeMultipartFormData Source #
multipart/form-data

data MimeOctetStream Source #

Constructors

MimeOctetStream 

Instances

MimeType MimeOctetStream Source #
application/octet-stream
MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
MimeRender MimeOctetStream ByteString Source #
P.id
MimeRender MimeOctetStream String Source #
BCL.pack
MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8

MimeType Class

class Typeable mtype => MimeType mtype where Source #

Minimal complete definition

mimeType | mimeTypes

Instances

MimeType MimeXmlCharsetutf8 Source #
application/xml; charset=utf-8
MimeType MimeJsonCharsetutf8 Source #
application/json; charset=utf-8
MimeType MimeAny Source #
"*/*"
MimeType MimeNoContent Source # 
MimeType MimeOctetStream Source #
application/octet-stream
MimeType MimeMultipartFormData Source #
multipart/form-data
MimeType MimeFormUrlEncoded Source #
application/x-www-form-urlencoded
MimeType MimePlainText Source #
text/plain; charset=utf-8
MimeType MimeXML Source #
application/xml; charset=utf-8
MimeType MimeJSON Source #
application/json; charset=utf-8

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

ToJSON a => MimeRender MimeJsonCharsetutf8 a Source # 
MimeRender MimeNoContent NoContent Source #
P.Right . P.const NoContent
MimeRender MimeOctetStream ByteString Source #
P.id
MimeRender MimeOctetStream String Source #
BCL.pack
MimeRender MimeOctetStream Text Source #
BL.fromStrict . T.encodeUtf8
MimeRender MimeMultipartFormData Bool Source # 
MimeRender MimeMultipartFormData Char Source # 
MimeRender MimeMultipartFormData Double Source # 
MimeRender MimeMultipartFormData Float Source # 
MimeRender MimeMultipartFormData Int Source # 
MimeRender MimeMultipartFormData Integer Source # 
MimeRender MimeMultipartFormData ByteString Source # 
MimeRender MimeMultipartFormData String Source # 
MimeRender MimeMultipartFormData Text Source # 
MimeRender MimeMultipartFormData Binary Source # 
MimeRender MimeMultipartFormData ByteArray Source # 
MimeRender MimeMultipartFormData Date Source # 
MimeRender MimeMultipartFormData DateTime Source # 
MimeRender MimeMultipartFormData OuterEnum Source # 
MimeRender MimeMultipartFormData EnumClass Source # 
MimeRender MimeMultipartFormData E'Status2 Source # 
MimeRender MimeMultipartFormData E'Status Source # 
MimeRender MimeMultipartFormData E'JustSymbol Source # 
MimeRender MimeMultipartFormData E'Inner2 Source # 
MimeRender MimeMultipartFormData E'Inner Source # 
MimeRender MimeMultipartFormData E'EnumString Source # 
MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 
MimeRender MimeMultipartFormData E'EnumNumber Source # 
MimeRender MimeMultipartFormData E'EnumInteger Source # 
MimeRender MimeMultipartFormData E'EnumFormString Source # 
MimeRender MimeMultipartFormData E'ArrayEnum Source # 
ToForm a => MimeRender MimeFormUrlEncoded a Source #
WH.urlEncodeAsForm
MimeRender MimePlainText ByteString Source #
P.id
MimeRender MimePlainText String Source #
BCL.pack
MimeRender MimePlainText Text Source #
BL.fromStrict . T.encodeUtf8
ToJSON a => MimeRender MimeJSON a Source #

encode

MimeUnrender Class

class MimeType mtype => MimeUnrender mtype o where Source #

Minimal complete definition

mimeUnrender

Instances

FromJSON a => MimeUnrender MimeJsonCharsetutf8 a Source # 
MimeUnrender MimeNoContent NoContent Source #
P.Right . P.const NoContent
MimeUnrender MimeOctetStream ByteString Source #
P.Right . P.id
MimeUnrender MimeOctetStream String Source #
P.Right . BCL.unpack
MimeUnrender MimeOctetStream Text Source #
P.left P.show . T.decodeUtf8' . BL.toStrict
FromForm a => MimeUnrender MimeFormUrlEncoded a Source #
P.left T.unpack . WH.urlDecodeAsForm
MimeUnrender MimePlainText ByteString Source #
P.Right . P.id
MimeUnrender MimePlainText String Source #
P.Right . BCL.unpack
MimeUnrender MimePlainText Text Source #
P.left P.show . TL.decodeUtf8'
FromJSON a => MimeUnrender MimeJSON a Source #
A.eitherDecode

Custom Mime Types

MimeJsonCharsetutf8

MimeXmlCharsetutf8

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-Model.html b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-Model.html index 010865ecb7c..917abfa367f 100644 --- a/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-Model.html +++ b/samples/client/petstore/haskell-http-client/docs/SwaggerPetstore-Model.html @@ -1,10 +1,10 @@ SwaggerPetstore.Model

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.Model

Description

 

Synopsis

Parameter newtypes

AdditionalMetadata

ApiKey

newtype ApiKey Source #

Constructors

ApiKey 

Fields

Instances

Body

newtype Body Source #

Constructors

Body 

Fields

Instances

Eq Body Source # 

Methods

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

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

Show Body Source # 

Methods

showsPrec :: Int -> Body -> ShowS #

show :: Body -> String #

showList :: [Body] -> ShowS #

ToJSON Body Source # 
HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

Byte

newtype Byte Source #

Constructors

Byte 

Fields

Instances

Eq Byte Source # 

Methods

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

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

Show Byte Source # 

Methods

showsPrec :: Int -> Byte -> ShowS #

show :: Byte -> String #

showList :: [Byte] -> ShowS #

Callback

EnumFormString

EnumFormStringArray

EnumHeaderString

EnumHeaderStringArray

EnumQueryDouble

EnumQueryInteger

EnumQueryString

EnumQueryStringArray

File

newtype File Source #

Constructors

File 

Fields

Instances

Eq File Source # 

Methods

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

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

Show File Source # 

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

HasOptionalParam UploadFile File Source #

Optional Param "file" - file to upload

Methods

applyOptionalParam :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

Int32

newtype Int32 Source #

Constructors

Int32 

Fields

Int64

newtype Int64 Source #

Constructors

Int64 

Fields

Name2

newtype Name2 Source #

Constructors

Name2 

Fields

Instances

Eq Name2 Source # 

Methods

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

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

Show Name2 Source # 

Methods

showsPrec :: Int -> Name2 -> ShowS #

show :: Name2 -> String #

showList :: [Name2] -> ShowS #

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

Number

newtype Number Source #

Constructors

Number 

Fields

Instances

OrderId

newtype OrderId Source #

Constructors

OrderId 

Fields

OrderIdText

Param

newtype Param Source #

Constructors

Param 

Fields

Instances

Eq Param Source # 

Methods

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

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

Show Param Source # 

Methods

showsPrec :: Int -> Param -> ShowS #

show :: Param -> String #

showList :: [Param] -> ShowS #

Param2

newtype Param2 Source #

Constructors

Param2 

Fields

Instances

ParamBinary

ParamDate

ParamDateTime

ParamDouble

ParamFloat

ParamInteger

ParamString

Password

PatternWithoutDelimiter

PetId

newtype PetId Source #

Constructors

PetId 

Fields

Instances

Eq PetId Source # 

Methods

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

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

Show PetId Source # 

Methods

showsPrec :: Int -> PetId -> ShowS #

show :: PetId -> String #

showList :: [PetId] -> ShowS #

Status

newtype Status Source #

Constructors

Status 

Fields

Instances

StatusText

Tags

newtype Tags Source #

Constructors

Tags 

Fields

Instances

Eq Tags Source # 

Methods

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

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

Show Tags Source # 

Methods

showsPrec :: Int -> Tags -> ShowS #

show :: Tags -> String #

showList :: [Tags] -> ShowS #

Username

newtype Username Source #

Constructors

Username 

Fields

Models

AdditionalPropertiesClass

mkAdditionalPropertiesClass :: AdditionalPropertiesClass Source #

Construct a value of type AdditionalPropertiesClass (by applying it's required fields, if any)

Animal

data Animal Source #

Animal

Constructors

Animal 

Fields

mkAnimal Source #

Arguments

:: Text

animalClassName

-> Animal 

Construct a value of type Animal (by applying it's required fields, if any)

AnimalFarm

mkAnimalFarm :: AnimalFarm Source #

Construct a value of type AnimalFarm (by applying it's required fields, if any)

ApiResponse

mkApiResponse :: ApiResponse Source #

Construct a value of type ApiResponse (by applying it's required fields, if any)

ArrayOfArrayOfNumberOnly

mkArrayOfArrayOfNumberOnly :: ArrayOfArrayOfNumberOnly Source #

Construct a value of type ArrayOfArrayOfNumberOnly (by applying it's required fields, if any)

ArrayOfNumberOnly

mkArrayOfNumberOnly :: ArrayOfNumberOnly Source #

Construct a value of type ArrayOfNumberOnly (by applying it's required fields, if any)

ArrayTest

mkArrayTest :: ArrayTest Source #

Construct a value of type ArrayTest (by applying it's required fields, if any)

Capitalization

mkCapitalization :: Capitalization Source #

Construct a value of type Capitalization (by applying it's required fields, if any)

Category

mkCategory :: Category Source #

Construct a value of type Category (by applying it's required fields, if any)

ClassModel

data ClassModel Source #

ClassModel - Model for testing model with "_class" property

Constructors

ClassModel 

Fields

mkClassModel :: ClassModel Source #

Construct a value of type ClassModel (by applying it's required fields, if any)

Client

data Client Source #

Client

Constructors

Client 

Fields

Instances

Eq Client Source # 

Methods

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

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

Show Client Source # 
ToJSON Client Source #

ToJSON Client

FromJSON Client Source #

FromJSON Client

HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Methods

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

HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Methods

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

HasBodyParam TestSpecialTags Client Source #

Body Param "body" - client model

Methods

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

mkClient :: Client Source #

Construct a value of type Client (by applying it's required fields, if any)

EnumArrays

mkEnumArrays :: EnumArrays Source #

Construct a value of type EnumArrays (by applying it's required fields, if any)

EnumTest

mkEnumTest :: EnumTest Source #

Construct a value of type EnumTest (by applying it's required fields, if any)

FormatTest

mkFormatTest Source #

Construct a value of type FormatTest (by applying it's required fields, if any)

HasOnlyReadOnly

mkHasOnlyReadOnly :: HasOnlyReadOnly Source #

Construct a value of type HasOnlyReadOnly (by applying it's required fields, if any)

MapTest

data MapTest Source #

MapTest

Constructors

MapTest 

Fields

mkMapTest :: MapTest Source #

Construct a value of type MapTest (by applying it's required fields, if any)

MixedPropertiesAndAdditionalPropertiesClass

data MixedPropertiesAndAdditionalPropertiesClass Source #

MixedPropertiesAndAdditionalPropertiesClass

Model200Response

data Model200Response Source #

Model200Response +

swagger-petstore-0.1.0.0: Auto-generated swagger-petstore API Client

Safe HaskellNone
LanguageHaskell2010

SwaggerPetstore.Model

Description

 

Synopsis

Parameter newtypes

AdditionalMetadata

ApiKey

newtype ApiKey Source #

Constructors

ApiKey 

Fields

Instances

Body

newtype Body Source #

Constructors

Body 

Fields

Instances

Eq Body Source # 

Methods

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

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

Show Body Source # 

Methods

showsPrec :: Int -> Body -> ShowS #

show :: Body -> String #

showList :: [Body] -> ShowS #

ToJSON Body Source # 
HasBodyParam CreateUsersWithListInput Body Source #

Body Param "body" - List of user object

HasBodyParam CreateUsersWithArrayInput Body Source #

Body Param "body" - List of user object

Byte

newtype Byte Source #

Constructors

Byte 

Fields

Instances

Eq Byte Source # 

Methods

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

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

Show Byte Source # 

Methods

showsPrec :: Int -> Byte -> ShowS #

show :: Byte -> String #

showList :: [Byte] -> ShowS #

Callback

EnumFormString

EnumFormStringArray

EnumHeaderString

EnumHeaderStringArray

EnumQueryDouble

EnumQueryInteger

EnumQueryString

EnumQueryStringArray

File

newtype File Source #

Constructors

File 

Fields

Instances

Eq File Source # 

Methods

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

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

Show File Source # 

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

HasOptionalParam UploadFile File Source #

Optional Param "file" - file to upload

Methods

applyOptionalParam :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

(-&-) :: SwaggerPetstoreRequest UploadFile contentType res accept -> File -> SwaggerPetstoreRequest UploadFile contentType res accept Source #

Int32

newtype Int32 Source #

Constructors

Int32 

Fields

Int64

newtype Int64 Source #

Constructors

Int64 

Fields

Name2

newtype Name2 Source #

Constructors

Name2 

Fields

Instances

Eq Name2 Source # 

Methods

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

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

Show Name2 Source # 

Methods

showsPrec :: Int -> Name2 -> ShowS #

show :: Name2 -> String #

showList :: [Name2] -> ShowS #

HasOptionalParam UpdatePetWithForm Name2 Source #

Optional Param "name" - Updated name of the pet

Number

newtype Number Source #

Constructors

Number 

Fields

Instances

OrderId

newtype OrderId Source #

Constructors

OrderId 

Fields

OrderIdText

Param

newtype Param Source #

Constructors

Param 

Fields

Instances

Eq Param Source # 

Methods

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

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

Show Param Source # 

Methods

showsPrec :: Int -> Param -> ShowS #

show :: Param -> String #

showList :: [Param] -> ShowS #

Param2

newtype Param2 Source #

Constructors

Param2 

Fields

Instances

ParamBinary

ParamDate

ParamDateTime

ParamDouble

ParamFloat

ParamInteger

ParamString

Password

PatternWithoutDelimiter

PetId

newtype PetId Source #

Constructors

PetId 

Fields

Instances

Eq PetId Source # 

Methods

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

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

Show PetId Source # 

Methods

showsPrec :: Int -> PetId -> ShowS #

show :: PetId -> String #

showList :: [PetId] -> ShowS #

Status

newtype Status Source #

Constructors

Status 

Fields

Instances

StatusText

Tags

newtype Tags Source #

Constructors

Tags 

Fields

Instances

Eq Tags Source # 

Methods

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

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

Show Tags Source # 

Methods

showsPrec :: Int -> Tags -> ShowS #

show :: Tags -> String #

showList :: [Tags] -> ShowS #

Username

newtype Username Source #

Constructors

Username 

Fields

Models

AdditionalPropertiesClass

mkAdditionalPropertiesClass :: AdditionalPropertiesClass Source #

Construct a value of type AdditionalPropertiesClass (by applying it's required fields, if any)

Animal

data Animal Source #

Animal

Constructors

Animal 

Fields

mkAnimal Source #

Arguments

:: Text

animalClassName

-> Animal 

Construct a value of type Animal (by applying it's required fields, if any)

AnimalFarm

mkAnimalFarm :: AnimalFarm Source #

Construct a value of type AnimalFarm (by applying it's required fields, if any)

ApiResponse

mkApiResponse :: ApiResponse Source #

Construct a value of type ApiResponse (by applying it's required fields, if any)

ArrayOfArrayOfNumberOnly

mkArrayOfArrayOfNumberOnly :: ArrayOfArrayOfNumberOnly Source #

Construct a value of type ArrayOfArrayOfNumberOnly (by applying it's required fields, if any)

ArrayOfNumberOnly

mkArrayOfNumberOnly :: ArrayOfNumberOnly Source #

Construct a value of type ArrayOfNumberOnly (by applying it's required fields, if any)

ArrayTest

mkArrayTest :: ArrayTest Source #

Construct a value of type ArrayTest (by applying it's required fields, if any)

Capitalization

mkCapitalization :: Capitalization Source #

Construct a value of type Capitalization (by applying it's required fields, if any)

Category

mkCategory :: Category Source #

Construct a value of type Category (by applying it's required fields, if any)

ClassModel

data ClassModel Source #

ClassModel + Model for testing model with "_class" property

Constructors

ClassModel 

Fields

mkClassModel :: ClassModel Source #

Construct a value of type ClassModel (by applying it's required fields, if any)

Client

data Client Source #

Client

Constructors

Client 

Fields

Instances

Eq Client Source # 

Methods

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

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

Show Client Source # 
ToJSON Client Source #

ToJSON Client

FromJSON Client Source #

FromJSON Client

HasBodyParam TestClassname Client Source #

Body Param "body" - client model

Methods

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

HasBodyParam TestClientModel Client Source #

Body Param "body" - client model

Methods

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

HasBodyParam TestSpecialTags Client Source #

Body Param "body" - client model

Methods

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

mkClient :: Client Source #

Construct a value of type Client (by applying it's required fields, if any)

EnumArrays

mkEnumArrays :: EnumArrays Source #

Construct a value of type EnumArrays (by applying it's required fields, if any)

EnumTest

mkEnumTest :: EnumTest Source #

Construct a value of type EnumTest (by applying it's required fields, if any)

FormatTest

mkFormatTest Source #

Construct a value of type FormatTest (by applying it's required fields, if any)

HasOnlyReadOnly

mkHasOnlyReadOnly :: HasOnlyReadOnly Source #

Construct a value of type HasOnlyReadOnly (by applying it's required fields, if any)

MapTest

data MapTest Source #

MapTest

Constructors

MapTest 

Fields

mkMapTest :: MapTest Source #

Construct a value of type MapTest (by applying it's required fields, if any)

MixedPropertiesAndAdditionalPropertiesClass

data MixedPropertiesAndAdditionalPropertiesClass Source #

MixedPropertiesAndAdditionalPropertiesClass

Model200Response

mkModel200Response :: Model200Response Source #

Construct a value of type Model200Response (by applying it's required fields, if any)

ModelList

mkModelList :: ModelList Source #

Construct a value of type ModelList (by applying it's required fields, if any)

ModelReturn

mkModelReturn :: ModelReturn Source #

Construct a value of type ModelReturn (by applying it's required fields, if any)

Name

data Name Source #

Name - Model for testing model name same as property name

Constructors

Name 

Fields

Instances

mkName Source #

Arguments

:: Int

nameName

-> Name 

Construct a value of type Name (by applying it's required fields, if any)

NumberOnly

mkNumberOnly :: NumberOnly Source #

Construct a value of type NumberOnly (by applying it's required fields, if any)

Order

data Order Source #

Order

Constructors

Order 

Fields

Instances

Eq Order Source # 

Methods

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

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

Show Order Source # 

Methods

showsPrec :: Int -> Order -> ShowS #

show :: Order -> String #

showList :: [Order] -> ShowS #

ToJSON Order Source #

ToJSON Order

FromJSON Order Source #

FromJSON Order

HasBodyParam PlaceOrder Order Source #

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

Methods

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

mkOrder :: Order Source #

Construct a value of type Order (by applying it's required fields, if any)

OuterBoolean

newtype OuterBoolean Source #

OuterBoolean

Constructors

OuterBoolean 

Fields

OuterComposite

mkOuterComposite :: OuterComposite Source #

Construct a value of type OuterComposite (by applying it's required fields, if any)

OuterNumber

OuterString

Pet

data Pet Source #

Pet

Constructors

Pet 

Fields

Instances

Eq Pet Source # 

Methods

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

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

Show Pet Source # 

Methods

showsPrec :: Int -> Pet -> ShowS #

show :: Pet -> String #

showList :: [Pet] -> ShowS #

ToJSON Pet Source #

ToJSON Pet

FromJSON Pet Source #

FromJSON Pet

HasBodyParam UpdatePet Pet Source #

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

Methods

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

HasBodyParam AddPet Pet Source #

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

Methods

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

mkPet Source #

Arguments

:: Text

petName

-> [Text]

petPhotoUrls

-> Pet 

Construct a value of type Pet (by applying it's required fields, if any)

ReadOnlyFirst

mkReadOnlyFirst :: ReadOnlyFirst Source #

Construct a value of type ReadOnlyFirst (by applying it's required fields, if any)

SpecialModelName

mkSpecialModelName :: SpecialModelName Source #

Construct a value of type SpecialModelName (by applying it's required fields, if any)

Tag

data Tag Source #

Tag

Constructors

Tag 

Fields

Instances

Eq Tag Source # 

Methods

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

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

Show Tag Source # 

Methods

showsPrec :: Int -> Tag -> ShowS #

show :: Tag -> String #

showList :: [Tag] -> ShowS #

ToJSON Tag Source #

ToJSON Tag

FromJSON Tag Source #

FromJSON Tag

mkTag :: Tag Source #

Construct a value of type Tag (by applying it's required fields, if any)

User

data User Source #

User

Constructors

User 

Fields

Instances

Eq User Source # 

Methods

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

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

Show User Source # 

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

ToJSON User Source #

ToJSON User

FromJSON User Source #

FromJSON User

HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Methods

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

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Methods

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

mkUser :: User Source #

Construct a value of type User (by applying it's required fields, if any)

Cat

data Cat Source #

Cat

Constructors

Cat 

Fields

Instances

Eq Cat Source # 

Methods

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

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

Show Cat Source # 

Methods

showsPrec :: Int -> Cat -> ShowS #

show :: Cat -> String #

showList :: [Cat] -> ShowS #

ToJSON Cat Source #

ToJSON Cat

FromJSON Cat Source #

FromJSON Cat

mkCat Source #

Arguments

:: Text

catClassName

-> Cat 

Construct a value of type Cat (by applying it's required fields, if any)

Dog

data Dog Source #

Dog

Constructors

Dog 

Fields

Instances

Eq Dog Source # 

Methods

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

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

Show Dog Source # 

Methods

showsPrec :: Int -> Dog -> ShowS #

show :: Dog -> String #

showList :: [Dog] -> ShowS #

ToJSON Dog Source #

ToJSON Dog

FromJSON Dog Source #

FromJSON Dog

mkDog Source #

Arguments

:: Text

dogClassName

-> Dog 

Construct a value of type Dog (by applying it's required fields, if any)

Enums

E'ArrayEnum

data E'ArrayEnum Source #

Enum of Text

Constructors

E'ArrayEnum'Fish
"fish"
E'ArrayEnum'Crab
"crab"

Instances

Bounded E'ArrayEnum Source # 
Enum E'ArrayEnum Source # 
Eq E'ArrayEnum Source # 
Ord E'ArrayEnum Source # 
Show E'ArrayEnum Source # 
ToJSON E'ArrayEnum Source # 
FromJSON E'ArrayEnum Source # 
ToHttpApiData E'ArrayEnum Source # 
FromHttpApiData E'ArrayEnum Source # 
MimeRender MimeMultipartFormData E'ArrayEnum Source # 

E'EnumFormString

data E'EnumFormString Source #

Enum of Text

Instances

Bounded E'EnumFormString Source # 
Enum E'EnumFormString Source # 
Eq E'EnumFormString Source # 
Ord E'EnumFormString Source # 
Show E'EnumFormString Source # 
ToJSON E'EnumFormString Source # 
FromJSON E'EnumFormString Source # 
ToHttpApiData E'EnumFormString Source # 
FromHttpApiData E'EnumFormString Source # 
MimeRender MimeMultipartFormData E'EnumFormString Source # 

E'EnumInteger

data E'EnumInteger Source #

Enum of Int

Instances

Bounded E'EnumInteger Source # 
Enum E'EnumInteger Source # 
Eq E'EnumInteger Source # 
Ord E'EnumInteger Source # 
Show E'EnumInteger Source # 
ToJSON E'EnumInteger Source # 
FromJSON E'EnumInteger Source # 
ToHttpApiData E'EnumInteger Source # 
FromHttpApiData E'EnumInteger Source # 
MimeRender MimeMultipartFormData E'EnumInteger Source # 

E'EnumNumber

data E'EnumNumber Source #

Enum of Double

Instances

Bounded E'EnumNumber Source # 
Enum E'EnumNumber Source # 
Eq E'EnumNumber Source # 
Ord E'EnumNumber Source # 
Show E'EnumNumber Source # 
ToJSON E'EnumNumber Source # 
FromJSON E'EnumNumber Source # 
ToHttpApiData E'EnumNumber Source # 
FromHttpApiData E'EnumNumber Source # 
MimeRender MimeMultipartFormData E'EnumNumber Source # 

E'EnumQueryInteger

data E'EnumQueryInteger Source #

Enum of Int

Instances

Bounded E'EnumQueryInteger Source # 
Enum E'EnumQueryInteger Source # 
Eq E'EnumQueryInteger Source # 
Ord E'EnumQueryInteger Source # 
Show E'EnumQueryInteger Source # 
ToJSON E'EnumQueryInteger Source # 
FromJSON E'EnumQueryInteger Source # 
ToHttpApiData E'EnumQueryInteger Source # 
FromHttpApiData E'EnumQueryInteger Source # 
MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 

E'EnumString

data E'EnumString Source #

Enum of Text

Instances

Bounded E'EnumString Source # 
Enum E'EnumString Source # 
Eq E'EnumString Source # 
Ord E'EnumString Source # 
Show E'EnumString Source # 
ToJSON E'EnumString Source # 
FromJSON E'EnumString Source # 
ToHttpApiData E'EnumString Source # 
FromHttpApiData E'EnumString Source # 
MimeRender MimeMultipartFormData E'EnumString Source # 

E'Inner

data E'Inner Source #

Enum of Text

Instances

Bounded E'Inner Source # 
Enum E'Inner Source # 
Eq E'Inner Source # 

Methods

(==) :: E'Inner -> E'Inner -> Bool #

(/=) :: E'Inner -> E'Inner -> Bool #

Ord E'Inner Source # 
Show E'Inner Source # 
ToJSON E'Inner Source # 
FromJSON E'Inner Source # 
ToHttpApiData E'Inner Source # 
FromHttpApiData E'Inner Source # 
MimeRender MimeMultipartFormData E'Inner Source # 

E'Inner2

data E'Inner2 Source #

Enum of Text

Instances

Bounded E'Inner2 Source # 
Enum E'Inner2 Source # 
Eq E'Inner2 Source # 
Ord E'Inner2 Source # 
Show E'Inner2 Source # 
ToJSON E'Inner2 Source # 
FromJSON E'Inner2 Source # 
ToHttpApiData E'Inner2 Source # 
FromHttpApiData E'Inner2 Source # 
MimeRender MimeMultipartFormData E'Inner2 Source # 

E'JustSymbol

data E'JustSymbol Source #

Enum of Text

Instances

Bounded E'JustSymbol Source # 
Enum E'JustSymbol Source # 
Eq E'JustSymbol Source # 
Ord E'JustSymbol Source # 
Show E'JustSymbol Source # 
ToJSON E'JustSymbol Source # 
FromJSON E'JustSymbol Source # 
ToHttpApiData E'JustSymbol Source # 
FromHttpApiData E'JustSymbol Source # 
MimeRender MimeMultipartFormData E'JustSymbol Source # 

E'Status

data E'Status Source #

Enum of Text . + Model for testing model name same as property name

Constructors

Name 

Fields

Instances

mkName Source #

Arguments

:: Int

nameName

-> Name 

Construct a value of type Name (by applying it's required fields, if any)

NumberOnly

mkNumberOnly :: NumberOnly Source #

Construct a value of type NumberOnly (by applying it's required fields, if any)

Order

data Order Source #

Order

Constructors

Order 

Fields

Instances

Eq Order Source # 

Methods

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

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

Show Order Source # 

Methods

showsPrec :: Int -> Order -> ShowS #

show :: Order -> String #

showList :: [Order] -> ShowS #

ToJSON Order Source #

ToJSON Order

FromJSON Order Source #

FromJSON Order

HasBodyParam PlaceOrder Order Source #

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

Methods

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

mkOrder :: Order Source #

Construct a value of type Order (by applying it's required fields, if any)

OuterBoolean

newtype OuterBoolean Source #

OuterBoolean

Constructors

OuterBoolean 

Fields

OuterComposite

mkOuterComposite :: OuterComposite Source #

Construct a value of type OuterComposite (by applying it's required fields, if any)

OuterNumber

OuterString

Pet

data Pet Source #

Pet

Constructors

Pet 

Fields

Instances

Eq Pet Source # 

Methods

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

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

Show Pet Source # 

Methods

showsPrec :: Int -> Pet -> ShowS #

show :: Pet -> String #

showList :: [Pet] -> ShowS #

ToJSON Pet Source #

ToJSON Pet

FromJSON Pet Source #

FromJSON Pet

HasBodyParam UpdatePet Pet Source #

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

Methods

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

HasBodyParam AddPet Pet Source #

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

Methods

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

mkPet Source #

Arguments

:: Text

petName

-> [Text]

petPhotoUrls

-> Pet 

Construct a value of type Pet (by applying it's required fields, if any)

ReadOnlyFirst

mkReadOnlyFirst :: ReadOnlyFirst Source #

Construct a value of type ReadOnlyFirst (by applying it's required fields, if any)

SpecialModelName

mkSpecialModelName :: SpecialModelName Source #

Construct a value of type SpecialModelName (by applying it's required fields, if any)

Tag

data Tag Source #

Tag

Constructors

Tag 

Fields

Instances

Eq Tag Source # 

Methods

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

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

Show Tag Source # 

Methods

showsPrec :: Int -> Tag -> ShowS #

show :: Tag -> String #

showList :: [Tag] -> ShowS #

ToJSON Tag Source #

ToJSON Tag

FromJSON Tag Source #

FromJSON Tag

mkTag :: Tag Source #

Construct a value of type Tag (by applying it's required fields, if any)

User

data User Source #

User

Constructors

User 

Fields

Instances

Eq User Source # 

Methods

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

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

Show User Source # 

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

ToJSON User Source #

ToJSON User

FromJSON User Source #

FromJSON User

HasBodyParam UpdateUser User Source #

Body Param "body" - Updated user object

Methods

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

HasBodyParam CreateUser User Source #

Body Param "body" - Created user object

Methods

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

mkUser :: User Source #

Construct a value of type User (by applying it's required fields, if any)

Cat

data Cat Source #

Cat

Constructors

Cat 

Fields

Instances

Eq Cat Source # 

Methods

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

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

Show Cat Source # 

Methods

showsPrec :: Int -> Cat -> ShowS #

show :: Cat -> String #

showList :: [Cat] -> ShowS #

ToJSON Cat Source #

ToJSON Cat

FromJSON Cat Source #

FromJSON Cat

mkCat Source #

Arguments

:: Text

catClassName

-> Cat 

Construct a value of type Cat (by applying it's required fields, if any)

Dog

data Dog Source #

Dog

Constructors

Dog 

Fields

Instances

Eq Dog Source # 

Methods

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

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

Show Dog Source # 

Methods

showsPrec :: Int -> Dog -> ShowS #

show :: Dog -> String #

showList :: [Dog] -> ShowS #

ToJSON Dog Source #

ToJSON Dog

FromJSON Dog Source #

FromJSON Dog

mkDog Source #

Arguments

:: Text

dogClassName

-> Dog 

Construct a value of type Dog (by applying it's required fields, if any)

Enums

E'ArrayEnum

data E'ArrayEnum Source #

Enum of Text

Constructors

E'ArrayEnum'Fish
"fish"
E'ArrayEnum'Crab
"crab"

Instances

Bounded E'ArrayEnum Source # 
Enum E'ArrayEnum Source # 
Eq E'ArrayEnum Source # 
Ord E'ArrayEnum Source # 
Show E'ArrayEnum Source # 
ToJSON E'ArrayEnum Source # 
FromJSON E'ArrayEnum Source # 
ToHttpApiData E'ArrayEnum Source # 
FromHttpApiData E'ArrayEnum Source # 
MimeRender MimeMultipartFormData E'ArrayEnum Source # 

E'EnumFormString

data E'EnumFormString Source #

Enum of Text

Instances

Bounded E'EnumFormString Source # 
Enum E'EnumFormString Source # 
Eq E'EnumFormString Source # 
Ord E'EnumFormString Source # 
Show E'EnumFormString Source # 
ToJSON E'EnumFormString Source # 
FromJSON E'EnumFormString Source # 
ToHttpApiData E'EnumFormString Source # 
FromHttpApiData E'EnumFormString Source # 
MimeRender MimeMultipartFormData E'EnumFormString Source # 

E'EnumInteger

data E'EnumInteger Source #

Enum of Int

Instances

Bounded E'EnumInteger Source # 
Enum E'EnumInteger Source # 
Eq E'EnumInteger Source # 
Ord E'EnumInteger Source # 
Show E'EnumInteger Source # 
ToJSON E'EnumInteger Source # 
FromJSON E'EnumInteger Source # 
ToHttpApiData E'EnumInteger Source # 
FromHttpApiData E'EnumInteger Source # 
MimeRender MimeMultipartFormData E'EnumInteger Source # 

E'EnumNumber

data E'EnumNumber Source #

Enum of Double

Instances

Bounded E'EnumNumber Source # 
Enum E'EnumNumber Source # 
Eq E'EnumNumber Source # 
Ord E'EnumNumber Source # 
Show E'EnumNumber Source # 
ToJSON E'EnumNumber Source # 
FromJSON E'EnumNumber Source # 
ToHttpApiData E'EnumNumber Source # 
FromHttpApiData E'EnumNumber Source # 
MimeRender MimeMultipartFormData E'EnumNumber Source # 

E'EnumQueryInteger

data E'EnumQueryInteger Source #

Enum of Int

Instances

Bounded E'EnumQueryInteger Source # 
Enum E'EnumQueryInteger Source # 
Eq E'EnumQueryInteger Source # 
Ord E'EnumQueryInteger Source # 
Show E'EnumQueryInteger Source # 
ToJSON E'EnumQueryInteger Source # 
FromJSON E'EnumQueryInteger Source # 
ToHttpApiData E'EnumQueryInteger Source # 
FromHttpApiData E'EnumQueryInteger Source # 
MimeRender MimeMultipartFormData E'EnumQueryInteger Source # 

E'EnumString

data E'EnumString Source #

Enum of Text

Instances

Bounded E'EnumString Source # 
Enum E'EnumString Source # 
Eq E'EnumString Source # 
Ord E'EnumString Source # 
Show E'EnumString Source # 
ToJSON E'EnumString Source # 
FromJSON E'EnumString Source # 
ToHttpApiData E'EnumString Source # 
FromHttpApiData E'EnumString Source # 
MimeRender MimeMultipartFormData E'EnumString Source # 

E'Inner

data E'Inner Source #

Enum of Text

Instances

Bounded E'Inner Source # 
Enum E'Inner Source # 
Eq E'Inner Source # 

Methods

(==) :: E'Inner -> E'Inner -> Bool #

(/=) :: E'Inner -> E'Inner -> Bool #

Ord E'Inner Source # 
Show E'Inner Source # 
ToJSON E'Inner Source # 
FromJSON E'Inner Source # 
ToHttpApiData E'Inner Source # 
FromHttpApiData E'Inner Source # 
MimeRender MimeMultipartFormData E'Inner Source # 

E'Inner2

data E'Inner2 Source #

Enum of Text

Instances

Bounded E'Inner2 Source # 
Enum E'Inner2 Source # 
Eq E'Inner2 Source # 
Ord E'Inner2 Source # 
Show E'Inner2 Source # 
ToJSON E'Inner2 Source # 
FromJSON E'Inner2 Source # 
ToHttpApiData E'Inner2 Source # 
FromHttpApiData E'Inner2 Source # 
MimeRender MimeMultipartFormData E'Inner2 Source # 

E'JustSymbol

data E'JustSymbol Source #

Enum of Text

Instances

Bounded E'JustSymbol Source # 
Enum E'JustSymbol Source # 
Eq E'JustSymbol Source # 
Ord E'JustSymbol Source # 
Show E'JustSymbol Source # 
ToJSON E'JustSymbol Source # 
FromJSON E'JustSymbol Source # 
ToHttpApiData E'JustSymbol Source # 
FromHttpApiData E'JustSymbol Source # 
MimeRender MimeMultipartFormData E'JustSymbol Source # 

E'Status

data E'Status Source #

Enum of Text . Order Status

Constructors

E'Status'Placed
"placed"
E'Status'Approved
"approved"
E'Status'Delivered
"delivered"

Instances

Bounded E'Status Source # 
Enum E'Status Source # 
Eq E'Status Source # 
Ord E'Status Source # 
Show E'Status Source # 
ToJSON E'Status Source # 
FromJSON E'Status Source # 
ToHttpApiData E'Status Source # 
FromHttpApiData E'Status Source # 
MimeRender MimeMultipartFormData E'Status Source # 

E'Status2

data E'Status2 Source #

Enum of Text . pet status in the store

Constructors

E'Status2'Available
"available"
E'Status2'Pending
"pending"
E'Status2'Sold
"sold"

Instances

Bounded E'Status2 Source # 
Enum E'Status2 Source # 
Eq E'Status2 Source # 
Ord E'Status2 Source # 
Show E'Status2 Source # 
ToJSON E'Status2 Source # 
FromJSON E'Status2 Source # 
ToHttpApiData E'Status2 Source # 
FromHttpApiData E'Status2 Source # 
MimeRender MimeMultipartFormData E'Status2 Source # 

EnumClass

data EnumClass Source #

Enum of Text

Constructors

EnumClass'_abc
"_abc"
EnumClass'_efg
"-efg"
EnumClass'_xyz
"(xyz)"

Instances

Bounded EnumClass Source # 
Enum EnumClass Source # 
Eq EnumClass Source # 
Ord EnumClass Source # 
Show EnumClass Source # 
ToJSON EnumClass Source # 
FromJSON EnumClass Source # 
ToHttpApiData EnumClass Source # 
FromHttpApiData EnumClass Source # 
MimeRender MimeMultipartFormData EnumClass Source # 

OuterEnum

data OuterEnum Source #

Enum of Text

Constructors

OuterEnum'Placed
"placed"
OuterEnum'Approved
"approved"
OuterEnum'Delivered
"delivered"

Instances

Bounded OuterEnum Source # 
Enum OuterEnum Source # 
Eq OuterEnum Source # 
Ord OuterEnum Source # 
Show OuterEnum Source # 
ToJSON OuterEnum Source # 
FromJSON OuterEnum Source # 
ToHttpApiData OuterEnum Source # 
FromHttpApiData OuterEnum Source # 
MimeRender MimeMultipartFormData OuterEnum Source # 

Auth Methods

AuthApiKeyApiKey

AuthApiKeyApiKeyQuery

AuthBasicHttpBasicTest

AuthOAuthPetstoreAuth

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.AnotherFake.html b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.AnotherFake.html index fab69c90c20..ccb75fd8322 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.AnotherFake.html +++ b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.AnotherFake.html @@ -67,24 +67,22 @@ Module : SwaggerPetstore.API.AnotherFake -- To test special tags -- testSpecialTags - :: (Consumes TestSpecialTags contentType, MimeRender contentType Client) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> Client -- ^ "body" - client model - -> SwaggerPetstoreRequest TestSpecialTags contentType Client accept -testSpecialTags _ _ body = - _mkRequest "PATCH" ["/another-fake/dummy"] - `setBodyParam` body + :: (Consumes TestSpecialTags MimeJSON, MimeRender MimeJSON Client) + => Client -- ^ "body" - client model + -> SwaggerPetstoreRequest TestSpecialTags MimeJSON Client MimeJSON +testSpecialTags body = + _mkRequest "PATCH" ["/another-fake/dummy"] + `setBodyParam` body + +data TestSpecialTags -data TestSpecialTags - --- | /Body Param/ "body" - client model -instance HasBodyParam TestSpecialTags Client - --- | @application/json@ -instance Consumes TestSpecialTags MimeJSON - --- | @application/json@ -instance Produces TestSpecialTags MimeJSON - - \ No newline at end of file +-- | /Body Param/ "body" - client model +instance HasBodyParam TestSpecialTags Client + +-- | @application/json@ +instance Consumes TestSpecialTags MimeJSON + +-- | @application/json@ +instance Produces TestSpecialTags MimeJSON + + \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Fake.html b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Fake.html index 0259f0d5f10..9002577e9db 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Fake.html +++ b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Fake.html @@ -65,10 +65,10 @@ Module : SwaggerPetstore.API.Fake -- Test serialization of outer boolean types -- fakeOuterBooleanSerialize - :: (Consumes FakeOuterBooleanSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> SwaggerPetstoreRequest FakeOuterBooleanSerialize contentType OuterBoolean accept + :: (Consumes FakeOuterBooleanSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> SwaggerPetstoreRequest FakeOuterBooleanSerialize contentType OuterBoolean accept fakeOuterBooleanSerialize _ _ = _mkRequest "POST" ["/fake/outer/boolean"] @@ -84,10 +84,10 @@ Module : SwaggerPetstore.API.Fake -- Test serialization of object with outer number type -- fakeOuterCompositeSerialize - :: (Consumes FakeOuterCompositeSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> SwaggerPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept + :: (Consumes FakeOuterCompositeSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> SwaggerPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept fakeOuterCompositeSerialize _ _ = _mkRequest "POST" ["/fake/outer/composite"] @@ -103,10 +103,10 @@ Module : SwaggerPetstore.API.Fake -- Test serialization of outer number types -- fakeOuterNumberSerialize - :: (Consumes FakeOuterNumberSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> SwaggerPetstoreRequest FakeOuterNumberSerialize contentType OuterNumber accept + :: (Consumes FakeOuterNumberSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> SwaggerPetstoreRequest FakeOuterNumberSerialize contentType OuterNumber accept fakeOuterNumberSerialize _ _ = _mkRequest "POST" ["/fake/outer/number"] @@ -122,10 +122,10 @@ Module : SwaggerPetstore.API.Fake -- Test serialization of outer string types -- fakeOuterStringSerialize - :: (Consumes FakeOuterStringSerialize contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> SwaggerPetstoreRequest FakeOuterStringSerialize contentType OuterString accept + :: (Consumes FakeOuterStringSerialize contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> SwaggerPetstoreRequest FakeOuterStringSerialize contentType OuterString accept fakeOuterStringSerialize _ _ = _mkRequest "POST" ["/fake/outer/string"] @@ -143,234 +143,230 @@ Module : SwaggerPetstore.API.Fake -- To test \"client\" model -- testClientModel - :: (Consumes TestClientModel contentType, MimeRender contentType Client) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> Client -- ^ "body" - client model - -> SwaggerPetstoreRequest TestClientModel contentType Client accept -testClientModel _ _ body = - _mkRequest "PATCH" ["/fake"] - `setBodyParam` body + :: (Consumes TestClientModel MimeJSON, MimeRender MimeJSON Client) + => Client -- ^ "body" - client model + -> SwaggerPetstoreRequest TestClientModel MimeJSON Client MimeJSON +testClientModel body = + _mkRequest "PATCH" ["/fake"] + `setBodyParam` body + +data TestClientModel -data TestClientModel - --- | /Body Param/ "body" - client model -instance HasBodyParam TestClientModel Client - --- | @application/json@ -instance Consumes TestClientModel MimeJSON - --- | @application/json@ -instance Produces TestClientModel MimeJSON - +-- | /Body Param/ "body" - client model +instance HasBodyParam TestClientModel Client + +-- | @application/json@ +instance Consumes TestClientModel MimeJSON + +-- | @application/json@ +instance Produces TestClientModel MimeJSON + + +-- *** testEndpointParameters --- *** testEndpointParameters - --- | @POST \/fake@ +-- | @POST \/fake@ +-- +-- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -- -- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -- --- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +-- AuthMethod: 'AuthBasicHttpBasicTest' -- --- AuthMethod: 'AuthBasicHttpBasicTest' +-- Note: Has 'Produces' instances, but no response schema -- --- Note: Has 'Produces' instances, but no response schema --- -testEndpointParameters - :: (Consumes TestEndpointParameters contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> Number -- ^ "number" - None - -> ParamDouble -- ^ "double" - None - -> PatternWithoutDelimiter -- ^ "patternWithoutDelimiter" - None - -> Byte -- ^ "byte" - None - -> SwaggerPetstoreRequest TestEndpointParameters contentType res accept -testEndpointParameters _ _ (Number number) (ParamDouble double) (PatternWithoutDelimiter patternWithoutDelimiter) (Byte byte) = - _mkRequest "POST" ["/fake"] - `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicHttpBasicTest) - `addForm` toForm ("number", number) - `addForm` toForm ("double", double) - `addForm` toForm ("pattern_without_delimiter", patternWithoutDelimiter) - `addForm` toForm ("byte", byte) +testEndpointParameters + :: (Consumes TestEndpointParameters contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> Number -- ^ "number" - None + -> ParamDouble -- ^ "double" - None + -> PatternWithoutDelimiter -- ^ "patternWithoutDelimiter" - None + -> Byte -- ^ "byte" - None + -> SwaggerPetstoreRequest TestEndpointParameters contentType res accept +testEndpointParameters _ _ (Number number) (ParamDouble double) (PatternWithoutDelimiter patternWithoutDelimiter) (Byte byte) = + _mkRequest "POST" ["/fake"] + `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicHttpBasicTest) + `addForm` toForm ("number", number) + `addForm` toForm ("double", double) + `addForm` toForm ("pattern_without_delimiter", patternWithoutDelimiter) + `addForm` toForm ("byte", byte) + +data TestEndpointParameters -data TestEndpointParameters - --- | /Optional Param/ "integer" - None -instance HasOptionalParam TestEndpointParameters ParamInteger where - applyOptionalParam req (ParamInteger xs) = - req `addForm` toForm ("integer", xs) - --- | /Optional Param/ "int32" - None -instance HasOptionalParam TestEndpointParameters Int32 where - applyOptionalParam req (Int32 xs) = - req `addForm` toForm ("int32", xs) - --- | /Optional Param/ "int64" - None -instance HasOptionalParam TestEndpointParameters Int64 where - applyOptionalParam req (Int64 xs) = - req `addForm` toForm ("int64", xs) - --- | /Optional Param/ "float" - None -instance HasOptionalParam TestEndpointParameters ParamFloat where - applyOptionalParam req (ParamFloat xs) = - req `addForm` toForm ("float", xs) - --- | /Optional Param/ "string" - None -instance HasOptionalParam TestEndpointParameters ParamString where - applyOptionalParam req (ParamString xs) = - req `addForm` toForm ("string", xs) - --- | /Optional Param/ "binary" - None -instance HasOptionalParam TestEndpointParameters ParamBinary where - applyOptionalParam req (ParamBinary xs) = - req `addForm` toForm ("binary", xs) - --- | /Optional Param/ "date" - None -instance HasOptionalParam TestEndpointParameters ParamDate where - applyOptionalParam req (ParamDate xs) = - req `addForm` toForm ("date", xs) - --- | /Optional Param/ "dateTime" - None -instance HasOptionalParam TestEndpointParameters ParamDateTime where - applyOptionalParam req (ParamDateTime xs) = - req `addForm` toForm ("dateTime", xs) - --- | /Optional Param/ "password" - None -instance HasOptionalParam TestEndpointParameters Password where - applyOptionalParam req (Password xs) = - req `addForm` toForm ("password", xs) - --- | /Optional Param/ "callback" - None -instance HasOptionalParam TestEndpointParameters Callback where - applyOptionalParam req (Callback xs) = - req `addForm` toForm ("callback", xs) - --- | @application/xml; charset=utf-8@ -instance Consumes TestEndpointParameters MimeXmlCharsetutf8 --- | @application/json; charset=utf-8@ -instance Consumes TestEndpointParameters MimeJsonCharsetutf8 - --- | @application/xml; charset=utf-8@ -instance Produces TestEndpointParameters MimeXmlCharsetutf8 --- | @application/json; charset=utf-8@ -instance Produces TestEndpointParameters MimeJsonCharsetutf8 - +-- | /Optional Param/ "integer" - None +instance HasOptionalParam TestEndpointParameters ParamInteger where + applyOptionalParam req (ParamInteger xs) = + req `addForm` toForm ("integer", xs) + +-- | /Optional Param/ "int32" - None +instance HasOptionalParam TestEndpointParameters Int32 where + applyOptionalParam req (Int32 xs) = + req `addForm` toForm ("int32", xs) + +-- | /Optional Param/ "int64" - None +instance HasOptionalParam TestEndpointParameters Int64 where + applyOptionalParam req (Int64 xs) = + req `addForm` toForm ("int64", xs) + +-- | /Optional Param/ "float" - None +instance HasOptionalParam TestEndpointParameters ParamFloat where + applyOptionalParam req (ParamFloat xs) = + req `addForm` toForm ("float", xs) + +-- | /Optional Param/ "string" - None +instance HasOptionalParam TestEndpointParameters ParamString where + applyOptionalParam req (ParamString xs) = + req `addForm` toForm ("string", xs) + +-- | /Optional Param/ "binary" - None +instance HasOptionalParam TestEndpointParameters ParamBinary where + applyOptionalParam req (ParamBinary xs) = + req `addForm` toForm ("binary", xs) + +-- | /Optional Param/ "date" - None +instance HasOptionalParam TestEndpointParameters ParamDate where + applyOptionalParam req (ParamDate xs) = + req `addForm` toForm ("date", xs) + +-- | /Optional Param/ "dateTime" - None +instance HasOptionalParam TestEndpointParameters ParamDateTime where + applyOptionalParam req (ParamDateTime xs) = + req `addForm` toForm ("dateTime", xs) + +-- | /Optional Param/ "password" - None +instance HasOptionalParam TestEndpointParameters Password where + applyOptionalParam req (Password xs) = + req `addForm` toForm ("password", xs) + +-- | /Optional Param/ "callback" - None +instance HasOptionalParam TestEndpointParameters Callback where + applyOptionalParam req (Callback xs) = + req `addForm` toForm ("callback", xs) + +-- | @application/xml; charset=utf-8@ +instance Consumes TestEndpointParameters MimeXmlCharsetutf8 +-- | @application/json; charset=utf-8@ +instance Consumes TestEndpointParameters MimeJsonCharsetutf8 + +-- | @application/xml; charset=utf-8@ +instance Produces TestEndpointParameters MimeXmlCharsetutf8 +-- | @application/json; charset=utf-8@ +instance Produces TestEndpointParameters MimeJsonCharsetutf8 + + +-- *** testEnumParameters --- *** testEnumParameters - --- | @GET \/fake@ +-- | @GET \/fake@ +-- +-- To test enum parameters -- -- To test enum parameters -- --- To test enum parameters +-- Note: Has 'Produces' instances, but no response schema -- --- Note: Has 'Produces' instances, but no response schema --- -testEnumParameters - :: (Consumes TestEnumParameters contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> SwaggerPetstoreRequest TestEnumParameters contentType res accept -testEnumParameters _ _ = - _mkRequest "GET" ["/fake"] +testEnumParameters + :: (Consumes TestEnumParameters contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> SwaggerPetstoreRequest TestEnumParameters contentType res accept +testEnumParameters _ _ = + _mkRequest "GET" ["/fake"] + +data TestEnumParameters -data TestEnumParameters - --- | /Optional Param/ "enum_form_string_array" - Form parameter enum test (string array) -instance HasOptionalParam TestEnumParameters EnumFormStringArray where - applyOptionalParam req (EnumFormStringArray xs) = - req `addForm` toFormColl CommaSeparated ("enum_form_string_array", xs) - --- | /Optional Param/ "enum_form_string" - Form parameter enum test (string) -instance HasOptionalParam TestEnumParameters EnumFormString where - applyOptionalParam req (EnumFormString xs) = - req `addForm` toForm ("enum_form_string", xs) - --- | /Optional Param/ "enum_header_string_array" - Header parameter enum test (string array) -instance HasOptionalParam TestEnumParameters EnumHeaderStringArray where - applyOptionalParam req (EnumHeaderStringArray xs) = - req `setHeader` toHeaderColl CommaSeparated ("enum_header_string_array", xs) - --- | /Optional Param/ "enum_header_string" - Header parameter enum test (string) -instance HasOptionalParam TestEnumParameters EnumHeaderString where - applyOptionalParam req (EnumHeaderString xs) = - req `setHeader` toHeader ("enum_header_string", xs) - --- | /Optional Param/ "enum_query_string_array" - Query parameter enum test (string array) -instance HasOptionalParam TestEnumParameters EnumQueryStringArray where - applyOptionalParam req (EnumQueryStringArray xs) = - req `setQuery` toQueryColl CommaSeparated ("enum_query_string_array", Just xs) - --- | /Optional Param/ "enum_query_string" - Query parameter enum test (string) -instance HasOptionalParam TestEnumParameters EnumQueryString where - applyOptionalParam req (EnumQueryString xs) = - req `setQuery` toQuery ("enum_query_string", Just xs) - --- | /Optional Param/ "enum_query_integer" - Query parameter enum test (double) -instance HasOptionalParam TestEnumParameters EnumQueryInteger where - applyOptionalParam req (EnumQueryInteger xs) = - req `setQuery` toQuery ("enum_query_integer", Just xs) - --- | /Optional Param/ "enum_query_double" - Query parameter enum test (double) -instance HasOptionalParam TestEnumParameters EnumQueryDouble where - applyOptionalParam req (EnumQueryDouble xs) = - req `addForm` toForm ("enum_query_double", xs) - --- | @*/*@ -instance MimeType mtype => Consumes TestEnumParameters mtype - --- | @*/*@ -instance MimeType mtype => Produces TestEnumParameters mtype - +-- | /Optional Param/ "enum_form_string_array" - Form parameter enum test (string array) +instance HasOptionalParam TestEnumParameters EnumFormStringArray where + applyOptionalParam req (EnumFormStringArray xs) = + req `addForm` toFormColl CommaSeparated ("enum_form_string_array", xs) + +-- | /Optional Param/ "enum_form_string" - Form parameter enum test (string) +instance HasOptionalParam TestEnumParameters EnumFormString where + applyOptionalParam req (EnumFormString xs) = + req `addForm` toForm ("enum_form_string", xs) + +-- | /Optional Param/ "enum_header_string_array" - Header parameter enum test (string array) +instance HasOptionalParam TestEnumParameters EnumHeaderStringArray where + applyOptionalParam req (EnumHeaderStringArray xs) = + req `setHeader` toHeaderColl CommaSeparated ("enum_header_string_array", xs) + +-- | /Optional Param/ "enum_header_string" - Header parameter enum test (string) +instance HasOptionalParam TestEnumParameters EnumHeaderString where + applyOptionalParam req (EnumHeaderString xs) = + req `setHeader` toHeader ("enum_header_string", xs) + +-- | /Optional Param/ "enum_query_string_array" - Query parameter enum test (string array) +instance HasOptionalParam TestEnumParameters EnumQueryStringArray where + applyOptionalParam req (EnumQueryStringArray xs) = + req `setQuery` toQueryColl CommaSeparated ("enum_query_string_array", Just xs) + +-- | /Optional Param/ "enum_query_string" - Query parameter enum test (string) +instance HasOptionalParam TestEnumParameters EnumQueryString where + applyOptionalParam req (EnumQueryString xs) = + req `setQuery` toQuery ("enum_query_string", Just xs) + +-- | /Optional Param/ "enum_query_integer" - Query parameter enum test (double) +instance HasOptionalParam TestEnumParameters EnumQueryInteger where + applyOptionalParam req (EnumQueryInteger xs) = + req `setQuery` toQuery ("enum_query_integer", Just xs) + +-- | /Optional Param/ "enum_query_double" - Query parameter enum test (double) +instance HasOptionalParam TestEnumParameters EnumQueryDouble where + applyOptionalParam req (EnumQueryDouble xs) = + req `addForm` toForm ("enum_query_double", xs) + +-- | @*/*@ +instance MimeType mtype => Consumes TestEnumParameters mtype + +-- | @*/*@ +instance MimeType mtype => Produces TestEnumParameters mtype + + +-- *** testInlineAdditionalProperties --- *** testInlineAdditionalProperties - --- | @POST \/fake\/inline-additionalProperties@ +-- | @POST \/fake\/inline-additionalProperties@ +-- +-- test inline additionalProperties -- --- test inline additionalProperties +-- -- --- --- -testInlineAdditionalProperties - :: (Consumes TestInlineAdditionalProperties contentType, MimeRender contentType A.Value) - => ContentType contentType -- ^ request content-type ('MimeType') - -> A.Value -- ^ "param" - request body - -> SwaggerPetstoreRequest TestInlineAdditionalProperties contentType NoContent MimeNoContent -testInlineAdditionalProperties _ param = - _mkRequest "POST" ["/fake/inline-additionalProperties"] - `setBodyParam` param - -data TestInlineAdditionalProperties +testInlineAdditionalProperties + :: (Consumes TestInlineAdditionalProperties MimeJSON, MimeRender MimeJSON A.Value) + => A.Value -- ^ "param" - request body + -> SwaggerPetstoreRequest TestInlineAdditionalProperties MimeJSON NoContent MimeNoContent +testInlineAdditionalProperties param = + _mkRequest "POST" ["/fake/inline-additionalProperties"] + `setBodyParam` param + +data TestInlineAdditionalProperties + +-- | /Body Param/ "param" - request body +instance HasBodyParam TestInlineAdditionalProperties A.Value --- | /Body Param/ "param" - request body -instance HasBodyParam TestInlineAdditionalProperties A.Value +-- | @application/json@ +instance Consumes TestInlineAdditionalProperties MimeJSON --- | @application/json@ -instance Consumes TestInlineAdditionalProperties MimeJSON + +-- *** testJsonFormData - --- *** testJsonFormData - --- | @GET \/fake\/jsonFormData@ +-- | @GET \/fake\/jsonFormData@ +-- +-- test json serialization of form data +-- -- --- test json serialization of form data --- --- --- -testJsonFormData - :: (Consumes TestJsonFormData contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Param -- ^ "param" - field1 - -> Param2 -- ^ "param2" - field2 - -> SwaggerPetstoreRequest TestJsonFormData contentType NoContent MimeNoContent -testJsonFormData _ (Param param) (Param2 param2) = - _mkRequest "GET" ["/fake/jsonFormData"] - `addForm` toForm ("param", param) - `addForm` toForm ("param2", param2) - -data TestJsonFormData - --- | @application/json@ -instance Consumes TestJsonFormData MimeJSON - - \ No newline at end of file +-- +testJsonFormData + :: (Consumes TestJsonFormData MimeJSON) + => Param -- ^ "param" - field1 + -> Param2 -- ^ "param2" - field2 + -> SwaggerPetstoreRequest TestJsonFormData MimeJSON NoContent MimeNoContent +testJsonFormData (Param param) (Param2 param2) = + _mkRequest "GET" ["/fake/jsonFormData"] + `addForm` toForm ("param", param) + `addForm` toForm ("param2", param2) + +data TestJsonFormData + +-- | @application/json@ +instance Consumes TestJsonFormData MimeJSON + + \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.FakeClassnameTags123.html b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.FakeClassnameTags123.html index ef9df655c24..9b6c41a7fdb 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.FakeClassnameTags123.html +++ b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.FakeClassnameTags123.html @@ -67,25 +67,23 @@ Module : SwaggerPetstore.API.FakeClassnameTags123 -- AuthMethod: 'AuthApiKeyApiKeyQuery' -- testClassname - :: (Consumes TestClassname contentType, MimeRender contentType Client) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> Client -- ^ "body" - client model - -> SwaggerPetstoreRequest TestClassname contentType Client accept -testClassname _ _ body = - _mkRequest "PATCH" ["/fake_classname_test"] - `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKeyQuery) - `setBodyParam` body + :: (Consumes TestClassname MimeJSON, MimeRender MimeJSON Client) + => Client -- ^ "body" - client model + -> SwaggerPetstoreRequest TestClassname MimeJSON Client MimeJSON +testClassname body = + _mkRequest "PATCH" ["/fake_classname_test"] + `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKeyQuery) + `setBodyParam` body + +data TestClassname -data TestClassname - --- | /Body Param/ "body" - client model -instance HasBodyParam TestClassname Client - --- | @application/json@ -instance Consumes TestClassname MimeJSON - --- | @application/json@ -instance Produces TestClassname MimeJSON - - \ No newline at end of file +-- | /Body Param/ "body" - client model +instance HasBodyParam TestClassname Client + +-- | @application/json@ +instance Consumes TestClassname MimeJSON + +-- | @application/json@ +instance Produces TestClassname MimeJSON + + \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Pet.html b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Pet.html index 0e2c60913ed..51d11919c99 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Pet.html +++ b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Pet.html @@ -71,15 +71,15 @@ Module : SwaggerPetstore.API.Pet -- Note: Has 'Produces' instances, but no response schema -- addPet - :: (Consumes AddPet contentType, MimeRender contentType Pet) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') + :: (Consumes AddPet contentType, MimeRender contentType Pet) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') -> Pet -- ^ "body" - Pet object that needs to be added to the store - -> SwaggerPetstoreRequest AddPet contentType res accept -addPet _ _ body = + -> SwaggerPetstoreRequest AddPet contentType res accept +addPet _ _ body = _mkRequest "POST" ["/pet"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `setBodyParam` body + `setBodyParam` body data AddPet @@ -110,17 +110,17 @@ Module : SwaggerPetstore.API.Pet -- Note: Has 'Produces' instances, but no response schema -- deletePet - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> PetId -- ^ "petId" - Pet id to delete - -> SwaggerPetstoreRequest DeletePet MimeNoContent res accept -deletePet _ (PetId petId) = - _mkRequest "DELETE" ["/pet/",toPath petId] + -> SwaggerPetstoreRequest DeletePet MimeNoContent res accept +deletePet _ (PetId petId) = + _mkRequest "DELETE" ["/pet/",toPath petId] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) data DeletePet instance HasOptionalParam DeletePet ApiKey where - applyOptionalParam req (ApiKey xs) = - req `setHeader` toHeader ("api_key", xs) + applyOptionalParam req (ApiKey xs) = + req `setHeader` toHeader ("api_key", xs) -- | @application/xml@ instance Produces DeletePet MimeXML -- | @application/json@ @@ -138,13 +138,13 @@ Module : SwaggerPetstore.API.Pet -- AuthMethod: 'AuthOAuthPetstoreAuth' -- findPetsByStatus - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> Status -- ^ "status" - Status values that need to be considered for filter - -> SwaggerPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept -findPetsByStatus _ (Status status) = + -> SwaggerPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept +findPetsByStatus _ (Status status) = _mkRequest "GET" ["/pet/findByStatus"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `setQuery` toQueryColl CommaSeparated ("status", Just status) + `setQuery` toQueryColl CommaSeparated ("status", Just status) data FindPetsByStatus -- | @application/xml@ @@ -164,13 +164,13 @@ Module : SwaggerPetstore.API.Pet -- AuthMethod: 'AuthOAuthPetstoreAuth' -- findPetsByTags - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> Tags -- ^ "tags" - Tags to filter by - -> SwaggerPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept -findPetsByTags _ (Tags tags) = + -> SwaggerPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept +findPetsByTags _ (Tags tags) = _mkRequest "GET" ["/pet/findByTags"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `setQuery` toQueryColl CommaSeparated ("tags", Just tags) + `setQuery` toQueryColl CommaSeparated ("tags", Just tags) {-# DEPRECATED findPetsByTags "" #-} @@ -192,11 +192,11 @@ Module : SwaggerPetstore.API.Pet -- AuthMethod: 'AuthApiKeyApiKey' -- getPetById - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> PetId -- ^ "petId" - ID of pet to return - -> SwaggerPetstoreRequest GetPetById MimeNoContent Pet accept -getPetById _ (PetId petId) = - _mkRequest "GET" ["/pet/",toPath petId] + -> SwaggerPetstoreRequest GetPetById MimeNoContent Pet accept +getPetById _ (PetId petId) = + _mkRequest "GET" ["/pet/",toPath petId] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey) data GetPetById @@ -219,15 +219,15 @@ Module : SwaggerPetstore.API.Pet -- Note: Has 'Produces' instances, but no response schema -- updatePet - :: (Consumes UpdatePet contentType, MimeRender contentType Pet) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') + :: (Consumes UpdatePet contentType, MimeRender contentType Pet) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') -> Pet -- ^ "body" - Pet object that needs to be added to the store - -> SwaggerPetstoreRequest UpdatePet contentType res accept -updatePet _ _ body = + -> SwaggerPetstoreRequest UpdatePet contentType res accept +updatePet _ _ body = _mkRequest "PUT" ["/pet"] `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - `setBodyParam` body + `setBodyParam` body data UpdatePet @@ -258,72 +258,69 @@ Module : SwaggerPetstore.API.Pet -- Note: Has 'Produces' instances, but no response schema -- updatePetWithForm - :: (Consumes UpdatePetWithForm contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> PetId -- ^ "petId" - ID of pet that needs to be updated - -> SwaggerPetstoreRequest UpdatePetWithForm contentType res accept -updatePetWithForm _ _ (PetId petId) = - _mkRequest "POST" ["/pet/",toPath petId] - `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - -data UpdatePetWithForm - --- | /Optional Param/ "name" - Updated name of the pet -instance HasOptionalParam UpdatePetWithForm Name2 where - applyOptionalParam req (Name2 xs) = - req `addForm` toForm ("name", xs) - --- | /Optional Param/ "status" - Updated status of the pet -instance HasOptionalParam UpdatePetWithForm StatusText where - applyOptionalParam req (StatusText xs) = - req `addForm` toForm ("status", xs) - --- | @application/x-www-form-urlencoded@ -instance Consumes UpdatePetWithForm MimeFormUrlEncoded - --- | @application/xml@ -instance Produces UpdatePetWithForm MimeXML --- | @application/json@ -instance Produces UpdatePetWithForm MimeJSON + :: (Consumes UpdatePetWithForm MimeFormUrlEncoded) + => Accept accept -- ^ request accept ('MimeType') + -> PetId -- ^ "petId" - ID of pet that needs to be updated + -> SwaggerPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded res accept +updatePetWithForm _ (PetId petId) = + _mkRequest "POST" ["/pet/",toPath petId] + `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) + +data UpdatePetWithForm + +-- | /Optional Param/ "name" - Updated name of the pet +instance HasOptionalParam UpdatePetWithForm Name2 where + applyOptionalParam req (Name2 xs) = + req `addForm` toForm ("name", xs) + +-- | /Optional Param/ "status" - Updated status of the pet +instance HasOptionalParam UpdatePetWithForm StatusText where + applyOptionalParam req (StatusText xs) = + req `addForm` toForm ("status", xs) + +-- | @application/x-www-form-urlencoded@ +instance Consumes UpdatePetWithForm MimeFormUrlEncoded + +-- | @application/xml@ +instance Produces UpdatePetWithForm MimeXML +-- | @application/json@ +instance Produces UpdatePetWithForm MimeJSON + - --- *** uploadFile - --- | @POST \/pet\/{petId}\/uploadImage@ --- --- uploads an image +-- *** uploadFile + +-- | @POST \/pet\/{petId}\/uploadImage@ +-- +-- uploads an image +-- -- -- --- --- AuthMethod: 'AuthOAuthPetstoreAuth' --- -uploadFile - :: (Consumes UploadFile contentType) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> PetId -- ^ "petId" - ID of pet to update - -> SwaggerPetstoreRequest UploadFile contentType ApiResponse accept -uploadFile _ _ (PetId petId) = - _mkRequest "POST" ["/pet/",toPath petId,"/uploadImage"] - `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) - -data UploadFile - --- | /Optional Param/ "additionalMetadata" - Additional data to pass to server -instance HasOptionalParam UploadFile AdditionalMetadata where - applyOptionalParam req (AdditionalMetadata xs) = - req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs) - --- | /Optional Param/ "file" - file to upload -instance HasOptionalParam UploadFile File where - applyOptionalParam req (File xs) = - req `_addMultiFormPart` NH.partFileSource "file" xs +-- AuthMethod: 'AuthOAuthPetstoreAuth' +-- +uploadFile + :: (Consumes UploadFile MimeMultipartFormData) + => PetId -- ^ "petId" - ID of pet to update + -> SwaggerPetstoreRequest UploadFile MimeMultipartFormData ApiResponse MimeJSON +uploadFile (PetId petId) = + _mkRequest "POST" ["/pet/",toPath petId,"/uploadImage"] + `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth) + +data UploadFile + +-- | /Optional Param/ "additionalMetadata" - Additional data to pass to server +instance HasOptionalParam UploadFile AdditionalMetadata where + applyOptionalParam req (AdditionalMetadata xs) = + req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs) + +-- | /Optional Param/ "file" - file to upload +instance HasOptionalParam UploadFile File where + applyOptionalParam req (File xs) = + req `_addMultiFormPart` NH.partFileSource "file" xs + +-- | @multipart/form-data@ +instance Consumes UploadFile MimeMultipartFormData --- | @multipart/form-data@ -instance Consumes UploadFile MimeMultipartFormData +-- | @application/json@ +instance Produces UploadFile MimeJSON --- | @application/json@ -instance Produces UploadFile MimeJSON - - \ No newline at end of file + \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Store.html b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Store.html index 7853a0ffbad..665d0ad50d3 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Store.html +++ b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.API.Store.html @@ -69,11 +69,11 @@ Module : SwaggerPetstore.API.Store -- Note: Has 'Produces' instances, but no response schema -- deleteOrder - :: Accept accept -- ^ request accept ('MimeType') + :: Accept accept -- ^ request accept ('MimeType') -> OrderIdText -- ^ "orderId" - ID of the order that needs to be deleted - -> SwaggerPetstoreRequest DeleteOrder MimeNoContent res accept -deleteOrder _ (OrderIdText orderId) = - _mkRequest "DELETE" ["/store/order/",toPath orderId] + -> SwaggerPetstoreRequest DeleteOrder MimeNoContent res accept +deleteOrder _ (OrderIdText orderId) = + _mkRequest "DELETE" ["/store/order/",toPath orderId] data DeleteOrder -- | @application/xml@ @@ -93,64 +93,63 @@ Module : SwaggerPetstore.API.Store -- AuthMethod: 'AuthApiKeyApiKey' -- getInventory - :: Accept accept -- ^ request accept ('MimeType') - -> SwaggerPetstoreRequest GetInventory MimeNoContent ((Map.Map String Int)) accept -getInventory _ = - _mkRequest "GET" ["/store/inventory"] - `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey) - -data GetInventory --- | @application/json@ -instance Produces GetInventory MimeJSON + :: SwaggerPetstoreRequest GetInventory MimeNoContent ((Map.Map String Int)) MimeJSON +getInventory = + _mkRequest "GET" ["/store/inventory"] + `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey) + +data GetInventory +-- | @application/json@ +instance Produces GetInventory MimeJSON + - --- *** getOrderById - --- | @GET \/store\/order\/{order_id}@ --- --- Find purchase order by ID --- --- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions --- -getOrderById - :: Accept accept -- ^ request accept ('MimeType') - -> OrderId -- ^ "orderId" - ID of pet that needs to be fetched - -> SwaggerPetstoreRequest GetOrderById MimeNoContent Order accept -getOrderById _ (OrderId orderId) = - _mkRequest "GET" ["/store/order/",toPath orderId] - -data GetOrderById --- | @application/xml@ -instance Produces GetOrderById MimeXML --- | @application/json@ -instance Produces GetOrderById MimeJSON +-- *** getOrderById + +-- | @GET \/store\/order\/{order_id}@ +-- +-- Find purchase order by ID +-- +-- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +-- +getOrderById + :: Accept accept -- ^ request accept ('MimeType') + -> OrderId -- ^ "orderId" - ID of pet that needs to be fetched + -> SwaggerPetstoreRequest GetOrderById MimeNoContent Order accept +getOrderById _ (OrderId orderId) = + _mkRequest "GET" ["/store/order/",toPath orderId] + +data GetOrderById +-- | @application/xml@ +instance Produces GetOrderById MimeXML +-- | @application/json@ +instance Produces GetOrderById MimeJSON + - --- *** placeOrder - --- | @POST \/store\/order@ --- --- Place an order for a pet +-- *** placeOrder + +-- | @POST \/store\/order@ +-- +-- Place an order for a pet +-- -- -- --- -placeOrder - :: (Consumes PlaceOrder contentType, MimeRender contentType Order) - => ContentType contentType -- ^ request content-type ('MimeType') - -> Accept accept -- ^ request accept ('MimeType') - -> Order -- ^ "body" - order placed for purchasing the pet - -> SwaggerPetstoreRequest PlaceOrder contentType Order accept -placeOrder _ _ body = - _mkRequest "POST" ["/store/order"] - `setBodyParam` body - -data PlaceOrder - --- | /Body Param/ "body" - order placed for purchasing the pet -instance HasBodyParam PlaceOrder Order --- | @application/xml@ -instance Produces PlaceOrder MimeXML --- | @application/json@ -instance Produces PlaceOrder MimeJSON - - \ No newline at end of file +placeOrder + :: (Consumes PlaceOrder contentType, MimeRender contentType Order) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> Order -- ^ "body" - order placed for purchasing the pet + -> SwaggerPetstoreRequest PlaceOrder contentType Order accept +placeOrder _ _ body = + _mkRequest "POST" ["/store/order"] + `setBodyParam` body + +data PlaceOrder + +-- | /Body Param/ "body" - order placed for purchasing the pet +instance HasBodyParam PlaceOrder Order +-- | @application/xml@ +instance Produces PlaceOrder MimeXML +-- | @application/json@ +instance Produces PlaceOrder MimeJSON + + \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.ModelLens.html b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.ModelLens.html index 23322d2979d..676f94d45e4 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.ModelLens.html +++ b/samples/client/petstore/haskell-http-client/docs/src/SwaggerPetstore.ModelLens.html @@ -41,12 +41,12 @@ Module : SwaggerPetstore.Lens -- | 'additionalPropertiesClassMapProperty' Lens additionalPropertiesClassMapPropertyL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String Text)) -additionalPropertiesClassMapPropertyL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapProperty -> AdditionalPropertiesClass { additionalPropertiesClassMapProperty, ..} ) <$> f additionalPropertiesClassMapProperty +additionalPropertiesClassMapPropertyL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapProperty -> AdditionalPropertiesClass { additionalPropertiesClassMapProperty, ..} ) <$> f additionalPropertiesClassMapProperty {-# INLINE additionalPropertiesClassMapPropertyL #-} -- | 'additionalPropertiesClassMapOfMapProperty' Lens additionalPropertiesClassMapOfMapPropertyL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String (Map.Map String Text))) -additionalPropertiesClassMapOfMapPropertyL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapOfMapProperty -> AdditionalPropertiesClass { additionalPropertiesClassMapOfMapProperty, ..} ) <$> f additionalPropertiesClassMapOfMapProperty +additionalPropertiesClassMapOfMapPropertyL f AdditionalPropertiesClass{..} = (\additionalPropertiesClassMapOfMapProperty -> AdditionalPropertiesClass { additionalPropertiesClassMapOfMapProperty, ..} ) <$> f additionalPropertiesClassMapOfMapProperty {-# INLINE additionalPropertiesClassMapOfMapPropertyL #-} @@ -55,12 +55,12 @@ Module : SwaggerPetstore.Lens -- | 'animalClassName' Lens animalClassNameL :: Lens_' Animal (Text) -animalClassNameL f Animal{..} = (\animalClassName -> Animal { animalClassName, ..} ) <$> f animalClassName +animalClassNameL f Animal{..} = (\animalClassName -> Animal { animalClassName, ..} ) <$> f animalClassName {-# INLINE animalClassNameL #-} -- | 'animalColor' Lens animalColorL :: Lens_' Animal (Maybe Text) -animalColorL f Animal{..} = (\animalColor -> Animal { animalColor, ..} ) <$> f animalColor +animalColorL f Animal{..} = (\animalColor -> Animal { animalColor, ..} ) <$> f animalColor {-# INLINE animalColorL #-} @@ -73,17 +73,17 @@ Module : SwaggerPetstore.Lens -- | 'apiResponseCode' Lens apiResponseCodeL :: Lens_' ApiResponse (Maybe Int) -apiResponseCodeL f ApiResponse{..} = (\apiResponseCode -> ApiResponse { apiResponseCode, ..} ) <$> f apiResponseCode +apiResponseCodeL f ApiResponse{..} = (\apiResponseCode -> ApiResponse { apiResponseCode, ..} ) <$> f apiResponseCode {-# INLINE apiResponseCodeL #-} -- | 'apiResponseType' Lens apiResponseTypeL :: Lens_' ApiResponse (Maybe Text) -apiResponseTypeL f ApiResponse{..} = (\apiResponseType -> ApiResponse { apiResponseType, ..} ) <$> f apiResponseType +apiResponseTypeL f ApiResponse{..} = (\apiResponseType -> ApiResponse { apiResponseType, ..} ) <$> f apiResponseType {-# INLINE apiResponseTypeL #-} -- | 'apiResponseMessage' Lens apiResponseMessageL :: Lens_' ApiResponse (Maybe Text) -apiResponseMessageL f ApiResponse{..} = (\apiResponseMessage -> ApiResponse { apiResponseMessage, ..} ) <$> f apiResponseMessage +apiResponseMessageL f ApiResponse{..} = (\apiResponseMessage -> ApiResponse { apiResponseMessage, ..} ) <$> f apiResponseMessage {-# INLINE apiResponseMessageL #-} @@ -92,7 +92,7 @@ Module : SwaggerPetstore.Lens -- | 'arrayOfArrayOfNumberOnlyArrayArrayNumber' Lens arrayOfArrayOfNumberOnlyArrayArrayNumberL :: Lens_' ArrayOfArrayOfNumberOnly (Maybe [[Double]]) -arrayOfArrayOfNumberOnlyArrayArrayNumberL f ArrayOfArrayOfNumberOnly{..} = (\arrayOfArrayOfNumberOnlyArrayArrayNumber -> ArrayOfArrayOfNumberOnly { arrayOfArrayOfNumberOnlyArrayArrayNumber, ..} ) <$> f arrayOfArrayOfNumberOnlyArrayArrayNumber +arrayOfArrayOfNumberOnlyArrayArrayNumberL f ArrayOfArrayOfNumberOnly{..} = (\arrayOfArrayOfNumberOnlyArrayArrayNumber -> ArrayOfArrayOfNumberOnly { arrayOfArrayOfNumberOnlyArrayArrayNumber, ..} ) <$> f arrayOfArrayOfNumberOnlyArrayArrayNumber {-# INLINE arrayOfArrayOfNumberOnlyArrayArrayNumberL #-} @@ -101,7 +101,7 @@ Module : SwaggerPetstore.Lens -- | 'arrayOfNumberOnlyArrayNumber' Lens arrayOfNumberOnlyArrayNumberL :: Lens_' ArrayOfNumberOnly (Maybe [Double]) -arrayOfNumberOnlyArrayNumberL f ArrayOfNumberOnly{..} = (\arrayOfNumberOnlyArrayNumber -> ArrayOfNumberOnly { arrayOfNumberOnlyArrayNumber, ..} ) <$> f arrayOfNumberOnlyArrayNumber +arrayOfNumberOnlyArrayNumberL f ArrayOfNumberOnly{..} = (\arrayOfNumberOnlyArrayNumber -> ArrayOfNumberOnly { arrayOfNumberOnlyArrayNumber, ..} ) <$> f arrayOfNumberOnlyArrayNumber {-# INLINE arrayOfNumberOnlyArrayNumberL #-} @@ -110,17 +110,17 @@ Module : SwaggerPetstore.Lens -- | 'arrayTestArrayOfString' Lens arrayTestArrayOfStringL :: Lens_' ArrayTest (Maybe [Text]) -arrayTestArrayOfStringL f ArrayTest{..} = (\arrayTestArrayOfString -> ArrayTest { arrayTestArrayOfString, ..} ) <$> f arrayTestArrayOfString +arrayTestArrayOfStringL f ArrayTest{..} = (\arrayTestArrayOfString -> ArrayTest { arrayTestArrayOfString, ..} ) <$> f arrayTestArrayOfString {-# INLINE arrayTestArrayOfStringL #-} -- | 'arrayTestArrayArrayOfInteger' Lens arrayTestArrayArrayOfIntegerL :: Lens_' ArrayTest (Maybe [[Integer]]) -arrayTestArrayArrayOfIntegerL f ArrayTest{..} = (\arrayTestArrayArrayOfInteger -> ArrayTest { arrayTestArrayArrayOfInteger, ..} ) <$> f arrayTestArrayArrayOfInteger +arrayTestArrayArrayOfIntegerL f ArrayTest{..} = (\arrayTestArrayArrayOfInteger -> ArrayTest { arrayTestArrayArrayOfInteger, ..} ) <$> f arrayTestArrayArrayOfInteger {-# INLINE arrayTestArrayArrayOfIntegerL #-} -- | 'arrayTestArrayArrayOfModel' Lens arrayTestArrayArrayOfModelL :: Lens_' ArrayTest (Maybe [[ReadOnlyFirst]]) -arrayTestArrayArrayOfModelL f ArrayTest{..} = (\arrayTestArrayArrayOfModel -> ArrayTest { arrayTestArrayArrayOfModel, ..} ) <$> f arrayTestArrayArrayOfModel +arrayTestArrayArrayOfModelL f ArrayTest{..} = (\arrayTestArrayArrayOfModel -> ArrayTest { arrayTestArrayArrayOfModel, ..} ) <$> f arrayTestArrayArrayOfModel {-# INLINE arrayTestArrayArrayOfModelL #-} @@ -129,32 +129,32 @@ Module : SwaggerPetstore.Lens -- | 'capitalizationSmallCamel' Lens capitalizationSmallCamelL :: Lens_' Capitalization (Maybe Text) -capitalizationSmallCamelL f Capitalization{..} = (\capitalizationSmallCamel -> Capitalization { capitalizationSmallCamel, ..} ) <$> f capitalizationSmallCamel +capitalizationSmallCamelL f Capitalization{..} = (\capitalizationSmallCamel -> Capitalization { capitalizationSmallCamel, ..} ) <$> f capitalizationSmallCamel {-# INLINE capitalizationSmallCamelL #-} -- | 'capitalizationCapitalCamel' Lens capitalizationCapitalCamelL :: Lens_' Capitalization (Maybe Text) -capitalizationCapitalCamelL f Capitalization{..} = (\capitalizationCapitalCamel -> Capitalization { capitalizationCapitalCamel, ..} ) <$> f capitalizationCapitalCamel +capitalizationCapitalCamelL f Capitalization{..} = (\capitalizationCapitalCamel -> Capitalization { capitalizationCapitalCamel, ..} ) <$> f capitalizationCapitalCamel {-# INLINE capitalizationCapitalCamelL #-} -- | 'capitalizationSmallSnake' Lens capitalizationSmallSnakeL :: Lens_' Capitalization (Maybe Text) -capitalizationSmallSnakeL f Capitalization{..} = (\capitalizationSmallSnake -> Capitalization { capitalizationSmallSnake, ..} ) <$> f capitalizationSmallSnake +capitalizationSmallSnakeL f Capitalization{..} = (\capitalizationSmallSnake -> Capitalization { capitalizationSmallSnake, ..} ) <$> f capitalizationSmallSnake {-# INLINE capitalizationSmallSnakeL #-} -- | 'capitalizationCapitalSnake' Lens capitalizationCapitalSnakeL :: Lens_' Capitalization (Maybe Text) -capitalizationCapitalSnakeL f Capitalization{..} = (\capitalizationCapitalSnake -> Capitalization { capitalizationCapitalSnake, ..} ) <$> f capitalizationCapitalSnake +capitalizationCapitalSnakeL f Capitalization{..} = (\capitalizationCapitalSnake -> Capitalization { capitalizationCapitalSnake, ..} ) <$> f capitalizationCapitalSnake {-# INLINE capitalizationCapitalSnakeL #-} -- | 'capitalizationScaEthFlowPoints' Lens capitalizationScaEthFlowPointsL :: Lens_' Capitalization (Maybe Text) -capitalizationScaEthFlowPointsL f Capitalization{..} = (\capitalizationScaEthFlowPoints -> Capitalization { capitalizationScaEthFlowPoints, ..} ) <$> f capitalizationScaEthFlowPoints +capitalizationScaEthFlowPointsL f Capitalization{..} = (\capitalizationScaEthFlowPoints -> Capitalization { capitalizationScaEthFlowPoints, ..} ) <$> f capitalizationScaEthFlowPoints {-# INLINE capitalizationScaEthFlowPointsL #-} -- | 'capitalizationAttName' Lens capitalizationAttNameL :: Lens_' Capitalization (Maybe Text) -capitalizationAttNameL f Capitalization{..} = (\capitalizationAttName -> Capitalization { capitalizationAttName, ..} ) <$> f capitalizationAttName +capitalizationAttNameL f Capitalization{..} = (\capitalizationAttName -> Capitalization { capitalizationAttName, ..} ) <$> f capitalizationAttName {-# INLINE capitalizationAttNameL #-} @@ -163,12 +163,12 @@ Module : SwaggerPetstore.Lens -- | 'categoryId' Lens categoryIdL :: Lens_' Category (Maybe Integer) -categoryIdL f Category{..} = (\categoryId -> Category { categoryId, ..} ) <$> f categoryId +categoryIdL f Category{..} = (\categoryId -> Category { categoryId, ..} ) <$> f categoryId {-# INLINE categoryIdL #-} -- | 'categoryName' Lens categoryNameL :: Lens_' Category (Maybe Text) -categoryNameL f Category{..} = (\categoryName -> Category { categoryName, ..} ) <$> f categoryName +categoryNameL f Category{..} = (\categoryName -> Category { categoryName, ..} ) <$> f categoryName {-# INLINE categoryNameL #-} @@ -177,7 +177,7 @@ Module : SwaggerPetstore.Lens -- | 'classModelClass' Lens classModelClassL :: Lens_' ClassModel (Maybe Text) -classModelClassL f ClassModel{..} = (\classModelClass -> ClassModel { classModelClass, ..} ) <$> f classModelClass +classModelClassL f ClassModel{..} = (\classModelClass -> ClassModel { classModelClass, ..} ) <$> f classModelClass {-# INLINE classModelClassL #-} @@ -186,7 +186,7 @@ Module : SwaggerPetstore.Lens -- | 'clientClient' Lens clientClientL :: Lens_' Client (Maybe Text) -clientClientL f Client{..} = (\clientClient -> Client { clientClient, ..} ) <$> f clientClient +clientClientL f Client{..} = (\clientClient -> Client { clientClient, ..} ) <$> f clientClient {-# INLINE clientClientL #-} @@ -195,12 +195,12 @@ Module : SwaggerPetstore.Lens -- | 'enumArraysJustSymbol' Lens enumArraysJustSymbolL :: Lens_' EnumArrays (Maybe E'JustSymbol) -enumArraysJustSymbolL f EnumArrays{..} = (\enumArraysJustSymbol -> EnumArrays { enumArraysJustSymbol, ..} ) <$> f enumArraysJustSymbol +enumArraysJustSymbolL f EnumArrays{..} = (\enumArraysJustSymbol -> EnumArrays { enumArraysJustSymbol, ..} ) <$> f enumArraysJustSymbol {-# INLINE enumArraysJustSymbolL #-} -- | 'enumArraysArrayEnum' Lens enumArraysArrayEnumL :: Lens_' EnumArrays (Maybe [E'ArrayEnum]) -enumArraysArrayEnumL f EnumArrays{..} = (\enumArraysArrayEnum -> EnumArrays { enumArraysArrayEnum, ..} ) <$> f enumArraysArrayEnum +enumArraysArrayEnumL f EnumArrays{..} = (\enumArraysArrayEnum -> EnumArrays { enumArraysArrayEnum, ..} ) <$> f enumArraysArrayEnum {-# INLINE enumArraysArrayEnumL #-} @@ -213,22 +213,22 @@ Module : SwaggerPetstore.Lens -- | 'enumTestEnumString' Lens enumTestEnumStringL :: Lens_' EnumTest (Maybe E'EnumString) -enumTestEnumStringL f EnumTest{..} = (\enumTestEnumString -> EnumTest { enumTestEnumString, ..} ) <$> f enumTestEnumString +enumTestEnumStringL f EnumTest{..} = (\enumTestEnumString -> EnumTest { enumTestEnumString, ..} ) <$> f enumTestEnumString {-# INLINE enumTestEnumStringL #-} -- | 'enumTestEnumInteger' Lens enumTestEnumIntegerL :: Lens_' EnumTest (Maybe E'EnumInteger) -enumTestEnumIntegerL f EnumTest{..} = (\enumTestEnumInteger -> EnumTest { enumTestEnumInteger, ..} ) <$> f enumTestEnumInteger +enumTestEnumIntegerL f EnumTest{..} = (\enumTestEnumInteger -> EnumTest { enumTestEnumInteger, ..} ) <$> f enumTestEnumInteger {-# INLINE enumTestEnumIntegerL #-} -- | 'enumTestEnumNumber' Lens enumTestEnumNumberL :: Lens_' EnumTest (Maybe E'EnumNumber) -enumTestEnumNumberL f EnumTest{..} = (\enumTestEnumNumber -> EnumTest { enumTestEnumNumber, ..} ) <$> f enumTestEnumNumber +enumTestEnumNumberL f EnumTest{..} = (\enumTestEnumNumber -> EnumTest { enumTestEnumNumber, ..} ) <$> f enumTestEnumNumber {-# INLINE enumTestEnumNumberL #-} -- | 'enumTestOuterEnum' Lens enumTestOuterEnumL :: Lens_' EnumTest (Maybe OuterEnum) -enumTestOuterEnumL f EnumTest{..} = (\enumTestOuterEnum -> EnumTest { enumTestOuterEnum, ..} ) <$> f enumTestOuterEnum +enumTestOuterEnumL f EnumTest{..} = (\enumTestOuterEnum -> EnumTest { enumTestOuterEnum, ..} ) <$> f enumTestOuterEnum {-# INLINE enumTestOuterEnumL #-} @@ -237,67 +237,67 @@ Module : SwaggerPetstore.Lens -- | 'formatTestInteger' Lens formatTestIntegerL :: Lens_' FormatTest (Maybe Int) -formatTestIntegerL f FormatTest{..} = (\formatTestInteger -> FormatTest { formatTestInteger, ..} ) <$> f formatTestInteger +formatTestIntegerL f FormatTest{..} = (\formatTestInteger -> FormatTest { formatTestInteger, ..} ) <$> f formatTestInteger {-# INLINE formatTestIntegerL #-} -- | 'formatTestInt32' Lens formatTestInt32L :: Lens_' FormatTest (Maybe Int) -formatTestInt32L f FormatTest{..} = (\formatTestInt32 -> FormatTest { formatTestInt32, ..} ) <$> f formatTestInt32 +formatTestInt32L f FormatTest{..} = (\formatTestInt32 -> FormatTest { formatTestInt32, ..} ) <$> f formatTestInt32 {-# INLINE formatTestInt32L #-} -- | 'formatTestInt64' Lens formatTestInt64L :: Lens_' FormatTest (Maybe Integer) -formatTestInt64L f FormatTest{..} = (\formatTestInt64 -> FormatTest { formatTestInt64, ..} ) <$> f formatTestInt64 +formatTestInt64L f FormatTest{..} = (\formatTestInt64 -> FormatTest { formatTestInt64, ..} ) <$> f formatTestInt64 {-# INLINE formatTestInt64L #-} -- | 'formatTestNumber' Lens formatTestNumberL :: Lens_' FormatTest (Double) -formatTestNumberL f FormatTest{..} = (\formatTestNumber -> FormatTest { formatTestNumber, ..} ) <$> f formatTestNumber +formatTestNumberL f FormatTest{..} = (\formatTestNumber -> FormatTest { formatTestNumber, ..} ) <$> f formatTestNumber {-# INLINE formatTestNumberL #-} -- | 'formatTestFloat' Lens formatTestFloatL :: Lens_' FormatTest (Maybe Float) -formatTestFloatL f FormatTest{..} = (\formatTestFloat -> FormatTest { formatTestFloat, ..} ) <$> f formatTestFloat +formatTestFloatL f FormatTest{..} = (\formatTestFloat -> FormatTest { formatTestFloat, ..} ) <$> f formatTestFloat {-# INLINE formatTestFloatL #-} -- | 'formatTestDouble' Lens formatTestDoubleL :: Lens_' FormatTest (Maybe Double) -formatTestDoubleL f FormatTest{..} = (\formatTestDouble -> FormatTest { formatTestDouble, ..} ) <$> f formatTestDouble +formatTestDoubleL f FormatTest{..} = (\formatTestDouble -> FormatTest { formatTestDouble, ..} ) <$> f formatTestDouble {-# INLINE formatTestDoubleL #-} -- | 'formatTestString' Lens formatTestStringL :: Lens_' FormatTest (Maybe Text) -formatTestStringL f FormatTest{..} = (\formatTestString -> FormatTest { formatTestString, ..} ) <$> f formatTestString +formatTestStringL f FormatTest{..} = (\formatTestString -> FormatTest { formatTestString, ..} ) <$> f formatTestString {-# INLINE formatTestStringL #-} -- | 'formatTestByte' Lens formatTestByteL :: Lens_' FormatTest (ByteArray) -formatTestByteL f FormatTest{..} = (\formatTestByte -> FormatTest { formatTestByte, ..} ) <$> f formatTestByte +formatTestByteL f FormatTest{..} = (\formatTestByte -> FormatTest { formatTestByte, ..} ) <$> f formatTestByte {-# INLINE formatTestByteL #-} -- | 'formatTestBinary' Lens formatTestBinaryL :: Lens_' FormatTest (Maybe Binary) -formatTestBinaryL f FormatTest{..} = (\formatTestBinary -> FormatTest { formatTestBinary, ..} ) <$> f formatTestBinary +formatTestBinaryL f FormatTest{..} = (\formatTestBinary -> FormatTest { formatTestBinary, ..} ) <$> f formatTestBinary {-# INLINE formatTestBinaryL #-} -- | 'formatTestDate' Lens formatTestDateL :: Lens_' FormatTest (Date) -formatTestDateL f FormatTest{..} = (\formatTestDate -> FormatTest { formatTestDate, ..} ) <$> f formatTestDate +formatTestDateL f FormatTest{..} = (\formatTestDate -> FormatTest { formatTestDate, ..} ) <$> f formatTestDate {-# INLINE formatTestDateL #-} -- | 'formatTestDateTime' Lens formatTestDateTimeL :: Lens_' FormatTest (Maybe DateTime) -formatTestDateTimeL f FormatTest{..} = (\formatTestDateTime -> FormatTest { formatTestDateTime, ..} ) <$> f formatTestDateTime +formatTestDateTimeL f FormatTest{..} = (\formatTestDateTime -> FormatTest { formatTestDateTime, ..} ) <$> f formatTestDateTime {-# INLINE formatTestDateTimeL #-} -- | 'formatTestUuid' Lens formatTestUuidL :: Lens_' FormatTest (Maybe Text) -formatTestUuidL f FormatTest{..} = (\formatTestUuid -> FormatTest { formatTestUuid, ..} ) <$> f formatTestUuid +formatTestUuidL f FormatTest{..} = (\formatTestUuid -> FormatTest { formatTestUuid, ..} ) <$> f formatTestUuid {-# INLINE formatTestUuidL #-} -- | 'formatTestPassword' Lens formatTestPasswordL :: Lens_' FormatTest (Text) -formatTestPasswordL f FormatTest{..} = (\formatTestPassword -> FormatTest { formatTestPassword, ..} ) <$> f formatTestPassword +formatTestPasswordL f FormatTest{..} = (\formatTestPassword -> FormatTest { formatTestPassword, ..} ) <$> f formatTestPassword {-# INLINE formatTestPasswordL #-} @@ -306,12 +306,12 @@ Module : SwaggerPetstore.Lens -- | 'hasOnlyReadOnlyBar' Lens hasOnlyReadOnlyBarL :: Lens_' HasOnlyReadOnly (Maybe Text) -hasOnlyReadOnlyBarL f HasOnlyReadOnly{..} = (\hasOnlyReadOnlyBar -> HasOnlyReadOnly { hasOnlyReadOnlyBar, ..} ) <$> f hasOnlyReadOnlyBar +hasOnlyReadOnlyBarL f HasOnlyReadOnly{..} = (\hasOnlyReadOnlyBar -> HasOnlyReadOnly { hasOnlyReadOnlyBar, ..} ) <$> f hasOnlyReadOnlyBar {-# INLINE hasOnlyReadOnlyBarL #-} -- | 'hasOnlyReadOnlyFoo' Lens hasOnlyReadOnlyFooL :: Lens_' HasOnlyReadOnly (Maybe Text) -hasOnlyReadOnlyFooL f HasOnlyReadOnly{..} = (\hasOnlyReadOnlyFoo -> HasOnlyReadOnly { hasOnlyReadOnlyFoo, ..} ) <$> f hasOnlyReadOnlyFoo +hasOnlyReadOnlyFooL f HasOnlyReadOnly{..} = (\hasOnlyReadOnlyFoo -> HasOnlyReadOnly { hasOnlyReadOnlyFoo, ..} ) <$> f hasOnlyReadOnlyFoo {-# INLINE hasOnlyReadOnlyFooL #-} @@ -320,12 +320,12 @@ Module : SwaggerPetstore.Lens -- | 'mapTestMapMapOfString' Lens mapTestMapMapOfStringL :: Lens_' MapTest (Maybe (Map.Map String (Map.Map String Text))) -mapTestMapMapOfStringL f MapTest{..} = (\mapTestMapMapOfString -> MapTest { mapTestMapMapOfString, ..} ) <$> f mapTestMapMapOfString +mapTestMapMapOfStringL f MapTest{..} = (\mapTestMapMapOfString -> MapTest { mapTestMapMapOfString, ..} ) <$> f mapTestMapMapOfString {-# INLINE mapTestMapMapOfStringL #-} -- | 'mapTestMapOfEnumString' Lens mapTestMapOfEnumStringL :: Lens_' MapTest (Maybe (Map.Map String E'Inner)) -mapTestMapOfEnumStringL f MapTest{..} = (\mapTestMapOfEnumString -> MapTest { mapTestMapOfEnumString, ..} ) <$> f mapTestMapOfEnumString +mapTestMapOfEnumStringL f MapTest{..} = (\mapTestMapOfEnumString -> MapTest { mapTestMapOfEnumString, ..} ) <$> f mapTestMapOfEnumString {-# INLINE mapTestMapOfEnumStringL #-} @@ -334,17 +334,17 @@ Module : SwaggerPetstore.Lens -- | 'mixedPropertiesAndAdditionalPropertiesClassUuid' Lens mixedPropertiesAndAdditionalPropertiesClassUuidL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe Text) -mixedPropertiesAndAdditionalPropertiesClassUuidL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassUuid -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassUuid, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassUuid +mixedPropertiesAndAdditionalPropertiesClassUuidL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassUuid -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassUuid, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassUuid {-# INLINE mixedPropertiesAndAdditionalPropertiesClassUuidL #-} -- | 'mixedPropertiesAndAdditionalPropertiesClassDateTime' Lens mixedPropertiesAndAdditionalPropertiesClassDateTimeL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe DateTime) -mixedPropertiesAndAdditionalPropertiesClassDateTimeL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassDateTime -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassDateTime, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassDateTime +mixedPropertiesAndAdditionalPropertiesClassDateTimeL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassDateTime -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassDateTime, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassDateTime {-# INLINE mixedPropertiesAndAdditionalPropertiesClassDateTimeL #-} -- | 'mixedPropertiesAndAdditionalPropertiesClassMap' Lens mixedPropertiesAndAdditionalPropertiesClassMapL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe (Map.Map String Animal)) -mixedPropertiesAndAdditionalPropertiesClassMapL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassMap -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassMap, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassMap +mixedPropertiesAndAdditionalPropertiesClassMapL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassMap -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassMap, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassMap {-# INLINE mixedPropertiesAndAdditionalPropertiesClassMapL #-} @@ -353,12 +353,12 @@ Module : SwaggerPetstore.Lens -- | 'model200ResponseName' Lens model200ResponseNameL :: Lens_' Model200Response (Maybe Int) -model200ResponseNameL f Model200Response{..} = (\model200ResponseName -> Model200Response { model200ResponseName, ..} ) <$> f model200ResponseName +model200ResponseNameL f Model200Response{..} = (\model200ResponseName -> Model200Response { model200ResponseName, ..} ) <$> f model200ResponseName {-# INLINE model200ResponseNameL #-} -- | 'model200ResponseClass' Lens model200ResponseClassL :: Lens_' Model200Response (Maybe Text) -model200ResponseClassL f Model200Response{..} = (\model200ResponseClass -> Model200Response { model200ResponseClass, ..} ) <$> f model200ResponseClass +model200ResponseClassL f Model200Response{..} = (\model200ResponseClass -> Model200Response { model200ResponseClass, ..} ) <$> f model200ResponseClass {-# INLINE model200ResponseClassL #-} @@ -367,7 +367,7 @@ Module : SwaggerPetstore.Lens -- | 'modelList123List' Lens modelList123ListL :: Lens_' ModelList (Maybe Text) -modelList123ListL f ModelList{..} = (\modelList123List -> ModelList { modelList123List, ..} ) <$> f modelList123List +modelList123ListL f ModelList{..} = (\modelList123List -> ModelList { modelList123List, ..} ) <$> f modelList123List {-# INLINE modelList123ListL #-} @@ -376,7 +376,7 @@ Module : SwaggerPetstore.Lens -- | 'modelReturnReturn' Lens modelReturnReturnL :: Lens_' ModelReturn (Maybe Int) -modelReturnReturnL f ModelReturn{..} = (\modelReturnReturn -> ModelReturn { modelReturnReturn, ..} ) <$> f modelReturnReturn +modelReturnReturnL f ModelReturn{..} = (\modelReturnReturn -> ModelReturn { modelReturnReturn, ..} ) <$> f modelReturnReturn {-# INLINE modelReturnReturnL #-} @@ -385,22 +385,22 @@ Module : SwaggerPetstore.Lens -- | 'nameName' Lens nameNameL :: Lens_' Name (Int) -nameNameL f Name{..} = (\nameName -> Name { nameName, ..} ) <$> f nameName +nameNameL f Name{..} = (\nameName -> Name { nameName, ..} ) <$> f nameName {-# INLINE nameNameL #-} -- | 'nameSnakeCase' Lens nameSnakeCaseL :: Lens_' Name (Maybe Int) -nameSnakeCaseL f Name{..} = (\nameSnakeCase -> Name { nameSnakeCase, ..} ) <$> f nameSnakeCase +nameSnakeCaseL f Name{..} = (\nameSnakeCase -> Name { nameSnakeCase, ..} ) <$> f nameSnakeCase {-# INLINE nameSnakeCaseL #-} -- | 'nameProperty' Lens namePropertyL :: Lens_' Name (Maybe Text) -namePropertyL f Name{..} = (\nameProperty -> Name { nameProperty, ..} ) <$> f nameProperty +namePropertyL f Name{..} = (\nameProperty -> Name { nameProperty, ..} ) <$> f nameProperty {-# INLINE namePropertyL #-} -- | 'name123Number' Lens name123NumberL :: Lens_' Name (Maybe Int) -name123NumberL f Name{..} = (\name123Number -> Name { name123Number, ..} ) <$> f name123Number +name123NumberL f Name{..} = (\name123Number -> Name { name123Number, ..} ) <$> f name123Number {-# INLINE name123NumberL #-} @@ -409,7 +409,7 @@ Module : SwaggerPetstore.Lens -- | 'numberOnlyJustNumber' Lens numberOnlyJustNumberL :: Lens_' NumberOnly (Maybe Double) -numberOnlyJustNumberL f NumberOnly{..} = (\numberOnlyJustNumber -> NumberOnly { numberOnlyJustNumber, ..} ) <$> f numberOnlyJustNumber +numberOnlyJustNumberL f NumberOnly{..} = (\numberOnlyJustNumber -> NumberOnly { numberOnlyJustNumber, ..} ) <$> f numberOnlyJustNumber {-# INLINE numberOnlyJustNumberL #-} @@ -418,32 +418,32 @@ Module : SwaggerPetstore.Lens -- | 'orderId' Lens orderIdL :: Lens_' Order (Maybe Integer) -orderIdL f Order{..} = (\orderId -> Order { orderId, ..} ) <$> f orderId +orderIdL f Order{..} = (\orderId -> Order { orderId, ..} ) <$> f orderId {-# INLINE orderIdL #-} -- | 'orderPetId' Lens orderPetIdL :: Lens_' Order (Maybe Integer) -orderPetIdL f Order{..} = (\orderPetId -> Order { orderPetId, ..} ) <$> f orderPetId +orderPetIdL f Order{..} = (\orderPetId -> Order { orderPetId, ..} ) <$> f orderPetId {-# INLINE orderPetIdL #-} -- | 'orderQuantity' Lens orderQuantityL :: Lens_' Order (Maybe Int) -orderQuantityL f Order{..} = (\orderQuantity -> Order { orderQuantity, ..} ) <$> f orderQuantity +orderQuantityL f Order{..} = (\orderQuantity -> Order { orderQuantity, ..} ) <$> f orderQuantity {-# INLINE orderQuantityL #-} -- | 'orderShipDate' Lens orderShipDateL :: Lens_' Order (Maybe DateTime) -orderShipDateL f Order{..} = (\orderShipDate -> Order { orderShipDate, ..} ) <$> f orderShipDate +orderShipDateL f Order{..} = (\orderShipDate -> Order { orderShipDate, ..} ) <$> f orderShipDate {-# INLINE orderShipDateL #-} -- | 'orderStatus' Lens orderStatusL :: Lens_' Order (Maybe E'Status) -orderStatusL f Order{..} = (\orderStatus -> Order { orderStatus, ..} ) <$> f orderStatus +orderStatusL f Order{..} = (\orderStatus -> Order { orderStatus, ..} ) <$> f orderStatus {-# INLINE orderStatusL #-} -- | 'orderComplete' Lens orderCompleteL :: Lens_' Order (Maybe Bool) -orderCompleteL f Order{..} = (\orderComplete -> Order { orderComplete, ..} ) <$> f orderComplete +orderCompleteL f Order{..} = (\orderComplete -> Order { orderComplete, ..} ) <$> f orderComplete {-# INLINE orderCompleteL #-} @@ -456,17 +456,17 @@ Module : SwaggerPetstore.Lens -- | 'outerCompositeMyNumber' Lens outerCompositeMyNumberL :: Lens_' OuterComposite (Maybe OuterNumber) -outerCompositeMyNumberL f OuterComposite{..} = (\outerCompositeMyNumber -> OuterComposite { outerCompositeMyNumber, ..} ) <$> f outerCompositeMyNumber +outerCompositeMyNumberL f OuterComposite{..} = (\outerCompositeMyNumber -> OuterComposite { outerCompositeMyNumber, ..} ) <$> f outerCompositeMyNumber {-# INLINE outerCompositeMyNumberL #-} -- | 'outerCompositeMyString' Lens outerCompositeMyStringL :: Lens_' OuterComposite (Maybe OuterString) -outerCompositeMyStringL f OuterComposite{..} = (\outerCompositeMyString -> OuterComposite { outerCompositeMyString, ..} ) <$> f outerCompositeMyString +outerCompositeMyStringL f OuterComposite{..} = (\outerCompositeMyString -> OuterComposite { outerCompositeMyString, ..} ) <$> f outerCompositeMyString {-# INLINE outerCompositeMyStringL #-} -- | 'outerCompositeMyBoolean' Lens outerCompositeMyBooleanL :: Lens_' OuterComposite (Maybe OuterBoolean) -outerCompositeMyBooleanL f OuterComposite{..} = (\outerCompositeMyBoolean -> OuterComposite { outerCompositeMyBoolean, ..} ) <$> f outerCompositeMyBoolean +outerCompositeMyBooleanL f OuterComposite{..} = (\outerCompositeMyBoolean -> OuterComposite { outerCompositeMyBoolean, ..} ) <$> f outerCompositeMyBoolean {-# INLINE outerCompositeMyBooleanL #-} @@ -487,32 +487,32 @@ Module : SwaggerPetstore.Lens -- | 'petId' Lens petIdL :: Lens_' Pet (Maybe Integer) -petIdL f Pet{..} = (\petId -> Pet { petId, ..} ) <$> f petId +petIdL f Pet{..} = (\petId -> Pet { petId, ..} ) <$> f petId {-# INLINE petIdL #-} -- | 'petCategory' Lens petCategoryL :: Lens_' Pet (Maybe Category) -petCategoryL f Pet{..} = (\petCategory -> Pet { petCategory, ..} ) <$> f petCategory +petCategoryL f Pet{..} = (\petCategory -> Pet { petCategory, ..} ) <$> f petCategory {-# INLINE petCategoryL #-} -- | 'petName' Lens petNameL :: Lens_' Pet (Text) -petNameL f Pet{..} = (\petName -> Pet { petName, ..} ) <$> f petName +petNameL f Pet{..} = (\petName -> Pet { petName, ..} ) <$> f petName {-# INLINE petNameL #-} -- | 'petPhotoUrls' Lens petPhotoUrlsL :: Lens_' Pet ([Text]) -petPhotoUrlsL f Pet{..} = (\petPhotoUrls -> Pet { petPhotoUrls, ..} ) <$> f petPhotoUrls +petPhotoUrlsL f Pet{..} = (\petPhotoUrls -> Pet { petPhotoUrls, ..} ) <$> f petPhotoUrls {-# INLINE petPhotoUrlsL #-} -- | 'petTags' Lens petTagsL :: Lens_' Pet (Maybe [Tag]) -petTagsL f Pet{..} = (\petTags -> Pet { petTags, ..} ) <$> f petTags +petTagsL f Pet{..} = (\petTags -> Pet { petTags, ..} ) <$> f petTags {-# INLINE petTagsL #-} -- | 'petStatus' Lens petStatusL :: Lens_' Pet (Maybe E'Status2) -petStatusL f Pet{..} = (\petStatus -> Pet { petStatus, ..} ) <$> f petStatus +petStatusL f Pet{..} = (\petStatus -> Pet { petStatus, ..} ) <$> f petStatus {-# INLINE petStatusL #-} @@ -521,12 +521,12 @@ Module : SwaggerPetstore.Lens -- | 'readOnlyFirstBar' Lens readOnlyFirstBarL :: Lens_' ReadOnlyFirst (Maybe Text) -readOnlyFirstBarL f ReadOnlyFirst{..} = (\readOnlyFirstBar -> ReadOnlyFirst { readOnlyFirstBar, ..} ) <$> f readOnlyFirstBar +readOnlyFirstBarL f ReadOnlyFirst{..} = (\readOnlyFirstBar -> ReadOnlyFirst { readOnlyFirstBar, ..} ) <$> f readOnlyFirstBar {-# INLINE readOnlyFirstBarL #-} -- | 'readOnlyFirstBaz' Lens readOnlyFirstBazL :: Lens_' ReadOnlyFirst (Maybe Text) -readOnlyFirstBazL f ReadOnlyFirst{..} = (\readOnlyFirstBaz -> ReadOnlyFirst { readOnlyFirstBaz, ..} ) <$> f readOnlyFirstBaz +readOnlyFirstBazL f ReadOnlyFirst{..} = (\readOnlyFirstBaz -> ReadOnlyFirst { readOnlyFirstBaz, ..} ) <$> f readOnlyFirstBaz {-# INLINE readOnlyFirstBazL #-} @@ -535,7 +535,7 @@ Module : SwaggerPetstore.Lens -- | 'specialModelNameSpecialPropertyName' Lens specialModelNameSpecialPropertyNameL :: Lens_' SpecialModelName (Maybe Integer) -specialModelNameSpecialPropertyNameL f SpecialModelName{..} = (\specialModelNameSpecialPropertyName -> SpecialModelName { specialModelNameSpecialPropertyName, ..} ) <$> f specialModelNameSpecialPropertyName +specialModelNameSpecialPropertyNameL f SpecialModelName{..} = (\specialModelNameSpecialPropertyName -> SpecialModelName { specialModelNameSpecialPropertyName, ..} ) <$> f specialModelNameSpecialPropertyName {-# INLINE specialModelNameSpecialPropertyNameL #-} @@ -544,12 +544,12 @@ Module : SwaggerPetstore.Lens -- | 'tagId' Lens tagIdL :: Lens_' Tag (Maybe Integer) -tagIdL f Tag{..} = (\tagId -> Tag { tagId, ..} ) <$> f tagId +tagIdL f Tag{..} = (\tagId -> Tag { tagId, ..} ) <$> f tagId {-# INLINE tagIdL #-} -- | 'tagName' Lens tagNameL :: Lens_' Tag (Maybe Text) -tagNameL f Tag{..} = (\tagName -> Tag { tagName, ..} ) <$> f tagName +tagNameL f Tag{..} = (\tagName -> Tag { tagName, ..} ) <$> f tagName {-# INLINE tagNameL #-} @@ -558,42 +558,42 @@ Module : SwaggerPetstore.Lens -- | 'userId' Lens userIdL :: Lens_' User (Maybe Integer) -userIdL f User{..} = (\userId -> User { userId, ..} ) <$> f userId +userIdL f User{..} = (\userId -> User { userId, ..} ) <$> f userId {-# INLINE userIdL #-} -- | 'userUsername' Lens userUsernameL :: Lens_' User (Maybe Text) -userUsernameL f User{..} = (\userUsername -> User { userUsername, ..} ) <$> f userUsername +userUsernameL f User{..} = (\userUsername -> User { userUsername, ..} ) <$> f userUsername {-# INLINE userUsernameL #-} -- | 'userFirstName' Lens userFirstNameL :: Lens_' User (Maybe Text) -userFirstNameL f User{..} = (\userFirstName -> User { userFirstName, ..} ) <$> f userFirstName +userFirstNameL f User{..} = (\userFirstName -> User { userFirstName, ..} ) <$> f userFirstName {-# INLINE userFirstNameL #-} -- | 'userLastName' Lens userLastNameL :: Lens_' User (Maybe Text) -userLastNameL f User{..} = (\userLastName -> User { userLastName, ..} ) <$> f userLastName +userLastNameL f User{..} = (\userLastName -> User { userLastName, ..} ) <$> f userLastName {-# INLINE userLastNameL #-} -- | 'userEmail' Lens userEmailL :: Lens_' User (Maybe Text) -userEmailL f User{..} = (\userEmail -> User { userEmail, ..} ) <$> f userEmail +userEmailL f User{..} = (\userEmail -> User { userEmail, ..} ) <$> f userEmail {-# INLINE userEmailL #-} -- | 'userPassword' Lens userPasswordL :: Lens_' User (Maybe Text) -userPasswordL f User{..} = (\userPassword -> User { userPassword, ..} ) <$> f userPassword +userPasswordL f User{..} = (\userPassword -> User { userPassword, ..} ) <$> f userPassword {-# INLINE userPasswordL #-} -- | 'userPhone' Lens userPhoneL :: Lens_' User (Maybe Text) -userPhoneL f User{..} = (\userPhone -> User { userPhone, ..} ) <$> f userPhone +userPhoneL f User{..} = (\userPhone -> User { userPhone, ..} ) <$> f userPhone {-# INLINE userPhoneL #-} -- | 'userUserStatus' Lens userUserStatusL :: Lens_' User (Maybe Int) -userUserStatusL f User{..} = (\userUserStatus -> User { userUserStatus, ..} ) <$> f userUserStatus +userUserStatusL f User{..} = (\userUserStatus -> User { userUserStatus, ..} ) <$> f userUserStatus {-# INLINE userUserStatusL #-} @@ -602,17 +602,17 @@ Module : SwaggerPetstore.Lens -- | 'catClassName' Lens catClassNameL :: Lens_' Cat (Text) -catClassNameL f Cat{..} = (\catClassName -> Cat { catClassName, ..} ) <$> f catClassName +catClassNameL f Cat{..} = (\catClassName -> Cat { catClassName, ..} ) <$> f catClassName {-# INLINE catClassNameL #-} -- | 'catColor' Lens catColorL :: Lens_' Cat (Maybe Text) -catColorL f Cat{..} = (\catColor -> Cat { catColor, ..} ) <$> f catColor +catColorL f Cat{..} = (\catColor -> Cat { catColor, ..} ) <$> f catColor {-# INLINE catColorL #-} -- | 'catDeclawed' Lens catDeclawedL :: Lens_' Cat (Maybe Bool) -catDeclawedL f Cat{..} = (\catDeclawed -> Cat { catDeclawed, ..} ) <$> f catDeclawed +catDeclawedL f Cat{..} = (\catDeclawed -> Cat { catDeclawed, ..} ) <$> f catDeclawed {-# INLINE catDeclawedL #-} @@ -621,17 +621,17 @@ Module : SwaggerPetstore.Lens -- | 'dogClassName' Lens dogClassNameL :: Lens_' Dog (Text) -dogClassNameL f Dog{..} = (\dogClassName -> Dog { dogClassName, ..} ) <$> f dogClassName +dogClassNameL f Dog{..} = (\dogClassName -> Dog { dogClassName, ..} ) <$> f dogClassName {-# INLINE dogClassNameL #-} -- | 'dogColor' Lens dogColorL :: Lens_' Dog (Maybe Text) -dogColorL f Dog{..} = (\dogColor -> Dog { dogColor, ..} ) <$> f dogColor +dogColorL f Dog{..} = (\dogColor -> Dog { dogColor, ..} ) <$> f dogColor {-# INLINE dogColorL #-} -- | 'dogBreed' Lens dogBreedL :: Lens_' Dog (Maybe Text) -dogBreedL f Dog{..} = (\dogBreed -> Dog { dogBreed, ..} ) <$> f dogBreed +dogBreedL f Dog{..} = (\dogBreed -> Dog { dogBreed, ..} ) <$> f dogBreed {-# INLINE dogBreedL #-} diff --git a/samples/client/petstore/haskell-http-client/docs/swagger-petstore.txt b/samples/client/petstore/haskell-http-client/docs/swagger-petstore.txt index 4545461bbdd..65bd37a79c0 100644 --- a/samples/client/petstore/haskell-http-client/docs/swagger-petstore.txt +++ b/samples/client/petstore/haskell-http-client/docs/swagger-petstore.txt @@ -2259,7 +2259,7 @@ data DeleteOrder -- Returns a map of status codes to quantities -- -- AuthMethod: AuthApiKeyApiKey -getInventory :: Accept accept -> SwaggerPetstoreRequest GetInventory MimeNoContent ((Map String Int)) accept +getInventory :: SwaggerPetstoreRequest GetInventory MimeNoContent ((Map String Int)) MimeJSON data GetInventory -- |
@@ -2468,7 +2468,7 @@ data UpdatePet
 --   AuthMethod: AuthOAuthPetstoreAuth
 --   
 --   Note: Has Produces instances, but no response schema
-updatePetWithForm :: (Consumes UpdatePetWithForm contentType) => ContentType contentType -> Accept accept -> PetId -> SwaggerPetstoreRequest UpdatePetWithForm contentType res accept
+updatePetWithForm :: (Consumes UpdatePetWithForm MimeFormUrlEncoded) => Accept accept -> PetId -> SwaggerPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded res accept
 data UpdatePetWithForm
 
 -- | Optional Param "name" - Updated name of the pet
@@ -2494,7 +2494,7 @@ data UpdatePetWithForm
 --   uploads an image
 --   
 --   AuthMethod: AuthOAuthPetstoreAuth
-uploadFile :: (Consumes UploadFile contentType) => ContentType contentType -> Accept accept -> PetId -> SwaggerPetstoreRequest UploadFile contentType ApiResponse accept
+uploadFile :: (Consumes UploadFile MimeMultipartFormData) => PetId -> SwaggerPetstoreRequest UploadFile MimeMultipartFormData ApiResponse MimeJSON
 data UploadFile
 
 -- | Optional Param "additionalMetadata" - Additional data to pass
@@ -2548,7 +2548,7 @@ module SwaggerPetstore.API.FakeClassnameTags123
 --   To test class name in snake case
 --   
 --   AuthMethod: AuthApiKeyApiKeyQuery
-testClassname :: (Consumes TestClassname contentType, MimeRender contentType Client) => ContentType contentType -> Accept accept -> Client -> SwaggerPetstoreRequest TestClassname contentType Client accept
+testClassname :: (Consumes TestClassname MimeJSON, MimeRender MimeJSON Client) => Client -> SwaggerPetstoreRequest TestClassname MimeJSON Client MimeJSON
 data TestClassname
 
 -- | Body Param "body" - client model
@@ -2614,7 +2614,7 @@ data FakeOuterStringSerialize
 --   To test "client" model
 --   
 --   To test "client" model
-testClientModel :: (Consumes TestClientModel contentType, MimeRender contentType Client) => ContentType contentType -> Accept accept -> Client -> SwaggerPetstoreRequest TestClientModel contentType Client accept
+testClientModel :: (Consumes TestClientModel MimeJSON, MimeRender MimeJSON Client) => Client -> SwaggerPetstoreRequest TestClientModel MimeJSON Client MimeJSON
 data TestClientModel
 
 -- | Body Param "body" - client model
@@ -2726,7 +2726,7 @@ data TestEnumParameters
 --   
-- -- test inline additionalProperties -testInlineAdditionalProperties :: (Consumes TestInlineAdditionalProperties contentType, MimeRender contentType Value) => ContentType contentType -> Value -> SwaggerPetstoreRequest TestInlineAdditionalProperties contentType NoContent MimeNoContent +testInlineAdditionalProperties :: (Consumes TestInlineAdditionalProperties MimeJSON, MimeRender MimeJSON Value) => Value -> SwaggerPetstoreRequest TestInlineAdditionalProperties MimeJSON NoContent MimeNoContent data TestInlineAdditionalProperties -- | Body Param "param" - request body @@ -2740,7 +2740,7 @@ data TestInlineAdditionalProperties -- -- -- test json serialization of form data -testJsonFormData :: (Consumes TestJsonFormData contentType) => ContentType contentType -> Param -> Param2 -> SwaggerPetstoreRequest TestJsonFormData contentType NoContent MimeNoContent +testJsonFormData :: (Consumes TestJsonFormData MimeJSON) => Param -> Param2 -> SwaggerPetstoreRequest TestJsonFormData MimeJSON NoContent MimeNoContent data TestJsonFormData -- |
@@ -2791,7 +2791,7 @@ module SwaggerPetstore.API.AnotherFake
 --   To test special tags
 --   
 --   To test special tags
-testSpecialTags :: (Consumes TestSpecialTags contentType, MimeRender contentType Client) => ContentType contentType -> Accept accept -> Client -> SwaggerPetstoreRequest TestSpecialTags contentType Client accept
+testSpecialTags :: (Consumes TestSpecialTags MimeJSON, MimeRender MimeJSON Client) => Client -> SwaggerPetstoreRequest TestSpecialTags MimeJSON Client MimeJSON
 data TestSpecialTags
 
 -- | Body Param "body" - client model
diff --git a/samples/client/petstore/haskell-http-client/example-app/Main.hs b/samples/client/petstore/haskell-http-client/example-app/Main.hs
index 3518b97a3ef..f53bc6f7ba8 100644
--- a/samples/client/petstore/haskell-http-client/example-app/Main.hs
+++ b/samples/client/petstore/haskell-http-client/example-app/Main.hs
@@ -128,13 +128,13 @@ runPet mgr config = do
         --   -- Defined in ‘SwaggerPetstore.API’
         -- instance S.HasOptionalParam S.UpdatePetWithForm S.Status
         --   -- Defined in ‘SwaggerPetstore.API’
-        let updatePetWithFormRequest = S.updatePetWithForm (S.ContentType S.MimeFormUrlEncoded) (S.Accept S.MimeJSON) (S.PetId pid)
+        let updatePetWithFormRequest = S.updatePetWithForm (S.Accept S.MimeJSON) (S.PetId pid)
                 `S.applyOptionalParam` S.Name2 "petName"
                 `S.applyOptionalParam` S.StatusText "pending"
         _ <- S.dispatchLbs mgr config updatePetWithFormRequest 
 
         -- multipart/form-data file uploads are just a different content-type
-        let uploadFileRequest = S.uploadFile (S.ContentType S.MimeMultipartFormData) (S.Accept S.MimeJSON) (S.PetId pid)
+        let uploadFileRequest = S.uploadFile (S.PetId pid)
                 `S.applyOptionalParam` S.File "package.yaml" -- the file contents of the path are read when dispatched
                 `S.applyOptionalParam` S.AdditionalMetadata "a package.yaml file"
         uploadFileRequestResult <- S.dispatchMime mgr config uploadFileRequest 
@@ -163,7 +163,7 @@ runStore :: NH.Manager -> S.SwaggerPetstoreConfig -> IO ()
 runStore mgr config = do
 
   -- we can set arbitrary headers with setHeader
-  let getInventoryRequest = S.getInventory (S.Accept S.MimeJSON) 
+  let getInventoryRequest = S.getInventory
         `S.setHeader` [("random-header","random-value")] 
   getInventoryRequestRequestResult <- S.dispatchMime mgr config getInventoryRequest
   mapM_ (\r -> putStrLn $ "getInventoryRequest: found " <> (show . length) r <> " results") getInventoryRequestRequestResult
diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/AnotherFake.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/AnotherFake.hs
index 987a70b318d..80fb42d26dc 100644
--- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/AnotherFake.hs
+++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/AnotherFake.hs
@@ -67,12 +67,10 @@ import qualified Prelude as P
 -- To test special tags
 -- 
 testSpecialTags 
-  :: (Consumes TestSpecialTags contentType, MimeRender contentType Client)
-  => ContentType contentType -- ^ request content-type ('MimeType')
-  -> Accept accept -- ^ request accept ('MimeType')
-  -> Client -- ^ "body" -  client model
-  -> SwaggerPetstoreRequest TestSpecialTags contentType Client accept
-testSpecialTags _  _ body =
+  :: (Consumes TestSpecialTags MimeJSON, MimeRender MimeJSON Client)
+  => Client -- ^ "body" -  client model
+  -> SwaggerPetstoreRequest TestSpecialTags MimeJSON Client MimeJSON
+testSpecialTags body =
   _mkRequest "PATCH" ["/another-fake/dummy"]
     `setBodyParam` body
 
diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Fake.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Fake.hs
index 939c7f35dea..0036ade1008 100644
--- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Fake.hs
+++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Fake.hs
@@ -143,12 +143,10 @@ instance HasBodyParam FakeOuterStringSerialize OuterString
 -- To test \"client\" model
 -- 
 testClientModel 
-  :: (Consumes TestClientModel contentType, MimeRender contentType Client)
-  => ContentType contentType -- ^ request content-type ('MimeType')
-  -> Accept accept -- ^ request accept ('MimeType')
-  -> Client -- ^ "body" -  client model
-  -> SwaggerPetstoreRequest TestClientModel contentType Client accept
-testClientModel _  _ body =
+  :: (Consumes TestClientModel MimeJSON, MimeRender MimeJSON Client)
+  => Client -- ^ "body" -  client model
+  -> SwaggerPetstoreRequest TestClientModel MimeJSON Client MimeJSON
+testClientModel body =
   _mkRequest "PATCH" ["/fake"]
     `setBodyParam` body
 
@@ -332,11 +330,10 @@ instance MimeType mtype => Produces TestEnumParameters mtype
 -- 
 -- 
 testInlineAdditionalProperties 
-  :: (Consumes TestInlineAdditionalProperties contentType, MimeRender contentType A.Value)
-  => ContentType contentType -- ^ request content-type ('MimeType')
-  -> A.Value -- ^ "param" -  request body
-  -> SwaggerPetstoreRequest TestInlineAdditionalProperties contentType NoContent MimeNoContent
-testInlineAdditionalProperties _ param =
+  :: (Consumes TestInlineAdditionalProperties MimeJSON, MimeRender MimeJSON A.Value)
+  => A.Value -- ^ "param" -  request body
+  -> SwaggerPetstoreRequest TestInlineAdditionalProperties MimeJSON NoContent MimeNoContent
+testInlineAdditionalProperties param =
   _mkRequest "POST" ["/fake/inline-additionalProperties"]
     `setBodyParam` param
 
@@ -358,12 +355,11 @@ instance Consumes TestInlineAdditionalProperties MimeJSON
 -- 
 -- 
 testJsonFormData 
-  :: (Consumes TestJsonFormData contentType)
-  => ContentType contentType -- ^ request content-type ('MimeType')
-  -> Param -- ^ "param" -  field1
+  :: (Consumes TestJsonFormData MimeJSON)
+  => Param -- ^ "param" -  field1
   -> Param2 -- ^ "param2" -  field2
-  -> SwaggerPetstoreRequest TestJsonFormData contentType NoContent MimeNoContent
-testJsonFormData _ (Param param) (Param2 param2) =
+  -> SwaggerPetstoreRequest TestJsonFormData MimeJSON NoContent MimeNoContent
+testJsonFormData (Param param) (Param2 param2) =
   _mkRequest "GET" ["/fake/jsonFormData"]
     `addForm` toForm ("param", param)
     `addForm` toForm ("param2", param2)
diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/FakeClassnameTags123.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/FakeClassnameTags123.hs
index c5cf335cf98..8d588bb8f8f 100644
--- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/FakeClassnameTags123.hs
+++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/FakeClassnameTags123.hs
@@ -67,12 +67,10 @@ import qualified Prelude as P
 -- AuthMethod: 'AuthApiKeyApiKeyQuery'
 -- 
 testClassname 
-  :: (Consumes TestClassname contentType, MimeRender contentType Client)
-  => ContentType contentType -- ^ request content-type ('MimeType')
-  -> Accept accept -- ^ request accept ('MimeType')
-  -> Client -- ^ "body" -  client model
-  -> SwaggerPetstoreRequest TestClassname contentType Client accept
-testClassname _  _ body =
+  :: (Consumes TestClassname MimeJSON, MimeRender MimeJSON Client)
+  => Client -- ^ "body" -  client model
+  -> SwaggerPetstoreRequest TestClassname MimeJSON Client MimeJSON
+testClassname body =
   _mkRequest "PATCH" ["/fake_classname_test"]
     `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKeyQuery)
     `setBodyParam` body
diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Pet.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Pet.hs
index 5491c9b26c3..d9b8329bbf0 100644
--- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Pet.hs
+++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Pet.hs
@@ -258,12 +258,11 @@ instance Produces UpdatePet MimeJSON
 -- Note: Has 'Produces' instances, but no response schema
 -- 
 updatePetWithForm 
-  :: (Consumes UpdatePetWithForm contentType)
-  => ContentType contentType -- ^ request content-type ('MimeType')
-  -> Accept accept -- ^ request accept ('MimeType')
+  :: (Consumes UpdatePetWithForm MimeFormUrlEncoded)
+  => Accept accept -- ^ request accept ('MimeType')
   -> PetId -- ^ "petId" -  ID of pet that needs to be updated
-  -> SwaggerPetstoreRequest UpdatePetWithForm contentType res accept
-updatePetWithForm _  _ (PetId petId) =
+  -> SwaggerPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded res accept
+updatePetWithForm  _ (PetId petId) =
   _mkRequest "POST" ["/pet/",toPath petId]
     `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
 
@@ -299,12 +298,10 @@ instance Produces UpdatePetWithForm MimeJSON
 -- AuthMethod: 'AuthOAuthPetstoreAuth'
 -- 
 uploadFile 
-  :: (Consumes UploadFile contentType)
-  => ContentType contentType -- ^ request content-type ('MimeType')
-  -> Accept accept -- ^ request accept ('MimeType')
-  -> PetId -- ^ "petId" -  ID of pet to update
-  -> SwaggerPetstoreRequest UploadFile contentType ApiResponse accept
-uploadFile _  _ (PetId petId) =
+  :: (Consumes UploadFile MimeMultipartFormData)
+  => PetId -- ^ "petId" -  ID of pet to update
+  -> SwaggerPetstoreRequest UploadFile MimeMultipartFormData ApiResponse MimeJSON
+uploadFile (PetId petId) =
   _mkRequest "POST" ["/pet/",toPath petId,"/uploadImage"]
     `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
 
diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Store.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Store.hs
index 3a05e8fc802..858047e35f8 100644
--- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Store.hs
+++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API/Store.hs
@@ -93,9 +93,8 @@ instance Produces DeleteOrder MimeJSON
 -- AuthMethod: 'AuthApiKeyApiKey'
 -- 
 getInventory 
-  :: Accept accept -- ^ request accept ('MimeType')
-  -> SwaggerPetstoreRequest GetInventory MimeNoContent ((Map.Map String Int)) accept
-getInventory  _ =
+  :: SwaggerPetstoreRequest GetInventory MimeNoContent ((Map.Map String Int)) MimeJSON
+getInventory =
   _mkRequest "GET" ["/store/inventory"]
     `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
 
diff --git a/samples/client/petstore/haskell-http-client/swagger-petstore.cabal b/samples/client/petstore/haskell-http-client/swagger-petstore.cabal
index 90480f56d0c..d644de4087f 100644
--- a/samples/client/petstore/haskell-http-client/swagger-petstore.cabal
+++ b/samples/client/petstore/haskell-http-client/swagger-petstore.cabal
@@ -44,7 +44,7 @@ library
     , http-client >=0.5 && <0.6
     , http-client-tls
     , http-media >= 0.4 && < 0.8
-    , http-types >=0.8 && <0.12
+    , http-types >=0.8 && <0.13
     , iso8601-time >=0.1.3 && <0.2.0
     , microlens >= 0.4.3 && <0.5
     , mtl >=2.2.1
@@ -52,7 +52,7 @@ library
     , random >=1.1
     , safe-exceptions <0.2
     , text >=0.11 && <1.3
-    , time >=1.5 && <1.9
+    , time >=1.5 && <1.10
     , transformers >=0.4.0.0
     , unordered-containers
     , vector >=0.10.9 && <0.13
diff --git a/samples/client/petstore/haskell-http-client/tests-integration/tests/Test.hs b/samples/client/petstore/haskell-http-client/tests-integration/tests/Test.hs
index ed8da0fb728..a2b61a5908b 100644
--- a/samples/client/petstore/haskell-http-client/tests-integration/tests/Test.hs
+++ b/samples/client/petstore/haskell-http-client/tests-integration/tests/Test.hs
@@ -140,7 +140,7 @@ testPetOps mgr config =
     it "updatePetWithFormRequest" $ do
       readIORef _pet >>= \case
         Just S.Pet {S.petId = Just petId} -> do
-          let updatePetWithFormRequest = S.updatePetWithForm (S.ContentType S.MimeFormUrlEncoded) (S.Accept S.MimeJSON)
+          let updatePetWithFormRequest = S.updatePetWithForm (S.Accept S.MimeJSON)
                 (S.PetId petId)
                 `S.applyOptionalParam` S.Name2 "petName"
                 `S.applyOptionalParam` S.StatusText "pending"
@@ -153,8 +153,7 @@ testPetOps mgr config =
         Just pet@S.Pet {S.petId = Just petId} -> go petId
         _ -> pendingWith "no petId") $
       it "uploadFile" $ \petId -> do
-          let uploadFileRequest = S.uploadFile (S.ContentType S.MimeMultipartFormData) (S.Accept S.MimeJSON)
-                  (S.PetId petId)
+          let uploadFileRequest = S.uploadFile (S.PetId petId)
                   `S.applyOptionalParam` S.File "package.yaml"
                   `S.applyOptionalParam` S.AdditionalMetadata "a package.yaml file"
           uploadFileRequestResult <- S.dispatchMime mgr config uploadFileRequest 
@@ -184,7 +183,7 @@ testStoreOps mgr config = do
     _order <- runIO $ newIORef (Nothing :: Maybe S.Order)
 
     it "getInventory" $ do
-      let getInventoryRequest = S.getInventory (S.Accept S.MimeJSON)
+      let getInventoryRequest = S.getInventory
             `S.setHeader` [("api_key","special-key")] 
       getInventoryRequestRequestResult <- S.dispatchMime mgr config getInventoryRequest 
       NH.responseStatus (S.mimeResultResponse getInventoryRequestRequestResult) `shouldBe` NH.status200