diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,200 @@
+## OpenAPI Auto-Generated [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) Bindings to `OpenAPI Petstore`
+
+The library in `lib` provides auto-generated-from-OpenAPI [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) bindings to the OpenAPI Petstore API.
+
+OpenApi Version: 3.0.1
+
+## Installation
+
+Installation follows the standard approach to installing Stack-based projects.
+
+1. Install the [Haskell `stack` tool](http://docs.haskellstack.org/en/stable/README).
+2. To build the package, and generate the documentation (recommended):
+```
+stack haddock
+```
+which will generate docs for this lib in the `docs` folder.
+
+To generate the docs in the normal location (to enable hyperlinks to external libs), remove 
+```
+build:
+  haddock-arguments:
+    haddock-args:
+    - "--odir=./docs"
+```
+from the stack.yaml file and run `stack haddock` again.
+
+3. To run unit tests:
+```
+stack test
+```
+
+## OpenAPI-Generator
+
+The code generator that produced this library, and which explains how
+to obtain and use the openapi-generator cli tool lives at
+
+https://openapi-generator.tech
+
+The _generator-name_ argument (`--generator-name`) passed to the cli tool used should be
+
+```
+haskell-http-client
+```
+
+### Unsupported OpenAPI Features
+
+* Model Inheritance
+
+This is beta software; other cases may not be supported.
+
+### Codegen "additional properties" parameters
+
+These options allow some customization of the code generation process.
+
+**haskell-http-client additional properties:**
+
+| OPTION                          | DESCRIPTION                                                                                                                   | DEFAULT  | ACTUAL                                |
+| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------- |
+| 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                                                                                                 |          | OpenAPIPetstore                      |
+| cabalPackage                    | Set the cabal package name, which consists of one or more alphanumeric words separated by hyphens                             |          | openapi-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                                                                               |          | OpenAPIPetstoreConfig                      |
+| 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 OpenAPI 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                           | true     | true                 |
+| modelDeriving                   | Additional classes to include in the deriving() clause of Models                                                              |          |                    |
+| requestType                     | Set the name of the type used to generate requests                                                                            |          | OpenAPIPetstoreRequest                     |
+| 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                |
+
+[1]: https://www.stackage.org/haddock/lts-9.0/iso8601-time-0.1.4/Data-Time-ISO8601.html#v:formatISO8601Millis
+
+An example setting _strictFields_ and _dateTimeFormat_:
+
+```
+java -jar openapi-generator-cli.jar generate -i petstore.yaml -g haskell-http-client -o output/haskell-http-client -DstrictFields=true -DdateTimeFormat="%Y-%m-%dT%H:%M:%S%Q%z"
+```
+
+View the full list of Codegen "config option" parameters with the command:
+
+```
+java -jar openapi-generator-cli.jar config-help -g haskell-http-client
+```
+
+## Usage Notes
+
+### Example Petstore Haddock documentation
+
+An example of the generated haddock documentation targeting the server http://petstore.swagger.io/ (Petstore) can be found [here][2]
+
+[2]: https://hackage.haskell.org/package/swagger-petstore
+
+### Example Petstore App
+
+An example application using the auto-generated haskell-http-client bindings for the server http://petstore.swagger.io/ can be found [here][3]
+
+[3]: https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/haskell-http-client/example-app
+
+This library is intended to be imported qualified.
+
+### Modules
+
+| MODULE              | NOTES                                               |
+| ------------------- | --------------------------------------------------- |
+| OpenAPIPetstore.Client    | use the "dispatch" functions to send requests       |
+| OpenAPIPetstore.Core      | core funcions, config and request types             |
+| OpenAPIPetstore.API       | construct api requests                              |
+| OpenAPIPetstore.Model     | describes api models                                |
+| OpenAPIPetstore.MimeTypes | encoding/decoding MIME types (content-types/accept) |
+| OpenAPIPetstore.ModelLens | lenses for model fields                             |
+| OpenAPIPetstore.Logging   | logging functions and utils                         |
+
+
+### MimeTypes
+
+This library adds type safety around what OpenAPI specifies as
+Produces and Consumes for each Operation (e.g. the list of MIME types an
+Operation can Produce (using 'accept' headers) and Consume (using 'content-type' headers).
+
+For example, if there is an Operation named _addFoo_, there will be a
+data type generated named _AddFoo_ (note the capitalization), which
+describes additional constraints and actions on the _addFoo_ operation
+via its typeclass instances. These typeclass instances can be viewed
+in GHCi or via the Haddocks.
+
+* required parameters are included as function arguments to _addFoo_
+* optional non-body parameters are included by using  `applyOptionalParam`
+* optional body parameters are set by using  `setBodyParam`
+
+Example code generated for pretend _addFoo_ operation: 
+
+```haskell
+data AddFoo 	
+instance Consumes AddFoo MimeJSON
+instance Produces AddFoo MimeJSON
+instance Produces AddFoo MimeXML
+instance HasBodyParam AddFoo FooModel
+instance HasOptionalParam AddFoo FooName
+instance HasOptionalParam AddFoo FooId
+```
+
+this would indicate that:
+
+* the _addFoo_ operation can consume JSON
+* the _addFoo_ operation produces JSON or XML, depending on the argument passed to the dispatch function
+* the _addFoo_ operation can set it's body param of _FooModel_ via `setBodyParam`
+* the _addFoo_ operation can set 2 different optional parameters via `applyOptionalParam`
+
+If the OpenAPI spec doesn't declare it can accept or produce a certain
+MIME type for a given Operation, you should either add a Produces or
+Consumes instance for the desired MIME types (assuming the server
+supports it), use `dispatchLbsUnsafe` or modify the OpenAPI spec and
+run the generator again.
+
+New MIME type instances can be added via MimeType/MimeRender/MimeUnrender
+
+Only JSON instances are generated by default, and in some case
+x-www-form-urlencoded instances (FromFrom, ToForm) will also be
+generated if the model fields are primitive types, and there are
+Operations using x-www-form-urlencoded which use those models.
+
+### Authentication
+
+A haskell data type will be generated for each OpenAPI authentication type.
+
+If for example the AuthMethod `AuthOAuthFoo` is generated for OAuth operations, then
+`addAuthMethod` should be used to add the AuthMethod config.
+
+When a request is dispatched, if a matching auth method is found in
+the config, it will be applied to the request.
+
+### Example
+
+```haskell
+mgr <- newManager defaultManagerSettings
+config0 <- withStdoutLogging =<< newConfig 
+let config = config0
+    `addAuthMethod` AuthOAuthFoo "secret-key"
+
+let addFooRequest = 
+  addFoo 
+    (ContentType MimeJSON) 
+    (Accept MimeXML) 
+    (ParamBar paramBar)
+    (ParamQux paramQux)
+    modelBaz
+  `applyOptionalParam` FooId 1
+  `applyOptionalParam` FooName "name"
+  `setHeader` [("qux_header","xxyy")]
+addFooResult <- dispatchMime mgr config addFooRequest
+```
+
+See the example app and the haddocks for details.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/lib/OpenAPIPetstore.hs b/lib/OpenAPIPetstore.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore.hs
@@ -0,0 +1,31 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore
+-}
+
+module OpenAPIPetstore
+  (  module OpenAPIPetstore.API
+  , module OpenAPIPetstore.Client
+  , module OpenAPIPetstore.Core
+  , module OpenAPIPetstore.Logging
+  , module OpenAPIPetstore.MimeTypes
+  , module OpenAPIPetstore.Model
+  , module OpenAPIPetstore.ModelLens
+  ) where
+
+import OpenAPIPetstore.API
+import OpenAPIPetstore.Client
+import OpenAPIPetstore.Core
+import OpenAPIPetstore.Logging
+import OpenAPIPetstore.MimeTypes
+import OpenAPIPetstore.Model
+import OpenAPIPetstore.ModelLens
diff --git a/lib/OpenAPIPetstore/API.hs b/lib/OpenAPIPetstore/API.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/API.hs
@@ -0,0 +1,29 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.API
+-}
+
+module OpenAPIPetstore.API
+  ( module OpenAPIPetstore.API.AnotherFake
+  , module OpenAPIPetstore.API.Fake
+  , module OpenAPIPetstore.API.FakeClassnameTags123
+  , module OpenAPIPetstore.API.Pet
+  , module OpenAPIPetstore.API.Store
+  , module OpenAPIPetstore.API.User
+  ) where
+
+import OpenAPIPetstore.API.AnotherFake
+import OpenAPIPetstore.API.Fake
+import OpenAPIPetstore.API.FakeClassnameTags123
+import OpenAPIPetstore.API.Pet
+import OpenAPIPetstore.API.Store
+import OpenAPIPetstore.API.User
diff --git a/lib/OpenAPIPetstore/API/AnotherFake.hs b/lib/OpenAPIPetstore/API/AnotherFake.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/API/AnotherFake.hs
@@ -0,0 +1,86 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.API.AnotherFake
+-}
+
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.API.AnotherFake where
+
+import OpenAPIPetstore.Core
+import OpenAPIPetstore.MimeTypes
+import OpenAPIPetstore.Model as M
+
+import qualified Data.Aeson as A
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
+import qualified Data.Foldable as P
+import qualified Data.Map as Map
+import qualified Data.Maybe as P
+import qualified Data.Proxy as P (Proxy(..))
+import qualified Data.Set as Set
+import qualified Data.String as P
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Text.Lazy as TL
+import qualified Data.Text.Lazy.Encoding as TL
+import qualified Data.Time as TI
+import qualified Network.HTTP.Client.MultipartFormData as NH
+import qualified Network.HTTP.Media as ME
+import qualified Network.HTTP.Types as NH
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+
+import Data.Text (Text)
+import GHC.Base ((<|>))
+
+import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
+import qualified Prelude as P
+
+-- * Operations
+
+
+-- ** AnotherFake
+
+-- *** op123testSpecialTags
+
+-- | @PATCH \/another-fake\/dummy@
+-- 
+-- To test special tags
+-- 
+-- To test special tags and operation ID starting with number
+-- 
+op123testSpecialTags 
+  :: (Consumes Op123testSpecialTags MimeJSON, MimeRender MimeJSON Client)
+  => Client -- ^ "client" -  client model
+  -> OpenAPIPetstoreRequest Op123testSpecialTags MimeJSON Client MimeJSON
+op123testSpecialTags client =
+  _mkRequest "PATCH" ["/another-fake/dummy"]
+    `setBodyParam` client
+
+data Op123testSpecialTags 
+
+-- | /Body Param/ "Client" - client model
+instance HasBodyParam Op123testSpecialTags Client 
+
+-- | @application/json@
+instance Consumes Op123testSpecialTags MimeJSON
+
+-- | @application/json@
+instance Produces Op123testSpecialTags MimeJSON
+
diff --git a/lib/OpenAPIPetstore/API/Fake.hs b/lib/OpenAPIPetstore/API/Fake.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/API/Fake.hs
@@ -0,0 +1,457 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.API.Fake
+-}
+
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.API.Fake where
+
+import OpenAPIPetstore.Core
+import OpenAPIPetstore.MimeTypes
+import OpenAPIPetstore.Model as M
+
+import qualified Data.Aeson as A
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
+import qualified Data.Foldable as P
+import qualified Data.Map as Map
+import qualified Data.Maybe as P
+import qualified Data.Proxy as P (Proxy(..))
+import qualified Data.Set as Set
+import qualified Data.String as P
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Text.Lazy as TL
+import qualified Data.Text.Lazy.Encoding as TL
+import qualified Data.Time as TI
+import qualified Network.HTTP.Client.MultipartFormData as NH
+import qualified Network.HTTP.Media as ME
+import qualified Network.HTTP.Types as NH
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+
+import Data.Text (Text)
+import GHC.Base ((<|>))
+
+import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
+import qualified Prelude as P
+
+-- * Operations
+
+
+-- ** Fake
+
+-- *** fakeOuterBooleanSerialize
+
+-- | @POST \/fake\/outer\/boolean@
+-- 
+-- Test serialization of outer boolean types
+-- 
+fakeOuterBooleanSerialize 
+  :: (Consumes FakeOuterBooleanSerialize contentType)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> Accept accept -- ^ request accept ('MimeType')
+  -> OpenAPIPetstoreRequest FakeOuterBooleanSerialize contentType Bool accept
+fakeOuterBooleanSerialize _  _ =
+  _mkRequest "POST" ["/fake/outer/boolean"]
+
+data FakeOuterBooleanSerialize 
+
+-- | /Body Param/ "body" - Input boolean as post body
+instance HasBodyParam FakeOuterBooleanSerialize BodyBool 
+
+-- | @*/*@
+instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype
+
+
+-- *** fakeOuterCompositeSerialize
+
+-- | @POST \/fake\/outer\/composite@
+-- 
+-- Test serialization of object with outer number type
+-- 
+fakeOuterCompositeSerialize 
+  :: (Consumes FakeOuterCompositeSerialize contentType)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> Accept accept -- ^ request accept ('MimeType')
+  -> OpenAPIPetstoreRequest FakeOuterCompositeSerialize contentType OuterComposite accept
+fakeOuterCompositeSerialize _  _ =
+  _mkRequest "POST" ["/fake/outer/composite"]
+
+data FakeOuterCompositeSerialize 
+
+-- | /Body Param/ "OuterComposite" - Input composite as post body
+instance HasBodyParam FakeOuterCompositeSerialize OuterComposite 
+
+-- | @*/*@
+instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype
+
+
+-- *** fakeOuterNumberSerialize
+
+-- | @POST \/fake\/outer\/number@
+-- 
+-- Test serialization of outer number types
+-- 
+fakeOuterNumberSerialize 
+  :: (Consumes FakeOuterNumberSerialize contentType)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> Accept accept -- ^ request accept ('MimeType')
+  -> OpenAPIPetstoreRequest FakeOuterNumberSerialize contentType Double accept
+fakeOuterNumberSerialize _  _ =
+  _mkRequest "POST" ["/fake/outer/number"]
+
+data FakeOuterNumberSerialize 
+
+-- | /Body Param/ "body" - Input number as post body
+instance HasBodyParam FakeOuterNumberSerialize Body 
+
+-- | @*/*@
+instance MimeType mtype => Produces FakeOuterNumberSerialize mtype
+
+
+-- *** fakeOuterStringSerialize
+
+-- | @POST \/fake\/outer\/string@
+-- 
+-- Test serialization of outer string types
+-- 
+fakeOuterStringSerialize 
+  :: (Consumes FakeOuterStringSerialize contentType)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> Accept accept -- ^ request accept ('MimeType')
+  -> OpenAPIPetstoreRequest FakeOuterStringSerialize contentType Text accept
+fakeOuterStringSerialize _  _ =
+  _mkRequest "POST" ["/fake/outer/string"]
+
+data FakeOuterStringSerialize 
+
+-- | /Body Param/ "body" - Input string as post body
+instance HasBodyParam FakeOuterStringSerialize BodyText 
+
+-- | @*/*@
+instance MimeType mtype => Produces FakeOuterStringSerialize mtype
+
+
+-- *** testBodyWithFileSchema
+
+-- | @PUT \/fake\/body-with-file-schema@
+-- 
+-- For this test, the body for this request much reference a schema named `File`.
+-- 
+testBodyWithFileSchema 
+  :: (Consumes TestBodyWithFileSchema MimeJSON, MimeRender MimeJSON FileSchemaTestClass)
+  => FileSchemaTestClass -- ^ "fileSchemaTestClass"
+  -> OpenAPIPetstoreRequest TestBodyWithFileSchema MimeJSON NoContent MimeNoContent
+testBodyWithFileSchema fileSchemaTestClass =
+  _mkRequest "PUT" ["/fake/body-with-file-schema"]
+    `setBodyParam` fileSchemaTestClass
+
+data TestBodyWithFileSchema 
+instance HasBodyParam TestBodyWithFileSchema FileSchemaTestClass 
+
+-- | @application/json@
+instance Consumes TestBodyWithFileSchema MimeJSON
+
+instance Produces TestBodyWithFileSchema MimeNoContent
+
+
+-- *** testBodyWithQueryParams
+
+-- | @PUT \/fake\/body-with-query-params@
+-- 
+testBodyWithQueryParams 
+  :: (Consumes TestBodyWithQueryParams MimeJSON, MimeRender MimeJSON User)
+  => User -- ^ "user"
+  -> Query -- ^ "query"
+  -> OpenAPIPetstoreRequest TestBodyWithQueryParams MimeJSON NoContent MimeNoContent
+testBodyWithQueryParams user (Query query) =
+  _mkRequest "PUT" ["/fake/body-with-query-params"]
+    `setBodyParam` user
+    `setQuery` toQuery ("query", Just query)
+
+data TestBodyWithQueryParams 
+instance HasBodyParam TestBodyWithQueryParams User 
+
+-- | @application/json@
+instance Consumes TestBodyWithQueryParams MimeJSON
+
+instance Produces TestBodyWithQueryParams MimeNoContent
+
+
+-- *** testClientModel
+
+-- | @PATCH \/fake@
+-- 
+-- To test \"client\" model
+-- 
+-- To test \"client\" model
+-- 
+testClientModel 
+  :: (Consumes TestClientModel MimeJSON, MimeRender MimeJSON Client)
+  => Client -- ^ "client" -  client model
+  -> OpenAPIPetstoreRequest TestClientModel MimeJSON Client MimeJSON
+testClientModel client =
+  _mkRequest "PATCH" ["/fake"]
+    `setBodyParam` client
+
+data TestClientModel 
+
+-- | /Body Param/ "Client" - client model
+instance HasBodyParam TestClientModel Client 
+
+-- | @application/json@
+instance Consumes TestClientModel MimeJSON
+
+-- | @application/json@
+instance Produces TestClientModel MimeJSON
+
+
+-- *** testEndpointParameters
+
+-- | @POST \/fake@
+-- 
+-- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
+-- 
+-- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
+-- 
+-- AuthMethod: 'AuthBasicHttpBasicTest'
+-- 
+testEndpointParameters 
+  :: (Consumes TestEndpointParameters MimeFormUrlEncoded)
+  => Number -- ^ "number" -  None
+  -> ParamDouble -- ^ "double" -  None
+  -> PatternWithoutDelimiter -- ^ "patternWithoutDelimiter" -  None
+  -> Byte -- ^ "byte" -  None
+  -> OpenAPIPetstoreRequest TestEndpointParameters MimeFormUrlEncoded NoContent MimeNoContent
+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  
+
+-- | /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 `_addMultiFormPart` NH.partFileSource "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/x-www-form-urlencoded@
+instance Consumes TestEndpointParameters MimeFormUrlEncoded
+
+instance Produces TestEndpointParameters MimeNoContent
+
+
+-- *** testEnumParameters
+
+-- | @GET \/fake@
+-- 
+-- To test enum parameters
+-- 
+-- To test enum parameters
+-- 
+testEnumParameters 
+  :: (Consumes TestEnumParameters MimeFormUrlEncoded)
+  => OpenAPIPetstoreRequest TestEnumParameters MimeFormUrlEncoded NoContent MimeNoContent
+testEnumParameters =
+  _mkRequest "GET" ["/fake"]
+
+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 `setQuery` toQuery ("enum_query_double", Just xs)
+
+-- | @application/x-www-form-urlencoded@
+instance Consumes TestEnumParameters MimeFormUrlEncoded
+
+instance Produces TestEnumParameters MimeNoContent
+
+
+-- *** testGroupParameters
+
+-- | @DELETE \/fake@
+-- 
+-- Fake endpoint to test group parameters (optional)
+-- 
+-- Fake endpoint to test group parameters (optional)
+-- 
+testGroupParameters 
+  :: RequiredStringGroup -- ^ "requiredStringGroup" -  Required String in group parameters
+  -> RequiredBooleanGroup -- ^ "requiredBooleanGroup" -  Required Boolean in group parameters
+  -> RequiredInt64Group -- ^ "requiredInt64Group" -  Required Integer in group parameters
+  -> OpenAPIPetstoreRequest TestGroupParameters MimeNoContent NoContent MimeNoContent
+testGroupParameters (RequiredStringGroup requiredStringGroup) (RequiredBooleanGroup requiredBooleanGroup) (RequiredInt64Group requiredInt64Group) =
+  _mkRequest "DELETE" ["/fake"]
+    `setQuery` toQuery ("required_string_group", Just requiredStringGroup)
+    `setHeader` toHeader ("required_boolean_group", requiredBooleanGroup)
+    `setQuery` toQuery ("required_int64_group", Just requiredInt64Group)
+
+data TestGroupParameters  
+
+-- | /Optional Param/ "string_group" - String in group parameters
+instance HasOptionalParam TestGroupParameters StringGroup where
+  applyOptionalParam req (StringGroup xs) =
+    req `setQuery` toQuery ("string_group", Just xs)
+
+-- | /Optional Param/ "boolean_group" - Boolean in group parameters
+instance HasOptionalParam TestGroupParameters BooleanGroup where
+  applyOptionalParam req (BooleanGroup xs) =
+    req `setHeader` toHeader ("boolean_group", xs)
+
+-- | /Optional Param/ "int64_group" - Integer in group parameters
+instance HasOptionalParam TestGroupParameters Int64Group where
+  applyOptionalParam req (Int64Group xs) =
+    req `setQuery` toQuery ("int64_group", Just xs)
+
+instance Produces TestGroupParameters MimeNoContent
+
+
+-- *** testInlineAdditionalProperties
+
+-- | @POST \/fake\/inline-additionalProperties@
+-- 
+-- test inline additionalProperties
+-- 
+testInlineAdditionalProperties 
+  :: (Consumes TestInlineAdditionalProperties MimeJSON, MimeRender MimeJSON RequestBody)
+  => RequestBody -- ^ "requestBody" -  request body
+  -> OpenAPIPetstoreRequest TestInlineAdditionalProperties MimeJSON NoContent MimeNoContent
+testInlineAdditionalProperties requestBody =
+  _mkRequest "POST" ["/fake/inline-additionalProperties"]
+    `setBodyParam` requestBody
+
+data TestInlineAdditionalProperties 
+
+-- | /Body Param/ "request_body" - request body
+instance HasBodyParam TestInlineAdditionalProperties RequestBody 
+
+-- | @application/json@
+instance Consumes TestInlineAdditionalProperties MimeJSON
+
+instance Produces TestInlineAdditionalProperties MimeNoContent
+
+
+-- *** testJsonFormData
+
+-- | @GET \/fake\/jsonFormData@
+-- 
+-- test json serialization of form data
+-- 
+testJsonFormData 
+  :: (Consumes TestJsonFormData MimeFormUrlEncoded)
+  => Param -- ^ "param" -  field1
+  -> Param2 -- ^ "param2" -  field2
+  -> OpenAPIPetstoreRequest TestJsonFormData MimeFormUrlEncoded NoContent MimeNoContent
+testJsonFormData (Param param) (Param2 param2) =
+  _mkRequest "GET" ["/fake/jsonFormData"]
+    `addForm` toForm ("param", param)
+    `addForm` toForm ("param2", param2)
+
+data TestJsonFormData  
+
+-- | @application/x-www-form-urlencoded@
+instance Consumes TestJsonFormData MimeFormUrlEncoded
+
+instance Produces TestJsonFormData MimeNoContent
+
diff --git a/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs b/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs
@@ -0,0 +1,89 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.API.FakeClassnameTags123
+-}
+
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.API.FakeClassnameTags123 where
+
+import OpenAPIPetstore.Core
+import OpenAPIPetstore.MimeTypes
+import OpenAPIPetstore.Model as M
+
+import qualified Data.Aeson as A
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
+import qualified Data.Foldable as P
+import qualified Data.Map as Map
+import qualified Data.Maybe as P
+import qualified Data.Proxy as P (Proxy(..))
+import qualified Data.Set as Set
+import qualified Data.String as P
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Text.Lazy as TL
+import qualified Data.Text.Lazy.Encoding as TL
+import qualified Data.Time as TI
+import qualified Network.HTTP.Client.MultipartFormData as NH
+import qualified Network.HTTP.Media as ME
+import qualified Network.HTTP.Types as NH
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+
+import Data.Text (Text)
+import GHC.Base ((<|>))
+
+import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
+import qualified Prelude as P
+
+-- * Operations
+
+
+-- ** FakeClassnameTags123
+
+-- *** testClassname
+
+-- | @PATCH \/fake_classname_test@
+-- 
+-- To test class name in snake case
+-- 
+-- To test class name in snake case
+-- 
+-- AuthMethod: 'AuthApiKeyApiKeyQuery'
+-- 
+testClassname 
+  :: (Consumes TestClassname MimeJSON, MimeRender MimeJSON Client)
+  => Client -- ^ "client" -  client model
+  -> OpenAPIPetstoreRequest TestClassname MimeJSON Client MimeJSON
+testClassname client =
+  _mkRequest "PATCH" ["/fake_classname_test"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKeyQuery)
+    `setBodyParam` client
+
+data TestClassname 
+
+-- | /Body Param/ "Client" - client model
+instance HasBodyParam TestClassname Client 
+
+-- | @application/json@
+instance Consumes TestClassname MimeJSON
+
+-- | @application/json@
+instance Produces TestClassname MimeJSON
+
diff --git a/lib/OpenAPIPetstore/API/Pet.hs b/lib/OpenAPIPetstore/API/Pet.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/API/Pet.hs
@@ -0,0 +1,326 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.API.Pet
+-}
+
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.API.Pet where
+
+import OpenAPIPetstore.Core
+import OpenAPIPetstore.MimeTypes
+import OpenAPIPetstore.Model as M
+
+import qualified Data.Aeson as A
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
+import qualified Data.Foldable as P
+import qualified Data.Map as Map
+import qualified Data.Maybe as P
+import qualified Data.Proxy as P (Proxy(..))
+import qualified Data.Set as Set
+import qualified Data.String as P
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Text.Lazy as TL
+import qualified Data.Text.Lazy.Encoding as TL
+import qualified Data.Time as TI
+import qualified Network.HTTP.Client.MultipartFormData as NH
+import qualified Network.HTTP.Media as ME
+import qualified Network.HTTP.Types as NH
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+
+import Data.Text (Text)
+import GHC.Base ((<|>))
+
+import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
+import qualified Prelude as P
+
+-- * Operations
+
+
+-- ** Pet
+
+-- *** addPet
+
+-- | @POST \/pet@
+-- 
+-- Add a new pet to the store
+-- 
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
+-- 
+addPet 
+  :: (Consumes AddPet contentType, MimeRender contentType Pet)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> Pet -- ^ "pet" -  Pet object that needs to be added to the store
+  -> OpenAPIPetstoreRequest AddPet contentType NoContent MimeNoContent
+addPet _ pet =
+  _mkRequest "POST" ["/pet"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
+    `setBodyParam` pet
+
+data AddPet 
+
+-- | /Body Param/ "Pet" - Pet object that needs to be added to the store
+instance HasBodyParam AddPet Pet 
+
+-- | @application/xml@
+instance Consumes AddPet MimeXML
+-- | @application/json@
+instance Consumes AddPet MimeJSON
+
+instance Produces AddPet MimeNoContent
+
+
+-- *** deletePet
+
+-- | @DELETE \/pet\/{petId}@
+-- 
+-- Deletes a pet
+-- 
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
+-- 
+deletePet 
+  :: PetId -- ^ "petId" -  Pet id to delete
+  -> OpenAPIPetstoreRequest DeletePet MimeNoContent NoContent MimeNoContent
+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)
+
+instance Produces DeletePet MimeNoContent
+
+
+-- *** findPetsByStatus
+
+-- | @GET \/pet\/findByStatus@
+-- 
+-- Finds Pets by status
+-- 
+-- Multiple status values can be provided with comma separated strings
+-- 
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
+-- 
+findPetsByStatus 
+  :: Accept accept -- ^ request accept ('MimeType')
+  -> Status -- ^ "status" -  Status values that need to be considered for filter
+  -> OpenAPIPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept
+findPetsByStatus  _ (Status status) =
+  _mkRequest "GET" ["/pet/findByStatus"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
+    `setQuery` toQueryColl CommaSeparated ("status", Just status)
+
+data FindPetsByStatus  
+
+-- | @application/xml@
+instance Produces FindPetsByStatus MimeXML
+-- | @application/json@
+instance Produces FindPetsByStatus MimeJSON
+
+
+-- *** findPetsByTags
+
+-- | @GET \/pet\/findByTags@
+-- 
+-- Finds Pets by tags
+-- 
+-- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+-- 
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
+-- 
+findPetsByTags 
+  :: Accept accept -- ^ request accept ('MimeType')
+  -> Tags -- ^ "tags" -  Tags to filter by
+  -> OpenAPIPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept
+findPetsByTags  _ (Tags tags) =
+  _mkRequest "GET" ["/pet/findByTags"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
+    `setQuery` toQueryColl CommaSeparated ("tags", Just tags)
+
+{-# DEPRECATED findPetsByTags "" #-}
+
+data FindPetsByTags  
+
+-- | @application/xml@
+instance Produces FindPetsByTags MimeXML
+-- | @application/json@
+instance Produces FindPetsByTags MimeJSON
+
+
+-- *** getPetById
+
+-- | @GET \/pet\/{petId}@
+-- 
+-- Find pet by ID
+-- 
+-- Returns a single pet
+-- 
+-- AuthMethod: 'AuthApiKeyApiKey'
+-- 
+getPetById 
+  :: Accept accept -- ^ request accept ('MimeType')
+  -> PetId -- ^ "petId" -  ID of pet to return
+  -> OpenAPIPetstoreRequest GetPetById MimeNoContent Pet accept
+getPetById  _ (PetId petId) =
+  _mkRequest "GET" ["/pet/",toPath petId]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
+
+data GetPetById  
+
+-- | @application/xml@
+instance Produces GetPetById MimeXML
+-- | @application/json@
+instance Produces GetPetById MimeJSON
+
+
+-- *** updatePet
+
+-- | @PUT \/pet@
+-- 
+-- Update an existing pet
+-- 
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
+-- 
+updatePet 
+  :: (Consumes UpdatePet contentType, MimeRender contentType Pet)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> Pet -- ^ "pet" -  Pet object that needs to be added to the store
+  -> OpenAPIPetstoreRequest UpdatePet contentType NoContent MimeNoContent
+updatePet _ pet =
+  _mkRequest "PUT" ["/pet"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
+    `setBodyParam` pet
+
+data UpdatePet 
+
+-- | /Body Param/ "Pet" - Pet object that needs to be added to the store
+instance HasBodyParam UpdatePet Pet 
+
+-- | @application/xml@
+instance Consumes UpdatePet MimeXML
+-- | @application/json@
+instance Consumes UpdatePet MimeJSON
+
+instance Produces UpdatePet MimeNoContent
+
+
+-- *** updatePetWithForm
+
+-- | @POST \/pet\/{petId}@
+-- 
+-- Updates a pet in the store with form data
+-- 
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
+-- 
+updatePetWithForm 
+  :: (Consumes UpdatePetWithForm MimeFormUrlEncoded)
+  => PetId -- ^ "petId" -  ID of pet that needs to be updated
+  -> OpenAPIPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded NoContent MimeNoContent
+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
+
+instance Produces UpdatePetWithForm MimeNoContent
+
+
+-- *** uploadFile
+
+-- | @POST \/pet\/{petId}\/uploadImage@
+-- 
+-- uploads an image
+-- 
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
+-- 
+uploadFile 
+  :: (Consumes UploadFile MimeMultipartFormData)
+  => PetId -- ^ "petId" -  ID of pet to update
+  -> OpenAPIPetstoreRequest 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 File2 where
+  applyOptionalParam req (File2 xs) =
+    req `_addMultiFormPart` NH.partFileSource "file" xs
+
+-- | @multipart/form-data@
+instance Consumes UploadFile MimeMultipartFormData
+
+-- | @application/json@
+instance Produces UploadFile MimeJSON
+
+
+-- *** uploadFileWithRequiredFile
+
+-- | @POST \/fake\/{petId}\/uploadImageWithRequiredFile@
+-- 
+-- uploads an image (required)
+-- 
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
+-- 
+uploadFileWithRequiredFile 
+  :: (Consumes UploadFileWithRequiredFile MimeMultipartFormData)
+  => RequiredFile -- ^ "requiredFile" -  file to upload
+  -> PetId -- ^ "petId" -  ID of pet to update
+  -> OpenAPIPetstoreRequest UploadFileWithRequiredFile MimeMultipartFormData ApiResponse MimeJSON
+uploadFileWithRequiredFile (RequiredFile requiredFile) (PetId petId) =
+  _mkRequest "POST" ["/fake/",toPath petId,"/uploadImageWithRequiredFile"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
+    `_addMultiFormPart` NH.partFileSource "requiredFile" requiredFile
+
+data UploadFileWithRequiredFile  
+
+-- | /Optional Param/ "additionalMetadata" - Additional data to pass to server
+instance HasOptionalParam UploadFileWithRequiredFile AdditionalMetadata where
+  applyOptionalParam req (AdditionalMetadata xs) =
+    req `_addMultiFormPart` NH.partLBS "additionalMetadata" (mimeRender' MimeMultipartFormData xs)
+
+-- | @multipart/form-data@
+instance Consumes UploadFileWithRequiredFile MimeMultipartFormData
+
+-- | @application/json@
+instance Produces UploadFileWithRequiredFile MimeJSON
+
diff --git a/lib/OpenAPIPetstore/API/Store.hs b/lib/OpenAPIPetstore/API/Store.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/API/Store.hs
@@ -0,0 +1,149 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.API.Store
+-}
+
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.API.Store where
+
+import OpenAPIPetstore.Core
+import OpenAPIPetstore.MimeTypes
+import OpenAPIPetstore.Model as M
+
+import qualified Data.Aeson as A
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
+import qualified Data.Foldable as P
+import qualified Data.Map as Map
+import qualified Data.Maybe as P
+import qualified Data.Proxy as P (Proxy(..))
+import qualified Data.Set as Set
+import qualified Data.String as P
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Text.Lazy as TL
+import qualified Data.Text.Lazy.Encoding as TL
+import qualified Data.Time as TI
+import qualified Network.HTTP.Client.MultipartFormData as NH
+import qualified Network.HTTP.Media as ME
+import qualified Network.HTTP.Types as NH
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+
+import Data.Text (Text)
+import GHC.Base ((<|>))
+
+import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
+import qualified Prelude as P
+
+-- * Operations
+
+
+-- ** Store
+
+-- *** deleteOrder
+
+-- | @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
+-- 
+deleteOrder 
+  :: OrderIdText -- ^ "orderId" -  ID of the order that needs to be deleted
+  -> OpenAPIPetstoreRequest DeleteOrder MimeNoContent NoContent MimeNoContent
+deleteOrder (OrderIdText orderId) =
+  _mkRequest "DELETE" ["/store/order/",toPath orderId]
+
+data DeleteOrder  
+
+instance Produces DeleteOrder MimeNoContent
+
+
+-- *** getInventory
+
+-- | @GET \/store\/inventory@
+-- 
+-- Returns pet inventories by status
+-- 
+-- Returns a map of status codes to quantities
+-- 
+-- AuthMethod: 'AuthApiKeyApiKey'
+-- 
+getInventory 
+  :: OpenAPIPetstoreRequest 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
+  -> OpenAPIPetstoreRequest 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 
+  :: (Consumes PlaceOrder contentType, MimeRender contentType Order)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> Accept accept -- ^ request accept ('MimeType')
+  -> Order -- ^ "order" -  order placed for purchasing the pet
+  -> OpenAPIPetstoreRequest PlaceOrder contentType Order accept
+placeOrder _  _ order =
+  _mkRequest "POST" ["/store/order"]
+    `setBodyParam` order
+
+data PlaceOrder 
+
+-- | /Body Param/ "Order" - order placed for purchasing the pet
+instance HasBodyParam PlaceOrder Order 
+
+-- | @application/xml@
+instance Produces PlaceOrder MimeXML
+-- | @application/json@
+instance Produces PlaceOrder MimeJSON
+
diff --git a/lib/OpenAPIPetstore/API/User.hs b/lib/OpenAPIPetstore/API/User.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/API/User.hs
@@ -0,0 +1,235 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.API.User
+-}
+
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.API.User where
+
+import OpenAPIPetstore.Core
+import OpenAPIPetstore.MimeTypes
+import OpenAPIPetstore.Model as M
+
+import qualified Data.Aeson as A
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
+import qualified Data.Foldable as P
+import qualified Data.Map as Map
+import qualified Data.Maybe as P
+import qualified Data.Proxy as P (Proxy(..))
+import qualified Data.Set as Set
+import qualified Data.String as P
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Text.Lazy as TL
+import qualified Data.Text.Lazy.Encoding as TL
+import qualified Data.Time as TI
+import qualified Network.HTTP.Client.MultipartFormData as NH
+import qualified Network.HTTP.Media as ME
+import qualified Network.HTTP.Types as NH
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+
+import Data.Text (Text)
+import GHC.Base ((<|>))
+
+import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
+import qualified Prelude as P
+
+-- * Operations
+
+
+-- ** User
+
+-- *** createUser
+
+-- | @POST \/user@
+-- 
+-- Create user
+-- 
+-- This can only be done by the logged in user.
+-- 
+createUser 
+  :: (Consumes CreateUser contentType, MimeRender contentType User)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> User -- ^ "user" -  Created user object
+  -> OpenAPIPetstoreRequest CreateUser contentType NoContent MimeNoContent
+createUser _ user =
+  _mkRequest "POST" ["/user"]
+    `setBodyParam` user
+
+data CreateUser 
+
+-- | /Body Param/ "User" - Created user object
+instance HasBodyParam CreateUser User 
+
+instance Produces CreateUser MimeNoContent
+
+
+-- *** createUsersWithArrayInput
+
+-- | @POST \/user\/createWithArray@
+-- 
+-- Creates list of users with given input array
+-- 
+createUsersWithArrayInput 
+  :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType User2)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> User2 -- ^ "user" -  List of user object
+  -> OpenAPIPetstoreRequest CreateUsersWithArrayInput contentType NoContent MimeNoContent
+createUsersWithArrayInput _ user =
+  _mkRequest "POST" ["/user/createWithArray"]
+    `setBodyParam` user
+
+data CreateUsersWithArrayInput 
+
+-- | /Body Param/ "User" - List of user object
+instance HasBodyParam CreateUsersWithArrayInput User2 
+
+instance Produces CreateUsersWithArrayInput MimeNoContent
+
+
+-- *** createUsersWithListInput
+
+-- | @POST \/user\/createWithList@
+-- 
+-- Creates list of users with given input array
+-- 
+createUsersWithListInput 
+  :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType User2)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> User2 -- ^ "user" -  List of user object
+  -> OpenAPIPetstoreRequest CreateUsersWithListInput contentType NoContent MimeNoContent
+createUsersWithListInput _ user =
+  _mkRequest "POST" ["/user/createWithList"]
+    `setBodyParam` user
+
+data CreateUsersWithListInput 
+
+-- | /Body Param/ "User" - List of user object
+instance HasBodyParam CreateUsersWithListInput User2 
+
+instance Produces CreateUsersWithListInput MimeNoContent
+
+
+-- *** deleteUser
+
+-- | @DELETE \/user\/{username}@
+-- 
+-- Delete user
+-- 
+-- This can only be done by the logged in user.
+-- 
+deleteUser 
+  :: Username -- ^ "username" -  The name that needs to be deleted
+  -> OpenAPIPetstoreRequest DeleteUser MimeNoContent NoContent MimeNoContent
+deleteUser (Username username) =
+  _mkRequest "DELETE" ["/user/",toPath username]
+
+data DeleteUser  
+
+instance Produces DeleteUser MimeNoContent
+
+
+-- *** getUserByName
+
+-- | @GET \/user\/{username}@
+-- 
+-- Get user by user name
+-- 
+getUserByName 
+  :: Accept accept -- ^ request accept ('MimeType')
+  -> Username -- ^ "username" -  The name that needs to be fetched. Use user1 for testing.
+  -> OpenAPIPetstoreRequest GetUserByName MimeNoContent User accept
+getUserByName  _ (Username username) =
+  _mkRequest "GET" ["/user/",toPath username]
+
+data GetUserByName  
+
+-- | @application/xml@
+instance Produces GetUserByName MimeXML
+-- | @application/json@
+instance Produces GetUserByName MimeJSON
+
+
+-- *** loginUser
+
+-- | @GET \/user\/login@
+-- 
+-- Logs user into the system
+-- 
+loginUser 
+  :: Accept accept -- ^ request accept ('MimeType')
+  -> Username -- ^ "username" -  The user name for login
+  -> Password -- ^ "password" -  The password for login in clear text
+  -> OpenAPIPetstoreRequest LoginUser MimeNoContent Text accept
+loginUser  _ (Username username) (Password password) =
+  _mkRequest "GET" ["/user/login"]
+    `setQuery` toQuery ("username", Just username)
+    `setQuery` toQuery ("password", Just password)
+
+data LoginUser  
+
+-- | @application/xml@
+instance Produces LoginUser MimeXML
+-- | @application/json@
+instance Produces LoginUser MimeJSON
+
+
+-- *** logoutUser
+
+-- | @GET \/user\/logout@
+-- 
+-- Logs out current logged in user session
+-- 
+logoutUser 
+  :: OpenAPIPetstoreRequest LogoutUser MimeNoContent NoContent MimeNoContent
+logoutUser =
+  _mkRequest "GET" ["/user/logout"]
+
+data LogoutUser  
+
+instance Produces LogoutUser MimeNoContent
+
+
+-- *** updateUser
+
+-- | @PUT \/user\/{username}@
+-- 
+-- Updated user
+-- 
+-- This can only be done by the logged in user.
+-- 
+updateUser 
+  :: (Consumes UpdateUser contentType, MimeRender contentType User)
+  => ContentType contentType -- ^ request content-type ('MimeType')
+  -> User -- ^ "user" -  Updated user object
+  -> Username -- ^ "username" -  name that need to be deleted
+  -> OpenAPIPetstoreRequest UpdateUser contentType NoContent MimeNoContent
+updateUser _ user (Username username) =
+  _mkRequest "PUT" ["/user/",toPath username]
+    `setBodyParam` user
+
+data UpdateUser 
+
+-- | /Body Param/ "User" - Updated user object
+instance HasBodyParam UpdateUser User 
+
+instance Produces UpdateUser MimeNoContent
+
diff --git a/lib/OpenAPIPetstore/Client.hs b/lib/OpenAPIPetstore/Client.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/Client.hs
@@ -0,0 +1,217 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.Client
+-}
+
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE DeriveFunctor #-}
+{-# LANGUAGE DeriveFoldable #-}
+{-# LANGUAGE DeriveTraversable #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.Client where
+
+import OpenAPIPetstore.Core
+import OpenAPIPetstore.Logging
+import OpenAPIPetstore.MimeTypes
+
+import qualified Control.Exception.Safe as E
+import qualified Control.Monad.IO.Class as P
+import qualified Control.Monad as P
+import qualified Data.Aeson.Types as A
+import qualified Data.ByteString.Char8 as BC
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.ByteString.Lazy.Char8 as BCL
+import qualified Data.Proxy as P (Proxy(..))
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Network.HTTP.Client as NH
+import qualified Network.HTTP.Client.MultipartFormData as NH
+import qualified Network.HTTP.Types as NH
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+
+import Data.Function ((&))
+import Data.Monoid ((<>))
+import Data.Text (Text)
+import GHC.Exts (IsString(..))
+
+-- * Dispatch
+
+-- ** Lbs
+
+-- | send a request returning the raw http response
+dispatchLbs
+  :: (Produces req accept, MimeType contentType)
+  => NH.Manager -- ^ http-client Connection manager
+  -> OpenAPIPetstoreConfig -- ^ config
+  -> OpenAPIPetstoreRequest req contentType res accept -- ^ request
+  -> IO (NH.Response BCL.ByteString) -- ^ response
+dispatchLbs manager config request  = do
+  initReq <- _toInitRequest config request
+  dispatchInitUnsafe manager config initReq
+
+-- ** Mime
+
+-- | pair of decoded http body and http response
+data MimeResult res =
+  MimeResult { mimeResult :: Either MimeError res -- ^ decoded http body
+             , mimeResultResponse :: NH.Response BCL.ByteString -- ^ http response 
+             }
+  deriving (Show, Functor, Foldable, Traversable)
+
+-- | pair of unrender/parser error and http response
+data MimeError =
+  MimeError {
+    mimeError :: String -- ^ unrender/parser error
+  , mimeErrorResponse :: NH.Response BCL.ByteString -- ^ http response 
+  } deriving (Eq, Show)
+
+-- | send a request returning the 'MimeResult'
+dispatchMime
+  :: forall req contentType res accept. (Produces req accept, MimeUnrender accept res, MimeType contentType)
+  => NH.Manager -- ^ http-client Connection manager
+  -> OpenAPIPetstoreConfig -- ^ config
+  -> OpenAPIPetstoreRequest req contentType res accept -- ^ request
+  -> IO (MimeResult res) -- ^ response
+dispatchMime manager config request = do
+  httpResponse <- dispatchLbs manager config request
+  let statusCode = NH.statusCode . NH.responseStatus $ httpResponse
+  parsedResult <-
+    runConfigLogWithExceptions "Client" config $
+    do if (statusCode >= 400 && statusCode < 600)
+         then do
+           let s = "error statusCode: " ++ show statusCode
+           _log "Client" levelError (T.pack s)
+           pure (Left (MimeError s httpResponse))
+         else case mimeUnrender (P.Proxy :: P.Proxy accept) (NH.responseBody httpResponse) of
+           Left s -> do
+             _log "Client" levelError (T.pack s)
+             pure (Left (MimeError s httpResponse))
+           Right r -> pure (Right r)
+  return (MimeResult parsedResult httpResponse)
+
+-- | like 'dispatchMime', but only returns the decoded http body
+dispatchMime'
+  :: (Produces req accept, MimeUnrender accept res, MimeType contentType)
+  => NH.Manager -- ^ http-client Connection manager
+  -> OpenAPIPetstoreConfig -- ^ config
+  -> OpenAPIPetstoreRequest req contentType res accept -- ^ request
+  -> IO (Either MimeError res) -- ^ response
+dispatchMime' manager config request  = do
+    MimeResult parsedResult _ <- dispatchMime manager config request
+    return parsedResult
+
+-- ** Unsafe
+
+-- | like 'dispatchReqLbs', but does not validate the operation is a 'Producer' of the "accept" 'MimeType'.  (Useful if the server's response is undocumented)
+dispatchLbsUnsafe
+  :: (MimeType accept, MimeType contentType)
+  => NH.Manager -- ^ http-client Connection manager
+  -> OpenAPIPetstoreConfig -- ^ config
+  -> OpenAPIPetstoreRequest req contentType res accept -- ^ request
+  -> IO (NH.Response BCL.ByteString) -- ^ response
+dispatchLbsUnsafe manager config request  = do
+  initReq <- _toInitRequest config request
+  dispatchInitUnsafe manager config initReq
+
+-- | dispatch an InitRequest
+dispatchInitUnsafe
+  :: NH.Manager -- ^ http-client Connection manager
+  -> OpenAPIPetstoreConfig -- ^ config
+  -> InitRequest req contentType res accept -- ^ init request
+  -> IO (NH.Response BCL.ByteString) -- ^ response
+dispatchInitUnsafe manager config (InitRequest req) = do
+  runConfigLogWithExceptions src config $
+    do _log src levelInfo requestLogMsg
+       _log src levelDebug requestDbgLogMsg
+       res <- P.liftIO $ NH.httpLbs req manager
+       _log src levelInfo (responseLogMsg res)
+       _log src levelDebug ((T.pack . show) res)
+       return res
+  where
+    src = "Client"
+    endpoint =
+      T.pack $
+      BC.unpack $
+      NH.method req <> " " <> NH.host req <> NH.path req <> NH.queryString req
+    requestLogMsg = "REQ:" <> endpoint
+    requestDbgLogMsg =
+      "Headers=" <> (T.pack . show) (NH.requestHeaders req) <> " Body=" <>
+      (case NH.requestBody req of
+         NH.RequestBodyLBS xs -> T.decodeUtf8 (BL.toStrict xs)
+         _ -> "<RequestBody>")
+    responseStatusCode = (T.pack . show) . NH.statusCode . NH.responseStatus
+    responseLogMsg res =
+      "RES:statusCode=" <> responseStatusCode res <> " (" <> endpoint <> ")"
+
+-- * InitRequest
+
+-- | wraps an http-client 'Request' with request/response type parameters
+newtype InitRequest req contentType res accept = InitRequest
+  { unInitRequest :: NH.Request
+  } deriving (Show)
+
+-- |  Build an http-client 'Request' record from the supplied config and request
+_toInitRequest
+  :: (MimeType accept, MimeType contentType)
+  => OpenAPIPetstoreConfig -- ^ config
+  -> OpenAPIPetstoreRequest req contentType res accept -- ^ request
+  -> IO (InitRequest req contentType res accept) -- ^ initialized request
+_toInitRequest config req0  = 
+  runConfigLogWithExceptions "Client" config $ do
+    parsedReq <- P.liftIO $ NH.parseRequest $ BCL.unpack $ BCL.append (configHost config) (BCL.concat (rUrlPath req0))
+    req1 <- P.liftIO $ _applyAuthMethods req0 config
+    P.when
+        (configValidateAuthMethods config && (not . null . rAuthTypes) req1)
+        (E.throw $ AuthMethodException $ "AuthMethod not configured: " <> (show . head . rAuthTypes) req1)
+    let req2 = req1 & _setContentTypeHeader & _setAcceptHeader
+        reqHeaders = ("User-Agent", WH.toHeader (configUserAgent config)) : paramsHeaders (rParams req2)
+        reqQuery = NH.renderQuery True (paramsQuery (rParams req2))
+        pReq = parsedReq { NH.method = (rMethod req2)
+                        , NH.requestHeaders = reqHeaders
+                        , NH.queryString = reqQuery
+                        }
+    outReq <- case paramsBody (rParams req2) of
+        ParamBodyNone -> pure (pReq { NH.requestBody = mempty })
+        ParamBodyB bs -> pure (pReq { NH.requestBody = NH.RequestBodyBS bs })
+        ParamBodyBL bl -> pure (pReq { NH.requestBody = NH.RequestBodyLBS bl })
+        ParamBodyFormUrlEncoded form -> pure (pReq { NH.requestBody = NH.RequestBodyLBS (WH.urlEncodeForm form) })
+        ParamBodyMultipartFormData parts -> NH.formDataBody parts pReq
+
+    pure (InitRequest outReq)
+
+-- | modify the underlying Request
+modifyInitRequest :: InitRequest req contentType res accept -> (NH.Request -> NH.Request) -> InitRequest req contentType res accept
+modifyInitRequest (InitRequest req) f = InitRequest (f req)
+
+-- | modify the underlying Request (monadic)
+modifyInitRequestM :: Monad m => InitRequest req contentType res accept -> (NH.Request -> m NH.Request) -> m (InitRequest req contentType res accept)
+modifyInitRequestM (InitRequest req) f = fmap InitRequest (f req)
+
+-- ** Logging 
+
+-- | Run a block using the configured logger instance
+runConfigLog
+  :: P.MonadIO m
+  => OpenAPIPetstoreConfig -> LogExec m
+runConfigLog config = configLogExecWithContext config (configLogContext config)
+
+-- | Run a block using the configured logger instance (logs exceptions)
+runConfigLogWithExceptions
+  :: (E.MonadCatch m, P.MonadIO m)
+  => T.Text -> OpenAPIPetstoreConfig -> LogExec m
+runConfigLogWithExceptions src config = runConfigLog config . logExceptions src
diff --git a/lib/OpenAPIPetstore/Core.hs b/lib/OpenAPIPetstore/Core.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/Core.hs
@@ -0,0 +1,544 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.Core
+-}
+
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE ExistentialQuantification #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE NamedFieldPuns #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TupleSections #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds #-}
+
+module OpenAPIPetstore.Core where
+
+import OpenAPIPetstore.MimeTypes
+import OpenAPIPetstore.Logging
+
+import qualified Control.Arrow as P (left)
+import qualified Control.DeepSeq as NF
+import qualified Control.Exception.Safe as E
+import qualified Data.Aeson as A
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Base64.Lazy as BL64
+import qualified Data.ByteString.Builder as BB
+import qualified Data.ByteString.Char8 as BC
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.ByteString.Lazy.Char8 as BCL
+import qualified Data.CaseInsensitive as CI
+import qualified Data.Data as P (Data, Typeable, TypeRep, typeRep)
+import qualified Data.Foldable as P
+import qualified Data.Ix as P
+import qualified Data.Maybe as P
+import qualified Data.Proxy as P (Proxy(..))
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Time as TI
+import qualified Data.Time.ISO8601 as TI
+import qualified GHC.Base as P (Alternative)
+import qualified Lens.Micro as L
+import qualified Network.HTTP.Client.MultipartFormData as NH
+import qualified Network.HTTP.Types as NH
+import qualified Prelude as P
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+import qualified Text.Printf as T
+
+import Control.Applicative ((<|>))
+import Control.Applicative (Alternative)
+import Data.Function ((&))
+import Data.Foldable(foldlM)
+import Data.Monoid ((<>))
+import Data.Text (Text)
+import Prelude (($), (.), (<$>), (<*>), Maybe(..), Bool(..), Char, String, fmap, mempty, pure, return, show, IO, Monad, Functor)
+
+-- * OpenAPIPetstoreConfig
+
+-- | 
+data OpenAPIPetstoreConfig = OpenAPIPetstoreConfig
+  { configHost  :: BCL.ByteString -- ^ host supplied in the Request
+  , configUserAgent :: Text -- ^ user-agent supplied in the Request
+  , configLogExecWithContext :: LogExecWithContext -- ^ Run a block using a Logger instance
+  , configLogContext :: LogContext -- ^ Configures the logger
+  , configAuthMethods :: [AnyAuthMethod] -- ^ List of configured auth methods
+  , configValidateAuthMethods :: Bool -- ^ throw exceptions if auth methods are not configured
+  }
+
+-- | display the config
+instance P.Show OpenAPIPetstoreConfig where
+  show c =
+    T.printf
+      "{ configHost = %v, configUserAgent = %v, ..}"
+      (show (configHost c))
+      (show (configUserAgent c))
+
+-- | constructs a default OpenAPIPetstoreConfig
+--
+-- configHost:
+--
+-- @http://petstore.swagger.io:80/v2@
+--
+-- configUserAgent:
+--
+-- @"openapi-petstore/0.1.0.0"@
+--
+newConfig :: IO OpenAPIPetstoreConfig
+newConfig = do
+    logCxt <- initLogContext
+    return $ OpenAPIPetstoreConfig
+        { configHost = "http://petstore.swagger.io:80/v2"
+        , configUserAgent = "openapi-petstore/0.1.0.0"
+        , configLogExecWithContext = runDefaultLogExecWithContext
+        , configLogContext = logCxt
+        , configAuthMethods = []
+        , configValidateAuthMethods = True
+        }  
+
+-- | updates config use AuthMethod on matching requests
+addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig
+addAuthMethod config@OpenAPIPetstoreConfig {configAuthMethods = as} a =
+  config { configAuthMethods = AnyAuthMethod a : as}
+
+-- | updates the config to use stdout logging
+withStdoutLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig
+withStdoutLogging p = do
+    logCxt <- stdoutLoggingContext (configLogContext p)
+    return $ p { configLogExecWithContext = stdoutLoggingExec, configLogContext = logCxt }
+
+-- | updates the config to use stderr logging
+withStderrLogging :: OpenAPIPetstoreConfig -> IO OpenAPIPetstoreConfig
+withStderrLogging p = do
+    logCxt <- stderrLoggingContext (configLogContext p)
+    return $ p { configLogExecWithContext = stderrLoggingExec, configLogContext = logCxt }
+
+-- | updates the config to disable logging
+withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig
+withNoLogging p = p { configLogExecWithContext =  runNullLogExec}
+ 
+-- * OpenAPIPetstoreRequest
+
+-- | Represents a request.
+--
+--   Type Variables:
+--
+--   * req - request operation
+--   * contentType - 'MimeType' associated with request body
+--   * res - response model
+--   * accept - 'MimeType' associated with response body
+data OpenAPIPetstoreRequest req contentType res accept = OpenAPIPetstoreRequest
+  { rMethod  :: NH.Method   -- ^ Method of OpenAPIPetstoreRequest
+  , rUrlPath :: [BCL.ByteString] -- ^ Endpoint of OpenAPIPetstoreRequest
+  , rParams   :: Params -- ^ params of OpenAPIPetstoreRequest
+  , rAuthTypes :: [P.TypeRep] -- ^ types of auth methods
+  }
+  deriving (P.Show)
+
+-- | 'rMethod' Lens
+rMethodL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) NH.Method
+rMethodL f OpenAPIPetstoreRequest{..} = (\rMethod -> OpenAPIPetstoreRequest { rMethod, ..} ) <$> f rMethod
+{-# INLINE rMethodL #-}
+
+-- | 'rUrlPath' Lens
+rUrlPathL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [BCL.ByteString]
+rUrlPathL f OpenAPIPetstoreRequest{..} = (\rUrlPath -> OpenAPIPetstoreRequest { rUrlPath, ..} ) <$> f rUrlPath
+{-# INLINE rUrlPathL #-}
+
+-- | 'rParams' Lens
+rParamsL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) Params
+rParamsL f OpenAPIPetstoreRequest{..} = (\rParams -> OpenAPIPetstoreRequest { rParams, ..} ) <$> f rParams
+{-# INLINE rParamsL #-}
+
+-- | 'rParams' Lens
+rAuthTypesL :: Lens_' (OpenAPIPetstoreRequest req contentType res accept) [P.TypeRep]
+rAuthTypesL f OpenAPIPetstoreRequest{..} = (\rAuthTypes -> OpenAPIPetstoreRequest { rAuthTypes, ..} ) <$> f rAuthTypes
+{-# INLINE rAuthTypesL #-}
+
+-- * HasBodyParam
+
+-- | Designates the body parameter of a request
+class HasBodyParam req param where
+  setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept
+  setBodyParam req xs =
+    req `_setBodyLBS` mimeRender (P.Proxy :: P.Proxy contentType) xs & _setContentTypeHeader
+
+-- * HasOptionalParam
+
+-- | Designates the optional parameters of a request
+class HasOptionalParam req param where
+  {-# MINIMAL applyOptionalParam | (-&-) #-}
+
+  -- | Apply an optional parameter to a request
+  applyOptionalParam :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept
+  applyOptionalParam = (-&-)
+  {-# INLINE applyOptionalParam #-}
+
+  -- | infix operator \/ alias for 'addOptionalParam'
+  (-&-) :: OpenAPIPetstoreRequest req contentType res accept -> param -> OpenAPIPetstoreRequest req contentType res accept
+  (-&-) = applyOptionalParam
+  {-# INLINE (-&-) #-}
+
+infixl 2 -&-
+
+-- | Request Params
+data Params = Params
+  { paramsQuery :: NH.Query
+  , paramsHeaders :: NH.RequestHeaders
+  , paramsBody :: ParamBody
+  }
+  deriving (P.Show)
+
+-- | 'paramsQuery' Lens
+paramsQueryL :: Lens_' Params NH.Query
+paramsQueryL f Params{..} = (\paramsQuery -> Params { paramsQuery, ..} ) <$> f paramsQuery
+{-# INLINE paramsQueryL #-}
+
+-- | 'paramsHeaders' Lens
+paramsHeadersL :: Lens_' Params NH.RequestHeaders
+paramsHeadersL f Params{..} = (\paramsHeaders -> Params { paramsHeaders, ..} ) <$> f paramsHeaders
+{-# INLINE paramsHeadersL #-}
+
+-- | 'paramsBody' Lens
+paramsBodyL :: Lens_' Params ParamBody
+paramsBodyL f Params{..} = (\paramsBody -> Params { paramsBody, ..} ) <$> f paramsBody
+{-# INLINE paramsBodyL #-}
+
+-- | Request Body
+data ParamBody
+  = ParamBodyNone
+  | ParamBodyB B.ByteString
+  | ParamBodyBL BL.ByteString
+  | ParamBodyFormUrlEncoded WH.Form
+  | ParamBodyMultipartFormData [NH.Part]
+  deriving (P.Show)
+
+-- ** OpenAPIPetstoreRequest Utils
+
+_mkRequest :: NH.Method -- ^ Method 
+          -> [BCL.ByteString] -- ^ Endpoint
+          -> OpenAPIPetstoreRequest req contentType res accept -- ^ req: Request Type, res: Response Type
+_mkRequest m u = OpenAPIPetstoreRequest m u _mkParams []
+
+_mkParams :: Params
+_mkParams = Params [] [] ParamBodyNone
+
+setHeader :: OpenAPIPetstoreRequest req contentType res accept -> [NH.Header] -> OpenAPIPetstoreRequest req contentType res accept
+setHeader req header =
+  req `removeHeader` P.fmap P.fst header &
+  L.over (rParamsL . paramsHeadersL) (header P.++)
+
+removeHeader :: OpenAPIPetstoreRequest req contentType res accept -> [NH.HeaderName] -> OpenAPIPetstoreRequest req contentType res accept
+removeHeader req header =
+  req &
+  L.over
+    (rParamsL . paramsHeadersL)
+    (P.filter (\h -> cifst h `P.notElem` P.fmap CI.mk header))
+  where
+    cifst = CI.mk . P.fst
+
+
+_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept
+_setContentTypeHeader req =
+    case mimeType (P.Proxy :: P.Proxy contentType) of 
+        Just m -> req `setHeader` [("content-type", BC.pack $ P.show m)]
+        Nothing -> req `removeHeader` ["content-type"]
+
+_setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept
+_setAcceptHeader req =
+    case mimeType (P.Proxy :: P.Proxy accept) of 
+        Just m -> req `setHeader` [("accept", BC.pack $ P.show m)]
+        Nothing -> req `removeHeader` ["accept"]
+
+setQuery :: OpenAPIPetstoreRequest req contentType res accept -> [NH.QueryItem] -> OpenAPIPetstoreRequest req contentType res accept
+setQuery req query = 
+  req &
+  L.over
+    (rParamsL . paramsQueryL)
+    ((query P.++) . P.filter (\q -> cifst q `P.notElem` P.fmap cifst query))
+  where
+    cifst = CI.mk . P.fst
+
+addForm :: OpenAPIPetstoreRequest req contentType res accept -> WH.Form -> OpenAPIPetstoreRequest req contentType res accept
+addForm req newform = 
+    let form = case paramsBody (rParams req) of
+            ParamBodyFormUrlEncoded _form -> _form
+            _ -> mempty
+    in req & L.set (rParamsL . paramsBodyL) (ParamBodyFormUrlEncoded (newform <> form))
+
+_addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> NH.Part -> OpenAPIPetstoreRequest req contentType res accept
+_addMultiFormPart req newpart = 
+    let parts = case paramsBody (rParams req) of
+            ParamBodyMultipartFormData _parts -> _parts
+            _ -> []
+    in req & L.set (rParamsL . paramsBodyL) (ParamBodyMultipartFormData (newpart : parts))
+
+_setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> B.ByteString -> OpenAPIPetstoreRequest req contentType res accept
+_setBodyBS req body = 
+    req & L.set (rParamsL . paramsBodyL) (ParamBodyB body)
+
+_setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> BL.ByteString -> OpenAPIPetstoreRequest req contentType res accept
+_setBodyLBS req body = 
+    req & L.set (rParamsL . paramsBodyL) (ParamBodyBL body)
+
+_hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> P.Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept
+_hasAuthType req proxy =
+  req & L.over rAuthTypesL (P.typeRep proxy :)
+
+-- ** Params Utils
+
+toPath
+  :: WH.ToHttpApiData a
+  => a -> BCL.ByteString
+toPath = BB.toLazyByteString . WH.toEncodedUrlPiece
+
+toHeader :: WH.ToHttpApiData a => (NH.HeaderName, a) -> [NH.Header]
+toHeader x = [fmap WH.toHeader x]
+
+toForm :: WH.ToHttpApiData v => (BC.ByteString, v) -> WH.Form
+toForm (k,v) = WH.toForm [(BC.unpack k,v)]
+
+toQuery :: WH.ToHttpApiData a => (BC.ByteString, Maybe a) -> [NH.QueryItem]
+toQuery x = [(fmap . fmap) toQueryParam x]
+  where toQueryParam = T.encodeUtf8 . WH.toQueryParam
+
+-- *** OpenAPI `CollectionFormat` Utils
+
+-- | Determines the format of the array if type array is used.
+data CollectionFormat
+  = CommaSeparated -- ^ CSV format for multiple parameters.
+  | SpaceSeparated -- ^ Also called "SSV"
+  | TabSeparated -- ^ Also called "TSV"
+  | PipeSeparated -- ^ `value1|value2|value2`
+  | MultiParamArray -- ^ Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" ('NH.Query') or "formData" ('WH.Form')
+
+toHeaderColl :: WH.ToHttpApiData a => CollectionFormat -> (NH.HeaderName, [a]) -> [NH.Header]
+toHeaderColl c xs = _toColl c toHeader xs
+
+toFormColl :: WH.ToHttpApiData v => CollectionFormat -> (BC.ByteString, [v]) -> WH.Form
+toFormColl c xs = WH.toForm $ fmap unpack $ _toColl c toHeader $ pack xs
+  where
+    pack (k,v) = (CI.mk k, v)
+    unpack (k,v) = (BC.unpack (CI.original k), BC.unpack v)
+
+toQueryColl :: WH.ToHttpApiData a => CollectionFormat -> (BC.ByteString, Maybe [a]) -> NH.Query
+toQueryColl c xs = _toCollA c toQuery xs
+
+_toColl :: P.Traversable f => CollectionFormat -> (f a -> [(b, BC.ByteString)]) -> f [a] -> [(b, BC.ByteString)]
+_toColl c encode xs = fmap (fmap P.fromJust) (_toCollA' c fencode BC.singleton (fmap Just xs))
+  where fencode = fmap (fmap Just) . encode . fmap P.fromJust
+        {-# INLINE fencode #-}
+
+_toCollA :: (P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t BC.ByteString)]) -> f (t [a]) -> [(b, t BC.ByteString)]
+_toCollA c encode xs = _toCollA' c encode BC.singleton xs
+
+_toCollA' :: (P.Monoid c, P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)]
+_toCollA' c encode one xs = case c of
+  CommaSeparated -> go (one ',')
+  SpaceSeparated -> go (one ' ')
+  TabSeparated -> go (one '\t')
+  PipeSeparated -> go (one '|')
+  MultiParamArray -> expandList
+  where
+    go sep =
+      [P.foldl1 (\(sk, sv) (_, v) -> (sk, (combine sep <$> sv <*> v) <|> sv <|> v)) expandList]
+    combine sep x y = x <> sep <> y
+    expandList = (P.concatMap encode . (P.traverse . P.traverse) P.toList) xs
+    {-# INLINE go #-}
+    {-# INLINE expandList #-}
+    {-# INLINE combine #-}
+  
+-- * AuthMethods
+
+-- | Provides a method to apply auth methods to requests
+class P.Typeable a =>
+      AuthMethod a  where
+  applyAuthMethod
+    :: OpenAPIPetstoreConfig
+    -> a
+    -> OpenAPIPetstoreRequest req contentType res accept
+    -> IO (OpenAPIPetstoreRequest req contentType res accept)
+
+-- | An existential wrapper for any AuthMethod
+data AnyAuthMethod = forall a. AuthMethod a => AnyAuthMethod a deriving (P.Typeable)
+
+instance AuthMethod AnyAuthMethod where applyAuthMethod config (AnyAuthMethod a) req = applyAuthMethod config a req
+
+-- | indicates exceptions related to AuthMethods
+data AuthMethodException = AuthMethodException String deriving (P.Show, P.Typeable)
+
+instance E.Exception AuthMethodException
+
+-- | apply all matching AuthMethods in config to request
+_applyAuthMethods
+  :: OpenAPIPetstoreRequest req contentType res accept
+  -> OpenAPIPetstoreConfig
+  -> IO (OpenAPIPetstoreRequest req contentType res accept)
+_applyAuthMethods req config@(OpenAPIPetstoreConfig {configAuthMethods = as}) =
+  foldlM go req as
+  where
+    go r (AnyAuthMethod a) = applyAuthMethod config a r
+  
+-- * Utils
+
+-- | Removes Null fields.  (OpenAPI-Specification 2.0 does not allow Null in JSON)
+_omitNulls :: [(Text, A.Value)] -> A.Value
+_omitNulls = A.object . P.filter notNull
+  where
+    notNull (_, A.Null) = False
+    notNull _ = True
+
+-- | Encodes fields using WH.toQueryParam
+_toFormItem :: (WH.ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text])
+_toFormItem name x = (name,) . (:[]) . WH.toQueryParam <$> x
+
+-- | Collapse (Just "") to Nothing
+_emptyToNothing :: Maybe String -> Maybe String
+_emptyToNothing (Just "") = Nothing
+_emptyToNothing x = x
+{-# INLINE _emptyToNothing #-}
+
+-- | Collapse (Just mempty) to Nothing
+_memptyToNothing :: (P.Monoid a, P.Eq a) => Maybe a -> Maybe a
+_memptyToNothing (Just x) | x P.== P.mempty = Nothing
+_memptyToNothing x = x
+{-# INLINE _memptyToNothing #-}
+
+-- * DateTime Formatting
+
+newtype DateTime = DateTime { unDateTime :: TI.UTCTime }
+  deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData,TI.ParseTime,TI.FormatTime)
+instance A.FromJSON DateTime where
+  parseJSON = A.withText "DateTime" (_readDateTime . T.unpack)
+instance A.ToJSON DateTime where
+  toJSON (DateTime t) = A.toJSON (_showDateTime t)
+instance WH.FromHttpApiData DateTime where
+  parseUrlPiece = P.left T.pack . _readDateTime . T.unpack
+instance WH.ToHttpApiData DateTime where
+  toUrlPiece (DateTime t) = T.pack (_showDateTime t)
+instance P.Show DateTime where
+  show (DateTime t) = _showDateTime t
+instance MimeRender MimeMultipartFormData DateTime where
+  mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | @_parseISO8601@
+_readDateTime :: (TI.ParseTime t, Monad m, Alternative m) => String -> m t
+_readDateTime =
+  _parseISO8601
+{-# INLINE _readDateTime #-}
+
+-- | @TI.formatISO8601Millis@
+_showDateTime :: (t ~ TI.UTCTime, TI.FormatTime t) => t -> String
+_showDateTime =
+  TI.formatISO8601Millis
+{-# INLINE _showDateTime #-}
+
+-- | parse an ISO8601 date-time string
+_parseISO8601 :: (TI.ParseTime t, Monad m, Alternative m) => String -> m t
+_parseISO8601 t =
+  P.asum $
+  P.flip (TI.parseTimeM True TI.defaultTimeLocale) t <$>
+  ["%FT%T%QZ", "%FT%T%Q%z", "%FT%T%Q%Z"]
+{-# INLINE _parseISO8601 #-}
+
+-- * Date Formatting
+
+newtype Date = Date { unDate :: TI.Day }
+  deriving (P.Enum,P.Eq,P.Data,P.Ord,P.Ix,NF.NFData,TI.ParseTime,TI.FormatTime)
+instance A.FromJSON Date where
+  parseJSON = A.withText "Date" (_readDate . T.unpack)
+instance A.ToJSON Date where
+  toJSON (Date t) = A.toJSON (_showDate t)
+instance WH.FromHttpApiData Date where
+  parseUrlPiece = P.left T.pack . _readDate . T.unpack
+instance WH.ToHttpApiData Date where
+  toUrlPiece (Date t) = T.pack (_showDate t)
+instance P.Show Date where
+  show (Date t) = _showDate t
+instance MimeRender MimeMultipartFormData Date where
+  mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | @TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"@
+_readDate :: (TI.ParseTime t, Monad m) => String -> m t
+_readDate =
+  TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"
+{-# INLINE _readDate #-}
+
+-- | @TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"@
+_showDate :: TI.FormatTime t => t -> String
+_showDate =
+  TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"
+{-# INLINE _showDate #-}
+
+-- * Byte/Binary Formatting
+
+  
+-- | base64 encoded characters
+newtype ByteArray = ByteArray { unByteArray :: BL.ByteString }
+  deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData)
+
+instance A.FromJSON ByteArray where
+  parseJSON = A.withText "ByteArray" _readByteArray
+instance A.ToJSON ByteArray where
+  toJSON = A.toJSON . _showByteArray
+instance WH.FromHttpApiData ByteArray where
+  parseUrlPiece = P.left T.pack . _readByteArray
+instance WH.ToHttpApiData ByteArray where
+  toUrlPiece = _showByteArray
+instance P.Show ByteArray where
+  show = T.unpack . _showByteArray
+instance MimeRender MimeMultipartFormData ByteArray where
+  mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | read base64 encoded characters
+_readByteArray :: Monad m => Text -> m ByteArray
+_readByteArray = P.either P.fail (pure . ByteArray) . BL64.decode . BL.fromStrict . T.encodeUtf8
+{-# INLINE _readByteArray #-}
+
+-- | show base64 encoded characters
+_showByteArray :: ByteArray -> Text
+_showByteArray = T.decodeUtf8 . BL.toStrict . BL64.encode . unByteArray
+{-# INLINE _showByteArray #-}
+
+-- | any sequence of octets
+newtype Binary = Binary { unBinary :: BL.ByteString }
+  deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData)
+
+instance A.FromJSON Binary where
+  parseJSON = A.withText "Binary" _readBinaryBase64
+instance A.ToJSON Binary where
+  toJSON = A.toJSON . _showBinaryBase64
+instance WH.FromHttpApiData Binary where
+  parseUrlPiece = P.left T.pack . _readBinaryBase64
+instance WH.ToHttpApiData Binary where
+  toUrlPiece = _showBinaryBase64
+instance P.Show Binary where
+  show = T.unpack . _showBinaryBase64
+instance MimeRender MimeMultipartFormData Binary where
+  mimeRender _ = unBinary
+
+_readBinaryBase64 :: Monad m => Text -> m Binary
+_readBinaryBase64 = P.either P.fail (pure . Binary) . BL64.decode . BL.fromStrict . T.encodeUtf8
+{-# INLINE _readBinaryBase64 #-}
+
+_showBinaryBase64 :: Binary -> Text
+_showBinaryBase64 = T.decodeUtf8 . BL.toStrict . BL64.encode . unBinary
+{-# INLINE _showBinaryBase64 #-}
+
+-- * Lens Type Aliases
+
+type Lens_' s a = Lens_ s s a a
+type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t
diff --git a/lib/OpenAPIPetstore/Logging.hs b/lib/OpenAPIPetstore/Logging.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/Logging.hs
@@ -0,0 +1,118 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.Logging
+Katip Logging functions
+-}
+
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+
+module OpenAPIPetstore.Logging where
+
+import qualified Control.Exception.Safe as E
+import qualified Control.Monad.IO.Class as P
+import qualified Control.Monad.Trans.Reader as P
+import qualified Data.Text as T
+import qualified Lens.Micro as L
+import qualified System.IO as IO
+
+import Data.Text (Text)
+import GHC.Exts (IsString(..))
+
+import qualified Katip as LG
+
+-- * Type Aliases (for compatibility)
+
+-- | Runs a Katip logging block with the Log environment
+type LogExecWithContext = forall m. P.MonadIO m =>
+                                    LogContext -> LogExec m
+
+-- | A Katip logging block
+type LogExec m = forall a. LG.KatipT m a -> m a
+
+-- | A Katip Log environment
+type LogContext = LG.LogEnv
+
+-- | A Katip Log severity
+type LogLevel = LG.Severity
+
+-- * default logger
+
+-- | the default log environment
+initLogContext :: IO LogContext
+initLogContext = LG.initLogEnv "OpenAPIPetstore" "dev"
+
+-- | Runs a Katip logging block with the Log environment
+runDefaultLogExecWithContext :: LogExecWithContext
+runDefaultLogExecWithContext = LG.runKatipT
+
+-- * stdout logger
+
+-- | Runs a Katip logging block with the Log environment
+stdoutLoggingExec :: LogExecWithContext
+stdoutLoggingExec = runDefaultLogExecWithContext
+
+-- | A Katip Log environment which targets stdout
+stdoutLoggingContext :: LogContext -> IO LogContext
+stdoutLoggingContext cxt = do
+    handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stdout LG.InfoS LG.V2
+    LG.registerScribe "stdout" handleScribe LG.defaultScribeSettings cxt
+
+-- * stderr logger
+
+-- | Runs a Katip logging block with the Log environment
+stderrLoggingExec :: LogExecWithContext
+stderrLoggingExec = runDefaultLogExecWithContext
+
+-- | A Katip Log environment which targets stderr
+stderrLoggingContext :: LogContext -> IO LogContext
+stderrLoggingContext cxt = do
+    handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stderr LG.InfoS LG.V2
+    LG.registerScribe "stderr" handleScribe LG.defaultScribeSettings cxt
+
+-- * Null logger
+
+-- | Disables Katip logging
+runNullLogExec :: LogExecWithContext
+runNullLogExec le (LG.KatipT f) = P.runReaderT f (L.set LG.logEnvScribes mempty le)
+
+-- * Log Msg
+
+-- | Log a katip message
+_log :: (Applicative m, LG.Katip m) => Text -> LogLevel -> Text -> m ()
+_log src level msg = do
+  LG.logMsg (fromString $ T.unpack src) level (LG.logStr msg)
+
+-- * Log Exceptions
+
+-- | re-throws exceptions after logging them
+logExceptions
+  :: (LG.Katip m, E.MonadCatch m, Applicative m)
+  => Text -> m a -> m a
+logExceptions src =
+  E.handle
+    (\(e :: E.SomeException) -> do
+       _log src LG.ErrorS ((T.pack . show) e)
+       E.throw e)
+
+-- * Log Level
+
+levelInfo :: LogLevel
+levelInfo = LG.InfoS
+
+levelError :: LogLevel
+levelError = LG.ErrorS
+
+levelDebug :: LogLevel
+levelDebug = LG.DebugS
+
diff --git a/lib/OpenAPIPetstore/MimeTypes.hs b/lib/OpenAPIPetstore/MimeTypes.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/MimeTypes.hs
@@ -0,0 +1,203 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.MimeTypes
+-}
+
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE ExistentialQuantification #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.MimeTypes where
+
+import qualified Control.Arrow as P (left)
+import qualified Data.Aeson as A
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Builder as BB
+import qualified Data.ByteString.Char8 as BC
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.ByteString.Lazy.Char8 as BCL
+import qualified Data.Data as P (Typeable)
+import qualified Data.Proxy as P (Proxy(..))
+import qualified Data.String as P
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Network.HTTP.Media as ME
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+
+import Prelude (($), (.),(<$>),(<*>),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty)
+import qualified Prelude as P
+
+-- * ContentType MimeType
+
+data ContentType a = MimeType a => ContentType { unContentType :: a }
+
+-- * Accept MimeType
+
+data Accept a = MimeType a => Accept { unAccept :: a }
+
+-- * Consumes Class
+
+class MimeType mtype => Consumes req mtype where
+
+-- * Produces Class
+
+class MimeType mtype => Produces req mtype where
+
+-- * Default Mime Types
+
+data MimeJSON = MimeJSON deriving (P.Typeable)
+data MimeXML = MimeXML deriving (P.Typeable)
+data MimePlainText = MimePlainText deriving (P.Typeable)
+data MimeFormUrlEncoded = MimeFormUrlEncoded deriving (P.Typeable)
+data MimeMultipartFormData = MimeMultipartFormData deriving (P.Typeable)
+data MimeOctetStream = MimeOctetStream deriving (P.Typeable)
+data MimeNoContent = MimeNoContent deriving (P.Typeable)
+data MimeAny = MimeAny deriving (P.Typeable)
+
+-- | A type for responses without content-body.
+data NoContent = NoContent
+  deriving (P.Show, P.Eq, P.Typeable)
+
+
+-- * MimeType Class
+
+class P.Typeable mtype => MimeType mtype  where
+  {-# MINIMAL mimeType | mimeTypes #-}
+
+  mimeTypes :: P.Proxy mtype -> [ME.MediaType]
+  mimeTypes p =
+    case mimeType p of
+      Just x -> [x]
+      Nothing -> []
+
+  mimeType :: P.Proxy mtype -> Maybe ME.MediaType
+  mimeType p =
+    case mimeTypes p of
+      [] -> Nothing
+      (x:_) -> Just x
+
+  mimeType' :: mtype -> Maybe ME.MediaType
+  mimeType' _ = mimeType (P.Proxy :: P.Proxy mtype)
+  mimeTypes' :: mtype -> [ME.MediaType]
+  mimeTypes' _ = mimeTypes (P.Proxy :: P.Proxy mtype)
+
+-- Default MimeType Instances
+
+-- | @application/json; charset=utf-8@
+instance MimeType MimeJSON where
+  mimeType _ = Just $ P.fromString "application/json"
+-- | @application/xml; charset=utf-8@
+instance MimeType MimeXML where
+  mimeType _ = Just $ P.fromString "application/xml"
+-- | @application/x-www-form-urlencoded@
+instance MimeType MimeFormUrlEncoded where
+  mimeType _ = Just $ P.fromString "application/x-www-form-urlencoded"
+-- | @multipart/form-data@
+instance MimeType MimeMultipartFormData where
+  mimeType _ = Just $ P.fromString "multipart/form-data"
+-- | @text/plain; charset=utf-8@
+instance MimeType MimePlainText where
+  mimeType _ = Just $ P.fromString "text/plain"
+-- | @application/octet-stream@
+instance MimeType MimeOctetStream where
+  mimeType _ = Just $ P.fromString "application/octet-stream"
+-- | @"*/*"@
+instance MimeType MimeAny where
+  mimeType _ = Just $ P.fromString "*/*"
+instance MimeType MimeNoContent where
+  mimeType _ = Nothing
+
+-- * MimeRender Class
+
+class MimeType mtype => MimeRender mtype x where
+    mimeRender  :: P.Proxy mtype -> x -> BL.ByteString
+    mimeRender' :: mtype -> x -> BL.ByteString
+    mimeRender' _ x = mimeRender (P.Proxy :: P.Proxy mtype) x
+
+
+mimeRenderDefaultMultipartFormData :: WH.ToHttpApiData a => a -> BL.ByteString
+mimeRenderDefaultMultipartFormData = BL.fromStrict . T.encodeUtf8 . WH.toQueryParam
+
+-- Default MimeRender Instances
+
+-- | `A.encode`
+instance A.ToJSON a => MimeRender MimeJSON a where mimeRender _ = A.encode
+-- | @WH.urlEncodeAsForm@
+instance WH.ToForm a => MimeRender MimeFormUrlEncoded a where mimeRender _ = WH.urlEncodeAsForm
+
+-- | @P.id@
+instance MimeRender MimePlainText BL.ByteString where mimeRender _ = P.id
+-- | @BL.fromStrict . T.encodeUtf8@
+instance MimeRender MimePlainText T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8
+-- | @BCL.pack@
+instance MimeRender MimePlainText String where mimeRender _ = BCL.pack
+
+-- | @P.id@
+instance MimeRender MimeOctetStream BL.ByteString where mimeRender _ = P.id
+-- | @BL.fromStrict . T.encodeUtf8@
+instance MimeRender MimeOctetStream T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8
+-- | @BCL.pack@
+instance MimeRender MimeOctetStream String where mimeRender _ = BCL.pack
+
+instance MimeRender MimeMultipartFormData BL.ByteString where mimeRender _ = P.id
+
+instance MimeRender MimeMultipartFormData Bool where mimeRender _ = mimeRenderDefaultMultipartFormData
+instance MimeRender MimeMultipartFormData Char where mimeRender _ = mimeRenderDefaultMultipartFormData
+instance MimeRender MimeMultipartFormData Double where mimeRender _ = mimeRenderDefaultMultipartFormData
+instance MimeRender MimeMultipartFormData Float where mimeRender _ = mimeRenderDefaultMultipartFormData
+instance MimeRender MimeMultipartFormData Int where mimeRender _ = mimeRenderDefaultMultipartFormData
+instance MimeRender MimeMultipartFormData Integer where mimeRender _ = mimeRenderDefaultMultipartFormData
+instance MimeRender MimeMultipartFormData String where mimeRender _ = mimeRenderDefaultMultipartFormData
+instance MimeRender MimeMultipartFormData T.Text where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | @P.Right . P.const NoContent@
+instance MimeRender MimeNoContent NoContent where mimeRender _ = P.const BCL.empty
+
+
+-- * MimeUnrender Class
+
+class MimeType mtype => MimeUnrender mtype o where
+    mimeUnrender :: P.Proxy mtype -> BL.ByteString -> P.Either String o
+    mimeUnrender' :: mtype -> BL.ByteString -> P.Either String o
+    mimeUnrender' _ x = mimeUnrender (P.Proxy :: P.Proxy mtype) x
+
+-- Default MimeUnrender Instances
+
+-- | @A.eitherDecode@
+instance A.FromJSON a => MimeUnrender MimeJSON a where mimeUnrender _ = A.eitherDecode
+-- | @P.left T.unpack . WH.urlDecodeAsForm@
+instance WH.FromForm a => MimeUnrender MimeFormUrlEncoded a where mimeUnrender _ = P.left T.unpack . WH.urlDecodeAsForm
+-- | @P.Right . P.id@
+
+instance MimeUnrender MimePlainText BL.ByteString where mimeUnrender _ = P.Right . P.id
+-- | @P.left P.show . TL.decodeUtf8'@
+instance MimeUnrender MimePlainText T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict
+-- | @P.Right . BCL.unpack@
+instance MimeUnrender MimePlainText String where mimeUnrender _ = P.Right . BCL.unpack
+
+-- | @P.Right . P.id@
+instance MimeUnrender MimeOctetStream BL.ByteString where mimeUnrender _ = P.Right . P.id
+-- | @P.left P.show . T.decodeUtf8' . BL.toStrict@
+instance MimeUnrender MimeOctetStream T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict
+-- | @P.Right . BCL.unpack@
+instance MimeUnrender MimeOctetStream String where mimeUnrender _ = P.Right . BCL.unpack
+
+-- | @P.Right . P.const NoContent@
+instance MimeUnrender MimeNoContent NoContent where mimeUnrender _ = P.Right . P.const NoContent
+
+
diff --git a/lib/OpenAPIPetstore/Model.hs b/lib/OpenAPIPetstore/Model.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/Model.hs
@@ -0,0 +1,1888 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.Model
+-}
+
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveFoldable #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE DeriveTraversable #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE NamedFieldPuns #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TupleSections #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.Model where
+
+import OpenAPIPetstore.Core
+import OpenAPIPetstore.MimeTypes
+
+import Data.Aeson ((.:),(.:!),(.:?),(.=))
+
+import qualified Control.Arrow as P (left)
+import qualified Data.Aeson as A
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Base64 as B64
+import qualified Data.ByteString.Char8 as BC
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
+import qualified Data.Foldable as P
+import qualified Data.HashMap.Lazy as HM
+import qualified Data.Map as Map
+import qualified Data.Maybe as P
+import qualified Data.Set as Set
+import qualified Data.Text as T
+import qualified Data.Text.Encoding as T
+import qualified Data.Time as TI
+import qualified Lens.Micro as L
+import qualified Web.FormUrlEncoded as WH
+import qualified Web.HttpApiData as WH
+
+import Control.Applicative ((<|>))
+import Control.Applicative (Alternative)
+import Data.Function ((&))
+import Data.Monoid ((<>))
+import Data.Text (Text)
+import Prelude (($),(/=),(.),(<$>),(<*>),(>>=),(=<<),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
+
+import qualified Prelude as P
+
+
+
+-- * Parameter newtypes
+
+
+-- ** AdditionalMetadata
+newtype AdditionalMetadata = AdditionalMetadata { unAdditionalMetadata :: Text } deriving (P.Eq, P.Show)
+
+-- ** ApiKey
+newtype ApiKey = ApiKey { unApiKey :: Text } deriving (P.Eq, P.Show)
+
+-- ** Body
+newtype Body = Body { unBody :: Double } deriving (P.Eq, P.Show, A.ToJSON)
+
+-- ** BodyBool
+newtype BodyBool = BodyBool { unBodyBool :: Bool } deriving (P.Eq, P.Show, A.ToJSON)
+
+-- ** BodyText
+newtype BodyText = BodyText { unBodyText :: Text } deriving (P.Eq, P.Show, A.ToJSON)
+
+-- ** BooleanGroup
+newtype BooleanGroup = BooleanGroup { unBooleanGroup :: Bool } deriving (P.Eq, P.Show)
+
+-- ** Byte
+newtype Byte = Byte { unByte :: ByteArray } deriving (P.Eq, P.Show)
+
+-- ** Callback
+newtype Callback = Callback { unCallback :: Text } deriving (P.Eq, P.Show)
+
+-- ** EnumFormString
+newtype EnumFormString = EnumFormString { unEnumFormString :: E'EnumFormString } deriving (P.Eq, P.Show)
+
+-- ** EnumFormStringArray
+newtype EnumFormStringArray = EnumFormStringArray { unEnumFormStringArray :: [E'EnumFormStringArray] } deriving (P.Eq, P.Show)
+
+-- ** EnumHeaderString
+newtype EnumHeaderString = EnumHeaderString { unEnumHeaderString :: E'EnumFormString } deriving (P.Eq, P.Show)
+
+-- ** EnumHeaderStringArray
+newtype EnumHeaderStringArray = EnumHeaderStringArray { unEnumHeaderStringArray :: [E'EnumFormStringArray] } deriving (P.Eq, P.Show)
+
+-- ** EnumQueryDouble
+newtype EnumQueryDouble = EnumQueryDouble { unEnumQueryDouble :: E'EnumNumber } deriving (P.Eq, P.Show)
+
+-- ** EnumQueryInteger
+newtype EnumQueryInteger = EnumQueryInteger { unEnumQueryInteger :: E'EnumQueryInteger } deriving (P.Eq, P.Show)
+
+-- ** EnumQueryString
+newtype EnumQueryString = EnumQueryString { unEnumQueryString :: E'EnumFormString } deriving (P.Eq, P.Show)
+
+-- ** EnumQueryStringArray
+newtype EnumQueryStringArray = EnumQueryStringArray { unEnumQueryStringArray :: [E'EnumFormStringArray] } deriving (P.Eq, P.Show)
+
+-- ** File2
+newtype File2 = File2 { unFile2 :: FilePath } deriving (P.Eq, P.Show)
+
+-- ** Int32
+newtype Int32 = Int32 { unInt32 :: Int } deriving (P.Eq, P.Show)
+
+-- ** Int64
+newtype Int64 = Int64 { unInt64 :: Integer } deriving (P.Eq, P.Show)
+
+-- ** Int64Group
+newtype Int64Group = Int64Group { unInt64Group :: Integer } deriving (P.Eq, P.Show)
+
+-- ** Name2
+newtype Name2 = Name2 { unName2 :: Text } deriving (P.Eq, P.Show)
+
+-- ** Number
+newtype Number = Number { unNumber :: Double } deriving (P.Eq, P.Show)
+
+-- ** OrderId
+newtype OrderId = OrderId { unOrderId :: Integer } deriving (P.Eq, P.Show)
+
+-- ** OrderIdText
+newtype OrderIdText = OrderIdText { unOrderIdText :: Text } deriving (P.Eq, P.Show)
+
+-- ** Param
+newtype Param = Param { unParam :: Text } deriving (P.Eq, P.Show)
+
+-- ** Param2
+newtype Param2 = Param2 { unParam2 :: Text } deriving (P.Eq, P.Show)
+
+-- ** ParamBinary
+newtype ParamBinary = ParamBinary { unParamBinary :: FilePath } deriving (P.Eq, P.Show)
+
+-- ** ParamDate
+newtype ParamDate = ParamDate { unParamDate :: Date } deriving (P.Eq, P.Show)
+
+-- ** ParamDateTime
+newtype ParamDateTime = ParamDateTime { unParamDateTime :: DateTime } deriving (P.Eq, P.Show)
+
+-- ** ParamDouble
+newtype ParamDouble = ParamDouble { unParamDouble :: Double } deriving (P.Eq, P.Show)
+
+-- ** ParamFloat
+newtype ParamFloat = ParamFloat { unParamFloat :: Float } deriving (P.Eq, P.Show)
+
+-- ** ParamInteger
+newtype ParamInteger = ParamInteger { unParamInteger :: Int } deriving (P.Eq, P.Show)
+
+-- ** ParamString
+newtype ParamString = ParamString { unParamString :: Text } deriving (P.Eq, P.Show)
+
+-- ** Password
+newtype Password = Password { unPassword :: Text } deriving (P.Eq, P.Show)
+
+-- ** PatternWithoutDelimiter
+newtype PatternWithoutDelimiter = PatternWithoutDelimiter { unPatternWithoutDelimiter :: Text } deriving (P.Eq, P.Show)
+
+-- ** PetId
+newtype PetId = PetId { unPetId :: Integer } deriving (P.Eq, P.Show)
+
+-- ** Query
+newtype Query = Query { unQuery :: Text } deriving (P.Eq, P.Show)
+
+-- ** RequestBody
+newtype RequestBody = RequestBody { unRequestBody :: (Map.Map String Text) } deriving (P.Eq, P.Show, A.ToJSON)
+
+-- ** RequiredBooleanGroup
+newtype RequiredBooleanGroup = RequiredBooleanGroup { unRequiredBooleanGroup :: Bool } deriving (P.Eq, P.Show)
+
+-- ** RequiredFile
+newtype RequiredFile = RequiredFile { unRequiredFile :: FilePath } deriving (P.Eq, P.Show)
+
+-- ** RequiredInt64Group
+newtype RequiredInt64Group = RequiredInt64Group { unRequiredInt64Group :: Integer } deriving (P.Eq, P.Show)
+
+-- ** RequiredStringGroup
+newtype RequiredStringGroup = RequiredStringGroup { unRequiredStringGroup :: Int } deriving (P.Eq, P.Show)
+
+-- ** Status
+newtype Status = Status { unStatus :: [E'Status2] } deriving (P.Eq, P.Show)
+
+-- ** StatusText
+newtype StatusText = StatusText { unStatusText :: Text } deriving (P.Eq, P.Show)
+
+-- ** StringGroup
+newtype StringGroup = StringGroup { unStringGroup :: Int } deriving (P.Eq, P.Show)
+
+-- ** Tags
+newtype Tags = Tags { unTags :: [Text] } deriving (P.Eq, P.Show)
+
+-- ** User2
+newtype User2 = User2 { unUser2 :: [User] } deriving (P.Eq, P.Show, A.ToJSON)
+
+-- ** Username
+newtype Username = Username { unUsername :: Text } deriving (P.Eq, P.Show)
+
+-- * Models
+
+
+-- ** AdditionalPropertiesClass
+-- | AdditionalPropertiesClass
+data AdditionalPropertiesClass = AdditionalPropertiesClass
+  { additionalPropertiesClassMapProperty :: !(Maybe (Map.Map String Text)) -- ^ "map_property"
+  , additionalPropertiesClassMapOfMapProperty :: !(Maybe (Map.Map String (Map.Map String Text))) -- ^ "map_of_map_property"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON AdditionalPropertiesClass
+instance A.FromJSON AdditionalPropertiesClass where
+  parseJSON = A.withObject "AdditionalPropertiesClass" $ \o ->
+    AdditionalPropertiesClass
+      <$> (o .:? "map_property")
+      <*> (o .:? "map_of_map_property")
+
+-- | ToJSON AdditionalPropertiesClass
+instance A.ToJSON AdditionalPropertiesClass where
+  toJSON AdditionalPropertiesClass {..} =
+   _omitNulls
+      [ "map_property" .= additionalPropertiesClassMapProperty
+      , "map_of_map_property" .= additionalPropertiesClassMapOfMapProperty
+      ]
+
+
+-- | Construct a value of type 'AdditionalPropertiesClass' (by applying it's required fields, if any)
+mkAdditionalPropertiesClass
+  :: AdditionalPropertiesClass
+mkAdditionalPropertiesClass =
+  AdditionalPropertiesClass
+  { additionalPropertiesClassMapProperty = Nothing
+  , additionalPropertiesClassMapOfMapProperty = Nothing
+  }
+
+-- ** Animal
+-- | Animal
+data Animal = Animal
+  { animalClassName :: !(Text) -- ^ /Required/ "className"
+  , animalColor :: !(Maybe Text) -- ^ "color"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Animal
+instance A.FromJSON Animal where
+  parseJSON = A.withObject "Animal" $ \o ->
+    Animal
+      <$> (o .:  "className")
+      <*> (o .:? "color")
+
+-- | ToJSON Animal
+instance A.ToJSON Animal where
+  toJSON Animal {..} =
+   _omitNulls
+      [ "className" .= animalClassName
+      , "color" .= animalColor
+      ]
+
+
+-- | Construct a value of type 'Animal' (by applying it's required fields, if any)
+mkAnimal
+  :: Text -- ^ 'animalClassName' 
+  -> Animal
+mkAnimal animalClassName =
+  Animal
+  { animalClassName
+  , animalColor = Nothing
+  }
+
+-- ** AnimalFarm
+-- | AnimalFarm
+data AnimalFarm = AnimalFarm
+  { 
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON AnimalFarm
+instance A.FromJSON AnimalFarm where
+  parseJSON = A.withObject "AnimalFarm" $ \o ->
+    pure AnimalFarm
+      
+
+-- | ToJSON AnimalFarm
+instance A.ToJSON AnimalFarm where
+  toJSON AnimalFarm  =
+   _omitNulls
+      [ 
+      ]
+
+
+-- | Construct a value of type 'AnimalFarm' (by applying it's required fields, if any)
+mkAnimalFarm
+  :: AnimalFarm
+mkAnimalFarm =
+  AnimalFarm
+  { 
+  }
+
+-- ** ApiResponse
+-- | ApiResponse
+data ApiResponse = ApiResponse
+  { apiResponseCode :: !(Maybe Int) -- ^ "code"
+  , apiResponseType :: !(Maybe Text) -- ^ "type"
+  , apiResponseMessage :: !(Maybe Text) -- ^ "message"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON ApiResponse
+instance A.FromJSON ApiResponse where
+  parseJSON = A.withObject "ApiResponse" $ \o ->
+    ApiResponse
+      <$> (o .:? "code")
+      <*> (o .:? "type")
+      <*> (o .:? "message")
+
+-- | ToJSON ApiResponse
+instance A.ToJSON ApiResponse where
+  toJSON ApiResponse {..} =
+   _omitNulls
+      [ "code" .= apiResponseCode
+      , "type" .= apiResponseType
+      , "message" .= apiResponseMessage
+      ]
+
+
+-- | Construct a value of type 'ApiResponse' (by applying it's required fields, if any)
+mkApiResponse
+  :: ApiResponse
+mkApiResponse =
+  ApiResponse
+  { apiResponseCode = Nothing
+  , apiResponseType = Nothing
+  , apiResponseMessage = Nothing
+  }
+
+-- ** ArrayOfArrayOfNumberOnly
+-- | ArrayOfArrayOfNumberOnly
+data ArrayOfArrayOfNumberOnly = ArrayOfArrayOfNumberOnly
+  { arrayOfArrayOfNumberOnlyArrayArrayNumber :: !(Maybe [[Double]]) -- ^ "ArrayArrayNumber"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON ArrayOfArrayOfNumberOnly
+instance A.FromJSON ArrayOfArrayOfNumberOnly where
+  parseJSON = A.withObject "ArrayOfArrayOfNumberOnly" $ \o ->
+    ArrayOfArrayOfNumberOnly
+      <$> (o .:? "ArrayArrayNumber")
+
+-- | ToJSON ArrayOfArrayOfNumberOnly
+instance A.ToJSON ArrayOfArrayOfNumberOnly where
+  toJSON ArrayOfArrayOfNumberOnly {..} =
+   _omitNulls
+      [ "ArrayArrayNumber" .= arrayOfArrayOfNumberOnlyArrayArrayNumber
+      ]
+
+
+-- | Construct a value of type 'ArrayOfArrayOfNumberOnly' (by applying it's required fields, if any)
+mkArrayOfArrayOfNumberOnly
+  :: ArrayOfArrayOfNumberOnly
+mkArrayOfArrayOfNumberOnly =
+  ArrayOfArrayOfNumberOnly
+  { arrayOfArrayOfNumberOnlyArrayArrayNumber = Nothing
+  }
+
+-- ** ArrayOfNumberOnly
+-- | ArrayOfNumberOnly
+data ArrayOfNumberOnly = ArrayOfNumberOnly
+  { arrayOfNumberOnlyArrayNumber :: !(Maybe [Double]) -- ^ "ArrayNumber"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON ArrayOfNumberOnly
+instance A.FromJSON ArrayOfNumberOnly where
+  parseJSON = A.withObject "ArrayOfNumberOnly" $ \o ->
+    ArrayOfNumberOnly
+      <$> (o .:? "ArrayNumber")
+
+-- | ToJSON ArrayOfNumberOnly
+instance A.ToJSON ArrayOfNumberOnly where
+  toJSON ArrayOfNumberOnly {..} =
+   _omitNulls
+      [ "ArrayNumber" .= arrayOfNumberOnlyArrayNumber
+      ]
+
+
+-- | Construct a value of type 'ArrayOfNumberOnly' (by applying it's required fields, if any)
+mkArrayOfNumberOnly
+  :: ArrayOfNumberOnly
+mkArrayOfNumberOnly =
+  ArrayOfNumberOnly
+  { arrayOfNumberOnlyArrayNumber = Nothing
+  }
+
+-- ** ArrayTest
+-- | ArrayTest
+data ArrayTest = ArrayTest
+  { arrayTestArrayOfString :: !(Maybe [Text]) -- ^ "array_of_string"
+  , arrayTestArrayArrayOfInteger :: !(Maybe [[Integer]]) -- ^ "array_array_of_integer"
+  , arrayTestArrayArrayOfModel :: !(Maybe [[ReadOnlyFirst]]) -- ^ "array_array_of_model"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON ArrayTest
+instance A.FromJSON ArrayTest where
+  parseJSON = A.withObject "ArrayTest" $ \o ->
+    ArrayTest
+      <$> (o .:? "array_of_string")
+      <*> (o .:? "array_array_of_integer")
+      <*> (o .:? "array_array_of_model")
+
+-- | ToJSON ArrayTest
+instance A.ToJSON ArrayTest where
+  toJSON ArrayTest {..} =
+   _omitNulls
+      [ "array_of_string" .= arrayTestArrayOfString
+      , "array_array_of_integer" .= arrayTestArrayArrayOfInteger
+      , "array_array_of_model" .= arrayTestArrayArrayOfModel
+      ]
+
+
+-- | Construct a value of type 'ArrayTest' (by applying it's required fields, if any)
+mkArrayTest
+  :: ArrayTest
+mkArrayTest =
+  ArrayTest
+  { arrayTestArrayOfString = Nothing
+  , arrayTestArrayArrayOfInteger = Nothing
+  , arrayTestArrayArrayOfModel = Nothing
+  }
+
+-- ** Capitalization
+-- | Capitalization
+data Capitalization = Capitalization
+  { capitalizationSmallCamel :: !(Maybe Text) -- ^ "smallCamel"
+  , capitalizationCapitalCamel :: !(Maybe Text) -- ^ "CapitalCamel"
+  , capitalizationSmallSnake :: !(Maybe Text) -- ^ "small_Snake"
+  , capitalizationCapitalSnake :: !(Maybe Text) -- ^ "Capital_Snake"
+  , capitalizationScaEthFlowPoints :: !(Maybe Text) -- ^ "SCA_ETH_Flow_Points"
+  , capitalizationAttName :: !(Maybe Text) -- ^ "ATT_NAME" - Name of the pet 
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Capitalization
+instance A.FromJSON Capitalization where
+  parseJSON = A.withObject "Capitalization" $ \o ->
+    Capitalization
+      <$> (o .:? "smallCamel")
+      <*> (o .:? "CapitalCamel")
+      <*> (o .:? "small_Snake")
+      <*> (o .:? "Capital_Snake")
+      <*> (o .:? "SCA_ETH_Flow_Points")
+      <*> (o .:? "ATT_NAME")
+
+-- | ToJSON Capitalization
+instance A.ToJSON Capitalization where
+  toJSON Capitalization {..} =
+   _omitNulls
+      [ "smallCamel" .= capitalizationSmallCamel
+      , "CapitalCamel" .= capitalizationCapitalCamel
+      , "small_Snake" .= capitalizationSmallSnake
+      , "Capital_Snake" .= capitalizationCapitalSnake
+      , "SCA_ETH_Flow_Points" .= capitalizationScaEthFlowPoints
+      , "ATT_NAME" .= capitalizationAttName
+      ]
+
+
+-- | Construct a value of type 'Capitalization' (by applying it's required fields, if any)
+mkCapitalization
+  :: Capitalization
+mkCapitalization =
+  Capitalization
+  { capitalizationSmallCamel = Nothing
+  , capitalizationCapitalCamel = Nothing
+  , capitalizationSmallSnake = Nothing
+  , capitalizationCapitalSnake = Nothing
+  , capitalizationScaEthFlowPoints = Nothing
+  , capitalizationAttName = Nothing
+  }
+
+-- ** Cat
+-- | Cat
+data Cat = Cat
+  { catClassName :: !(Text) -- ^ /Required/ "className"
+  , catColor :: !(Maybe Text) -- ^ "color"
+  , catDeclawed :: !(Maybe Bool) -- ^ "declawed"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Cat
+instance A.FromJSON Cat where
+  parseJSON = A.withObject "Cat" $ \o ->
+    Cat
+      <$> (o .:  "className")
+      <*> (o .:? "color")
+      <*> (o .:? "declawed")
+
+-- | ToJSON Cat
+instance A.ToJSON Cat where
+  toJSON Cat {..} =
+   _omitNulls
+      [ "className" .= catClassName
+      , "color" .= catColor
+      , "declawed" .= catDeclawed
+      ]
+
+
+-- | Construct a value of type 'Cat' (by applying it's required fields, if any)
+mkCat
+  :: Text -- ^ 'catClassName' 
+  -> Cat
+mkCat catClassName =
+  Cat
+  { catClassName
+  , catColor = Nothing
+  , catDeclawed = Nothing
+  }
+
+-- ** Category
+-- | Category
+data Category = Category
+  { categoryId :: !(Maybe Integer) -- ^ "id"
+  , categoryName :: !(Text) -- ^ /Required/ "name"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Category
+instance A.FromJSON Category where
+  parseJSON = A.withObject "Category" $ \o ->
+    Category
+      <$> (o .:? "id")
+      <*> (o .:  "name")
+
+-- | ToJSON Category
+instance A.ToJSON Category where
+  toJSON Category {..} =
+   _omitNulls
+      [ "id" .= categoryId
+      , "name" .= categoryName
+      ]
+
+
+-- | Construct a value of type 'Category' (by applying it's required fields, if any)
+mkCategory
+  :: Text -- ^ 'categoryName' 
+  -> Category
+mkCategory categoryName =
+  Category
+  { categoryId = Nothing
+  , categoryName
+  }
+
+-- ** ClassModel
+-- | ClassModel
+-- Model for testing model with \"_class\" property
+data ClassModel = ClassModel
+  { classModelClass :: !(Maybe Text) -- ^ "_class"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON ClassModel
+instance A.FromJSON ClassModel where
+  parseJSON = A.withObject "ClassModel" $ \o ->
+    ClassModel
+      <$> (o .:? "_class")
+
+-- | ToJSON ClassModel
+instance A.ToJSON ClassModel where
+  toJSON ClassModel {..} =
+   _omitNulls
+      [ "_class" .= classModelClass
+      ]
+
+
+-- | Construct a value of type 'ClassModel' (by applying it's required fields, if any)
+mkClassModel
+  :: ClassModel
+mkClassModel =
+  ClassModel
+  { classModelClass = Nothing
+  }
+
+-- ** Client
+-- | Client
+data Client = Client
+  { clientClient :: !(Maybe Text) -- ^ "client"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Client
+instance A.FromJSON Client where
+  parseJSON = A.withObject "Client" $ \o ->
+    Client
+      <$> (o .:? "client")
+
+-- | ToJSON Client
+instance A.ToJSON Client where
+  toJSON Client {..} =
+   _omitNulls
+      [ "client" .= clientClient
+      ]
+
+
+-- | Construct a value of type 'Client' (by applying it's required fields, if any)
+mkClient
+  :: Client
+mkClient =
+  Client
+  { clientClient = Nothing
+  }
+
+-- ** Dog
+-- | Dog
+data Dog = Dog
+  { dogClassName :: !(Text) -- ^ /Required/ "className"
+  , dogColor :: !(Maybe Text) -- ^ "color"
+  , dogBreed :: !(Maybe Text) -- ^ "breed"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Dog
+instance A.FromJSON Dog where
+  parseJSON = A.withObject "Dog" $ \o ->
+    Dog
+      <$> (o .:  "className")
+      <*> (o .:? "color")
+      <*> (o .:? "breed")
+
+-- | ToJSON Dog
+instance A.ToJSON Dog where
+  toJSON Dog {..} =
+   _omitNulls
+      [ "className" .= dogClassName
+      , "color" .= dogColor
+      , "breed" .= dogBreed
+      ]
+
+
+-- | Construct a value of type 'Dog' (by applying it's required fields, if any)
+mkDog
+  :: Text -- ^ 'dogClassName' 
+  -> Dog
+mkDog dogClassName =
+  Dog
+  { dogClassName
+  , dogColor = Nothing
+  , dogBreed = Nothing
+  }
+
+-- ** EnumArrays
+-- | EnumArrays
+data EnumArrays = EnumArrays
+  { enumArraysJustSymbol :: !(Maybe E'JustSymbol) -- ^ "just_symbol"
+  , enumArraysArrayEnum :: !(Maybe [E'ArrayEnum]) -- ^ "array_enum"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON EnumArrays
+instance A.FromJSON EnumArrays where
+  parseJSON = A.withObject "EnumArrays" $ \o ->
+    EnumArrays
+      <$> (o .:? "just_symbol")
+      <*> (o .:? "array_enum")
+
+-- | ToJSON EnumArrays
+instance A.ToJSON EnumArrays where
+  toJSON EnumArrays {..} =
+   _omitNulls
+      [ "just_symbol" .= enumArraysJustSymbol
+      , "array_enum" .= enumArraysArrayEnum
+      ]
+
+
+-- | Construct a value of type 'EnumArrays' (by applying it's required fields, if any)
+mkEnumArrays
+  :: EnumArrays
+mkEnumArrays =
+  EnumArrays
+  { enumArraysJustSymbol = Nothing
+  , enumArraysArrayEnum = Nothing
+  }
+
+-- ** EnumTest
+-- | EnumTest
+data EnumTest = EnumTest
+  { enumTestEnumString :: !(Maybe E'EnumString) -- ^ "enum_string"
+  , enumTestEnumStringRequired :: !(E'EnumString) -- ^ /Required/ "enum_string_required"
+  , enumTestEnumInteger :: !(Maybe E'EnumInteger) -- ^ "enum_integer"
+  , enumTestEnumNumber :: !(Maybe E'EnumNumber) -- ^ "enum_number"
+  , enumTestOuterEnum :: !(Maybe OuterEnum) -- ^ "outerEnum"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON EnumTest
+instance A.FromJSON EnumTest where
+  parseJSON = A.withObject "EnumTest" $ \o ->
+    EnumTest
+      <$> (o .:? "enum_string")
+      <*> (o .:  "enum_string_required")
+      <*> (o .:? "enum_integer")
+      <*> (o .:? "enum_number")
+      <*> (o .:? "outerEnum")
+
+-- | ToJSON EnumTest
+instance A.ToJSON EnumTest where
+  toJSON EnumTest {..} =
+   _omitNulls
+      [ "enum_string" .= enumTestEnumString
+      , "enum_string_required" .= enumTestEnumStringRequired
+      , "enum_integer" .= enumTestEnumInteger
+      , "enum_number" .= enumTestEnumNumber
+      , "outerEnum" .= enumTestOuterEnum
+      ]
+
+
+-- | Construct a value of type 'EnumTest' (by applying it's required fields, if any)
+mkEnumTest
+  :: E'EnumString -- ^ 'enumTestEnumStringRequired' 
+  -> EnumTest
+mkEnumTest enumTestEnumStringRequired =
+  EnumTest
+  { enumTestEnumString = Nothing
+  , enumTestEnumStringRequired
+  , enumTestEnumInteger = Nothing
+  , enumTestEnumNumber = Nothing
+  , enumTestOuterEnum = Nothing
+  }
+
+-- ** File
+-- | File
+-- Must be named `File` for test.
+data File = File
+  { fileSourceUri :: !(Maybe Text) -- ^ "sourceURI" - Test capitalization
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON File
+instance A.FromJSON File where
+  parseJSON = A.withObject "File" $ \o ->
+    File
+      <$> (o .:? "sourceURI")
+
+-- | ToJSON File
+instance A.ToJSON File where
+  toJSON File {..} =
+   _omitNulls
+      [ "sourceURI" .= fileSourceUri
+      ]
+
+
+-- | Construct a value of type 'File' (by applying it's required fields, if any)
+mkFile
+  :: File
+mkFile =
+  File
+  { fileSourceUri = Nothing
+  }
+
+-- ** FileSchemaTestClass
+-- | FileSchemaTestClass
+data FileSchemaTestClass = FileSchemaTestClass
+  { fileSchemaTestClassFile :: !(Maybe File) -- ^ "file"
+  , fileSchemaTestClassFiles :: !(Maybe [File]) -- ^ "files"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON FileSchemaTestClass
+instance A.FromJSON FileSchemaTestClass where
+  parseJSON = A.withObject "FileSchemaTestClass" $ \o ->
+    FileSchemaTestClass
+      <$> (o .:? "file")
+      <*> (o .:? "files")
+
+-- | ToJSON FileSchemaTestClass
+instance A.ToJSON FileSchemaTestClass where
+  toJSON FileSchemaTestClass {..} =
+   _omitNulls
+      [ "file" .= fileSchemaTestClassFile
+      , "files" .= fileSchemaTestClassFiles
+      ]
+
+
+-- | Construct a value of type 'FileSchemaTestClass' (by applying it's required fields, if any)
+mkFileSchemaTestClass
+  :: FileSchemaTestClass
+mkFileSchemaTestClass =
+  FileSchemaTestClass
+  { fileSchemaTestClassFile = Nothing
+  , fileSchemaTestClassFiles = Nothing
+  }
+
+-- ** FormatTest
+-- | FormatTest
+data FormatTest = FormatTest
+  { formatTestInteger :: !(Maybe Int) -- ^ "integer"
+  , formatTestInt32 :: !(Maybe Int) -- ^ "int32"
+  , formatTestInt64 :: !(Maybe Integer) -- ^ "int64"
+  , formatTestNumber :: !(Double) -- ^ /Required/ "number"
+  , formatTestFloat :: !(Maybe Float) -- ^ "float"
+  , formatTestDouble :: !(Maybe Double) -- ^ "double"
+  , formatTestString :: !(Maybe Text) -- ^ "string"
+  , formatTestByte :: !(ByteArray) -- ^ /Required/ "byte"
+  , formatTestBinary :: !(Maybe FilePath) -- ^ "binary"
+  , formatTestDate :: !(Date) -- ^ /Required/ "date"
+  , formatTestDateTime :: !(Maybe DateTime) -- ^ "dateTime"
+  , formatTestUuid :: !(Maybe Text) -- ^ "uuid"
+  , formatTestPassword :: !(Text) -- ^ /Required/ "password"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON FormatTest
+instance A.FromJSON FormatTest where
+  parseJSON = A.withObject "FormatTest" $ \o ->
+    FormatTest
+      <$> (o .:? "integer")
+      <*> (o .:? "int32")
+      <*> (o .:? "int64")
+      <*> (o .:  "number")
+      <*> (o .:? "float")
+      <*> (o .:? "double")
+      <*> (o .:? "string")
+      <*> (o .:  "byte")
+      <*> (o .:? "binary")
+      <*> (o .:  "date")
+      <*> (o .:? "dateTime")
+      <*> (o .:? "uuid")
+      <*> (o .:  "password")
+
+-- | ToJSON FormatTest
+instance A.ToJSON FormatTest where
+  toJSON FormatTest {..} =
+   _omitNulls
+      [ "integer" .= formatTestInteger
+      , "int32" .= formatTestInt32
+      , "int64" .= formatTestInt64
+      , "number" .= formatTestNumber
+      , "float" .= formatTestFloat
+      , "double" .= formatTestDouble
+      , "string" .= formatTestString
+      , "byte" .= formatTestByte
+      , "binary" .= formatTestBinary
+      , "date" .= formatTestDate
+      , "dateTime" .= formatTestDateTime
+      , "uuid" .= formatTestUuid
+      , "password" .= formatTestPassword
+      ]
+
+
+-- | Construct a value of type 'FormatTest' (by applying it's required fields, if any)
+mkFormatTest
+  :: Double -- ^ 'formatTestNumber' 
+  -> ByteArray -- ^ 'formatTestByte' 
+  -> Date -- ^ 'formatTestDate' 
+  -> Text -- ^ 'formatTestPassword' 
+  -> FormatTest
+mkFormatTest formatTestNumber formatTestByte formatTestDate formatTestPassword =
+  FormatTest
+  { formatTestInteger = Nothing
+  , formatTestInt32 = Nothing
+  , formatTestInt64 = Nothing
+  , formatTestNumber
+  , formatTestFloat = Nothing
+  , formatTestDouble = Nothing
+  , formatTestString = Nothing
+  , formatTestByte
+  , formatTestBinary = Nothing
+  , formatTestDate
+  , formatTestDateTime = Nothing
+  , formatTestUuid = Nothing
+  , formatTestPassword
+  }
+
+-- ** HasOnlyReadOnly
+-- | HasOnlyReadOnly
+data HasOnlyReadOnly = HasOnlyReadOnly
+  { hasOnlyReadOnlyBar :: !(Maybe Text) -- ^ "bar"
+  , hasOnlyReadOnlyFoo :: !(Maybe Text) -- ^ "foo"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON HasOnlyReadOnly
+instance A.FromJSON HasOnlyReadOnly where
+  parseJSON = A.withObject "HasOnlyReadOnly" $ \o ->
+    HasOnlyReadOnly
+      <$> (o .:? "bar")
+      <*> (o .:? "foo")
+
+-- | ToJSON HasOnlyReadOnly
+instance A.ToJSON HasOnlyReadOnly where
+  toJSON HasOnlyReadOnly {..} =
+   _omitNulls
+      [ "bar" .= hasOnlyReadOnlyBar
+      , "foo" .= hasOnlyReadOnlyFoo
+      ]
+
+
+-- | Construct a value of type 'HasOnlyReadOnly' (by applying it's required fields, if any)
+mkHasOnlyReadOnly
+  :: HasOnlyReadOnly
+mkHasOnlyReadOnly =
+  HasOnlyReadOnly
+  { hasOnlyReadOnlyBar = Nothing
+  , hasOnlyReadOnlyFoo = Nothing
+  }
+
+-- ** MapTest
+-- | MapTest
+data MapTest = MapTest
+  { mapTestMapMapOfString :: !(Maybe (Map.Map String (Map.Map String Text))) -- ^ "map_map_of_string"
+  , mapTestMapOfEnumString :: !(Maybe (Map.Map String E'Inner)) -- ^ "map_of_enum_string"
+  , mapTestDirectMap :: !(Maybe (Map.Map String Bool)) -- ^ "direct_map"
+  , mapTestIndirectMap :: !(Maybe (Map.Map String Bool)) -- ^ "indirect_map"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON MapTest
+instance A.FromJSON MapTest where
+  parseJSON = A.withObject "MapTest" $ \o ->
+    MapTest
+      <$> (o .:? "map_map_of_string")
+      <*> (o .:? "map_of_enum_string")
+      <*> (o .:? "direct_map")
+      <*> (o .:? "indirect_map")
+
+-- | ToJSON MapTest
+instance A.ToJSON MapTest where
+  toJSON MapTest {..} =
+   _omitNulls
+      [ "map_map_of_string" .= mapTestMapMapOfString
+      , "map_of_enum_string" .= mapTestMapOfEnumString
+      , "direct_map" .= mapTestDirectMap
+      , "indirect_map" .= mapTestIndirectMap
+      ]
+
+
+-- | Construct a value of type 'MapTest' (by applying it's required fields, if any)
+mkMapTest
+  :: MapTest
+mkMapTest =
+  MapTest
+  { mapTestMapMapOfString = Nothing
+  , mapTestMapOfEnumString = Nothing
+  , mapTestDirectMap = Nothing
+  , mapTestIndirectMap = Nothing
+  }
+
+-- ** MixedPropertiesAndAdditionalPropertiesClass
+-- | MixedPropertiesAndAdditionalPropertiesClass
+data MixedPropertiesAndAdditionalPropertiesClass = MixedPropertiesAndAdditionalPropertiesClass
+  { mixedPropertiesAndAdditionalPropertiesClassUuid :: !(Maybe Text) -- ^ "uuid"
+  , mixedPropertiesAndAdditionalPropertiesClassDateTime :: !(Maybe DateTime) -- ^ "dateTime"
+  , mixedPropertiesAndAdditionalPropertiesClassMap :: !(Maybe (Map.Map String Animal)) -- ^ "map"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON MixedPropertiesAndAdditionalPropertiesClass
+instance A.FromJSON MixedPropertiesAndAdditionalPropertiesClass where
+  parseJSON = A.withObject "MixedPropertiesAndAdditionalPropertiesClass" $ \o ->
+    MixedPropertiesAndAdditionalPropertiesClass
+      <$> (o .:? "uuid")
+      <*> (o .:? "dateTime")
+      <*> (o .:? "map")
+
+-- | ToJSON MixedPropertiesAndAdditionalPropertiesClass
+instance A.ToJSON MixedPropertiesAndAdditionalPropertiesClass where
+  toJSON MixedPropertiesAndAdditionalPropertiesClass {..} =
+   _omitNulls
+      [ "uuid" .= mixedPropertiesAndAdditionalPropertiesClassUuid
+      , "dateTime" .= mixedPropertiesAndAdditionalPropertiesClassDateTime
+      , "map" .= mixedPropertiesAndAdditionalPropertiesClassMap
+      ]
+
+
+-- | Construct a value of type 'MixedPropertiesAndAdditionalPropertiesClass' (by applying it's required fields, if any)
+mkMixedPropertiesAndAdditionalPropertiesClass
+  :: MixedPropertiesAndAdditionalPropertiesClass
+mkMixedPropertiesAndAdditionalPropertiesClass =
+  MixedPropertiesAndAdditionalPropertiesClass
+  { mixedPropertiesAndAdditionalPropertiesClassUuid = Nothing
+  , mixedPropertiesAndAdditionalPropertiesClassDateTime = Nothing
+  , mixedPropertiesAndAdditionalPropertiesClassMap = Nothing
+  }
+
+-- ** Model200Response
+-- | Model200Response
+-- Model for testing model name starting with number
+data Model200Response = Model200Response
+  { model200ResponseName :: !(Maybe Int) -- ^ "name"
+  , model200ResponseClass :: !(Maybe Text) -- ^ "class"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Model200Response
+instance A.FromJSON Model200Response where
+  parseJSON = A.withObject "Model200Response" $ \o ->
+    Model200Response
+      <$> (o .:? "name")
+      <*> (o .:? "class")
+
+-- | ToJSON Model200Response
+instance A.ToJSON Model200Response where
+  toJSON Model200Response {..} =
+   _omitNulls
+      [ "name" .= model200ResponseName
+      , "class" .= model200ResponseClass
+      ]
+
+
+-- | Construct a value of type 'Model200Response' (by applying it's required fields, if any)
+mkModel200Response
+  :: Model200Response
+mkModel200Response =
+  Model200Response
+  { model200ResponseName = Nothing
+  , model200ResponseClass = Nothing
+  }
+
+-- ** ModelList
+-- | ModelList
+data ModelList = ModelList
+  { modelList123list :: !(Maybe Text) -- ^ "123-list"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON ModelList
+instance A.FromJSON ModelList where
+  parseJSON = A.withObject "ModelList" $ \o ->
+    ModelList
+      <$> (o .:? "123-list")
+
+-- | ToJSON ModelList
+instance A.ToJSON ModelList where
+  toJSON ModelList {..} =
+   _omitNulls
+      [ "123-list" .= modelList123list
+      ]
+
+
+-- | Construct a value of type 'ModelList' (by applying it's required fields, if any)
+mkModelList
+  :: ModelList
+mkModelList =
+  ModelList
+  { modelList123list = Nothing
+  }
+
+-- ** ModelReturn
+-- | ModelReturn
+-- Model for testing reserved words
+data ModelReturn = ModelReturn
+  { modelReturnReturn :: !(Maybe Int) -- ^ "return"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON ModelReturn
+instance A.FromJSON ModelReturn where
+  parseJSON = A.withObject "ModelReturn" $ \o ->
+    ModelReturn
+      <$> (o .:? "return")
+
+-- | ToJSON ModelReturn
+instance A.ToJSON ModelReturn where
+  toJSON ModelReturn {..} =
+   _omitNulls
+      [ "return" .= modelReturnReturn
+      ]
+
+
+-- | Construct a value of type 'ModelReturn' (by applying it's required fields, if any)
+mkModelReturn
+  :: ModelReturn
+mkModelReturn =
+  ModelReturn
+  { modelReturnReturn = Nothing
+  }
+
+-- ** Name
+-- | Name
+-- Model for testing model name same as property name
+data Name = Name
+  { nameName :: !(Int) -- ^ /Required/ "name"
+  , nameSnakeCase :: !(Maybe Int) -- ^ "snake_case"
+  , nameProperty :: !(Maybe Text) -- ^ "property"
+  , name123number :: !(Maybe Int) -- ^ "123Number"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Name
+instance A.FromJSON Name where
+  parseJSON = A.withObject "Name" $ \o ->
+    Name
+      <$> (o .:  "name")
+      <*> (o .:? "snake_case")
+      <*> (o .:? "property")
+      <*> (o .:? "123Number")
+
+-- | ToJSON Name
+instance A.ToJSON Name where
+  toJSON Name {..} =
+   _omitNulls
+      [ "name" .= nameName
+      , "snake_case" .= nameSnakeCase
+      , "property" .= nameProperty
+      , "123Number" .= name123number
+      ]
+
+
+-- | Construct a value of type 'Name' (by applying it's required fields, if any)
+mkName
+  :: Int -- ^ 'nameName' 
+  -> Name
+mkName nameName =
+  Name
+  { nameName
+  , nameSnakeCase = Nothing
+  , nameProperty = Nothing
+  , name123number = Nothing
+  }
+
+-- ** NumberOnly
+-- | NumberOnly
+data NumberOnly = NumberOnly
+  { numberOnlyJustNumber :: !(Maybe Double) -- ^ "JustNumber"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON NumberOnly
+instance A.FromJSON NumberOnly where
+  parseJSON = A.withObject "NumberOnly" $ \o ->
+    NumberOnly
+      <$> (o .:? "JustNumber")
+
+-- | ToJSON NumberOnly
+instance A.ToJSON NumberOnly where
+  toJSON NumberOnly {..} =
+   _omitNulls
+      [ "JustNumber" .= numberOnlyJustNumber
+      ]
+
+
+-- | Construct a value of type 'NumberOnly' (by applying it's required fields, if any)
+mkNumberOnly
+  :: NumberOnly
+mkNumberOnly =
+  NumberOnly
+  { numberOnlyJustNumber = Nothing
+  }
+
+-- ** Order
+-- | Order
+data Order = Order
+  { orderId :: !(Maybe Integer) -- ^ "id"
+  , orderPetId :: !(Maybe Integer) -- ^ "petId"
+  , orderQuantity :: !(Maybe Int) -- ^ "quantity"
+  , orderShipDate :: !(Maybe DateTime) -- ^ "shipDate"
+  , orderStatus :: !(Maybe E'Status) -- ^ "status" - Order Status
+  , orderComplete :: !(Maybe Bool) -- ^ "complete"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Order
+instance A.FromJSON Order where
+  parseJSON = A.withObject "Order" $ \o ->
+    Order
+      <$> (o .:? "id")
+      <*> (o .:? "petId")
+      <*> (o .:? "quantity")
+      <*> (o .:? "shipDate")
+      <*> (o .:? "status")
+      <*> (o .:? "complete")
+
+-- | ToJSON Order
+instance A.ToJSON Order where
+  toJSON Order {..} =
+   _omitNulls
+      [ "id" .= orderId
+      , "petId" .= orderPetId
+      , "quantity" .= orderQuantity
+      , "shipDate" .= orderShipDate
+      , "status" .= orderStatus
+      , "complete" .= orderComplete
+      ]
+
+
+-- | Construct a value of type 'Order' (by applying it's required fields, if any)
+mkOrder
+  :: Order
+mkOrder =
+  Order
+  { orderId = Nothing
+  , orderPetId = Nothing
+  , orderQuantity = Nothing
+  , orderShipDate = Nothing
+  , orderStatus = Nothing
+  , orderComplete = Nothing
+  }
+
+-- ** OuterComposite
+-- | OuterComposite
+data OuterComposite = OuterComposite
+  { outerCompositeMyNumber :: !(Maybe Double) -- ^ "my_number"
+  , outerCompositeMyString :: !(Maybe Text) -- ^ "my_string"
+  , outerCompositeMyBoolean :: !(Maybe Bool) -- ^ "my_boolean"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON OuterComposite
+instance A.FromJSON OuterComposite where
+  parseJSON = A.withObject "OuterComposite" $ \o ->
+    OuterComposite
+      <$> (o .:? "my_number")
+      <*> (o .:? "my_string")
+      <*> (o .:? "my_boolean")
+
+-- | ToJSON OuterComposite
+instance A.ToJSON OuterComposite where
+  toJSON OuterComposite {..} =
+   _omitNulls
+      [ "my_number" .= outerCompositeMyNumber
+      , "my_string" .= outerCompositeMyString
+      , "my_boolean" .= outerCompositeMyBoolean
+      ]
+
+
+-- | Construct a value of type 'OuterComposite' (by applying it's required fields, if any)
+mkOuterComposite
+  :: OuterComposite
+mkOuterComposite =
+  OuterComposite
+  { outerCompositeMyNumber = Nothing
+  , outerCompositeMyString = Nothing
+  , outerCompositeMyBoolean = Nothing
+  }
+
+-- ** Pet
+-- | Pet
+data Pet = Pet
+  { petId :: !(Maybe Integer) -- ^ "id"
+  , petCategory :: !(Maybe Category) -- ^ "category"
+  , petName :: !(Text) -- ^ /Required/ "name"
+  , petPhotoUrls :: !([Text]) -- ^ /Required/ "photoUrls"
+  , petTags :: !(Maybe [Tag]) -- ^ "tags"
+  , petStatus :: !(Maybe E'Status2) -- ^ "status" - pet status in the store
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Pet
+instance A.FromJSON Pet where
+  parseJSON = A.withObject "Pet" $ \o ->
+    Pet
+      <$> (o .:? "id")
+      <*> (o .:? "category")
+      <*> (o .:  "name")
+      <*> (o .:  "photoUrls")
+      <*> (o .:? "tags")
+      <*> (o .:? "status")
+
+-- | ToJSON Pet
+instance A.ToJSON Pet where
+  toJSON Pet {..} =
+   _omitNulls
+      [ "id" .= petId
+      , "category" .= petCategory
+      , "name" .= petName
+      , "photoUrls" .= petPhotoUrls
+      , "tags" .= petTags
+      , "status" .= petStatus
+      ]
+
+
+-- | Construct a value of type 'Pet' (by applying it's required fields, if any)
+mkPet
+  :: Text -- ^ 'petName' 
+  -> [Text] -- ^ 'petPhotoUrls' 
+  -> Pet
+mkPet petName petPhotoUrls =
+  Pet
+  { petId = Nothing
+  , petCategory = Nothing
+  , petName
+  , petPhotoUrls
+  , petTags = Nothing
+  , petStatus = Nothing
+  }
+
+-- ** ReadOnlyFirst
+-- | ReadOnlyFirst
+data ReadOnlyFirst = ReadOnlyFirst
+  { readOnlyFirstBar :: !(Maybe Text) -- ^ "bar"
+  , readOnlyFirstBaz :: !(Maybe Text) -- ^ "baz"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON ReadOnlyFirst
+instance A.FromJSON ReadOnlyFirst where
+  parseJSON = A.withObject "ReadOnlyFirst" $ \o ->
+    ReadOnlyFirst
+      <$> (o .:? "bar")
+      <*> (o .:? "baz")
+
+-- | ToJSON ReadOnlyFirst
+instance A.ToJSON ReadOnlyFirst where
+  toJSON ReadOnlyFirst {..} =
+   _omitNulls
+      [ "bar" .= readOnlyFirstBar
+      , "baz" .= readOnlyFirstBaz
+      ]
+
+
+-- | Construct a value of type 'ReadOnlyFirst' (by applying it's required fields, if any)
+mkReadOnlyFirst
+  :: ReadOnlyFirst
+mkReadOnlyFirst =
+  ReadOnlyFirst
+  { readOnlyFirstBar = Nothing
+  , readOnlyFirstBaz = Nothing
+  }
+
+-- ** SpecialModelName
+-- | SpecialModelName
+data SpecialModelName = SpecialModelName
+  { specialModelNameSpecialPropertyName :: !(Maybe Integer) -- ^ "$special[property.name]"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON SpecialModelName
+instance A.FromJSON SpecialModelName where
+  parseJSON = A.withObject "SpecialModelName" $ \o ->
+    SpecialModelName
+      <$> (o .:? "$special[property.name]")
+
+-- | ToJSON SpecialModelName
+instance A.ToJSON SpecialModelName where
+  toJSON SpecialModelName {..} =
+   _omitNulls
+      [ "$special[property.name]" .= specialModelNameSpecialPropertyName
+      ]
+
+
+-- | Construct a value of type 'SpecialModelName' (by applying it's required fields, if any)
+mkSpecialModelName
+  :: SpecialModelName
+mkSpecialModelName =
+  SpecialModelName
+  { specialModelNameSpecialPropertyName = Nothing
+  }
+
+-- ** StringBooleanMap
+-- | StringBooleanMap
+data StringBooleanMap = StringBooleanMap
+  { 
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON StringBooleanMap
+instance A.FromJSON StringBooleanMap where
+  parseJSON = A.withObject "StringBooleanMap" $ \o ->
+    pure StringBooleanMap
+      
+
+-- | ToJSON StringBooleanMap
+instance A.ToJSON StringBooleanMap where
+  toJSON StringBooleanMap  =
+   _omitNulls
+      [ 
+      ]
+
+
+-- | Construct a value of type 'StringBooleanMap' (by applying it's required fields, if any)
+mkStringBooleanMap
+  :: StringBooleanMap
+mkStringBooleanMap =
+  StringBooleanMap
+  { 
+  }
+
+-- ** Tag
+-- | Tag
+data Tag = Tag
+  { tagId :: !(Maybe Integer) -- ^ "id"
+  , tagName :: !(Maybe Text) -- ^ "name"
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON Tag
+instance A.FromJSON Tag where
+  parseJSON = A.withObject "Tag" $ \o ->
+    Tag
+      <$> (o .:? "id")
+      <*> (o .:? "name")
+
+-- | ToJSON Tag
+instance A.ToJSON Tag where
+  toJSON Tag {..} =
+   _omitNulls
+      [ "id" .= tagId
+      , "name" .= tagName
+      ]
+
+
+-- | Construct a value of type 'Tag' (by applying it's required fields, if any)
+mkTag
+  :: Tag
+mkTag =
+  Tag
+  { tagId = Nothing
+  , tagName = Nothing
+  }
+
+-- ** User
+-- | User
+data User = User
+  { userId :: !(Maybe Integer) -- ^ "id"
+  , userUsername :: !(Maybe Text) -- ^ "username"
+  , userFirstName :: !(Maybe Text) -- ^ "firstName"
+  , userLastName :: !(Maybe Text) -- ^ "lastName"
+  , userEmail :: !(Maybe Text) -- ^ "email"
+  , userPassword :: !(Maybe Text) -- ^ "password"
+  , userPhone :: !(Maybe Text) -- ^ "phone"
+  , userUserStatus :: !(Maybe Int) -- ^ "userStatus" - User Status
+  } deriving (P.Show, P.Eq, P.Typeable)
+
+-- | FromJSON User
+instance A.FromJSON User where
+  parseJSON = A.withObject "User" $ \o ->
+    User
+      <$> (o .:? "id")
+      <*> (o .:? "username")
+      <*> (o .:? "firstName")
+      <*> (o .:? "lastName")
+      <*> (o .:? "email")
+      <*> (o .:? "password")
+      <*> (o .:? "phone")
+      <*> (o .:? "userStatus")
+
+-- | ToJSON User
+instance A.ToJSON User where
+  toJSON User {..} =
+   _omitNulls
+      [ "id" .= userId
+      , "username" .= userUsername
+      , "firstName" .= userFirstName
+      , "lastName" .= userLastName
+      , "email" .= userEmail
+      , "password" .= userPassword
+      , "phone" .= userPhone
+      , "userStatus" .= userUserStatus
+      ]
+
+
+-- | Construct a value of type 'User' (by applying it's required fields, if any)
+mkUser
+  :: User
+mkUser =
+  User
+  { userId = Nothing
+  , userUsername = Nothing
+  , userFirstName = Nothing
+  , userLastName = Nothing
+  , userEmail = Nothing
+  , userPassword = Nothing
+  , userPhone = Nothing
+  , userUserStatus = Nothing
+  }
+
+
+-- * Enums
+
+
+-- ** E'ArrayEnum
+
+-- | Enum of 'Text'
+data E'ArrayEnum
+  = E'ArrayEnum'Fish -- ^ @"fish"@
+  | E'ArrayEnum'Crab -- ^ @"crab"@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'ArrayEnum where toJSON = A.toJSON . fromE'ArrayEnum
+instance A.FromJSON E'ArrayEnum where parseJSON o = P.either P.fail (pure . P.id) . toE'ArrayEnum =<< A.parseJSON o
+instance WH.ToHttpApiData E'ArrayEnum where toQueryParam = WH.toQueryParam . fromE'ArrayEnum
+instance WH.FromHttpApiData E'ArrayEnum where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'ArrayEnum
+instance MimeRender MimeMultipartFormData E'ArrayEnum where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'ArrayEnum' enum
+fromE'ArrayEnum :: E'ArrayEnum -> Text
+fromE'ArrayEnum = \case
+  E'ArrayEnum'Fish -> "fish"
+  E'ArrayEnum'Crab -> "crab"
+
+-- | parse 'E'ArrayEnum' enum
+toE'ArrayEnum :: Text -> P.Either String E'ArrayEnum
+toE'ArrayEnum = \case
+  "fish" -> P.Right E'ArrayEnum'Fish
+  "crab" -> P.Right E'ArrayEnum'Crab
+  s -> P.Left $ "toE'ArrayEnum: enum parse failure: " P.++ P.show s
+
+
+-- ** E'EnumFormString
+
+-- | Enum of 'Text' . 
+-- Form parameter enum test (string)
+data E'EnumFormString
+  = E'EnumFormString'_abc -- ^ @"_abc"@
+  | E'EnumFormString'_efg -- ^ @"-efg"@
+  | E'EnumFormString'_xyz -- ^ @"(xyz)"@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'EnumFormString where toJSON = A.toJSON . fromE'EnumFormString
+instance A.FromJSON E'EnumFormString where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumFormString =<< A.parseJSON o
+instance WH.ToHttpApiData E'EnumFormString where toQueryParam = WH.toQueryParam . fromE'EnumFormString
+instance WH.FromHttpApiData E'EnumFormString where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumFormString
+instance MimeRender MimeMultipartFormData E'EnumFormString where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'EnumFormString' enum
+fromE'EnumFormString :: E'EnumFormString -> Text
+fromE'EnumFormString = \case
+  E'EnumFormString'_abc -> "_abc"
+  E'EnumFormString'_efg -> "-efg"
+  E'EnumFormString'_xyz -> "(xyz)"
+
+-- | parse 'E'EnumFormString' enum
+toE'EnumFormString :: Text -> P.Either String E'EnumFormString
+toE'EnumFormString = \case
+  "_abc" -> P.Right E'EnumFormString'_abc
+  "-efg" -> P.Right E'EnumFormString'_efg
+  "(xyz)" -> P.Right E'EnumFormString'_xyz
+  s -> P.Left $ "toE'EnumFormString: enum parse failure: " P.++ P.show s
+
+
+-- ** E'EnumFormStringArray
+
+-- | Enum of 'Text'
+data E'EnumFormStringArray
+  = E'EnumFormStringArray'GreaterThan -- ^ @">"@
+  | E'EnumFormStringArray'Dollar -- ^ @"$"@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'EnumFormStringArray where toJSON = A.toJSON . fromE'EnumFormStringArray
+instance A.FromJSON E'EnumFormStringArray where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumFormStringArray =<< A.parseJSON o
+instance WH.ToHttpApiData E'EnumFormStringArray where toQueryParam = WH.toQueryParam . fromE'EnumFormStringArray
+instance WH.FromHttpApiData E'EnumFormStringArray where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumFormStringArray
+instance MimeRender MimeMultipartFormData E'EnumFormStringArray where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'EnumFormStringArray' enum
+fromE'EnumFormStringArray :: E'EnumFormStringArray -> Text
+fromE'EnumFormStringArray = \case
+  E'EnumFormStringArray'GreaterThan -> ">"
+  E'EnumFormStringArray'Dollar -> "$"
+
+-- | parse 'E'EnumFormStringArray' enum
+toE'EnumFormStringArray :: Text -> P.Either String E'EnumFormStringArray
+toE'EnumFormStringArray = \case
+  ">" -> P.Right E'EnumFormStringArray'GreaterThan
+  "$" -> P.Right E'EnumFormStringArray'Dollar
+  s -> P.Left $ "toE'EnumFormStringArray: enum parse failure: " P.++ P.show s
+
+
+-- ** E'EnumInteger
+
+-- | Enum of 'Int'
+data E'EnumInteger
+  = E'EnumInteger'Num1 -- ^ @1@
+  | E'EnumInteger'NumMinus_1 -- ^ @-1@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'EnumInteger where toJSON = A.toJSON . fromE'EnumInteger
+instance A.FromJSON E'EnumInteger where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumInteger =<< A.parseJSON o
+instance WH.ToHttpApiData E'EnumInteger where toQueryParam = WH.toQueryParam . fromE'EnumInteger
+instance WH.FromHttpApiData E'EnumInteger where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumInteger
+instance MimeRender MimeMultipartFormData E'EnumInteger where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'EnumInteger' enum
+fromE'EnumInteger :: E'EnumInteger -> Int
+fromE'EnumInteger = \case
+  E'EnumInteger'Num1 -> 1
+  E'EnumInteger'NumMinus_1 -> -1
+
+-- | parse 'E'EnumInteger' enum
+toE'EnumInteger :: Int -> P.Either String E'EnumInteger
+toE'EnumInteger = \case
+  1 -> P.Right E'EnumInteger'Num1
+  -1 -> P.Right E'EnumInteger'NumMinus_1
+  s -> P.Left $ "toE'EnumInteger: enum parse failure: " P.++ P.show s
+
+
+-- ** E'EnumNumber
+
+-- | Enum of 'Double'
+data E'EnumNumber
+  = E'EnumNumber'Num1_Dot_1 -- ^ @1.1@
+  | E'EnumNumber'NumMinus_1_Dot_2 -- ^ @-1.2@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'EnumNumber where toJSON = A.toJSON . fromE'EnumNumber
+instance A.FromJSON E'EnumNumber where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumNumber =<< A.parseJSON o
+instance WH.ToHttpApiData E'EnumNumber where toQueryParam = WH.toQueryParam . fromE'EnumNumber
+instance WH.FromHttpApiData E'EnumNumber where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumNumber
+instance MimeRender MimeMultipartFormData E'EnumNumber where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'EnumNumber' enum
+fromE'EnumNumber :: E'EnumNumber -> Double
+fromE'EnumNumber = \case
+  E'EnumNumber'Num1_Dot_1 -> 1.1
+  E'EnumNumber'NumMinus_1_Dot_2 -> -1.2
+
+-- | parse 'E'EnumNumber' enum
+toE'EnumNumber :: Double -> P.Either String E'EnumNumber
+toE'EnumNumber = \case
+  1.1 -> P.Right E'EnumNumber'Num1_Dot_1
+  -1.2 -> P.Right E'EnumNumber'NumMinus_1_Dot_2
+  s -> P.Left $ "toE'EnumNumber: enum parse failure: " P.++ P.show s
+
+
+-- ** E'EnumQueryInteger
+
+-- | Enum of 'Int'
+data E'EnumQueryInteger
+  = E'EnumQueryInteger'Num1 -- ^ @1@
+  | E'EnumQueryInteger'NumMinus_2 -- ^ @-2@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'EnumQueryInteger where toJSON = A.toJSON . fromE'EnumQueryInteger
+instance A.FromJSON E'EnumQueryInteger where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumQueryInteger =<< A.parseJSON o
+instance WH.ToHttpApiData E'EnumQueryInteger where toQueryParam = WH.toQueryParam . fromE'EnumQueryInteger
+instance WH.FromHttpApiData E'EnumQueryInteger where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumQueryInteger
+instance MimeRender MimeMultipartFormData E'EnumQueryInteger where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'EnumQueryInteger' enum
+fromE'EnumQueryInteger :: E'EnumQueryInteger -> Int
+fromE'EnumQueryInteger = \case
+  E'EnumQueryInteger'Num1 -> 1
+  E'EnumQueryInteger'NumMinus_2 -> -2
+
+-- | parse 'E'EnumQueryInteger' enum
+toE'EnumQueryInteger :: Int -> P.Either String E'EnumQueryInteger
+toE'EnumQueryInteger = \case
+  1 -> P.Right E'EnumQueryInteger'Num1
+  -2 -> P.Right E'EnumQueryInteger'NumMinus_2
+  s -> P.Left $ "toE'EnumQueryInteger: enum parse failure: " P.++ P.show s
+
+
+-- ** E'EnumString
+
+-- | Enum of 'Text'
+data E'EnumString
+  = E'EnumString'UPPER -- ^ @"UPPER"@
+  | E'EnumString'Lower -- ^ @"lower"@
+  | E'EnumString'Empty -- ^ @""@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'EnumString where toJSON = A.toJSON . fromE'EnumString
+instance A.FromJSON E'EnumString where parseJSON o = P.either P.fail (pure . P.id) . toE'EnumString =<< A.parseJSON o
+instance WH.ToHttpApiData E'EnumString where toQueryParam = WH.toQueryParam . fromE'EnumString
+instance WH.FromHttpApiData E'EnumString where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'EnumString
+instance MimeRender MimeMultipartFormData E'EnumString where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'EnumString' enum
+fromE'EnumString :: E'EnumString -> Text
+fromE'EnumString = \case
+  E'EnumString'UPPER -> "UPPER"
+  E'EnumString'Lower -> "lower"
+  E'EnumString'Empty -> ""
+
+-- | parse 'E'EnumString' enum
+toE'EnumString :: Text -> P.Either String E'EnumString
+toE'EnumString = \case
+  "UPPER" -> P.Right E'EnumString'UPPER
+  "lower" -> P.Right E'EnumString'Lower
+  "" -> P.Right E'EnumString'Empty
+  s -> P.Left $ "toE'EnumString: enum parse failure: " P.++ P.show s
+
+
+-- ** E'Inner
+
+-- | Enum of 'Text'
+data E'Inner
+  = E'Inner'UPPER -- ^ @"UPPER"@
+  | E'Inner'Lower -- ^ @"lower"@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'Inner where toJSON = A.toJSON . fromE'Inner
+instance A.FromJSON E'Inner where parseJSON o = P.either P.fail (pure . P.id) . toE'Inner =<< A.parseJSON o
+instance WH.ToHttpApiData E'Inner where toQueryParam = WH.toQueryParam . fromE'Inner
+instance WH.FromHttpApiData E'Inner where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Inner
+instance MimeRender MimeMultipartFormData E'Inner where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'Inner' enum
+fromE'Inner :: E'Inner -> Text
+fromE'Inner = \case
+  E'Inner'UPPER -> "UPPER"
+  E'Inner'Lower -> "lower"
+
+-- | parse 'E'Inner' enum
+toE'Inner :: Text -> P.Either String E'Inner
+toE'Inner = \case
+  "UPPER" -> P.Right E'Inner'UPPER
+  "lower" -> P.Right E'Inner'Lower
+  s -> P.Left $ "toE'Inner: enum parse failure: " P.++ P.show s
+
+
+-- ** E'JustSymbol
+
+-- | Enum of 'Text'
+data E'JustSymbol
+  = E'JustSymbol'Greater_Than_Or_Equal_To -- ^ @">="@
+  | E'JustSymbol'Dollar -- ^ @"$"@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'JustSymbol where toJSON = A.toJSON . fromE'JustSymbol
+instance A.FromJSON E'JustSymbol where parseJSON o = P.either P.fail (pure . P.id) . toE'JustSymbol =<< A.parseJSON o
+instance WH.ToHttpApiData E'JustSymbol where toQueryParam = WH.toQueryParam . fromE'JustSymbol
+instance WH.FromHttpApiData E'JustSymbol where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'JustSymbol
+instance MimeRender MimeMultipartFormData E'JustSymbol where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'JustSymbol' enum
+fromE'JustSymbol :: E'JustSymbol -> Text
+fromE'JustSymbol = \case
+  E'JustSymbol'Greater_Than_Or_Equal_To -> ">="
+  E'JustSymbol'Dollar -> "$"
+
+-- | parse 'E'JustSymbol' enum
+toE'JustSymbol :: Text -> P.Either String E'JustSymbol
+toE'JustSymbol = \case
+  ">=" -> P.Right E'JustSymbol'Greater_Than_Or_Equal_To
+  "$" -> P.Right E'JustSymbol'Dollar
+  s -> P.Left $ "toE'JustSymbol: enum parse failure: " P.++ P.show s
+
+
+-- ** E'Status
+
+-- | Enum of 'Text' . 
+-- Order Status
+data E'Status
+  = E'Status'Placed -- ^ @"placed"@
+  | E'Status'Approved -- ^ @"approved"@
+  | E'Status'Delivered -- ^ @"delivered"@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'Status where toJSON = A.toJSON . fromE'Status
+instance A.FromJSON E'Status where parseJSON o = P.either P.fail (pure . P.id) . toE'Status =<< A.parseJSON o
+instance WH.ToHttpApiData E'Status where toQueryParam = WH.toQueryParam . fromE'Status
+instance WH.FromHttpApiData E'Status where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status
+instance MimeRender MimeMultipartFormData E'Status where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'Status' enum
+fromE'Status :: E'Status -> Text
+fromE'Status = \case
+  E'Status'Placed -> "placed"
+  E'Status'Approved -> "approved"
+  E'Status'Delivered -> "delivered"
+
+-- | parse 'E'Status' enum
+toE'Status :: Text -> P.Either String E'Status
+toE'Status = \case
+  "placed" -> P.Right E'Status'Placed
+  "approved" -> P.Right E'Status'Approved
+  "delivered" -> P.Right E'Status'Delivered
+  s -> P.Left $ "toE'Status: enum parse failure: " P.++ P.show s
+
+
+-- ** E'Status2
+
+-- | Enum of 'Text' . 
+-- pet status in the store
+data E'Status2
+  = E'Status2'Available -- ^ @"available"@
+  | E'Status2'Pending -- ^ @"pending"@
+  | E'Status2'Sold -- ^ @"sold"@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON E'Status2 where toJSON = A.toJSON . fromE'Status2
+instance A.FromJSON E'Status2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Status2 =<< A.parseJSON o
+instance WH.ToHttpApiData E'Status2 where toQueryParam = WH.toQueryParam . fromE'Status2
+instance WH.FromHttpApiData E'Status2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status2
+instance MimeRender MimeMultipartFormData E'Status2 where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'E'Status2' enum
+fromE'Status2 :: E'Status2 -> Text
+fromE'Status2 = \case
+  E'Status2'Available -> "available"
+  E'Status2'Pending -> "pending"
+  E'Status2'Sold -> "sold"
+
+-- | parse 'E'Status2' enum
+toE'Status2 :: Text -> P.Either String E'Status2
+toE'Status2 = \case
+  "available" -> P.Right E'Status2'Available
+  "pending" -> P.Right E'Status2'Pending
+  "sold" -> P.Right E'Status2'Sold
+  s -> P.Left $ "toE'Status2: enum parse failure: " P.++ P.show s
+
+
+-- ** EnumClass
+
+-- | Enum of 'Text'
+data EnumClass
+  = EnumClass'_abc -- ^ @"_abc"@
+  | EnumClass'_efg -- ^ @"-efg"@
+  | EnumClass'_xyz -- ^ @"(xyz)"@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON EnumClass where toJSON = A.toJSON . fromEnumClass
+instance A.FromJSON EnumClass where parseJSON o = P.either P.fail (pure . P.id) . toEnumClass =<< A.parseJSON o
+instance WH.ToHttpApiData EnumClass where toQueryParam = WH.toQueryParam . fromEnumClass
+instance WH.FromHttpApiData EnumClass where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toEnumClass
+instance MimeRender MimeMultipartFormData EnumClass where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'EnumClass' enum
+fromEnumClass :: EnumClass -> Text
+fromEnumClass = \case
+  EnumClass'_abc -> "_abc"
+  EnumClass'_efg -> "-efg"
+  EnumClass'_xyz -> "(xyz)"
+
+-- | parse 'EnumClass' enum
+toEnumClass :: Text -> P.Either String EnumClass
+toEnumClass = \case
+  "_abc" -> P.Right EnumClass'_abc
+  "-efg" -> P.Right EnumClass'_efg
+  "(xyz)" -> P.Right EnumClass'_xyz
+  s -> P.Left $ "toEnumClass: enum parse failure: " P.++ P.show s
+
+
+-- ** OuterEnum
+
+-- | Enum of 'Text'
+data OuterEnum
+  = OuterEnum'Placed -- ^ @"placed"@
+  | OuterEnum'Approved -- ^ @"approved"@
+  | OuterEnum'Delivered -- ^ @"delivered"@
+  deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum)
+
+instance A.ToJSON OuterEnum where toJSON = A.toJSON . fromOuterEnum
+instance A.FromJSON OuterEnum where parseJSON o = P.either P.fail (pure . P.id) . toOuterEnum =<< A.parseJSON o
+instance WH.ToHttpApiData OuterEnum where toQueryParam = WH.toQueryParam . fromOuterEnum
+instance WH.FromHttpApiData OuterEnum where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toOuterEnum
+instance MimeRender MimeMultipartFormData OuterEnum where mimeRender _ = mimeRenderDefaultMultipartFormData
+
+-- | unwrap 'OuterEnum' enum
+fromOuterEnum :: OuterEnum -> Text
+fromOuterEnum = \case
+  OuterEnum'Placed -> "placed"
+  OuterEnum'Approved -> "approved"
+  OuterEnum'Delivered -> "delivered"
+
+-- | parse 'OuterEnum' enum
+toOuterEnum :: Text -> P.Either String OuterEnum
+toOuterEnum = \case
+  "placed" -> P.Right OuterEnum'Placed
+  "approved" -> P.Right OuterEnum'Approved
+  "delivered" -> P.Right OuterEnum'Delivered
+  s -> P.Left $ "toOuterEnum: enum parse failure: " P.++ P.show s
+
+
+-- * Auth Methods
+
+-- ** AuthApiKeyApiKey
+data AuthApiKeyApiKey =
+  AuthApiKeyApiKey Text -- ^ secret
+  deriving (P.Eq, P.Show, P.Typeable)
+
+instance AuthMethod AuthApiKeyApiKey where
+  applyAuthMethod _ a@(AuthApiKeyApiKey secret) req =
+    P.pure $
+    if (P.typeOf a `P.elem` rAuthTypes req)
+      then req `setHeader` toHeader ("api_key", secret)
+           & L.over rAuthTypesL (P.filter (/= P.typeOf a))
+      else req
+
+-- ** AuthApiKeyApiKeyQuery
+data AuthApiKeyApiKeyQuery =
+  AuthApiKeyApiKeyQuery Text -- ^ secret
+  deriving (P.Eq, P.Show, P.Typeable)
+
+instance AuthMethod AuthApiKeyApiKeyQuery where
+  applyAuthMethod _ a@(AuthApiKeyApiKeyQuery secret) req =
+    P.pure $
+    if (P.typeOf a `P.elem` rAuthTypes req)
+      then req `setQuery` toQuery ("api_key_query", Just secret)
+           & L.over rAuthTypesL (P.filter (/= P.typeOf a))
+      else req
+
+-- ** AuthBasicHttpBasicTest
+data AuthBasicHttpBasicTest =
+  AuthBasicHttpBasicTest B.ByteString B.ByteString -- ^ username password
+  deriving (P.Eq, P.Show, P.Typeable)
+
+instance AuthMethod AuthBasicHttpBasicTest where
+  applyAuthMethod _ a@(AuthBasicHttpBasicTest user pw) req =
+    P.pure $
+    if (P.typeOf a `P.elem` rAuthTypes req)
+      then req `setHeader` toHeader ("Authorization", T.decodeUtf8 cred)
+           & L.over rAuthTypesL (P.filter (/= P.typeOf a))
+      else req
+    where cred = BC.append "Basic " (B64.encode $ BC.concat [ user, ":", pw ])
+
+-- ** AuthOAuthPetstoreAuth
+data AuthOAuthPetstoreAuth =
+  AuthOAuthPetstoreAuth Text -- ^ secret
+  deriving (P.Eq, P.Show, P.Typeable)
+
+instance AuthMethod AuthOAuthPetstoreAuth where
+  applyAuthMethod _ a@(AuthOAuthPetstoreAuth secret) req =
+    P.pure $
+    if (P.typeOf a `P.elem` rAuthTypes req)
+      then req `setHeader` toHeader ("Authorization", "Bearer " <> secret) 
+           & L.over rAuthTypesL (P.filter (/= P.typeOf a))
+      else req
+
diff --git a/lib/OpenAPIPetstore/ModelLens.hs b/lib/OpenAPIPetstore/ModelLens.hs
new file mode 100644
--- /dev/null
+++ b/lib/OpenAPIPetstore/ModelLens.hs
@@ -0,0 +1,666 @@
+{-
+   OpenAPI Petstore
+
+   This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+   OpenAPI Version: 3.0.1
+   OpenAPI Petstore API version: 1.0.0
+   Generated by OpenAPI Generator (https://openapi-generator.tech)
+-}
+
+{-|
+Module : OpenAPIPetstore.Lens
+-}
+
+{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE NamedFieldPuns #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-matches -fno-warn-unused-binds -fno-warn-unused-imports #-}
+
+module OpenAPIPetstore.ModelLens where
+
+import qualified Data.Aeson as A
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.Data as P (Data, Typeable)
+import qualified Data.Map as Map
+import qualified Data.Set as Set
+import qualified Data.Time as TI
+
+import Data.Text (Text)
+
+import Prelude (($), (.),(<$>),(<*>),(=<<),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
+import qualified Prelude as P
+
+import OpenAPIPetstore.Model
+import OpenAPIPetstore.Core
+
+
+-- * AdditionalPropertiesClass
+
+-- | 'additionalPropertiesClassMapProperty' Lens
+additionalPropertiesClassMapPropertyL :: Lens_' AdditionalPropertiesClass (Maybe (Map.Map String Text))
+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
+{-# INLINE additionalPropertiesClassMapOfMapPropertyL #-}
+
+
+
+-- * Animal
+
+-- | 'animalClassName' Lens
+animalClassNameL :: Lens_' Animal (Text)
+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
+{-# INLINE animalColorL #-}
+
+
+
+-- * AnimalFarm
+
+
+
+-- * ApiResponse
+
+-- | 'apiResponseCode' Lens
+apiResponseCodeL :: Lens_' ApiResponse (Maybe Int)
+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
+{-# INLINE apiResponseTypeL #-}
+
+-- | 'apiResponseMessage' Lens
+apiResponseMessageL :: Lens_' ApiResponse (Maybe Text)
+apiResponseMessageL f ApiResponse{..} = (\apiResponseMessage -> ApiResponse { apiResponseMessage, ..} ) <$> f apiResponseMessage
+{-# INLINE apiResponseMessageL #-}
+
+
+
+-- * ArrayOfArrayOfNumberOnly
+
+-- | 'arrayOfArrayOfNumberOnlyArrayArrayNumber' Lens
+arrayOfArrayOfNumberOnlyArrayArrayNumberL :: Lens_' ArrayOfArrayOfNumberOnly (Maybe [[Double]])
+arrayOfArrayOfNumberOnlyArrayArrayNumberL f ArrayOfArrayOfNumberOnly{..} = (\arrayOfArrayOfNumberOnlyArrayArrayNumber -> ArrayOfArrayOfNumberOnly { arrayOfArrayOfNumberOnlyArrayArrayNumber, ..} ) <$> f arrayOfArrayOfNumberOnlyArrayArrayNumber
+{-# INLINE arrayOfArrayOfNumberOnlyArrayArrayNumberL #-}
+
+
+
+-- * ArrayOfNumberOnly
+
+-- | 'arrayOfNumberOnlyArrayNumber' Lens
+arrayOfNumberOnlyArrayNumberL :: Lens_' ArrayOfNumberOnly (Maybe [Double])
+arrayOfNumberOnlyArrayNumberL f ArrayOfNumberOnly{..} = (\arrayOfNumberOnlyArrayNumber -> ArrayOfNumberOnly { arrayOfNumberOnlyArrayNumber, ..} ) <$> f arrayOfNumberOnlyArrayNumber
+{-# INLINE arrayOfNumberOnlyArrayNumberL #-}
+
+
+
+-- * ArrayTest
+
+-- | 'arrayTestArrayOfString' Lens
+arrayTestArrayOfStringL :: Lens_' ArrayTest (Maybe [Text])
+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
+{-# INLINE arrayTestArrayArrayOfIntegerL #-}
+
+-- | 'arrayTestArrayArrayOfModel' Lens
+arrayTestArrayArrayOfModelL :: Lens_' ArrayTest (Maybe [[ReadOnlyFirst]])
+arrayTestArrayArrayOfModelL f ArrayTest{..} = (\arrayTestArrayArrayOfModel -> ArrayTest { arrayTestArrayArrayOfModel, ..} ) <$> f arrayTestArrayArrayOfModel
+{-# INLINE arrayTestArrayArrayOfModelL #-}
+
+
+
+-- * Capitalization
+
+-- | 'capitalizationSmallCamel' Lens
+capitalizationSmallCamelL :: Lens_' Capitalization (Maybe Text)
+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
+{-# INLINE capitalizationCapitalCamelL #-}
+
+-- | 'capitalizationSmallSnake' Lens
+capitalizationSmallSnakeL :: Lens_' Capitalization (Maybe Text)
+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
+{-# INLINE capitalizationCapitalSnakeL #-}
+
+-- | 'capitalizationScaEthFlowPoints' Lens
+capitalizationScaEthFlowPointsL :: Lens_' Capitalization (Maybe Text)
+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
+{-# INLINE capitalizationAttNameL #-}
+
+
+
+-- * Cat
+
+-- | 'catClassName' Lens
+catClassNameL :: Lens_' Cat (Text)
+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
+{-# INLINE catColorL #-}
+
+-- | 'catDeclawed' Lens
+catDeclawedL :: Lens_' Cat (Maybe Bool)
+catDeclawedL f Cat{..} = (\catDeclawed -> Cat { catDeclawed, ..} ) <$> f catDeclawed
+{-# INLINE catDeclawedL #-}
+
+
+
+-- * Category
+
+-- | 'categoryId' Lens
+categoryIdL :: Lens_' Category (Maybe Integer)
+categoryIdL f Category{..} = (\categoryId -> Category { categoryId, ..} ) <$> f categoryId
+{-# INLINE categoryIdL #-}
+
+-- | 'categoryName' Lens
+categoryNameL :: Lens_' Category (Text)
+categoryNameL f Category{..} = (\categoryName -> Category { categoryName, ..} ) <$> f categoryName
+{-# INLINE categoryNameL #-}
+
+
+
+-- * ClassModel
+
+-- | 'classModelClass' Lens
+classModelClassL :: Lens_' ClassModel (Maybe Text)
+classModelClassL f ClassModel{..} = (\classModelClass -> ClassModel { classModelClass, ..} ) <$> f classModelClass
+{-# INLINE classModelClassL #-}
+
+
+
+-- * Client
+
+-- | 'clientClient' Lens
+clientClientL :: Lens_' Client (Maybe Text)
+clientClientL f Client{..} = (\clientClient -> Client { clientClient, ..} ) <$> f clientClient
+{-# INLINE clientClientL #-}
+
+
+
+-- * Dog
+
+-- | 'dogClassName' Lens
+dogClassNameL :: Lens_' Dog (Text)
+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
+{-# INLINE dogColorL #-}
+
+-- | 'dogBreed' Lens
+dogBreedL :: Lens_' Dog (Maybe Text)
+dogBreedL f Dog{..} = (\dogBreed -> Dog { dogBreed, ..} ) <$> f dogBreed
+{-# INLINE dogBreedL #-}
+
+
+
+-- * EnumArrays
+
+-- | 'enumArraysJustSymbol' Lens
+enumArraysJustSymbolL :: Lens_' EnumArrays (Maybe E'JustSymbol)
+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
+{-# INLINE enumArraysArrayEnumL #-}
+
+
+
+-- * EnumClass
+
+
+
+-- * EnumTest
+
+-- | 'enumTestEnumString' Lens
+enumTestEnumStringL :: Lens_' EnumTest (Maybe E'EnumString)
+enumTestEnumStringL f EnumTest{..} = (\enumTestEnumString -> EnumTest { enumTestEnumString, ..} ) <$> f enumTestEnumString
+{-# INLINE enumTestEnumStringL #-}
+
+-- | 'enumTestEnumStringRequired' Lens
+enumTestEnumStringRequiredL :: Lens_' EnumTest (E'EnumString)
+enumTestEnumStringRequiredL f EnumTest{..} = (\enumTestEnumStringRequired -> EnumTest { enumTestEnumStringRequired, ..} ) <$> f enumTestEnumStringRequired
+{-# INLINE enumTestEnumStringRequiredL #-}
+
+-- | 'enumTestEnumInteger' Lens
+enumTestEnumIntegerL :: Lens_' EnumTest (Maybe E'EnumInteger)
+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
+{-# INLINE enumTestEnumNumberL #-}
+
+-- | 'enumTestOuterEnum' Lens
+enumTestOuterEnumL :: Lens_' EnumTest (Maybe OuterEnum)
+enumTestOuterEnumL f EnumTest{..} = (\enumTestOuterEnum -> EnumTest { enumTestOuterEnum, ..} ) <$> f enumTestOuterEnum
+{-# INLINE enumTestOuterEnumL #-}
+
+
+
+-- * File
+
+-- | 'fileSourceUri' Lens
+fileSourceUriL :: Lens_' File (Maybe Text)
+fileSourceUriL f File{..} = (\fileSourceUri -> File { fileSourceUri, ..} ) <$> f fileSourceUri
+{-# INLINE fileSourceUriL #-}
+
+
+
+-- * FileSchemaTestClass
+
+-- | 'fileSchemaTestClassFile' Lens
+fileSchemaTestClassFileL :: Lens_' FileSchemaTestClass (Maybe File)
+fileSchemaTestClassFileL f FileSchemaTestClass{..} = (\fileSchemaTestClassFile -> FileSchemaTestClass { fileSchemaTestClassFile, ..} ) <$> f fileSchemaTestClassFile
+{-# INLINE fileSchemaTestClassFileL #-}
+
+-- | 'fileSchemaTestClassFiles' Lens
+fileSchemaTestClassFilesL :: Lens_' FileSchemaTestClass (Maybe [File])
+fileSchemaTestClassFilesL f FileSchemaTestClass{..} = (\fileSchemaTestClassFiles -> FileSchemaTestClass { fileSchemaTestClassFiles, ..} ) <$> f fileSchemaTestClassFiles
+{-# INLINE fileSchemaTestClassFilesL #-}
+
+
+
+-- * FormatTest
+
+-- | 'formatTestInteger' Lens
+formatTestIntegerL :: Lens_' FormatTest (Maybe Int)
+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
+{-# INLINE formatTestInt32L #-}
+
+-- | 'formatTestInt64' Lens
+formatTestInt64L :: Lens_' FormatTest (Maybe Integer)
+formatTestInt64L f FormatTest{..} = (\formatTestInt64 -> FormatTest { formatTestInt64, ..} ) <$> f formatTestInt64
+{-# INLINE formatTestInt64L #-}
+
+-- | 'formatTestNumber' Lens
+formatTestNumberL :: Lens_' FormatTest (Double)
+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
+{-# INLINE formatTestFloatL #-}
+
+-- | 'formatTestDouble' Lens
+formatTestDoubleL :: Lens_' FormatTest (Maybe Double)
+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
+{-# INLINE formatTestStringL #-}
+
+-- | 'formatTestByte' Lens
+formatTestByteL :: Lens_' FormatTest (ByteArray)
+formatTestByteL f FormatTest{..} = (\formatTestByte -> FormatTest { formatTestByte, ..} ) <$> f formatTestByte
+{-# INLINE formatTestByteL #-}
+
+-- | 'formatTestBinary' Lens
+formatTestBinaryL :: Lens_' FormatTest (Maybe FilePath)
+formatTestBinaryL f FormatTest{..} = (\formatTestBinary -> FormatTest { formatTestBinary, ..} ) <$> f formatTestBinary
+{-# INLINE formatTestBinaryL #-}
+
+-- | 'formatTestDate' Lens
+formatTestDateL :: Lens_' FormatTest (Date)
+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
+{-# INLINE formatTestDateTimeL #-}
+
+-- | 'formatTestUuid' Lens
+formatTestUuidL :: Lens_' FormatTest (Maybe Text)
+formatTestUuidL f FormatTest{..} = (\formatTestUuid -> FormatTest { formatTestUuid, ..} ) <$> f formatTestUuid
+{-# INLINE formatTestUuidL #-}
+
+-- | 'formatTestPassword' Lens
+formatTestPasswordL :: Lens_' FormatTest (Text)
+formatTestPasswordL f FormatTest{..} = (\formatTestPassword -> FormatTest { formatTestPassword, ..} ) <$> f formatTestPassword
+{-# INLINE formatTestPasswordL #-}
+
+
+
+-- * HasOnlyReadOnly
+
+-- | 'hasOnlyReadOnlyBar' Lens
+hasOnlyReadOnlyBarL :: Lens_' HasOnlyReadOnly (Maybe Text)
+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
+{-# INLINE hasOnlyReadOnlyFooL #-}
+
+
+
+-- * MapTest
+
+-- | 'mapTestMapMapOfString' Lens
+mapTestMapMapOfStringL :: Lens_' MapTest (Maybe (Map.Map String (Map.Map String Text)))
+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
+{-# INLINE mapTestMapOfEnumStringL #-}
+
+-- | 'mapTestDirectMap' Lens
+mapTestDirectMapL :: Lens_' MapTest (Maybe (Map.Map String Bool))
+mapTestDirectMapL f MapTest{..} = (\mapTestDirectMap -> MapTest { mapTestDirectMap, ..} ) <$> f mapTestDirectMap
+{-# INLINE mapTestDirectMapL #-}
+
+-- | 'mapTestIndirectMap' Lens
+mapTestIndirectMapL :: Lens_' MapTest (Maybe (Map.Map String Bool))
+mapTestIndirectMapL f MapTest{..} = (\mapTestIndirectMap -> MapTest { mapTestIndirectMap, ..} ) <$> f mapTestIndirectMap
+{-# INLINE mapTestIndirectMapL #-}
+
+
+
+-- * MixedPropertiesAndAdditionalPropertiesClass
+
+-- | 'mixedPropertiesAndAdditionalPropertiesClassUuid' Lens
+mixedPropertiesAndAdditionalPropertiesClassUuidL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe Text)
+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
+{-# INLINE mixedPropertiesAndAdditionalPropertiesClassDateTimeL #-}
+
+-- | 'mixedPropertiesAndAdditionalPropertiesClassMap' Lens
+mixedPropertiesAndAdditionalPropertiesClassMapL :: Lens_' MixedPropertiesAndAdditionalPropertiesClass (Maybe (Map.Map String Animal))
+mixedPropertiesAndAdditionalPropertiesClassMapL f MixedPropertiesAndAdditionalPropertiesClass{..} = (\mixedPropertiesAndAdditionalPropertiesClassMap -> MixedPropertiesAndAdditionalPropertiesClass { mixedPropertiesAndAdditionalPropertiesClassMap, ..} ) <$> f mixedPropertiesAndAdditionalPropertiesClassMap
+{-# INLINE mixedPropertiesAndAdditionalPropertiesClassMapL #-}
+
+
+
+-- * Model200Response
+
+-- | 'model200ResponseName' Lens
+model200ResponseNameL :: Lens_' Model200Response (Maybe Int)
+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
+{-# INLINE model200ResponseClassL #-}
+
+
+
+-- * ModelList
+
+-- | 'modelList123list' Lens
+modelList123listL :: Lens_' ModelList (Maybe Text)
+modelList123listL f ModelList{..} = (\modelList123list -> ModelList { modelList123list, ..} ) <$> f modelList123list
+{-# INLINE modelList123listL #-}
+
+
+
+-- * ModelReturn
+
+-- | 'modelReturnReturn' Lens
+modelReturnReturnL :: Lens_' ModelReturn (Maybe Int)
+modelReturnReturnL f ModelReturn{..} = (\modelReturnReturn -> ModelReturn { modelReturnReturn, ..} ) <$> f modelReturnReturn
+{-# INLINE modelReturnReturnL #-}
+
+
+
+-- * Name
+
+-- | 'nameName' Lens
+nameNameL :: Lens_' Name (Int)
+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
+{-# INLINE nameSnakeCaseL #-}
+
+-- | 'nameProperty' Lens
+namePropertyL :: Lens_' Name (Maybe Text)
+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
+{-# INLINE name123numberL #-}
+
+
+
+-- * NumberOnly
+
+-- | 'numberOnlyJustNumber' Lens
+numberOnlyJustNumberL :: Lens_' NumberOnly (Maybe Double)
+numberOnlyJustNumberL f NumberOnly{..} = (\numberOnlyJustNumber -> NumberOnly { numberOnlyJustNumber, ..} ) <$> f numberOnlyJustNumber
+{-# INLINE numberOnlyJustNumberL #-}
+
+
+
+-- * Order
+
+-- | 'orderId' Lens
+orderIdL :: Lens_' Order (Maybe Integer)
+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
+{-# INLINE orderPetIdL #-}
+
+-- | 'orderQuantity' Lens
+orderQuantityL :: Lens_' Order (Maybe Int)
+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
+{-# INLINE orderShipDateL #-}
+
+-- | 'orderStatus' Lens
+orderStatusL :: Lens_' Order (Maybe E'Status)
+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
+{-# INLINE orderCompleteL #-}
+
+
+
+-- * OuterComposite
+
+-- | 'outerCompositeMyNumber' Lens
+outerCompositeMyNumberL :: Lens_' OuterComposite (Maybe Double)
+outerCompositeMyNumberL f OuterComposite{..} = (\outerCompositeMyNumber -> OuterComposite { outerCompositeMyNumber, ..} ) <$> f outerCompositeMyNumber
+{-# INLINE outerCompositeMyNumberL #-}
+
+-- | 'outerCompositeMyString' Lens
+outerCompositeMyStringL :: Lens_' OuterComposite (Maybe Text)
+outerCompositeMyStringL f OuterComposite{..} = (\outerCompositeMyString -> OuterComposite { outerCompositeMyString, ..} ) <$> f outerCompositeMyString
+{-# INLINE outerCompositeMyStringL #-}
+
+-- | 'outerCompositeMyBoolean' Lens
+outerCompositeMyBooleanL :: Lens_' OuterComposite (Maybe Bool)
+outerCompositeMyBooleanL f OuterComposite{..} = (\outerCompositeMyBoolean -> OuterComposite { outerCompositeMyBoolean, ..} ) <$> f outerCompositeMyBoolean
+{-# INLINE outerCompositeMyBooleanL #-}
+
+
+
+-- * OuterEnum
+
+
+
+-- * Pet
+
+-- | 'petId' Lens
+petIdL :: Lens_' Pet (Maybe Integer)
+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
+{-# INLINE petCategoryL #-}
+
+-- | 'petName' Lens
+petNameL :: Lens_' Pet (Text)
+petNameL f Pet{..} = (\petName -> Pet { petName, ..} ) <$> f petName
+{-# INLINE petNameL #-}
+
+-- | 'petPhotoUrls' Lens
+petPhotoUrlsL :: Lens_' Pet ([Text])
+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
+{-# INLINE petTagsL #-}
+
+-- | 'petStatus' Lens
+petStatusL :: Lens_' Pet (Maybe E'Status2)
+petStatusL f Pet{..} = (\petStatus -> Pet { petStatus, ..} ) <$> f petStatus
+{-# INLINE petStatusL #-}
+
+
+
+-- * ReadOnlyFirst
+
+-- | 'readOnlyFirstBar' Lens
+readOnlyFirstBarL :: Lens_' ReadOnlyFirst (Maybe Text)
+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
+{-# INLINE readOnlyFirstBazL #-}
+
+
+
+-- * SpecialModelName
+
+-- | 'specialModelNameSpecialPropertyName' Lens
+specialModelNameSpecialPropertyNameL :: Lens_' SpecialModelName (Maybe Integer)
+specialModelNameSpecialPropertyNameL f SpecialModelName{..} = (\specialModelNameSpecialPropertyName -> SpecialModelName { specialModelNameSpecialPropertyName, ..} ) <$> f specialModelNameSpecialPropertyName
+{-# INLINE specialModelNameSpecialPropertyNameL #-}
+
+
+
+-- * StringBooleanMap
+
+
+
+-- * Tag
+
+-- | 'tagId' Lens
+tagIdL :: Lens_' Tag (Maybe Integer)
+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
+{-# INLINE tagNameL #-}
+
+
+
+-- * User
+
+-- | 'userId' Lens
+userIdL :: Lens_' User (Maybe Integer)
+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
+{-# INLINE userUsernameL #-}
+
+-- | 'userFirstName' Lens
+userFirstNameL :: Lens_' User (Maybe Text)
+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
+{-# INLINE userLastNameL #-}
+
+-- | 'userEmail' Lens
+userEmailL :: Lens_' User (Maybe Text)
+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
+{-# INLINE userPasswordL #-}
+
+-- | 'userPhone' Lens
+userPhoneL :: Lens_' User (Maybe Text)
+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
+{-# INLINE userUserStatusL #-}
+
+
diff --git a/openapi-petstore.cabal b/openapi-petstore.cabal
new file mode 100644
--- /dev/null
+++ b/openapi-petstore.cabal
@@ -0,0 +1,104 @@
+name:           openapi-petstore
+version:        0.0.3.0
+synopsis:       Auto-generated openapi-petstore API Client
+description:    .
+                Client library for calling the OpenAPI Petstore API based on http-client.
+                .
+                host: petstore.swagger.io
+                .
+                base path: http://petstore.swagger.io:80/v2
+                .
+                OpenAPI Petstore API version: 1.0.0
+                .
+                OpenAPI version: 3.0.1
+                .
+                category:       Web
+homepage:       https://openapi-generator.tech
+author:         Author Name Here
+maintainer:     author.name@email.com
+copyright:      YEAR - AUTHOR
+license:        MIT
+category:       Web
+build-type:     Simple
+cabal-version:  >= 1.10
+
+extra-source-files:
+    README.md
+    openapi.yaml
+
+library
+  hs-source-dirs:
+      lib
+  ghc-options: -Wall -funbox-strict-fields
+  build-depends:
+      aeson >=1.0 && <2.0
+    , base >=4.7 && <5.0
+    , base64-bytestring >1.0 && <2.0
+    , bytestring >=0.10.0 && <0.11
+    , case-insensitive
+    , containers >=0.5.0.0 && <0.6
+    , deepseq >= 1.4 && <1.6
+    , exceptions >= 0.4
+    , http-api-data >= 0.3.4 && <0.4
+    , http-client >=0.5 && <0.6
+    , http-client-tls
+    , http-media >= 0.4 && < 0.8
+    , http-types >=0.8 && <0.13
+    , iso8601-time >=0.1.3 && <0.2.0
+    , microlens >= 0.4.3 && <0.5
+    , mtl >=2.2.1
+    , network >=2.6.2 && <2.8
+    , random >=1.1
+    , safe-exceptions <0.2
+    , text >=0.11 && <1.3
+    , 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_openapi_petstore
+  exposed-modules:
+      OpenAPIPetstore
+      OpenAPIPetstore.API
+      OpenAPIPetstore.API.AnotherFake
+      OpenAPIPetstore.API.Fake
+      OpenAPIPetstore.API.FakeClassnameTags123
+      OpenAPIPetstore.API.Pet
+      OpenAPIPetstore.API.Store
+      OpenAPIPetstore.API.User
+      OpenAPIPetstore.Client
+      OpenAPIPetstore.Core
+      OpenAPIPetstore.Logging
+      OpenAPIPetstore.MimeTypes
+      OpenAPIPetstore.Model
+      OpenAPIPetstore.ModelLens
+  default-language: Haskell2010
+
+test-suite tests
+  type: exitcode-stdio-1.0
+  main-is: Test.hs
+  hs-source-dirs:
+      tests
+  ghc-options: -Wall -fno-warn-orphans
+  build-depends:
+      openapi-petstore
+    , QuickCheck
+    , aeson
+    , base >=4.7 && <5.0
+    , bytestring >=0.10.0 && <0.11
+    , containers
+    , hspec >=1.8
+    , iso8601-time
+    , mtl >=2.2.1
+    , semigroups
+    , text
+    , time
+    , transformers >=0.4.0.0
+    , unordered-containers
+    , vector
+  other-modules:
+      ApproxEq
+      Instances
+      PropMime
+  default-language: Haskell2010
diff --git a/openapi.yaml b/openapi.yaml
new file mode 100644
--- /dev/null
+++ b/openapi.yaml
@@ -0,0 +1,1651 @@
+openapi: 3.0.1
+info:
+  description: 'This spec is mainly for testing Petstore server and contains fake
+    endpoints, models. Please do not use this for any other purpose. Special characters:
+    " \'
+  license:
+    name: Apache-2.0
+    url: http://www.apache.org/licenses/LICENSE-2.0.html
+  title: OpenAPI Petstore
+  version: 1.0.0
+servers:
+- url: http://petstore.swagger.io:80/v2
+tags:
+- description: Everything about your Pets
+  name: pet
+- description: Access to Petstore orders
+  name: store
+- description: Operations about user
+  name: user
+paths:
+  /pet:
+    post:
+      operationId: addPet
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/Pet'
+          application/xml:
+            schema:
+              $ref: '#/components/schemas/Pet'
+        description: Pet object that needs to be added to the store
+        required: true
+      responses:
+        405:
+          content: {}
+          description: Invalid input
+      security:
+      - petstore_auth:
+        - write:pets
+        - read:pets
+      summary: Add a new pet to the store
+      tags:
+      - pet
+    put:
+      operationId: updatePet
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/Pet'
+          application/xml:
+            schema:
+              $ref: '#/components/schemas/Pet'
+        description: Pet object that needs to be added to the store
+        required: true
+      responses:
+        400:
+          content: {}
+          description: Invalid ID supplied
+        404:
+          content: {}
+          description: Pet not found
+        405:
+          content: {}
+          description: Validation exception
+      security:
+      - petstore_auth:
+        - write:pets
+        - read:pets
+      summary: Update an existing pet
+      tags:
+      - pet
+  /pet/findByStatus:
+    get:
+      description: Multiple status values can be provided with comma separated strings
+      operationId: findPetsByStatus
+      parameters:
+      - description: Status values that need to be considered for filter
+        explode: false
+        in: query
+        name: status
+        required: true
+        schema:
+          items:
+            default: available
+            enum:
+            - available
+            - pending
+            - sold
+            type: string
+          type: array
+        style: form
+      responses:
+        200:
+          content:
+            application/xml:
+              schema:
+                items:
+                  $ref: '#/components/schemas/Pet'
+                type: array
+            application/json:
+              schema:
+                items:
+                  $ref: '#/components/schemas/Pet'
+                type: array
+          description: successful operation
+        400:
+          content: {}
+          description: Invalid status value
+      security:
+      - petstore_auth:
+        - write:pets
+        - read:pets
+      summary: Finds Pets by status
+      tags:
+      - pet
+  /pet/findByTags:
+    get:
+      deprecated: true
+      description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+      operationId: findPetsByTags
+      parameters:
+      - description: Tags to filter by
+        explode: false
+        in: query
+        name: tags
+        required: true
+        schema:
+          items:
+            type: string
+          type: array
+        style: form
+      responses:
+        200:
+          content:
+            application/xml:
+              schema:
+                items:
+                  $ref: '#/components/schemas/Pet'
+                type: array
+            application/json:
+              schema:
+                items:
+                  $ref: '#/components/schemas/Pet'
+                type: array
+          description: successful operation
+        400:
+          content: {}
+          description: Invalid tag value
+      security:
+      - petstore_auth:
+        - write:pets
+        - read:pets
+      summary: Finds Pets by tags
+      tags:
+      - pet
+  /pet/{petId}:
+    delete:
+      operationId: deletePet
+      parameters:
+      - in: header
+        name: api_key
+        schema:
+          type: string
+      - description: Pet id to delete
+        in: path
+        name: petId
+        required: true
+        schema:
+          format: int64
+          type: integer
+      responses:
+        400:
+          content: {}
+          description: Invalid pet value
+      security:
+      - petstore_auth:
+        - write:pets
+        - read:pets
+      summary: Deletes a pet
+      tags:
+      - pet
+    get:
+      description: Returns a single pet
+      operationId: getPetById
+      parameters:
+      - description: ID of pet to return
+        in: path
+        name: petId
+        required: true
+        schema:
+          format: int64
+          type: integer
+      responses:
+        200:
+          content:
+            application/xml:
+              schema:
+                $ref: '#/components/schemas/Pet'
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Pet'
+          description: successful operation
+        400:
+          content: {}
+          description: Invalid ID supplied
+        404:
+          content: {}
+          description: Pet not found
+      security:
+      - api_key: []
+      summary: Find pet by ID
+      tags:
+      - pet
+    post:
+      operationId: updatePetWithForm
+      parameters:
+      - description: ID of pet that needs to be updated
+        in: path
+        name: petId
+        required: true
+        schema:
+          format: int64
+          type: integer
+      requestBody:
+        content:
+          application/x-www-form-urlencoded:
+            schema:
+              properties:
+                name:
+                  description: Updated name of the pet
+                  type: string
+                status:
+                  description: Updated status of the pet
+                  type: string
+      responses:
+        405:
+          content: {}
+          description: Invalid input
+      security:
+      - petstore_auth:
+        - write:pets
+        - read:pets
+      summary: Updates a pet in the store with form data
+      tags:
+      - pet
+  /pet/{petId}/uploadImage:
+    post:
+      operationId: uploadFile
+      parameters:
+      - description: ID of pet to update
+        in: path
+        name: petId
+        required: true
+        schema:
+          format: int64
+          type: integer
+      requestBody:
+        content:
+          multipart/form-data:
+            schema:
+              properties:
+                additionalMetadata:
+                  description: Additional data to pass to server
+                  type: string
+                file:
+                  description: file to upload
+                  format: binary
+                  type: string
+      responses:
+        200:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ApiResponse'
+          description: successful operation
+      security:
+      - petstore_auth:
+        - write:pets
+        - read:pets
+      summary: uploads an image
+      tags:
+      - pet
+  /store/inventory:
+    get:
+      description: Returns a map of status codes to quantities
+      operationId: getInventory
+      responses:
+        200:
+          content:
+            application/json:
+              schema:
+                additionalProperties:
+                  format: int32
+                  type: integer
+                type: object
+          description: successful operation
+      security:
+      - api_key: []
+      summary: Returns pet inventories by status
+      tags:
+      - store
+  /store/order:
+    post:
+      operationId: placeOrder
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              $ref: '#/components/schemas/Order'
+        description: order placed for purchasing the pet
+        required: true
+      responses:
+        200:
+          content:
+            application/xml:
+              schema:
+                $ref: '#/components/schemas/Order'
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Order'
+          description: successful operation
+        400:
+          content: {}
+          description: Invalid Order
+      summary: Place an order for a pet
+      tags:
+      - store
+  /store/order/{order_id}:
+    delete:
+      description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+      operationId: deleteOrder
+      parameters:
+      - description: ID of the order that needs to be deleted
+        in: path
+        name: order_id
+        required: true
+        schema:
+          type: string
+      responses:
+        400:
+          content: {}
+          description: Invalid ID supplied
+        404:
+          content: {}
+          description: Order not found
+      summary: Delete purchase order by ID
+      tags:
+      - store
+    get:
+      description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+      operationId: getOrderById
+      parameters:
+      - description: ID of pet that needs to be fetched
+        in: path
+        name: order_id
+        required: true
+        schema:
+          format: int64
+          maximum: 5
+          minimum: 1
+          type: integer
+      responses:
+        200:
+          content:
+            application/xml:
+              schema:
+                $ref: '#/components/schemas/Order'
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Order'
+          description: successful operation
+        400:
+          content: {}
+          description: Invalid ID supplied
+        404:
+          content: {}
+          description: Order not found
+      summary: Find purchase order by ID
+      tags:
+      - store
+  /user:
+    post:
+      description: This can only be done by the logged in user.
+      operationId: createUser
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              $ref: '#/components/schemas/User'
+        description: Created user object
+        required: true
+      responses:
+        default:
+          content: {}
+          description: successful operation
+      summary: Create user
+      tags:
+      - user
+  /user/createWithArray:
+    post:
+      operationId: createUsersWithArrayInput
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              items:
+                $ref: '#/components/schemas/User'
+              type: array
+        description: List of user object
+        required: true
+      responses:
+        default:
+          content: {}
+          description: successful operation
+      summary: Creates list of users with given input array
+      tags:
+      - user
+  /user/createWithList:
+    post:
+      operationId: createUsersWithListInput
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              items:
+                $ref: '#/components/schemas/User'
+              type: array
+        description: List of user object
+        required: true
+      responses:
+        default:
+          content: {}
+          description: successful operation
+      summary: Creates list of users with given input array
+      tags:
+      - user
+  /user/login:
+    get:
+      operationId: loginUser
+      parameters:
+      - description: The user name for login
+        in: query
+        name: username
+        required: true
+        schema:
+          type: string
+      - description: The password for login in clear text
+        in: query
+        name: password
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          content:
+            application/xml:
+              schema:
+                type: string
+            application/json:
+              schema:
+                type: string
+          description: successful operation
+          headers:
+            X-Rate-Limit:
+              description: calls per hour allowed by the user
+              schema:
+                format: int32
+                type: integer
+            X-Expires-After:
+              description: date in UTC when token expires
+              schema:
+                format: date-time
+                type: string
+        400:
+          content: {}
+          description: Invalid username/password supplied
+      summary: Logs user into the system
+      tags:
+      - user
+  /user/logout:
+    get:
+      operationId: logoutUser
+      responses:
+        default:
+          content: {}
+          description: successful operation
+      summary: Logs out current logged in user session
+      tags:
+      - user
+  /user/{username}:
+    delete:
+      description: This can only be done by the logged in user.
+      operationId: deleteUser
+      parameters:
+      - description: The name that needs to be deleted
+        in: path
+        name: username
+        required: true
+        schema:
+          type: string
+      responses:
+        400:
+          content: {}
+          description: Invalid username supplied
+        404:
+          content: {}
+          description: User not found
+      summary: Delete user
+      tags:
+      - user
+    get:
+      operationId: getUserByName
+      parameters:
+      - description: The name that needs to be fetched. Use user1 for testing.
+        in: path
+        name: username
+        required: true
+        schema:
+          type: string
+      responses:
+        200:
+          content:
+            application/xml:
+              schema:
+                $ref: '#/components/schemas/User'
+            application/json:
+              schema:
+                $ref: '#/components/schemas/User'
+          description: successful operation
+        400:
+          content: {}
+          description: Invalid username supplied
+        404:
+          content: {}
+          description: User not found
+      summary: Get user by user name
+      tags:
+      - user
+    put:
+      description: This can only be done by the logged in user.
+      operationId: updateUser
+      parameters:
+      - description: name that need to be deleted
+        in: path
+        name: username
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              $ref: '#/components/schemas/User'
+        description: Updated user object
+        required: true
+      responses:
+        400:
+          content: {}
+          description: Invalid user supplied
+        404:
+          content: {}
+          description: User not found
+      summary: Updated user
+      tags:
+      - user
+  /fake_classname_test:
+    patch:
+      description: To test class name in snake case
+      operationId: testClassname
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/Client'
+        description: client model
+        required: true
+      responses:
+        200:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Client'
+          description: successful operation
+      security:
+      - api_key_query: []
+      summary: To test class name in snake case
+      tags:
+      - fake_classname_tags 123#$%^
+  /fake:
+    delete:
+      description: Fake endpoint to test group parameters (optional)
+      operationId: testGroupParameters
+      parameters:
+      - description: Required String in group parameters
+        in: query
+        name: required_string_group
+        required: true
+        schema:
+          type: integer
+      - description: Required Boolean in group parameters
+        in: header
+        name: required_boolean_group
+        required: true
+        schema:
+          type: boolean
+      - description: Required Integer in group parameters
+        in: query
+        name: required_int64_group
+        required: true
+        schema:
+          format: int64
+          type: integer
+      - description: String in group parameters
+        in: query
+        name: string_group
+        schema:
+          type: integer
+      - description: Boolean in group parameters
+        in: header
+        name: boolean_group
+        schema:
+          type: boolean
+      - description: Integer in group parameters
+        in: query
+        name: int64_group
+        schema:
+          format: int64
+          type: integer
+      responses:
+        400:
+          content: {}
+          description: Someting wrong
+      summary: Fake endpoint to test group parameters (optional)
+      tags:
+      - fake
+      x-group-parameters: true
+    get:
+      description: To test enum parameters
+      operationId: testEnumParameters
+      parameters:
+      - description: Header parameter enum test (string array)
+        explode: false
+        in: header
+        name: enum_header_string_array
+        schema:
+          items:
+            default: $
+            enum:
+            - '>'
+            - $
+            type: string
+          type: array
+        style: simple
+      - description: Header parameter enum test (string)
+        in: header
+        name: enum_header_string
+        schema:
+          default: -efg
+          enum:
+          - _abc
+          - -efg
+          - (xyz)
+          type: string
+      - description: Query parameter enum test (string array)
+        explode: false
+        in: query
+        name: enum_query_string_array
+        schema:
+          items:
+            default: $
+            enum:
+            - '>'
+            - $
+            type: string
+          type: array
+        style: form
+      - description: Query parameter enum test (string)
+        in: query
+        name: enum_query_string
+        schema:
+          default: -efg
+          enum:
+          - _abc
+          - -efg
+          - (xyz)
+          type: string
+      - description: Query parameter enum test (double)
+        in: query
+        name: enum_query_integer
+        schema:
+          enum:
+          - 1
+          - -2
+          format: int32
+          type: integer
+      - description: Query parameter enum test (double)
+        in: query
+        name: enum_query_double
+        schema:
+          enum:
+          - 1.1
+          - -1.2
+          format: double
+          type: number
+      requestBody:
+        content:
+          application/x-www-form-urlencoded:
+            schema:
+              properties:
+                enum_form_string_array:
+                  description: Form parameter enum test (string array)
+                  items:
+                    default: $
+                    enum:
+                    - '>'
+                    - $
+                    type: string
+                  type: array
+                enum_form_string:
+                  default: -efg
+                  description: Form parameter enum test (string)
+                  enum:
+                  - _abc
+                  - -efg
+                  - (xyz)
+                  type: string
+      responses:
+        400:
+          content: {}
+          description: Invalid request
+        404:
+          content: {}
+          description: Not found
+      summary: To test enum parameters
+      tags:
+      - fake
+    patch:
+      description: To test "client" model
+      operationId: testClientModel
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/Client'
+        description: client model
+        required: true
+      responses:
+        200:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Client'
+          description: successful operation
+      summary: To test "client" model
+      tags:
+      - fake
+    post:
+      description: |
+        Fake endpoint for testing various parameters
+        假端點
+        偽のエンドポイント
+        가짜 엔드 포인트
+      operationId: testEndpointParameters
+      requestBody:
+        content:
+          application/x-www-form-urlencoded:
+            schema:
+              properties:
+                integer:
+                  description: None
+                  maximum: 100
+                  minimum: 10
+                  type: integer
+                int32:
+                  description: None
+                  format: int32
+                  maximum: 200
+                  minimum: 20
+                  type: integer
+                int64:
+                  description: None
+                  format: int64
+                  type: integer
+                number:
+                  description: None
+                  maximum: 543.2
+                  minimum: 32.1
+                  type: number
+                float:
+                  description: None
+                  format: float
+                  maximum: 987.6
+                  type: number
+                double:
+                  description: None
+                  format: double
+                  maximum: 123.4
+                  minimum: 67.8
+                  type: number
+                string:
+                  description: None
+                  pattern: /[a-z]/i
+                  type: string
+                pattern_without_delimiter:
+                  description: None
+                  pattern: ^[A-Z].*
+                  type: string
+                byte:
+                  description: None
+                  format: byte
+                  type: string
+                binary:
+                  description: None
+                  format: binary
+                  type: string
+                date:
+                  description: None
+                  format: date
+                  type: string
+                dateTime:
+                  description: None
+                  format: date-time
+                  type: string
+                password:
+                  description: None
+                  format: password
+                  maxLength: 64
+                  minLength: 10
+                  type: string
+                callback:
+                  description: None
+                  type: string
+              required:
+              - byte
+              - double
+              - number
+              - pattern_without_delimiter
+        required: true
+      responses:
+        400:
+          content: {}
+          description: Invalid username supplied
+        404:
+          content: {}
+          description: User not found
+      security:
+      - http_basic_test: []
+      summary: |
+        Fake endpoint for testing various parameters
+        假端點
+        偽のエンドポイント
+        가짜 엔드 포인트
+      tags:
+      - fake
+  /fake/outer/number:
+    post:
+      description: Test serialization of outer number types
+      operationId: fakeOuterNumberSerialize
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              $ref: '#/components/schemas/OuterNumber'
+        description: Input number as post body
+        required: false
+      responses:
+        200:
+          content:
+            '*/*':
+              schema:
+                $ref: '#/components/schemas/OuterNumber'
+          description: Output number
+      tags:
+      - fake
+  /fake/outer/string:
+    post:
+      description: Test serialization of outer string types
+      operationId: fakeOuterStringSerialize
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              $ref: '#/components/schemas/OuterString'
+        description: Input string as post body
+        required: false
+      responses:
+        200:
+          content:
+            '*/*':
+              schema:
+                $ref: '#/components/schemas/OuterString'
+          description: Output string
+      tags:
+      - fake
+  /fake/outer/boolean:
+    post:
+      description: Test serialization of outer boolean types
+      operationId: fakeOuterBooleanSerialize
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              $ref: '#/components/schemas/OuterBoolean'
+        description: Input boolean as post body
+        required: false
+      responses:
+        200:
+          content:
+            '*/*':
+              schema:
+                $ref: '#/components/schemas/OuterBoolean'
+          description: Output boolean
+      tags:
+      - fake
+  /fake/outer/composite:
+    post:
+      description: Test serialization of object with outer number type
+      operationId: fakeOuterCompositeSerialize
+      requestBody:
+        content:
+          '*/*':
+            schema:
+              $ref: '#/components/schemas/OuterComposite'
+        description: Input composite as post body
+        required: false
+      responses:
+        200:
+          content:
+            '*/*':
+              schema:
+                $ref: '#/components/schemas/OuterComposite'
+          description: Output composite
+      tags:
+      - fake
+  /fake/jsonFormData:
+    get:
+      operationId: testJsonFormData
+      requestBody:
+        content:
+          application/x-www-form-urlencoded:
+            schema:
+              properties:
+                param:
+                  description: field1
+                  type: string
+                param2:
+                  description: field2
+                  type: string
+              required:
+              - param
+              - param2
+        required: true
+      responses:
+        200:
+          content: {}
+          description: successful operation
+      summary: test json serialization of form data
+      tags:
+      - fake
+  /fake/inline-additionalProperties:
+    post:
+      operationId: testInlineAdditionalProperties
+      requestBody:
+        content:
+          application/json:
+            schema:
+              additionalProperties:
+                type: string
+              type: object
+        description: request body
+        required: true
+      responses:
+        200:
+          content: {}
+          description: successful operation
+      summary: test inline additionalProperties
+      tags:
+      - fake
+  /fake/body-with-query-params:
+    put:
+      operationId: testBodyWithQueryParams
+      parameters:
+      - in: query
+        name: query
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/User'
+        required: true
+      responses:
+        200:
+          content: {}
+          description: Success
+      tags:
+      - fake
+  /another-fake/dummy:
+    patch:
+      description: To test special tags and operation ID starting with number
+      operationId: 123_test_@#$%_special_tags
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/Client'
+        description: client model
+        required: true
+      responses:
+        200:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/Client'
+          description: successful operation
+      summary: To test special tags
+      tags:
+      - $another-fake?
+  /fake/body-with-file-schema:
+    put:
+      description: For this test, the body for this request much reference a schema named `File`.
+      operationId: testBodyWithFileSchema
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/FileSchemaTestClass'
+        required: true
+      responses:
+        200:
+          content: {}
+          description: Success
+      tags:
+      - fake
+  /fake/{petId}/uploadImageWithRequiredFile:
+    post:
+      operationId: uploadFileWithRequiredFile
+      parameters:
+      - description: ID of pet to update
+        in: path
+        name: petId
+        required: true
+        schema:
+          format: int64
+          type: integer
+      requestBody:
+        content:
+          multipart/form-data:
+            schema:
+              properties:
+                additionalMetadata:
+                  description: Additional data to pass to server
+                  type: string
+                requiredFile:
+                  description: file to upload
+                  format: binary
+                  type: string
+              required:
+              - requiredFile
+        required: true
+      responses:
+        200:
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ApiResponse'
+          description: successful operation
+      security:
+      - petstore_auth:
+        - write:pets
+        - read:pets
+      summary: uploads an image (required)
+      tags:
+      - pet
+components:
+  schemas:
+    Category:
+      example:
+        name: default-name
+        id: 6
+      properties:
+        id:
+          format: int64
+          type: integer
+        name:
+          default: default-name
+          type: string
+      required:
+      - name
+      type: object
+      xml:
+        name: Category
+    User:
+      example:
+        firstName: firstName
+        lastName: lastName
+        password: password
+        userStatus: 6
+        phone: phone
+        id: 0
+        email: email
+        username: username
+      properties:
+        id:
+          format: int64
+          type: integer
+          x-is-unique: true
+        username:
+          type: string
+        firstName:
+          type: string
+        lastName:
+          type: string
+        email:
+          type: string
+        password:
+          type: string
+        phone:
+          type: string
+        userStatus:
+          description: User Status
+          format: int32
+          type: integer
+      type: object
+      xml:
+        name: User
+    OuterNumber:
+      type: number
+    ArrayOfNumberOnly:
+      properties:
+        ArrayNumber:
+          items:
+            type: number
+          type: array
+      type: object
+    Capitalization:
+      properties:
+        smallCamel:
+          type: string
+        CapitalCamel:
+          type: string
+        small_Snake:
+          type: string
+        Capital_Snake:
+          type: string
+        SCA_ETH_Flow_Points:
+          type: string
+        ATT_NAME:
+          description: |
+            Name of the pet
+          type: string
+      type: object
+    MixedPropertiesAndAdditionalPropertiesClass:
+      properties:
+        uuid:
+          format: uuid
+          type: string
+        dateTime:
+          format: date-time
+          type: string
+        map:
+          additionalProperties:
+            $ref: '#/components/schemas/Animal'
+          type: object
+      type: object
+    ApiResponse:
+      example:
+        code: 0
+        type: type
+        message: message
+      properties:
+        code:
+          format: int32
+          type: integer
+        type:
+          type: string
+        message:
+          type: string
+      type: object
+    Name:
+      description: Model for testing model name same as property name
+      properties:
+        name:
+          format: int32
+          type: integer
+        snake_case:
+          format: int32
+          readOnly: true
+          type: integer
+        property:
+          type: string
+        123Number:
+          readOnly: true
+          type: integer
+      required:
+      - name
+      type: object
+      xml:
+        name: Name
+    EnumClass:
+      default: -efg
+      enum:
+      - _abc
+      - -efg
+      - (xyz)
+      type: string
+    List:
+      properties:
+        123-list:
+          type: string
+      type: object
+    NumberOnly:
+      properties:
+        JustNumber:
+          type: number
+      type: object
+    200_response:
+      description: Model for testing model name starting with number
+      properties:
+        name:
+          format: int32
+          type: integer
+        class:
+          type: string
+      type: object
+      xml:
+        name: Name
+    Client:
+      example:
+        client: client
+      properties:
+        client:
+          type: string
+      type: object
+    Dog:
+      allOf:
+      - $ref: '#/components/schemas/Animal'
+      - properties:
+          breed:
+            type: string
+        type: object
+    Enum_Test:
+      properties:
+        enum_string:
+          enum:
+          - UPPER
+          - lower
+          - ""
+          type: string
+        enum_string_required:
+          enum:
+          - UPPER
+          - lower
+          - ""
+          type: string
+        enum_integer:
+          enum:
+          - 1
+          - -1
+          format: int32
+          type: integer
+        enum_number:
+          enum:
+          - 1.1
+          - -1.2
+          format: double
+          type: number
+        outerEnum:
+          $ref: '#/components/schemas/OuterEnum'
+      required:
+      - enum_string_required
+      type: object
+    Order:
+      example:
+        petId: 6
+        quantity: 1
+        id: 0
+        shipDate: 2000-01-23T04:56:07.000+00:00
+        complete: false
+        status: placed
+      properties:
+        id:
+          format: int64
+          type: integer
+        petId:
+          format: int64
+          type: integer
+        quantity:
+          format: int32
+          type: integer
+        shipDate:
+          format: date-time
+          type: string
+        status:
+          description: Order Status
+          enum:
+          - placed
+          - approved
+          - delivered
+          type: string
+        complete:
+          default: false
+          type: boolean
+      type: object
+      xml:
+        name: Order
+    AdditionalPropertiesClass:
+      properties:
+        map_property:
+          additionalProperties:
+            type: string
+          type: object
+        map_of_map_property:
+          additionalProperties:
+            additionalProperties:
+              type: string
+            type: object
+          type: object
+      type: object
+    $special[model.name]:
+      properties:
+        $special[property.name]:
+          format: int64
+          type: integer
+      type: object
+      xml:
+        name: $special[model.name]
+    Return:
+      description: Model for testing reserved words
+      properties:
+        return:
+          format: int32
+          type: integer
+      type: object
+      xml:
+        name: Return
+    ReadOnlyFirst:
+      properties:
+        bar:
+          readOnly: true
+          type: string
+        baz:
+          type: string
+      type: object
+    ArrayOfArrayOfNumberOnly:
+      properties:
+        ArrayArrayNumber:
+          items:
+            items:
+              type: number
+            type: array
+          type: array
+      type: object
+    OuterEnum:
+      enum:
+      - placed
+      - approved
+      - delivered
+      type: string
+    ArrayTest:
+      properties:
+        array_of_string:
+          items:
+            type: string
+          type: array
+        array_array_of_integer:
+          items:
+            items:
+              format: int64
+              type: integer
+            type: array
+          type: array
+        array_array_of_model:
+          items:
+            items:
+              $ref: '#/components/schemas/ReadOnlyFirst'
+            type: array
+          type: array
+      type: object
+    OuterComposite:
+      example:
+        my_string: my_string
+        my_number: 0.80082819046101150206595775671303272247314453125
+        my_boolean: true
+      properties:
+        my_number:
+          type: number
+        my_string:
+          type: string
+        my_boolean:
+          type: boolean
+          x-codegen-body-parameter-name: boolean_post_body
+      type: object
+    format_test:
+      properties:
+        integer:
+          maximum: 1E+2
+          minimum: 1E+1
+          type: integer
+        int32:
+          format: int32
+          maximum: 2E+2
+          minimum: 2E+1
+          type: integer
+        int64:
+          format: int64
+          type: integer
+        number:
+          maximum: 543.2
+          minimum: 32.1
+          type: number
+        float:
+          format: float
+          maximum: 987.6
+          minimum: 54.3
+          type: number
+        double:
+          format: double
+          maximum: 123.4
+          minimum: 67.8
+          type: number
+        string:
+          pattern: /[a-z]/i
+          type: string
+        byte:
+          format: byte
+          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
+          type: string
+        binary:
+          format: binary
+          type: string
+        date:
+          format: date
+          type: string
+        dateTime:
+          format: date-time
+          type: string
+        uuid:
+          format: uuid
+          type: string
+        password:
+          format: password
+          maxLength: 64
+          minLength: 10
+          type: string
+      required:
+      - byte
+      - date
+      - number
+      - password
+      type: object
+    EnumArrays:
+      properties:
+        just_symbol:
+          enum:
+          - '>='
+          - $
+          type: string
+        array_enum:
+          items:
+            enum:
+            - fish
+            - crab
+            type: string
+          type: array
+      type: object
+    OuterString:
+      type: string
+    ClassModel:
+      description: Model for testing model with "_class" property
+      properties:
+        _class:
+          type: string
+      type: object
+    OuterBoolean:
+      type: boolean
+      x-codegen-body-parameter-name: boolean_post_body
+    FileSchemaTestClass:
+      example:
+        file:
+          sourceURI: sourceURI
+        files:
+        - sourceURI: sourceURI
+        - sourceURI: sourceURI
+      properties:
+        file:
+          $ref: '#/components/schemas/File'
+        files:
+          items:
+            $ref: '#/components/schemas/File'
+          type: array
+      type: object
+    Animal:
+      discriminator:
+        propertyName: className
+      properties:
+        className:
+          type: string
+        color:
+          default: red
+          type: string
+      required:
+      - className
+      type: object
+    StringBooleanMap:
+      additionalProperties:
+        type: boolean
+      type: object
+    Cat:
+      allOf:
+      - $ref: '#/components/schemas/Animal'
+      - properties:
+          declawed:
+            type: boolean
+        type: object
+    MapTest:
+      properties:
+        map_map_of_string:
+          additionalProperties:
+            additionalProperties:
+              type: string
+            type: object
+          type: object
+        map_of_enum_string:
+          additionalProperties:
+            enum:
+            - UPPER
+            - lower
+            type: string
+          type: object
+        direct_map:
+          additionalProperties:
+            type: boolean
+          type: object
+        indirect_map:
+          additionalProperties:
+            type: boolean
+          type: object
+      type: object
+    Tag:
+      example:
+        name: name
+        id: 1
+      properties:
+        id:
+          format: int64
+          type: integer
+        name:
+          type: string
+      type: object
+      xml:
+        name: Tag
+    AnimalFarm:
+      items:
+        $ref: '#/components/schemas/Animal'
+      type: array
+    File:
+      description: Must be named `File` for test.
+      example:
+        sourceURI: sourceURI
+      properties:
+        sourceURI:
+          description: Test capitalization
+          type: string
+      type: object
+    Pet:
+      example:
+        photoUrls:
+        - photoUrls
+        - photoUrls
+        name: doggie
+        id: 0
+        category:
+          name: default-name
+          id: 6
+        tags:
+        - name: name
+          id: 1
+        - name: name
+          id: 1
+        status: available
+      properties:
+        id:
+          format: int64
+          type: integer
+          x-is-unique: true
+        category:
+          $ref: '#/components/schemas/Category'
+        name:
+          example: doggie
+          type: string
+        photoUrls:
+          items:
+            type: string
+          type: array
+          xml:
+            name: photoUrl
+            wrapped: true
+        tags:
+          items:
+            $ref: '#/components/schemas/Tag'
+          type: array
+          xml:
+            name: tag
+            wrapped: true
+        status:
+          description: pet status in the store
+          enum:
+          - available
+          - pending
+          - sold
+          type: string
+      required:
+      - name
+      - photoUrls
+      type: object
+      xml:
+        name: Pet
+    hasOnlyReadOnly:
+      properties:
+        bar:
+          readOnly: true
+          type: string
+        foo:
+          readOnly: true
+          type: string
+      type: object
+  securitySchemes:
+    petstore_auth:
+      flows:
+        implicit:
+          authorizationUrl: http://petstore.swagger.io/api/oauth/dialog
+          scopes:
+            write:pets: modify pets in your account
+            read:pets: read your pets
+      type: oauth2
+    http_basic_test:
+      scheme: basic
+      type: http
+    api_key:
+      in: header
+      name: api_key
+      type: apiKey
+    api_key_query:
+      in: query
+      name: api_key_query
+      type: apiKey
diff --git a/tests/ApproxEq.hs b/tests/ApproxEq.hs
new file mode 100644
--- /dev/null
+++ b/tests/ApproxEq.hs
@@ -0,0 +1,81 @@
+{-# LANGUAGE DefaultSignatures #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TypeOperators #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+
+module ApproxEq where
+
+import Data.Text (Text)
+import Data.Time.Clock
+import Test.QuickCheck
+import GHC.Generics as G
+
+(==~)
+  :: (ApproxEq a, Show a)
+  => a -> a -> Property
+a ==~ b = counterexample (show a ++ " !=~ " ++ show b) (a =~ b)
+
+class GApproxEq f  where
+  gApproxEq :: f a -> f a -> Bool
+
+instance GApproxEq U1 where
+  gApproxEq U1 U1 = True
+
+instance (GApproxEq a, GApproxEq b) =>
+         GApproxEq (a :+: b) where
+  gApproxEq (L1 a) (L1 b) = gApproxEq a b
+  gApproxEq (R1 a) (R1 b) = gApproxEq a b
+  gApproxEq _ _ = False
+
+instance (GApproxEq a, GApproxEq b) =>
+         GApproxEq (a :*: b) where
+  gApproxEq (a1 :*: b1) (a2 :*: b2) = gApproxEq a1 a2 && gApproxEq b1 b2
+
+instance (ApproxEq a) =>
+         GApproxEq (K1 i a) where
+  gApproxEq (K1 a) (K1 b) = a =~ b
+
+instance (GApproxEq f) =>
+         GApproxEq (M1 i t f) where
+  gApproxEq (M1 a) (M1 b) = gApproxEq a b
+
+class ApproxEq a  where
+  (=~) :: a -> a -> Bool
+  default (=~) :: (Generic a, GApproxEq (Rep a)) => a -> a -> Bool
+  a =~ b = gApproxEq (G.from a) (G.from b)
+
+instance ApproxEq Text where
+  (=~) = (==)
+
+instance ApproxEq Char where
+  (=~) = (==)
+
+instance ApproxEq Bool where
+  (=~) = (==)
+
+instance ApproxEq Int where
+  (=~) = (==)
+
+instance ApproxEq Double where
+  (=~) = (==)
+
+instance ApproxEq a =>
+         ApproxEq (Maybe a)
+
+instance ApproxEq UTCTime where
+  (=~) = (==)
+
+instance ApproxEq a =>
+         ApproxEq [a] where
+  as =~ bs = and (zipWith (=~) as bs)
+
+instance (ApproxEq l, ApproxEq r) =>
+         ApproxEq (Either l r) where
+  Left a =~ Left b = a =~ b
+  Right a =~ Right b = a =~ b
+  _ =~ _ = False
+
+instance (ApproxEq l, ApproxEq r) =>
+         ApproxEq (l, r) where
+  (=~) (l1, r1) (l2, r2) = l1 =~ l2 && r1 =~ r2
diff --git a/tests/Instances.hs b/tests/Instances.hs
new file mode 100644
--- /dev/null
+++ b/tests/Instances.hs
@@ -0,0 +1,367 @@
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+module Instances where
+
+import OpenAPIPetstore.Model
+import OpenAPIPetstore.Core
+
+import qualified Data.Aeson as A
+import qualified Data.ByteString.Lazy as BL
+import qualified Data.HashMap.Strict as HM
+import qualified Data.Set as Set
+import qualified Data.Text as T
+import qualified Data.Time as TI
+import qualified Data.Vector as V
+
+import Control.Monad
+import Data.Char (isSpace)
+import Data.List (sort)
+import Test.QuickCheck
+
+import ApproxEq
+
+instance Arbitrary T.Text where
+  arbitrary = T.pack <$> arbitrary
+
+instance Arbitrary TI.Day where
+  arbitrary = TI.ModifiedJulianDay . (2000 +) <$> arbitrary
+  shrink = (TI.ModifiedJulianDay <$>) . shrink . TI.toModifiedJulianDay
+
+instance Arbitrary TI.UTCTime where
+  arbitrary =
+    TI.UTCTime <$> arbitrary <*> (TI.secondsToDiffTime <$> choose (0, 86401))
+
+instance Arbitrary BL.ByteString where
+    arbitrary = BL.pack <$> arbitrary
+    shrink xs = BL.pack <$> shrink (BL.unpack xs)
+
+instance Arbitrary ByteArray where
+    arbitrary = ByteArray <$> arbitrary
+    shrink (ByteArray xs) = ByteArray <$> shrink xs
+
+instance Arbitrary Binary where
+    arbitrary = Binary <$> arbitrary
+    shrink (Binary xs) = Binary <$> shrink xs
+
+instance Arbitrary DateTime where
+    arbitrary = DateTime <$> arbitrary
+    shrink (DateTime xs) = DateTime <$> shrink xs
+
+instance Arbitrary Date where
+    arbitrary = Date <$> arbitrary
+    shrink (Date xs) = Date <$> shrink xs
+
+-- | A naive Arbitrary instance for A.Value:
+instance Arbitrary A.Value where
+  arbitrary = frequency [(3, simpleTypes), (1, arrayTypes), (1, objectTypes)]
+    where
+      simpleTypes :: Gen A.Value
+      simpleTypes =
+        frequency
+          [ (1, return A.Null)
+          , (2, liftM A.Bool (arbitrary :: Gen Bool))
+          , (2, liftM (A.Number . fromIntegral) (arbitrary :: Gen Int))
+          , (2, liftM (A.String . T.pack) (arbitrary :: Gen String))
+          ]
+      mapF (k, v) = (T.pack k, v)
+      simpleAndArrays = frequency [(1, sized sizedArray), (4, simpleTypes)]
+      arrayTypes = sized sizedArray
+      objectTypes = sized sizedObject
+      sizedArray n = liftM (A.Array . V.fromList) $ replicateM n simpleTypes
+      sizedObject n =
+        liftM (A.object . map mapF) $
+        replicateM n $ (,) <$> (arbitrary :: Gen String) <*> simpleAndArrays
+    
+-- | Checks if a given list has no duplicates in _O(n log n)_.
+hasNoDups
+  :: (Ord a)
+  => [a] -> Bool
+hasNoDups = go Set.empty
+  where
+    go _ [] = True
+    go s (x:xs)
+      | s' <- Set.insert x s
+      , Set.size s' > Set.size s = go s' xs
+      | otherwise = False
+
+instance ApproxEq TI.Day where
+  (=~) = (==)
+
+-- * Models
+ 
+instance Arbitrary AdditionalPropertiesClass where
+  arbitrary =
+    AdditionalPropertiesClass
+      <$> arbitrary -- additionalPropertiesClassMapProperty :: Maybe (Map.Map String Text)
+      <*> arbitrary -- additionalPropertiesClassMapOfMapProperty :: Maybe (Map.Map String (Map.Map String Text))
+    
+instance Arbitrary Animal where
+  arbitrary =
+    Animal
+      <$> arbitrary -- animalClassName :: Text
+      <*> arbitrary -- animalColor :: Maybe Text
+    
+instance Arbitrary AnimalFarm where
+  arbitrary =
+    
+    pure AnimalFarm
+     
+instance Arbitrary ApiResponse where
+  arbitrary =
+    ApiResponse
+      <$> arbitrary -- apiResponseCode :: Maybe Int
+      <*> arbitrary -- apiResponseType :: Maybe Text
+      <*> arbitrary -- apiResponseMessage :: Maybe Text
+    
+instance Arbitrary ArrayOfArrayOfNumberOnly where
+  arbitrary =
+    ArrayOfArrayOfNumberOnly
+      <$> arbitrary -- arrayOfArrayOfNumberOnlyArrayArrayNumber :: Maybe [[Double]]
+    
+instance Arbitrary ArrayOfNumberOnly where
+  arbitrary =
+    ArrayOfNumberOnly
+      <$> arbitrary -- arrayOfNumberOnlyArrayNumber :: Maybe [Double]
+    
+instance Arbitrary ArrayTest where
+  arbitrary =
+    ArrayTest
+      <$> arbitrary -- arrayTestArrayOfString :: Maybe [Text]
+      <*> arbitrary -- arrayTestArrayArrayOfInteger :: Maybe [[Integer]]
+      <*> arbitrary -- arrayTestArrayArrayOfModel :: Maybe [[ReadOnlyFirst]]
+    
+instance Arbitrary Capitalization where
+  arbitrary =
+    Capitalization
+      <$> arbitrary -- capitalizationSmallCamel :: Maybe Text
+      <*> arbitrary -- capitalizationCapitalCamel :: Maybe Text
+      <*> arbitrary -- capitalizationSmallSnake :: Maybe Text
+      <*> arbitrary -- capitalizationCapitalSnake :: Maybe Text
+      <*> arbitrary -- capitalizationScaEthFlowPoints :: Maybe Text
+      <*> arbitrary -- capitalizationAttName :: Maybe Text
+    
+instance Arbitrary Cat where
+  arbitrary =
+    Cat
+      <$> arbitrary -- catClassName :: Text
+      <*> arbitrary -- catColor :: Maybe Text
+      <*> arbitrary -- catDeclawed :: Maybe Bool
+    
+instance Arbitrary Category where
+  arbitrary =
+    Category
+      <$> arbitrary -- categoryId :: Maybe Integer
+      <*> arbitrary -- categoryName :: Text
+    
+instance Arbitrary ClassModel where
+  arbitrary =
+    ClassModel
+      <$> arbitrary -- classModelClass :: Maybe Text
+    
+instance Arbitrary Client where
+  arbitrary =
+    Client
+      <$> arbitrary -- clientClient :: Maybe Text
+    
+instance Arbitrary Dog where
+  arbitrary =
+    Dog
+      <$> arbitrary -- dogClassName :: Text
+      <*> arbitrary -- dogColor :: Maybe Text
+      <*> arbitrary -- dogBreed :: Maybe Text
+    
+instance Arbitrary EnumArrays where
+  arbitrary =
+    EnumArrays
+      <$> arbitrary -- enumArraysJustSymbol :: Maybe Text
+      <*> arbitrary -- enumArraysArrayEnum :: Maybe [Text]
+    
+instance Arbitrary EnumTest where
+  arbitrary =
+    EnumTest
+      <$> arbitrary -- enumTestEnumString :: Maybe Text
+      <*> arbitrary -- enumTestEnumStringRequired :: Text
+      <*> arbitrary -- enumTestEnumInteger :: Maybe Int
+      <*> arbitrary -- enumTestEnumNumber :: Maybe Double
+      <*> arbitrary -- enumTestOuterEnum :: Maybe OuterEnum
+    
+instance Arbitrary File where
+  arbitrary =
+    File
+      <$> arbitrary -- fileSourceUri :: Maybe Text
+    
+instance Arbitrary FileSchemaTestClass where
+  arbitrary =
+    FileSchemaTestClass
+      <$> arbitrary -- fileSchemaTestClassFile :: Maybe File
+      <*> arbitrary -- fileSchemaTestClassFiles :: Maybe [File]
+    
+instance Arbitrary FormatTest where
+  arbitrary =
+    FormatTest
+      <$> arbitrary -- formatTestInteger :: Maybe Int
+      <*> arbitrary -- formatTestInt32 :: Maybe Int
+      <*> arbitrary -- formatTestInt64 :: Maybe Integer
+      <*> arbitrary -- formatTestNumber :: Double
+      <*> arbitrary -- formatTestFloat :: Maybe Float
+      <*> arbitrary -- formatTestDouble :: Maybe Double
+      <*> arbitrary -- formatTestString :: Maybe Text
+      <*> arbitrary -- formatTestByte :: ByteArray
+      <*> arbitrary -- formatTestBinary :: Maybe FilePath
+      <*> arbitrary -- formatTestDate :: Date
+      <*> arbitrary -- formatTestDateTime :: Maybe DateTime
+      <*> arbitrary -- formatTestUuid :: Maybe Text
+      <*> arbitrary -- formatTestPassword :: Text
+    
+instance Arbitrary HasOnlyReadOnly where
+  arbitrary =
+    HasOnlyReadOnly
+      <$> arbitrary -- hasOnlyReadOnlyBar :: Maybe Text
+      <*> arbitrary -- hasOnlyReadOnlyFoo :: Maybe Text
+    
+instance Arbitrary MapTest where
+  arbitrary =
+    MapTest
+      <$> arbitrary -- mapTestMapMapOfString :: Maybe (Map.Map String (Map.Map String Text))
+      <*> arbitrary -- mapTestMapOfEnumString :: Maybe (Map.Map String Text)
+      <*> arbitrary -- mapTestDirectMap :: Maybe (Map.Map String Bool)
+      <*> arbitrary -- mapTestIndirectMap :: Maybe (Map.Map String Bool)
+    
+instance Arbitrary MixedPropertiesAndAdditionalPropertiesClass where
+  arbitrary =
+    MixedPropertiesAndAdditionalPropertiesClass
+      <$> arbitrary -- mixedPropertiesAndAdditionalPropertiesClassUuid :: Maybe Text
+      <*> arbitrary -- mixedPropertiesAndAdditionalPropertiesClassDateTime :: Maybe DateTime
+      <*> arbitrary -- mixedPropertiesAndAdditionalPropertiesClassMap :: Maybe (Map.Map String Animal)
+    
+instance Arbitrary Model200Response where
+  arbitrary =
+    Model200Response
+      <$> arbitrary -- model200ResponseName :: Maybe Int
+      <*> arbitrary -- model200ResponseClass :: Maybe Text
+    
+instance Arbitrary ModelList where
+  arbitrary =
+    ModelList
+      <$> arbitrary -- modelList123list :: Maybe Text
+    
+instance Arbitrary ModelReturn where
+  arbitrary =
+    ModelReturn
+      <$> arbitrary -- modelReturnReturn :: Maybe Int
+    
+instance Arbitrary Name where
+  arbitrary =
+    Name
+      <$> arbitrary -- nameName :: Int
+      <*> arbitrary -- nameSnakeCase :: Maybe Int
+      <*> arbitrary -- nameProperty :: Maybe Text
+      <*> arbitrary -- name123number :: Maybe Int
+    
+instance Arbitrary NumberOnly where
+  arbitrary =
+    NumberOnly
+      <$> arbitrary -- numberOnlyJustNumber :: Maybe Double
+    
+instance Arbitrary Order where
+  arbitrary =
+    Order
+      <$> arbitrary -- orderId :: Maybe Integer
+      <*> arbitrary -- orderPetId :: Maybe Integer
+      <*> arbitrary -- orderQuantity :: Maybe Int
+      <*> arbitrary -- orderShipDate :: Maybe DateTime
+      <*> arbitrary -- orderStatus :: Maybe Text
+      <*> arbitrary -- orderComplete :: Maybe Bool
+    
+instance Arbitrary OuterComposite where
+  arbitrary =
+    OuterComposite
+      <$> arbitrary -- outerCompositeMyNumber :: Maybe Double
+      <*> arbitrary -- outerCompositeMyString :: Maybe Text
+      <*> arbitrary -- outerCompositeMyBoolean :: Maybe Bool
+    
+instance Arbitrary Pet where
+  arbitrary =
+    Pet
+      <$> arbitrary -- petId :: Maybe Integer
+      <*> arbitrary -- petCategory :: Maybe Category
+      <*> arbitrary -- petName :: Text
+      <*> arbitrary -- petPhotoUrls :: [Text]
+      <*> arbitrary -- petTags :: Maybe [Tag]
+      <*> arbitrary -- petStatus :: Maybe Text
+    
+instance Arbitrary ReadOnlyFirst where
+  arbitrary =
+    ReadOnlyFirst
+      <$> arbitrary -- readOnlyFirstBar :: Maybe Text
+      <*> arbitrary -- readOnlyFirstBaz :: Maybe Text
+    
+instance Arbitrary SpecialModelName where
+  arbitrary =
+    SpecialModelName
+      <$> arbitrary -- specialModelNameSpecialPropertyName :: Maybe Integer
+    
+instance Arbitrary StringBooleanMap where
+  arbitrary =
+    
+    pure StringBooleanMap
+     
+instance Arbitrary Tag where
+  arbitrary =
+    Tag
+      <$> arbitrary -- tagId :: Maybe Integer
+      <*> arbitrary -- tagName :: Maybe Text
+    
+instance Arbitrary User where
+  arbitrary =
+    User
+      <$> arbitrary -- userId :: Maybe Integer
+      <*> arbitrary -- userUsername :: Maybe Text
+      <*> arbitrary -- userFirstName :: Maybe Text
+      <*> arbitrary -- userLastName :: Maybe Text
+      <*> arbitrary -- userEmail :: Maybe Text
+      <*> arbitrary -- userPassword :: Maybe Text
+      <*> arbitrary -- userPhone :: Maybe Text
+      <*> arbitrary -- userUserStatus :: Maybe Int
+    
+
+
+
+instance Arbitrary E'ArrayEnum where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'EnumFormString where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'EnumFormStringArray where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'EnumInteger where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'EnumNumber where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'EnumQueryInteger where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'EnumString where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'Inner where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'JustSymbol where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'Status where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary E'Status2 where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary EnumClass where
+  arbitrary = arbitraryBoundedEnum
+
+instance Arbitrary OuterEnum where
+  arbitrary = arbitraryBoundedEnum
diff --git a/tests/PropMime.hs b/tests/PropMime.hs
new file mode 100644
--- /dev/null
+++ b/tests/PropMime.hs
@@ -0,0 +1,51 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE ConstraintKinds #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+
+module PropMime where
+
+import Data.Aeson
+import Data.Aeson.Types (parseEither)
+import Data.Monoid ((<>))
+import Data.Typeable (Proxy(..), typeOf, Typeable)
+import qualified Data.ByteString.Lazy.Char8 as BL8
+import Test.Hspec
+import Test.QuickCheck
+import Test.QuickCheck.Property
+import Test.Hspec.QuickCheck (prop)
+
+import OpenAPIPetstore.MimeTypes
+
+import ApproxEq
+
+-- * Type Aliases
+
+type ArbitraryMime mime a = ArbitraryRoundtrip (MimeUnrender mime) (MimeRender mime) a
+
+type ArbitraryRoundtrip from to a = (from a, to a, Arbitrary' a)
+
+type Arbitrary' a = (Arbitrary a, Show a, Typeable a)
+
+-- * Mime
+
+propMime
+  :: forall a b mime.
+     (ArbitraryMime mime a, Testable b)
+  => String -> (a -> a -> b) -> mime -> Proxy a -> Spec
+propMime eqDescr eq m _ =
+  prop
+    (show (typeOf (undefined :: a)) <> " " <> show (typeOf (undefined :: mime)) <> " roundtrip " <> eqDescr) $
+  \(x :: a) ->
+     let rendered = mimeRender' m x
+         actual = mimeUnrender' m rendered
+         expected = Right x
+         failMsg =
+           "ACTUAL: " <> show actual <> "\nRENDERED: " <> BL8.unpack rendered
+     in counterexample failMsg $
+        either reject property (eq <$> actual <*> expected)
+  where
+    reject = property . const rejected
+
+propMimeEq :: (ArbitraryMime mime a, Eq a) => mime -> Proxy a -> Spec
+propMimeEq = propMime "(EQ)" (==)
diff --git a/tests/Test.hs b/tests/Test.hs
new file mode 100644
--- /dev/null
+++ b/tests/Test.hs
@@ -0,0 +1,59 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE PartialTypeSignatures #-}
+
+module Main where
+
+import Data.Typeable (Proxy(..))
+import Test.Hspec
+import Test.Hspec.QuickCheck
+
+import PropMime
+import Instances ()
+
+import OpenAPIPetstore.Model
+import OpenAPIPetstore.MimeTypes
+
+main :: IO ()
+main =
+  hspec $ modifyMaxSize (const 5) $ do
+    describe "JSON instances" $ do
+      pure ()
+      propMimeEq MimeJSON (Proxy :: Proxy AdditionalPropertiesClass)
+      propMimeEq MimeJSON (Proxy :: Proxy Animal)
+      propMimeEq MimeJSON (Proxy :: Proxy AnimalFarm)
+      propMimeEq MimeJSON (Proxy :: Proxy ApiResponse)
+      propMimeEq MimeJSON (Proxy :: Proxy ArrayOfArrayOfNumberOnly)
+      propMimeEq MimeJSON (Proxy :: Proxy ArrayOfNumberOnly)
+      propMimeEq MimeJSON (Proxy :: Proxy ArrayTest)
+      propMimeEq MimeJSON (Proxy :: Proxy Capitalization)
+      propMimeEq MimeJSON (Proxy :: Proxy Cat)
+      propMimeEq MimeJSON (Proxy :: Proxy Category)
+      propMimeEq MimeJSON (Proxy :: Proxy ClassModel)
+      propMimeEq MimeJSON (Proxy :: Proxy Client)
+      propMimeEq MimeJSON (Proxy :: Proxy Dog)
+      propMimeEq MimeJSON (Proxy :: Proxy EnumArrays)
+      propMimeEq MimeJSON (Proxy :: Proxy EnumClass)
+      propMimeEq MimeJSON (Proxy :: Proxy EnumTest)
+      propMimeEq MimeJSON (Proxy :: Proxy File)
+      propMimeEq MimeJSON (Proxy :: Proxy FileSchemaTestClass)
+      propMimeEq MimeJSON (Proxy :: Proxy FormatTest)
+      propMimeEq MimeJSON (Proxy :: Proxy HasOnlyReadOnly)
+      propMimeEq MimeJSON (Proxy :: Proxy MapTest)
+      propMimeEq MimeJSON (Proxy :: Proxy MixedPropertiesAndAdditionalPropertiesClass)
+      propMimeEq MimeJSON (Proxy :: Proxy Model200Response)
+      propMimeEq MimeJSON (Proxy :: Proxy ModelList)
+      propMimeEq MimeJSON (Proxy :: Proxy ModelReturn)
+      propMimeEq MimeJSON (Proxy :: Proxy Name)
+      propMimeEq MimeJSON (Proxy :: Proxy NumberOnly)
+      propMimeEq MimeJSON (Proxy :: Proxy Order)
+      propMimeEq MimeJSON (Proxy :: Proxy OuterComposite)
+      propMimeEq MimeJSON (Proxy :: Proxy OuterEnum)
+      propMimeEq MimeJSON (Proxy :: Proxy Pet)
+      propMimeEq MimeJSON (Proxy :: Proxy ReadOnlyFirst)
+      propMimeEq MimeJSON (Proxy :: Proxy SpecialModelName)
+      propMimeEq MimeJSON (Proxy :: Proxy StringBooleanMap)
+      propMimeEq MimeJSON (Proxy :: Proxy Tag)
+      propMimeEq MimeJSON (Proxy :: Proxy User)
+      
