swagger-petstore 0.0.1.7 → 0.0.1.8
raw patch · 8 files changed
+47/−54 lines, 8 filesdep ~http-typesdep ~timePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: http-types, time
API changes (from Hackage documentation)
- SwaggerPetstore.API.AnotherFake: testSpecialTags :: (Consumes TestSpecialTags contentType, MimeRender contentType Client) => ContentType contentType -> Accept accept -> Client -> SwaggerPetstoreRequest TestSpecialTags contentType Client accept
+ SwaggerPetstore.API.AnotherFake: testSpecialTags :: (Consumes TestSpecialTags MimeJSON, MimeRender MimeJSON Client) => Client -> SwaggerPetstoreRequest TestSpecialTags MimeJSON Client MimeJSON
- SwaggerPetstore.API.Fake: testClientModel :: (Consumes TestClientModel contentType, MimeRender contentType Client) => ContentType contentType -> Accept accept -> Client -> SwaggerPetstoreRequest TestClientModel contentType Client accept
+ SwaggerPetstore.API.Fake: testClientModel :: (Consumes TestClientModel MimeJSON, MimeRender MimeJSON Client) => Client -> SwaggerPetstoreRequest TestClientModel MimeJSON Client MimeJSON
- SwaggerPetstore.API.Fake: testInlineAdditionalProperties :: (Consumes TestInlineAdditionalProperties contentType, MimeRender contentType Value) => ContentType contentType -> Value -> SwaggerPetstoreRequest TestInlineAdditionalProperties contentType NoContent MimeNoContent
+ SwaggerPetstore.API.Fake: testInlineAdditionalProperties :: (Consumes TestInlineAdditionalProperties MimeJSON, MimeRender MimeJSON Value) => Value -> SwaggerPetstoreRequest TestInlineAdditionalProperties MimeJSON NoContent MimeNoContent
- SwaggerPetstore.API.Fake: testJsonFormData :: (Consumes TestJsonFormData contentType) => ContentType contentType -> Param -> Param2 -> SwaggerPetstoreRequest TestJsonFormData contentType NoContent MimeNoContent
+ SwaggerPetstore.API.Fake: testJsonFormData :: (Consumes TestJsonFormData MimeJSON) => Param -> Param2 -> SwaggerPetstoreRequest TestJsonFormData MimeJSON NoContent MimeNoContent
- SwaggerPetstore.API.FakeClassnameTags123: testClassname :: (Consumes TestClassname contentType, MimeRender contentType Client) => ContentType contentType -> Accept accept -> Client -> SwaggerPetstoreRequest TestClassname contentType Client accept
+ SwaggerPetstore.API.FakeClassnameTags123: testClassname :: (Consumes TestClassname MimeJSON, MimeRender MimeJSON Client) => Client -> SwaggerPetstoreRequest TestClassname MimeJSON Client MimeJSON
- SwaggerPetstore.API.Pet: updatePetWithForm :: (Consumes UpdatePetWithForm contentType) => ContentType contentType -> Accept accept -> PetId -> SwaggerPetstoreRequest UpdatePetWithForm contentType res accept
+ SwaggerPetstore.API.Pet: updatePetWithForm :: (Consumes UpdatePetWithForm MimeFormUrlEncoded) => Accept accept -> PetId -> SwaggerPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded res accept
- SwaggerPetstore.API.Pet: uploadFile :: (Consumes UploadFile contentType) => ContentType contentType -> Accept accept -> PetId -> SwaggerPetstoreRequest UploadFile contentType ApiResponse accept
+ SwaggerPetstore.API.Pet: uploadFile :: (Consumes UploadFile MimeMultipartFormData) => PetId -> SwaggerPetstoreRequest UploadFile MimeMultipartFormData ApiResponse MimeJSON
- SwaggerPetstore.API.Store: getInventory :: Accept accept -> SwaggerPetstoreRequest GetInventory MimeNoContent ((Map String Int)) accept
+ SwaggerPetstore.API.Store: getInventory :: SwaggerPetstoreRequest GetInventory MimeNoContent ((Map String Int)) MimeJSON
Files
- README.md +9/−4
- lib/SwaggerPetstore/API/AnotherFake.hs +4/−6
- lib/SwaggerPetstore/API/Fake.hs +12/−16
- lib/SwaggerPetstore/API/FakeClassnameTags123.hs +4/−6
- lib/SwaggerPetstore/API/Pet.hs +8/−11
- lib/SwaggerPetstore/API/Store.hs +2/−3
- lib/SwaggerPetstore/Core.hs +2/−2
- swagger-petstore.cabal +6/−6
README.md view
@@ -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 @@ -58,17 +58,22 @@ | OPTION | DESCRIPTION | DEFAULT | ACTUAL | | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------- |-| allowNonUniqueOperationIds | allow *different* API modules to contain the same operationId. Each API must be imported qualified | false | false | | allowFromJsonNulls | allow JSON Null during model decoding from JSON | true | true |+| allowNonUniqueOperationIds | allow *different* API modules to contain the same operationId. Each API must be imported qualified | false | false | | allowToJsonNulls | allow emitting JSON Null during model encoding to JSON | false | false |+| baseModule | Set the base module namespace | | SwaggerPetstore |+| cabalPackage | Set the cabal package name, which consists of one or more alphanumeric words separated by hyphens | | swagger-petstore |+| cabalVersion | Set the cabal version number, consisting of a sequence of one or more integers separated by dots | 0.1.0.0 | 0.1.0.0 |+| configType | Set the name of the type used for configuration | | SwaggerPetstoreConfig | | dateFormat | format string used to parse/render a date | %Y-%m-%d | %Y-%m-%d | | dateTimeFormat | format string used to parse/render a datetime. (Defaults to [formatISO8601Millis][1] when not provided) | | | | generateEnums | Generate specific datatypes for swagger enums | true | true | | 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 | | useMonadLogger | Use the monad-logger package to provide logging (if instead false, use the katip logging package) | false | false |
lib/SwaggerPetstore/API/AnotherFake.hs view
@@ -67,12 +67,10 @@ -- 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
lib/SwaggerPetstore/API/Fake.hs view
@@ -143,12 +143,10 @@ -- 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 @@ -- -- 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 @@ -- -- 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)
lib/SwaggerPetstore/API/FakeClassnameTags123.hs view
@@ -67,12 +67,10 @@ -- 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
lib/SwaggerPetstore/API/Pet.hs view
@@ -258,12 +258,11 @@ -- 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 @@ -- 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)
lib/SwaggerPetstore/API/Store.hs view
@@ -93,9 +93,8 @@ -- 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)
lib/SwaggerPetstore/Core.hs view
@@ -96,14 +96,14 @@ -- -- configUserAgent: ----- @"swagger-haskell-http-client/1.0.0"@+-- @"swagger-petstore/0.1.0.0"@ -- newConfig :: IO SwaggerPetstoreConfig newConfig = do logCxt <- initLogContext return $ SwaggerPetstoreConfig { configHost = "http://petstore.swagger.io:80/v2"- , configUserAgent = "swagger-haskell-http-client/1.0.0"+ , configUserAgent = "swagger-petstore/0.1.0.0" , configLogExecWithContext = runDefaultLogExecWithContext , configLogContext = logCxt , configAuthMethods = []
swagger-petstore.cabal view
@@ -1,8 +1,8 @@ name: swagger-petstore-version: 0.0.1.7+version: 0.0.1.8 synopsis: Auto-generated swagger-petstore API Client description: .- Client library for calling the swagger-petstore API based on http-client.+ Client library for calling the Swagger Petstore API based on http-client. . host: petstore.swagger.io:80 .@@ -44,7 +44,7 @@ , 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,11 +52,13 @@ , 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 , katip >=0.4 && < 0.6+ other-modules:+ Paths_swagger_petstore exposed-modules: SwaggerPetstore SwaggerPetstore.API@@ -72,8 +74,6 @@ SwaggerPetstore.MimeTypes SwaggerPetstore.Model SwaggerPetstore.ModelLens- other-modules:- Paths_swagger_petstore default-language: Haskell2010 test-suite tests