diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -46,10 +46,6 @@
 
 ### Unsupported Swagger Features
 
-* Auth Methods (https://swagger.io/docs/specification/2-0/authentication/)
-    
-    - use `setHeader` to add any required headers to requests
-
 * Model Inheritance
 
 * Default Parameter Values
@@ -92,6 +88,7 @@
 java -jar swagger-codegen-cli.jar config-help -l haskell-http-client
 ```
 
+## Usage Notes
 
 ### Example SwaggerPetstore Haddock documentation 
 
@@ -103,12 +100,12 @@
 
 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/swagger-api/swagger-codegen/tree/c7d145a4ba3c0627e04ece9eb97e354ac91be821/samples/client/petstore/haskell-http-client/example-app
-
-### Usage Notes
+[3]: https://github.com/swagger-api/swagger-codegen/tree/master/samples/client/petstore/haskell-http-client/example-app
 
 This library is intended to be imported qualified.
 
+### Modules
+
 | MODULE              | NOTES                                               |
 | ------------------- | --------------------------------------------------- |
 | SwaggerPetstore.Client    | use the "dispatch" functions to send requests       |
@@ -118,6 +115,9 @@
 | SwaggerPetstore.Lens      | lenses for model fields                             |
 | SwaggerPetstore.Logging   | logging functions and utils                         |
 
+
+### MimeTypes
+
 This library adds type safety around what swagger 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).
@@ -151,16 +151,6 @@
 * the _addFoo_ operation can set it's body param of _FooModel_ via `setBodyParam`
 * the _addFoo_ operation can set 2 different optional parameters via `applyOptionalParam`
 
-putting this together:
-
-```haskell
-let addFooRequest = addFoo MimeJSON foomodel requiredparam1 requiredparam2
-  `applyOptionalParam` FooId 1
-  `applyOptionalParam` FooName "name"
-  `setHeader` [("api_key","xxyy")]
-addFooResult <- dispatchMime mgr config addFooRequest MimeXML
-```
-
 If the swagger 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
@@ -173,5 +163,30 @@
 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 swagger 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 MimeJSON foomodel requiredparam1 requiredparam2
+  `applyOptionalParam` FooId 1
+  `applyOptionalParam` FooName "name"
+  `setHeader` [("qux_header","xxyy")]
+addFooResult <- dispatchMime mgr config addFooRequest MimeXML
+```
 
 See the example app and the haddocks for details.
diff --git a/lib/SwaggerPetstore.hs b/lib/SwaggerPetstore.hs
--- a/lib/SwaggerPetstore.hs
+++ b/lib/SwaggerPetstore.hs
@@ -1,3 +1,14 @@
+{-
+   Swagger 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 spec version: 2.0
+   Swagger Petstore API version: 1.0.0
+   Contact: apiteam@swagger.io
+   Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+-}
+
 {-|
 Module : SwaggerPetstore
 -}
diff --git a/lib/SwaggerPetstore/API.hs b/lib/SwaggerPetstore/API.hs
--- a/lib/SwaggerPetstore/API.hs
+++ b/lib/SwaggerPetstore/API.hs
@@ -1,17 +1,29 @@
+{-
+   Swagger 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 spec version: 2.0
+   Swagger Petstore API version: 1.0.0
+   Contact: apiteam@swagger.io
+   Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+-}
+
 {-|
 Module : SwaggerPetstore.API
 -}
 
-{-# LANGUAGE RecordWildCards #-}
-
-{-# LANGUAGE MultiParamTypeClasses #-}
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE InstanceSigs #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE NamedFieldPuns #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE ExistentialQuantification #-}
 {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
 
 module SwaggerPetstore.API where
@@ -30,6 +42,7 @@
 import qualified Data.ByteString.Builder as BB
 import qualified Data.ByteString.Char8 as BC
 import qualified Data.ByteString.Lazy.Char8 as BCL
+import qualified Data.ByteString.Base64 as B64
 
 import qualified Network.HTTP.Client.MultipartFormData as NH
 import qualified Network.HTTP.Media as ME
@@ -39,7 +52,7 @@
 import qualified Web.FormUrlEncoded as WH
 
 import qualified Data.CaseInsensitive as CI
-import qualified Data.Data as P (Typeable)
+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.Set as Set
@@ -207,76 +220,77 @@
 -- 
 -- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
 -- 
--- AuthMethod: http_basic_test
+-- AuthMethod: 'AuthBasicHttpBasicTest'
 -- 
 -- Note: Has 'Produces' instances, but no response schema
 -- 
 testEndpointParameters 
   :: (Consumes TestEndpointParameters contentType)
   => contentType -- ^ request content-type ('MimeType')
-  -> Double -- ^ "number" -  None
-  -> Double -- ^ "double" -  None
-  -> Text -- ^ "patternWithoutDelimiter" -  None
-  -> ByteArray -- ^ "byte" -  None
+  -> Number -- ^ "number" -  None
+  -> ParamDouble -- ^ "double" -  None
+  -> PatternWithoutDelimiter -- ^ "patternWithoutDelimiter" -  None
+  -> Byte -- ^ "byte" -  None
   -> SwaggerPetstoreRequest TestEndpointParameters contentType res
-testEndpointParameters _ number double patternWithoutDelimiter byte =
+testEndpointParameters _ (Number number) (ParamDouble double) (PatternWithoutDelimiter patternWithoutDelimiter) (Byte byte) =
   _mkRequest "POST" ["/fake"]
-    `_addForm` toForm ("number", number)
-    `_addForm` toForm ("double", double)
-    `_addForm` toForm ("pattern_without_delimiter", patternWithoutDelimiter)
-    `_addForm` toForm ("byte", byte)
+    `_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)
+    req `addForm` toForm ("integer", xs)
 
 -- | /Optional Param/ "int32" - None
 instance HasOptionalParam TestEndpointParameters Int32 where
   applyOptionalParam req (Int32 xs) =
-    req `_addForm` toForm ("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)
+    req `addForm` toForm ("int64", xs)
 
 -- | /Optional Param/ "float" - None
 instance HasOptionalParam TestEndpointParameters ParamFloat where
   applyOptionalParam req (ParamFloat xs) =
-    req `_addForm` toForm ("float", xs)
+    req `addForm` toForm ("float", xs)
 
 -- | /Optional Param/ "string" - None
 instance HasOptionalParam TestEndpointParameters ParamString where
   applyOptionalParam req (ParamString xs) =
-    req `_addForm` toForm ("string", xs)
+    req `addForm` toForm ("string", xs)
 
 -- | /Optional Param/ "binary" - None
 instance HasOptionalParam TestEndpointParameters ParamBinary where
   applyOptionalParam req (ParamBinary xs) =
-    req `_addForm` toForm ("binary", xs)
+    req `addForm` toForm ("binary", xs)
 
 -- | /Optional Param/ "date" - None
 instance HasOptionalParam TestEndpointParameters ParamDate where
   applyOptionalParam req (ParamDate xs) =
-    req `_addForm` toForm ("date", xs)
+    req `addForm` toForm ("date", xs)
 
 -- | /Optional Param/ "dateTime" - None
 instance HasOptionalParam TestEndpointParameters ParamDateTime where
   applyOptionalParam req (ParamDateTime xs) =
-    req `_addForm` toForm ("dateTime", xs)
+    req `addForm` toForm ("dateTime", xs)
 
 -- | /Optional Param/ "password" - None
 instance HasOptionalParam TestEndpointParameters Password where
   applyOptionalParam req (Password xs) =
-    req `_addForm` toForm ("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)
+    req `addForm` toForm ("callback", xs)
 
 -- | @application/xml; charset=utf-8@
 instance Consumes TestEndpointParameters MimeXmlCharsetutf8
@@ -311,12 +325,12 @@
 -- | /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)
+    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)
+    req `addForm` toForm ("enum_form_string", xs)
 
 -- | /Optional Param/ "enum_header_string_array" - Header parameter enum test (string array)
 instance HasOptionalParam TestEnumParameters EnumHeaderStringArray where
@@ -331,22 +345,22 @@
 -- | /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)
+    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)
+    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)
+    req `setQuery` toQuery ("enum_query_integer", Just xs)
 
 -- | /Optional Param/ "enum_query_double" - Query parameter enum test (double)
 instance HasOptionalParam TestEnumParameters EnumQueryDouble where
   applyOptionalParam req (EnumQueryDouble xs) =
-    req `_addForm` toForm ("enum_query_double", xs)
+    req `addForm` toForm ("enum_query_double", xs)
 
 -- | @*/*@
 instance Consumes TestEnumParameters MimeAny
@@ -366,13 +380,13 @@
 testJsonFormData 
   :: (Consumes TestJsonFormData contentType)
   => contentType -- ^ request content-type ('MimeType')
-  -> Text -- ^ "param" -  field1
-  -> Text -- ^ "param2" -  field2
+  -> Param -- ^ "param" -  field1
+  -> Param2 -- ^ "param2" -  field2
   -> SwaggerPetstoreRequest TestJsonFormData contentType NoContent
-testJsonFormData _ param param2 =
+testJsonFormData _ (Param param) (Param2 param2) =
   _mkRequest "GET" ["/fake/jsonFormData"]
-    `_addForm` toForm ("param", param)
-    `_addForm` toForm ("param2", param2)
+    `addForm` toForm ("param", param)
+    `addForm` toForm ("param2", param2)
 
 data TestJsonFormData  
 
@@ -388,7 +402,7 @@
 -- 
 -- To test class name in snake case
 -- 
--- AuthMethod: api_key_query
+-- AuthMethod: 'AuthApiKeyApiKeyQuery'
 -- 
 testClassname 
   :: (Consumes TestClassname contentType, MimeRender contentType Client)
@@ -397,6 +411,7 @@
   -> SwaggerPetstoreRequest TestClassname contentType Client
 testClassname _ body =
   _mkRequest "PATCH" ["/fake_classname_test"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKeyQuery)
     `setBodyParam` body
 
 data TestClassname 
@@ -421,7 +436,7 @@
 -- 
 -- 
 -- 
--- AuthMethod: petstore_auth
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
 -- 
 -- Note: Has 'Produces' instances, but no response schema
 -- 
@@ -432,6 +447,7 @@
   -> SwaggerPetstoreRequest AddPet contentType res
 addPet _ body =
   _mkRequest "POST" ["/pet"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
     `setBodyParam` body
 
 data AddPet 
@@ -458,16 +474,16 @@
 -- 
 -- 
 -- 
--- AuthMethod: petstore_auth
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
 -- 
 -- Note: Has 'Produces' instances, but no response schema
 -- 
 deletePet 
-  :: Integer -- ^ "petId" -  Pet id to delete
+  :: PetId -- ^ "petId" -  Pet id to delete
   -> SwaggerPetstoreRequest DeletePet MimeNoContent res
-deletePet petId =
+deletePet (PetId petId) =
   _mkRequest "DELETE" ["/pet/",toPath petId]
-    
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
 
 data DeletePet  
 instance HasOptionalParam DeletePet ApiKey where
@@ -487,14 +503,15 @@
 -- 
 -- Multiple status values can be provided with comma separated strings
 -- 
--- AuthMethod: petstore_auth
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
 -- 
 findPetsByStatus 
-  :: [Text] -- ^ "status" -  Status values that need to be considered for filter
+  :: Status -- ^ "status" -  Status values that need to be considered for filter
   -> SwaggerPetstoreRequest FindPetsByStatus MimeNoContent [Pet]
-findPetsByStatus status =
+findPetsByStatus (Status status) =
   _mkRequest "GET" ["/pet/findByStatus"]
-    `_setQuery` toQueryColl CommaSeparated ("status", Just status)
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
+    `setQuery` toQueryColl CommaSeparated ("status", Just status)
 
 data FindPetsByStatus  
 -- | @application/xml@
@@ -511,14 +528,15 @@
 -- 
 -- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
 -- 
--- AuthMethod: petstore_auth
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
 -- 
 findPetsByTags 
-  :: [Text] -- ^ "tags" -  Tags to filter by
+  :: Tags -- ^ "tags" -  Tags to filter by
   -> SwaggerPetstoreRequest FindPetsByTags MimeNoContent [Pet]
-findPetsByTags tags =
+findPetsByTags (Tags tags) =
   _mkRequest "GET" ["/pet/findByTags"]
-    `_setQuery` toQueryColl CommaSeparated ("tags", Just tags)
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
+    `setQuery` toQueryColl CommaSeparated ("tags", Just tags)
 
 {-# DEPRECATED findPetsByTags "" #-}
 
@@ -537,14 +555,14 @@
 -- 
 -- Returns a single pet
 -- 
--- AuthMethod: api_key
+-- AuthMethod: 'AuthApiKeyApiKey'
 -- 
 getPetById 
-  :: Integer -- ^ "petId" -  ID of pet to return
+  :: PetId -- ^ "petId" -  ID of pet to return
   -> SwaggerPetstoreRequest GetPetById MimeNoContent Pet
-getPetById petId =
+getPetById (PetId petId) =
   _mkRequest "GET" ["/pet/",toPath petId]
-    
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
 
 data GetPetById  
 -- | @application/xml@
@@ -561,7 +579,7 @@
 -- 
 -- 
 -- 
--- AuthMethod: petstore_auth
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
 -- 
 -- Note: Has 'Produces' instances, but no response schema
 -- 
@@ -572,6 +590,7 @@
   -> SwaggerPetstoreRequest UpdatePet contentType res
 updatePet _ body =
   _mkRequest "PUT" ["/pet"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
     `setBodyParam` body
 
 data UpdatePet 
@@ -598,30 +617,30 @@
 -- 
 -- 
 -- 
--- AuthMethod: petstore_auth
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
 -- 
 -- Note: Has 'Produces' instances, but no response schema
 -- 
 updatePetWithForm 
   :: (Consumes UpdatePetWithForm contentType)
   => contentType -- ^ request content-type ('MimeType')
-  -> Integer -- ^ "petId" -  ID of pet that needs to be updated
+  -> PetId -- ^ "petId" -  ID of pet that needs to be updated
   -> SwaggerPetstoreRequest UpdatePetWithForm contentType res
-updatePetWithForm _ petId =
+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)
+    req `addForm` toForm ("name", xs)
 
 -- | /Optional Param/ "status" - Updated status of the pet
-instance HasOptionalParam UpdatePetWithForm Status where
-  applyOptionalParam req (Status xs) =
-    req `_addForm` toForm ("status", xs)
+instance HasOptionalParam UpdatePetWithForm StatusText where
+  applyOptionalParam req (StatusText xs) =
+    req `addForm` toForm ("status", xs)
 
 -- | @application/x-www-form-urlencoded@
 instance Consumes UpdatePetWithForm MimeFormUrlEncoded
@@ -640,16 +659,16 @@
 -- 
 -- 
 -- 
--- AuthMethod: petstore_auth
+-- AuthMethod: 'AuthOAuthPetstoreAuth'
 -- 
 uploadFile 
   :: (Consumes UploadFile contentType)
   => contentType -- ^ request content-type ('MimeType')
-  -> Integer -- ^ "petId" -  ID of pet to update
+  -> PetId -- ^ "petId" -  ID of pet to update
   -> SwaggerPetstoreRequest UploadFile contentType ApiResponse
-uploadFile _ petId =
+uploadFile _ (PetId petId) =
   _mkRequest "POST" ["/pet/",toPath petId,"/uploadImage"]
-    
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
 
 data UploadFile  
 
@@ -683,11 +702,10 @@
 -- Note: Has 'Produces' instances, but no response schema
 -- 
 deleteOrder 
-  :: Text -- ^ "orderId" -  ID of the order that needs to be deleted
+  :: OrderIdText -- ^ "orderId" -  ID of the order that needs to be deleted
   -> SwaggerPetstoreRequest DeleteOrder MimeNoContent res
-deleteOrder orderId =
+deleteOrder (OrderIdText orderId) =
   _mkRequest "DELETE" ["/store/order/",toPath orderId]
-    
 
 data DeleteOrder  
 -- | @application/xml@
@@ -704,12 +722,13 @@
 -- 
 -- Returns a map of status codes to quantities
 -- 
--- AuthMethod: api_key
+-- AuthMethod: 'AuthApiKeyApiKey'
 -- 
 getInventory 
   :: SwaggerPetstoreRequest GetInventory MimeNoContent ((Map.Map String Int))
 getInventory =
   _mkRequest "GET" ["/store/inventory"]
+    `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
 
 data GetInventory  
 -- | @application/json@
@@ -725,11 +744,10 @@
 -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
 -- 
 getOrderById 
-  :: Integer -- ^ "orderId" -  ID of pet that needs to be fetched
+  :: OrderId -- ^ "orderId" -  ID of pet that needs to be fetched
   -> SwaggerPetstoreRequest GetOrderById MimeNoContent Order
-getOrderById orderId =
+getOrderById (OrderId orderId) =
   _mkRequest "GET" ["/store/order/",toPath orderId]
-    
 
 data GetOrderById  
 -- | @application/xml@
@@ -807,9 +825,9 @@
 -- Note: Has 'Produces' instances, but no response schema
 -- 
 createUsersWithArrayInput 
-  :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType [User])
+  :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType Body)
   => contentType -- ^ request content-type ('MimeType')
-  -> [User] -- ^ "body" -  List of user object
+  -> Body -- ^ "body" -  List of user object
   -> SwaggerPetstoreRequest CreateUsersWithArrayInput contentType res
 createUsersWithArrayInput _ body =
   _mkRequest "POST" ["/user/createWithArray"]
@@ -818,7 +836,7 @@
 data CreateUsersWithArrayInput 
 
 -- | /Body Param/ "body" - List of user object
-instance HasBodyParam CreateUsersWithArrayInput [User] 
+instance HasBodyParam CreateUsersWithArrayInput Body 
 -- | @application/xml@
 instance Produces CreateUsersWithArrayInput MimeXML
 -- | @application/json@
@@ -836,9 +854,9 @@
 -- Note: Has 'Produces' instances, but no response schema
 -- 
 createUsersWithListInput 
-  :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType [User])
+  :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType Body)
   => contentType -- ^ request content-type ('MimeType')
-  -> [User] -- ^ "body" -  List of user object
+  -> Body -- ^ "body" -  List of user object
   -> SwaggerPetstoreRequest CreateUsersWithListInput contentType res
 createUsersWithListInput _ body =
   _mkRequest "POST" ["/user/createWithList"]
@@ -847,7 +865,7 @@
 data CreateUsersWithListInput 
 
 -- | /Body Param/ "body" - List of user object
-instance HasBodyParam CreateUsersWithListInput [User] 
+instance HasBodyParam CreateUsersWithListInput Body 
 -- | @application/xml@
 instance Produces CreateUsersWithListInput MimeXML
 -- | @application/json@
@@ -865,11 +883,10 @@
 -- Note: Has 'Produces' instances, but no response schema
 -- 
 deleteUser 
-  :: Text -- ^ "username" -  The name that needs to be deleted
+  :: Username -- ^ "username" -  The name that needs to be deleted
   -> SwaggerPetstoreRequest DeleteUser MimeNoContent res
-deleteUser username =
+deleteUser (Username username) =
   _mkRequest "DELETE" ["/user/",toPath username]
-    
 
 data DeleteUser  
 -- | @application/xml@
@@ -887,11 +904,10 @@
 -- 
 -- 
 getUserByName 
-  :: Text -- ^ "username" -  The name that needs to be fetched. Use user1 for testing. 
+  :: Username -- ^ "username" -  The name that needs to be fetched. Use user1 for testing. 
   -> SwaggerPetstoreRequest GetUserByName MimeNoContent User
-getUserByName username =
+getUserByName (Username username) =
   _mkRequest "GET" ["/user/",toPath username]
-    
 
 data GetUserByName  
 -- | @application/xml@
@@ -909,13 +925,13 @@
 -- 
 -- 
 loginUser 
-  :: Text -- ^ "username" -  The user name for login
-  -> Text -- ^ "password" -  The password for login in clear text
+  :: Username -- ^ "username" -  The user name for login
+  -> Password -- ^ "password" -  The password for login in clear text
   -> SwaggerPetstoreRequest LoginUser MimeNoContent Text
-loginUser username password =
+loginUser (Username username) (Password password) =
   _mkRequest "GET" ["/user/login"]
-    `_setQuery` toQuery ("username", Just username)
-    `_setQuery` toQuery ("password", Just password)
+    `setQuery` toQuery ("username", Just username)
+    `setQuery` toQuery ("password", Just password)
 
 data LoginUser  
 -- | @application/xml@
@@ -959,12 +975,11 @@
 updateUser 
   :: (Consumes UpdateUser contentType, MimeRender contentType User)
   => contentType -- ^ request content-type ('MimeType')
-  -> Text -- ^ "username" -  name that need to be deleted
+  -> Username -- ^ "username" -  name that need to be deleted
   -> User -- ^ "body" -  Updated user object
   -> SwaggerPetstoreRequest UpdateUser contentType res
-updateUser _ username body =
+updateUser _ (Username username) body =
   _mkRequest "PUT" ["/user/",toPath username]
-    
     `setBodyParam` body
 
 data UpdateUser 
@@ -1004,64 +1019,6 @@
 
 infixl 2 -&-
  
--- * Optional Request Parameter Types
-
-
-newtype BodyOuterBoolean = BodyOuterBoolean { unBodyOuterBoolean :: OuterBoolean } deriving (P.Eq, P.Show)
-
-newtype BodyOuterComposite = BodyOuterComposite { unBodyOuterComposite :: OuterComposite } deriving (P.Eq, P.Show)
-
-newtype Body = Body { unBody :: OuterNumber } deriving (P.Eq, P.Show)
-
-newtype BodyOuterString = BodyOuterString { unBodyOuterString :: OuterString } deriving (P.Eq, P.Show)
-
-newtype ParamInteger = ParamInteger { unParamInteger :: Int } deriving (P.Eq, P.Show)
-
-newtype Int32 = Int32 { unInt32 :: Int } deriving (P.Eq, P.Show)
-
-newtype Int64 = Int64 { unInt64 :: Integer } deriving (P.Eq, P.Show)
-
-newtype ParamFloat = ParamFloat { unParamFloat :: Float } deriving (P.Eq, P.Show)
-
-newtype ParamString = ParamString { unParamString :: Text } deriving (P.Eq, P.Show)
-
-newtype ParamBinary = ParamBinary { unParamBinary :: Binary } deriving (P.Eq, P.Show)
-
-newtype ParamDate = ParamDate { unParamDate :: Date } deriving (P.Eq, P.Show)
-
-newtype ParamDateTime = ParamDateTime { unParamDateTime :: DateTime } deriving (P.Eq, P.Show)
-
-newtype Password = Password { unPassword :: Text } deriving (P.Eq, P.Show)
-
-newtype Callback = Callback { unCallback :: Text } deriving (P.Eq, P.Show)
-
-newtype EnumFormStringArray = EnumFormStringArray { unEnumFormStringArray :: [Text] } deriving (P.Eq, P.Show)
-
-newtype EnumFormString = EnumFormString { unEnumFormString :: Text } deriving (P.Eq, P.Show)
-
-newtype EnumHeaderStringArray = EnumHeaderStringArray { unEnumHeaderStringArray :: [Text] } deriving (P.Eq, P.Show)
-
-newtype EnumHeaderString = EnumHeaderString { unEnumHeaderString :: Text } deriving (P.Eq, P.Show)
-
-newtype EnumQueryStringArray = EnumQueryStringArray { unEnumQueryStringArray :: [Text] } deriving (P.Eq, P.Show)
-
-newtype EnumQueryString = EnumQueryString { unEnumQueryString :: Text } deriving (P.Eq, P.Show)
-
-newtype EnumQueryInteger = EnumQueryInteger { unEnumQueryInteger :: Int } deriving (P.Eq, P.Show)
-
-newtype EnumQueryDouble = EnumQueryDouble { unEnumQueryDouble :: Double } deriving (P.Eq, P.Show)
-
-newtype ApiKey = ApiKey { unApiKey :: Text } deriving (P.Eq, P.Show)
-
-newtype Name2 = Name2 { unName2 :: Text } deriving (P.Eq, P.Show)
-
-newtype Status = Status { unStatus :: Text } deriving (P.Eq, P.Show)
-
-newtype AdditionalMetadata = AdditionalMetadata { unAdditionalMetadata :: Text } deriving (P.Eq, P.Show)
-
-newtype File = File { unFile :: FilePath } deriving (P.Eq, P.Show)
-
-
 -- * SwaggerPetstoreRequest
 
 -- | Represents a request. The "req" type variable is the request type. The "res" type variable is the response type.
@@ -1069,6 +1026,7 @@
   { rMethod  :: NH.Method   -- ^ Method of SwaggerPetstoreRequest
   , rUrlPath :: [BCL.ByteString] -- ^ Endpoint of SwaggerPetstoreRequest
   , rParams   :: Params -- ^ params of SwaggerPetstoreRequest
+  , rAuthTypes :: [P.TypeRep] -- ^ types of auth methods
   }
   deriving (P.Show)
 
@@ -1087,6 +1045,11 @@
 rParamsL f SwaggerPetstoreRequest{..} = (\rParams -> SwaggerPetstoreRequest { rParams, ..} ) <$> f rParams
 {-# INLINE rParamsL #-}
 
+-- | 'rParams' Lens
+rAuthTypesL :: Lens_' (SwaggerPetstoreRequest req contentType res) [P.TypeRep]
+rAuthTypesL f SwaggerPetstoreRequest{..} = (\rAuthTypes -> SwaggerPetstoreRequest { rAuthTypes, ..} ) <$> f rAuthTypes
+{-# INLINE rAuthTypesL #-}
+
 -- | Request Params
 data Params = Params
   { paramsQuery :: NH.Query
@@ -1124,7 +1087,7 @@
 _mkRequest :: NH.Method -- ^ Method 
           -> [BCL.ByteString] -- ^ Endpoint
           -> SwaggerPetstoreRequest req contentType res -- ^ req: Request Type, res: Response Type
-_mkRequest m u = SwaggerPetstoreRequest m u _mkParams
+_mkRequest m u = SwaggerPetstoreRequest m u _mkParams []
 
 _mkParams :: Params
 _mkParams = Params [] [] ParamBodyNone
@@ -1156,8 +1119,8 @@
         Just m -> req `setHeader` [("accept", BC.pack $ P.show m)]
         Nothing -> req `removeHeader` ["accept"]
 
-_setQuery :: SwaggerPetstoreRequest req contentType res -> [NH.QueryItem] -> SwaggerPetstoreRequest req contentType res
-_setQuery req query = 
+setQuery :: SwaggerPetstoreRequest req contentType res -> [NH.QueryItem] -> SwaggerPetstoreRequest req contentType res
+setQuery req query = 
   req &
   L.over
     (rParamsL . paramsQueryL)
@@ -1165,8 +1128,8 @@
   where
     cifst = CI.mk . P.fst
 
-_addForm :: SwaggerPetstoreRequest req contentType res -> WH.Form -> SwaggerPetstoreRequest req contentType res
-_addForm req newform = 
+addForm :: SwaggerPetstoreRequest req contentType res -> WH.Form -> SwaggerPetstoreRequest req contentType res
+addForm req newform = 
     let form = case paramsBody (rParams req) of
             ParamBodyFormUrlEncoded _form -> _form
             _ -> mempty
@@ -1187,6 +1150,9 @@
 _setBodyLBS req body = 
     req & L.set (rParamsL . paramsBodyL) (ParamBodyBL body)
 
+_hasAuthType :: AuthMethod authMethod => SwaggerPetstoreRequest req contentType res -> P.Proxy authMethod -> SwaggerPetstoreRequest req contentType res
+_hasAuthType req proxy =
+  req & L.over rAuthTypesL (P.typeRep proxy :)
 
 -- ** Params Utils
 
@@ -1251,3 +1217,60 @@
     {-# INLINE expandList #-}
     {-# INLINE combine #-}
   
+-- * AuthMethods
+
+-- | Provides a method to apply auth methods to requests
+class P.Typeable a => AuthMethod a where
+  applyAuthMethod :: SwaggerPetstoreRequest req contentType res -> a -> SwaggerPetstoreRequest req contentType res
+
+-- | An existential wrapper for any AuthMethod
+data AnyAuthMethod = forall a. AuthMethod a => AnyAuthMethod a deriving (P.Typeable)
+
+instance AuthMethod AnyAuthMethod where applyAuthMethod req (AnyAuthMethod a) = applyAuthMethod req a
+
+-- ** AuthApiKeyApiKey
+data AuthApiKeyApiKey =
+  AuthApiKeyApiKey Text -- ^ secret
+  deriving (P.Eq, P.Show, P.Typeable)
+
+instance AuthMethod AuthApiKeyApiKey where
+  applyAuthMethod req a@(AuthApiKeyApiKey secret) =
+    if (P.typeOf a `P.elem` rAuthTypes req)
+      then req `setHeader` toHeader ("api_key", secret)
+      else req
+
+-- ** AuthApiKeyApiKeyQuery
+data AuthApiKeyApiKeyQuery =
+  AuthApiKeyApiKeyQuery Text -- ^ secret
+  deriving (P.Eq, P.Show, P.Typeable)
+
+instance AuthMethod AuthApiKeyApiKeyQuery where
+  applyAuthMethod req a@(AuthApiKeyApiKeyQuery secret) =
+    if (P.typeOf a `P.elem` rAuthTypes req)
+      then req `setQuery` toQuery ("api_key_query", Just secret)
+      else req
+
+-- ** AuthBasicHttpBasicTest
+data AuthBasicHttpBasicTest =
+  AuthBasicHttpBasicTest B.ByteString B.ByteString -- ^ username password
+  deriving (P.Eq, P.Show, P.Typeable)
+
+instance AuthMethod AuthBasicHttpBasicTest where
+  applyAuthMethod req a@(AuthBasicHttpBasicTest user pw) =
+    if (P.typeOf a `P.elem` rAuthTypes req)
+      then req `setHeader` toHeader ("Authorization", T.decodeUtf8 cred)
+      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 req a@(AuthOAuthPetstoreAuth secret) =
+    if (P.typeOf a `P.elem` rAuthTypes req)
+      then req `setHeader` toHeader ("Authorization", "Bearer " <> secret) 
+      else req
+
+
diff --git a/lib/SwaggerPetstore/Client.hs b/lib/SwaggerPetstore/Client.hs
--- a/lib/SwaggerPetstore/Client.hs
+++ b/lib/SwaggerPetstore/Client.hs
@@ -1,3 +1,14 @@
+{-
+   Swagger 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 spec version: 2.0
+   Swagger Petstore API version: 1.0.0
+   Contact: apiteam@swagger.io
+   Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+-}
+
 {-|
 Module : SwaggerPetstore.Client
 -}
@@ -58,6 +69,7 @@
   , 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
   }
 
 -- | display the config
@@ -86,13 +98,21 @@
         , configUserAgent = "swagger-haskell-http-client/1.0.0"
         , configLogExecWithContext = runDefaultLogExecWithContext
         , configLogContext = logCxt
+        , configAuthMethods = []
         }  
 
+-- | updates config use AuthMethod on matching requests
+addAuthMethod :: AuthMethod auth => SwaggerPetstoreConfig -> auth -> SwaggerPetstoreConfig
+addAuthMethod config@SwaggerPetstoreConfig {configAuthMethods = as} a =
+  config { configAuthMethods = AnyAuthMethod a : as}
+
+-- | updates the config to use stdout logging
 withStdoutLogging :: SwaggerPetstoreConfig -> IO SwaggerPetstoreConfig
 withStdoutLogging p = do
     logCxt <- stdoutLoggingContext (configLogContext p)
     return $ p { configLogExecWithContext = stdoutLoggingExec, configLogContext = logCxt }
 
+-- | updates the config to use stderr logging
 withStderrLogging :: SwaggerPetstoreConfig -> IO SwaggerPetstoreConfig
 withStderrLogging p = do
     logCxt <- stderrLoggingContext (configLogContext p)
@@ -225,7 +245,9 @@
   -> IO (InitRequest req contentType res accept) -- ^ initialized request
 _toInitRequest config req0 accept = do
   parsedReq <- NH.parseRequest $ BCL.unpack $ BCL.append (configHost config) (BCL.concat (rUrlPath req0))
-  let req1 = _setAcceptHeader req0 accept & _setContentTypeHeader
+  let req1 = _applyAuthMethods req0 config
+                & _setContentTypeHeader
+                & flip _setAcceptHeader accept
       reqHeaders = ("User-Agent", WH.toHeader (configUserAgent config)) : paramsHeaders (rParams req1)
       reqQuery = NH.renderQuery True (paramsQuery (rParams req1))
       pReq = parsedReq { NH.method = (rMethod req1)
@@ -240,6 +262,16 @@
     ParamBodyMultipartFormData parts -> NH.formDataBody parts pReq
 
   pure (InitRequest outReq)
+
+-- | apply all matching AuthMethods in config to request
+_applyAuthMethods
+  :: SwaggerPetstoreRequest req contentType res
+  -> SwaggerPetstoreConfig
+  -> SwaggerPetstoreRequest req contentType res
+_applyAuthMethods req SwaggerPetstoreConfig {configAuthMethods = as} =
+  foldl go req as
+  where
+    go r (AnyAuthMethod a) = r `applyAuthMethod` a
 
 -- | modify the underlying Request
 modifyInitRequest :: InitRequest req contentType res accept -> (NH.Request -> NH.Request) -> InitRequest req contentType res accept 
diff --git a/lib/SwaggerPetstore/Lens.hs b/lib/SwaggerPetstore/Lens.hs
--- a/lib/SwaggerPetstore/Lens.hs
+++ b/lib/SwaggerPetstore/Lens.hs
@@ -1,3 +1,14 @@
+{-
+   Swagger 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 spec version: 2.0
+   Swagger Petstore API version: 1.0.0
+   Contact: apiteam@swagger.io
+   Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+-}
+
 {-|
 Module : SwaggerPetstore.Lens
 -}
diff --git a/lib/SwaggerPetstore/Logging.hs b/lib/SwaggerPetstore/Logging.hs
--- a/lib/SwaggerPetstore/Logging.hs
+++ b/lib/SwaggerPetstore/Logging.hs
@@ -1,3 +1,14 @@
+{-
+   Swagger 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 spec version: 2.0
+   Swagger Petstore API version: 1.0.0
+   Contact: apiteam@swagger.io
+   Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+-}
+
 {-|
 Module : SwaggerPetstore.Logging
 Katip Logging functions
diff --git a/lib/SwaggerPetstore/MimeTypes.hs b/lib/SwaggerPetstore/MimeTypes.hs
--- a/lib/SwaggerPetstore/MimeTypes.hs
+++ b/lib/SwaggerPetstore/MimeTypes.hs
@@ -1,4 +1,14 @@
+{-
+   Swagger 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 spec version: 2.0
+   Swagger Petstore API version: 1.0.0
+   Contact: apiteam@swagger.io
+   Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+-}
+
 {-|
 Module : SwaggerPetstore.MimeTypes
 -}
@@ -56,8 +66,8 @@
 data MimeNoContent = MimeNoContent deriving (P.Typeable)
 data MimeAny = MimeAny deriving (P.Typeable)
 
-data MimeXmlCharsetutf8 = MimeXmlCharsetutf8 deriving (P.Typeable)
 data MimeJsonCharsetutf8 = MimeJsonCharsetutf8 deriving (P.Typeable)
+data MimeXmlCharsetutf8 = MimeXmlCharsetutf8 deriving (P.Typeable)
 
 -- ** MimeType Class
 
@@ -107,17 +117,17 @@
 instance MimeType MimeNoContent where
   mimeType _ = Nothing
 
--- | @application/xml; charset=utf-8@
-instance MimeType MimeXmlCharsetutf8 where
-  mimeType _ = Just $ P.fromString "application/xml; charset=utf-8"
-
 -- | @application/json; charset=utf-8@
 instance MimeType MimeJsonCharsetutf8 where
   mimeType _ = Just $ P.fromString "application/json; charset=utf-8"
 instance A.ToJSON a => MimeRender MimeJsonCharsetutf8 a where mimeRender _ = A.encode
 instance A.FromJSON a => MimeUnrender MimeJsonCharsetutf8 a where mimeUnrender _ = A.eitherDecode
 
+-- | @application/xml; charset=utf-8@
+instance MimeType MimeXmlCharsetutf8 where
+  mimeType _ = Just $ P.fromString "application/xml; charset=utf-8"
 
+
 -- ** MimeRender Class
 
 class MimeType mtype => MimeRender mtype x where
@@ -173,8 +183,8 @@
 -- instance MimeRender MimeOctetStream Int where mimeRender _ = BB.toLazyByteString . BB.intDec
 -- instance MimeRender MimeOctetStream Integer where mimeRender _ = BB.toLazyByteString . BB.integerDec
 
--- instance MimeRender MimeXmlCharsetutf8 T.Text where mimeRender _ = undefined
 -- instance MimeRender MimeJsonCharsetutf8 T.Text where mimeRender _ = undefined
+-- instance MimeRender MimeXmlCharsetutf8 T.Text where mimeRender _ = undefined
 
 -- ** MimeUnrender Class
 
@@ -207,8 +217,8 @@
 -- | @P.Right . P.const NoContent@
 instance MimeUnrender MimeNoContent NoContent where mimeUnrender _ = P.Right . P.const NoContent
 
--- instance MimeUnrender MimeXmlCharsetutf8 T.Text where mimeUnrender _ = undefined
 -- instance MimeUnrender MimeJsonCharsetutf8 T.Text where mimeUnrender _ = undefined
+-- instance MimeUnrender MimeXmlCharsetutf8 T.Text where mimeUnrender _ = undefined
 
 -- ** Request Consumes
 
diff --git a/lib/SwaggerPetstore/Model.hs b/lib/SwaggerPetstore/Model.hs
--- a/lib/SwaggerPetstore/Model.hs
+++ b/lib/SwaggerPetstore/Model.hs
@@ -1,3 +1,14 @@
+{-
+   Swagger 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 spec version: 2.0
+   Swagger Petstore API version: 1.0.0
+   Contact: apiteam@swagger.io
+   Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+-}
+
 {-|
 Module : SwaggerPetstore.Model
 -}
@@ -51,18 +62,21 @@
 
 
 -- ** 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
@@ -82,18 +96,21 @@
   
 
 -- ** 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
@@ -114,16 +131,19 @@
   
 
 -- ** 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
@@ -141,13 +161,15 @@
   
 
 -- ** 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
@@ -155,6 +177,7 @@
       <*> (o .:? "type")
       <*> (o .:? "message")
 
+-- | ToJSON ApiResponse
 instance A.ToJSON ApiResponse where
   toJSON ApiResponse {..} =
    _omitNulls
@@ -176,16 +199,19 @@
   
 
 -- ** 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
@@ -203,16 +229,19 @@
   
 
 -- ** 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
@@ -230,13 +259,15 @@
   
 
 -- ** 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
@@ -244,6 +275,7 @@
       <*> (o .:? "array_array_of_integer")
       <*> (o .:? "array_array_of_model")
 
+-- | ToJSON ArrayTest
 instance A.ToJSON ArrayTest where
   toJSON ArrayTest {..} =
    _omitNulls
@@ -265,7 +297,7 @@
   
 
 -- ** Capitalization
--- |
+-- | Capitalization
 data Capitalization = Capitalization
   { capitalizationSmallCamel :: !(Maybe Text) -- ^ "smallCamel"
   , capitalizationCapitalCamel :: !(Maybe Text) -- ^ "CapitalCamel"
@@ -275,6 +307,8 @@
   , 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
@@ -285,6 +319,7 @@
       <*> (o .:? "SCA_ETH_Flow_Points")
       <*> (o .:? "ATT_NAME")
 
+-- | ToJSON Capitalization
 instance A.ToJSON Capitalization where
   toJSON Capitalization {..} =
    _omitNulls
@@ -312,18 +347,21 @@
   
 
 -- ** Category
--- |
+-- | Category
 data Category = Category
   { categoryId :: !(Maybe Integer) -- ^ "id"
   , categoryName :: !(Maybe Text) -- ^ "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
@@ -343,17 +381,20 @@
   
 
 -- ** 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
@@ -371,16 +412,19 @@
   
 
 -- ** 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
@@ -398,18 +442,21 @@
   
 
 -- ** EnumArrays
--- |
+-- | EnumArrays
 data EnumArrays = EnumArrays
   { enumArraysJustSymbol :: !(Maybe Text) -- ^ "just_symbol"
   , enumArraysArrayEnum :: !(Maybe [Text]) -- ^ "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
@@ -429,16 +476,19 @@
   
 
 -- ** EnumClass
--- |
+-- | EnumClass
 data EnumClass = EnumClass
   { 
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON EnumClass
 instance A.FromJSON EnumClass where
   parseJSON = A.withObject "EnumClass" $ \o ->
     pure EnumClass
       
 
+-- | ToJSON EnumClass
 instance A.ToJSON EnumClass where
   toJSON EnumClass  =
    _omitNulls
@@ -456,7 +506,7 @@
   
 
 -- ** EnumTest
--- |
+-- | EnumTest
 data EnumTest = EnumTest
   { enumTestEnumString :: !(Maybe Text) -- ^ "enum_string"
   , enumTestEnumInteger :: !(Maybe Int) -- ^ "enum_integer"
@@ -464,6 +514,8 @@
   , enumTestOuterEnum :: !(Maybe OuterEnum) -- ^ "outerEnum"
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON EnumTest
 instance A.FromJSON EnumTest where
   parseJSON = A.withObject "EnumTest" $ \o ->
     EnumTest
@@ -472,6 +524,7 @@
       <*> (o .:? "enum_number")
       <*> (o .:? "outerEnum")
 
+-- | ToJSON EnumTest
 instance A.ToJSON EnumTest where
   toJSON EnumTest {..} =
    _omitNulls
@@ -495,7 +548,7 @@
   
 
 -- ** FormatTest
--- |
+-- | FormatTest
 data FormatTest = FormatTest
   { formatTestInteger :: !(Maybe Int) -- ^ "integer"
   , formatTestInt32 :: !(Maybe Int) -- ^ "int32"
@@ -512,6 +565,8 @@
   , formatTestPassword :: !(Text) -- ^ /Required/ "password"
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON FormatTest
 instance A.FromJSON FormatTest where
   parseJSON = A.withObject "FormatTest" $ \o ->
     FormatTest
@@ -529,6 +584,7 @@
       <*> (o .:? "uuid")
       <*> (o .:  "password")
 
+-- | ToJSON FormatTest
 instance A.ToJSON FormatTest where
   toJSON FormatTest {..} =
    _omitNulls
@@ -574,18 +630,21 @@
   
 
 -- ** 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
@@ -605,18 +664,21 @@
   
 
 -- ** MapTest
--- |
+-- | MapTest
 data MapTest = MapTest
   { mapTestMapMapOfString :: !(Maybe (Map.Map String (Map.Map String Text))) -- ^ "map_map_of_string"
   , mapTestMapOfEnumString :: !(Maybe (Map.Map String Text)) -- ^ "map_of_enum_string"
   } 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")
 
+-- | ToJSON MapTest
 instance A.ToJSON MapTest where
   toJSON MapTest {..} =
    _omitNulls
@@ -636,13 +698,15 @@
   
 
 -- ** 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
@@ -650,6 +714,7 @@
       <*> (o .:? "dateTime")
       <*> (o .:? "map")
 
+-- | ToJSON MixedPropertiesAndAdditionalPropertiesClass
 instance A.ToJSON MixedPropertiesAndAdditionalPropertiesClass where
   toJSON MixedPropertiesAndAdditionalPropertiesClass {..} =
    _omitNulls
@@ -671,19 +736,22 @@
   
 
 -- ** 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
@@ -703,16 +771,19 @@
   
 
 -- ** 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
@@ -730,17 +801,20 @@
   
 
 -- ** 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
@@ -758,7 +832,7 @@
   
 
 -- ** Name
--- |
+-- | Name
 -- Model for testing model name same as property name
 data Name = Name
   { nameName :: !(Int) -- ^ /Required/ "name"
@@ -767,6 +841,8 @@
   , name123Number :: !(Maybe Int) -- ^ "123Number"
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON Name
 instance A.FromJSON Name where
   parseJSON = A.withObject "Name" $ \o ->
     Name
@@ -775,6 +851,7 @@
       <*> (o .:? "property")
       <*> (o .:? "123Number")
 
+-- | ToJSON Name
 instance A.ToJSON Name where
   toJSON Name {..} =
    _omitNulls
@@ -799,16 +876,19 @@
   
 
 -- ** 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
@@ -826,7 +906,7 @@
   
 
 -- ** Order
--- |
+-- | Order
 data Order = Order
   { orderId :: !(Maybe Integer) -- ^ "id"
   , orderPetId :: !(Maybe Integer) -- ^ "petId"
@@ -836,6 +916,8 @@
   , orderComplete :: !(Maybe Bool) -- ^ "complete"
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON Order
 instance A.FromJSON Order where
   parseJSON = A.withObject "Order" $ \o ->
     Order
@@ -846,6 +928,7 @@
       <*> (o .:? "status")
       <*> (o .:? "complete")
 
+-- | ToJSON Order
 instance A.ToJSON Order where
   toJSON Order {..} =
    _omitNulls
@@ -873,16 +956,19 @@
   
 
 -- ** OuterBoolean
--- |
+-- | OuterBoolean
 data OuterBoolean = OuterBoolean
   { 
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON OuterBoolean
 instance A.FromJSON OuterBoolean where
   parseJSON = A.withObject "OuterBoolean" $ \o ->
     pure OuterBoolean
       
 
+-- | ToJSON OuterBoolean
 instance A.ToJSON OuterBoolean where
   toJSON OuterBoolean  =
    _omitNulls
@@ -900,13 +986,15 @@
   
 
 -- ** OuterComposite
--- |
+-- | OuterComposite
 data OuterComposite = OuterComposite
   { outerCompositeMyNumber :: !(Maybe OuterNumber) -- ^ "my_number"
   , outerCompositeMyString :: !(Maybe OuterString) -- ^ "my_string"
   , outerCompositeMyBoolean :: !(Maybe OuterBoolean) -- ^ "my_boolean"
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON OuterComposite
 instance A.FromJSON OuterComposite where
   parseJSON = A.withObject "OuterComposite" $ \o ->
     OuterComposite
@@ -914,6 +1002,7 @@
       <*> (o .:? "my_string")
       <*> (o .:? "my_boolean")
 
+-- | ToJSON OuterComposite
 instance A.ToJSON OuterComposite where
   toJSON OuterComposite {..} =
    _omitNulls
@@ -935,16 +1024,19 @@
   
 
 -- ** OuterEnum
--- |
+-- | OuterEnum
 data OuterEnum = OuterEnum
   { 
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON OuterEnum
 instance A.FromJSON OuterEnum where
   parseJSON = A.withObject "OuterEnum" $ \o ->
     pure OuterEnum
       
 
+-- | ToJSON OuterEnum
 instance A.ToJSON OuterEnum where
   toJSON OuterEnum  =
    _omitNulls
@@ -962,16 +1054,19 @@
   
 
 -- ** OuterNumber
--- |
+-- | OuterNumber
 data OuterNumber = OuterNumber
   { 
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON OuterNumber
 instance A.FromJSON OuterNumber where
   parseJSON = A.withObject "OuterNumber" $ \o ->
     pure OuterNumber
       
 
+-- | ToJSON OuterNumber
 instance A.ToJSON OuterNumber where
   toJSON OuterNumber  =
    _omitNulls
@@ -989,16 +1084,19 @@
   
 
 -- ** OuterString
--- |
+-- | OuterString
 data OuterString = OuterString
   { 
   } deriving (P.Show,P.Eq,P.Typeable)
 
+
+-- | FromJSON OuterString
 instance A.FromJSON OuterString where
   parseJSON = A.withObject "OuterString" $ \o ->
     pure OuterString
       
 
+-- | ToJSON OuterString
 instance A.ToJSON OuterString where
   toJSON OuterString  =
    _omitNulls
@@ -1016,7 +1114,7 @@
   
 
 -- ** Pet
--- |
+-- | Pet
 data Pet = Pet
   { petId :: !(Maybe Integer) -- ^ "id"
   , petCategory :: !(Maybe Category) -- ^ "category"
@@ -1026,6 +1124,8 @@
   , petStatus :: !(Maybe Text) -- ^ "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
@@ -1036,6 +1136,7 @@
       <*> (o .:? "tags")
       <*> (o .:? "status")
 
+-- | ToJSON Pet
 instance A.ToJSON Pet where
   toJSON Pet {..} =
    _omitNulls
@@ -1065,18 +1166,21 @@
   
 
 -- ** 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
@@ -1096,16 +1200,19 @@
   
 
 -- ** 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
@@ -1123,18 +1230,21 @@
   
 
 -- ** 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
@@ -1154,7 +1264,7 @@
   
 
 -- ** User
--- |
+-- | User
 data User = User
   { userId :: !(Maybe Integer) -- ^ "id"
   , userUsername :: !(Maybe Text) -- ^ "username"
@@ -1166,6 +1276,8 @@
   , 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
@@ -1178,6 +1290,7 @@
       <*> (o .:? "phone")
       <*> (o .:? "userStatus")
 
+-- | ToJSON User
 instance A.ToJSON User where
   toJSON User {..} =
    _omitNulls
@@ -1209,13 +1322,15 @@
   
 
 -- ** 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
@@ -1223,6 +1338,7 @@
       <*> (o .:? "color")
       <*> (o .:? "declawed")
 
+-- | ToJSON Cat
 instance A.ToJSON Cat where
   toJSON Cat {..} =
    _omitNulls
@@ -1245,13 +1361,15 @@
   
 
 -- ** 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
@@ -1259,6 +1377,7 @@
       <*> (o .:? "color")
       <*> (o .:? "breed")
 
+-- | ToJSON Dog
 instance A.ToJSON Dog where
   toJSON Dog {..} =
    _omitNulls
@@ -1280,24 +1399,65 @@
   }
   
 
+-- * Parameter newtypes
+
+newtype AdditionalMetadata = AdditionalMetadata { unAdditionalMetadata :: Text } deriving (P.Eq, P.Show)
+newtype ApiKey = ApiKey { unApiKey :: Text } deriving (P.Eq, P.Show)
+newtype Body = Body { unBody :: [User] } deriving (P.Eq, P.Show, A.ToJSON)
+newtype Byte = Byte { unByte :: ByteArray } deriving (P.Eq, P.Show)
+newtype Callback = Callback { unCallback :: Text } deriving (P.Eq, P.Show)
+newtype EnumFormString = EnumFormString { unEnumFormString :: Text } deriving (P.Eq, P.Show)
+newtype EnumFormStringArray = EnumFormStringArray { unEnumFormStringArray :: [Text] } deriving (P.Eq, P.Show)
+newtype EnumHeaderString = EnumHeaderString { unEnumHeaderString :: Text } deriving (P.Eq, P.Show)
+newtype EnumHeaderStringArray = EnumHeaderStringArray { unEnumHeaderStringArray :: [Text] } deriving (P.Eq, P.Show)
+newtype EnumQueryDouble = EnumQueryDouble { unEnumQueryDouble :: Double } deriving (P.Eq, P.Show)
+newtype EnumQueryInteger = EnumQueryInteger { unEnumQueryInteger :: Int } deriving (P.Eq, P.Show)
+newtype EnumQueryString = EnumQueryString { unEnumQueryString :: Text } deriving (P.Eq, P.Show)
+newtype EnumQueryStringArray = EnumQueryStringArray { unEnumQueryStringArray :: [Text] } deriving (P.Eq, P.Show)
+newtype File = File { unFile :: FilePath } deriving (P.Eq, P.Show)
+newtype Int32 = Int32 { unInt32 :: Int } deriving (P.Eq, P.Show)
+newtype Int64 = Int64 { unInt64 :: Integer } deriving (P.Eq, P.Show)
+newtype Name2 = Name2 { unName2 :: Text } deriving (P.Eq, P.Show)
+newtype Number = Number { unNumber :: Double } deriving (P.Eq, P.Show)
+newtype OrderId = OrderId { unOrderId :: Integer } deriving (P.Eq, P.Show)
+newtype OrderIdText = OrderIdText { unOrderIdText :: Text } deriving (P.Eq, P.Show)
+newtype Param = Param { unParam :: Text } deriving (P.Eq, P.Show)
+newtype Param2 = Param2 { unParam2 :: Text } deriving (P.Eq, P.Show)
+newtype ParamBinary = ParamBinary { unParamBinary :: Binary } deriving (P.Eq, P.Show)
+newtype ParamDate = ParamDate { unParamDate :: Date } deriving (P.Eq, P.Show)
+newtype ParamDateTime = ParamDateTime { unParamDateTime :: DateTime } deriving (P.Eq, P.Show)
+newtype ParamDouble = ParamDouble { unParamDouble :: Double } deriving (P.Eq, P.Show)
+newtype ParamFloat = ParamFloat { unParamFloat :: Float } deriving (P.Eq, P.Show)
+newtype ParamInteger = ParamInteger { unParamInteger :: Int } deriving (P.Eq, P.Show)
+newtype ParamString = ParamString { unParamString :: Text } deriving (P.Eq, P.Show)
+newtype Password = Password { unPassword :: Text } deriving (P.Eq, P.Show)
+newtype PatternWithoutDelimiter = PatternWithoutDelimiter { unPatternWithoutDelimiter :: Text } deriving (P.Eq, P.Show)
+newtype PetId = PetId { unPetId :: Integer } deriving (P.Eq, P.Show)
+newtype Status = Status { unStatus :: [Text] } deriving (P.Eq, P.Show)
+newtype StatusText = StatusText { unStatusText :: Text } deriving (P.Eq, P.Show)
+newtype Tags = Tags { unTags :: [Text] } deriving (P.Eq, P.Show)
+newtype Username = Username { unUsername :: Text } deriving (P.Eq, P.Show)
+
 -- * 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
@@ -1330,6 +1490,7 @@
   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 $
diff --git a/swagger-petstore.cabal b/swagger-petstore.cabal
--- a/swagger-petstore.cabal
+++ b/swagger-petstore.cabal
@@ -1,9 +1,5 @@
--- This file has been generated from package.yaml by hpack version 0.17.1.
---
--- see: https://github.com/sol/hpack
-
 name:           swagger-petstore
-version:        0.0.1.2
+version:        0.0.1.3
 synopsis:       Auto-generated swagger-petstore API Client
 description:    .
                 Client library for calling the swagger-petstore API based on http-client.
@@ -12,17 +8,17 @@
                 .
                 base path: http://petstore.swagger.io:80/v2
                 .
-                apiVersion: 0.0.1
+                Swagger Petstore API version: 1.0.0
                 .
-                swagger version: 2.0
+                OpenAPI spec version: 2.0
                 .
                 OpenAPI-Specification: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
                 .
 category:       Web
 homepage:       https://github.com/swagger-api/swagger-codegen#readme
-author:         Author Name Here
-maintainer:     author.name@email.com
-copyright:      YEAR - AUTHOR
+author:         Jon Schoning
+maintainer:     jonschoning@gmail.com
+copyright:      2017 - Jon Schoning
 license:        MIT
 build-type:     Simple
 cabal-version:  >= 1.10
@@ -92,6 +88,7 @@
     , time
     , iso8601-time
     , aeson
+    , vector
     , semigroups
     , QuickCheck
   other-modules:
diff --git a/swagger.json b/swagger.json
--- a/swagger.json
+++ b/swagger.json
@@ -9,7 +9,7 @@
       "email" : "apiteam@swagger.io"
     },
     "license" : {
-      "name" : "Apache 2.0",
+      "name" : "Apache-2.0",
       "url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
     }
   },
@@ -1662,15 +1662,6 @@
       "type" : "string",
       "enum" : [ "placed", "approved", "delivered" ]
     },
-    "OuterNumber" : {
-      "type" : "number"
-    },
-    "OuterString" : {
-      "type" : "string"
-    },
-    "OuterBoolean" : {
-      "type" : "boolean"
-    },
     "OuterComposite" : {
       "type" : "object",
       "properties" : {
@@ -1684,6 +1675,15 @@
           "$ref" : "#/definitions/OuterBoolean"
         }
       }
+    },
+    "OuterNumber" : {
+      "type" : "number"
+    },
+    "OuterString" : {
+      "type" : "string"
+    },
+    "OuterBoolean" : {
+      "type" : "boolean"
     }
   },
   "externalDocs" : {
diff --git a/tests/Instances.hs b/tests/Instances.hs
--- a/tests/Instances.hs
+++ b/tests/Instances.hs
@@ -2,20 +2,23 @@
 
 module Instances where
 
-import Data.Text (Text, pack)
+import Control.Monad
 import Data.Char (isSpace)
 import Data.List (sort)
-import qualified Data.Time as TI
 import Test.QuickCheck
+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.ByteString.Lazy as BL
+import qualified Data.Text as T
+import qualified Data.Time as TI
+import qualified Data.Vector as V
 
 import ApproxEq
 import SwaggerPetstore.Model
 
-instance Arbitrary Text where
-  arbitrary = pack <$> arbitrary
+instance Arbitrary T.Text where
+  arbitrary = T.pack <$> arbitrary
 
 instance Arbitrary TI.Day where
   arbitrary = TI.ModifiedJulianDay . (2000 +) <$> arbitrary
@@ -45,6 +48,27 @@
     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)
diff --git a/tests/Test.hs b/tests/Test.hs
--- a/tests/Test.hs
+++ b/tests/Test.hs
@@ -17,42 +17,43 @@
 
 main :: IO ()
 main =
-  hspec $ modifyMaxSize (const 10) $
-  do describe "JSON instances" $
-       do 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 Category)
-          propMimeEq MimeJSON (Proxy :: Proxy ClassModel)
-          propMimeEq MimeJSON (Proxy :: Proxy Client)
-          propMimeEq MimeJSON (Proxy :: Proxy EnumArrays)
-          propMimeEq MimeJSON (Proxy :: Proxy EnumClass)
-          propMimeEq MimeJSON (Proxy :: Proxy EnumTest)
-          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 OuterBoolean)
-          propMimeEq MimeJSON (Proxy :: Proxy OuterComposite)
-          propMimeEq MimeJSON (Proxy :: Proxy OuterEnum)
-          propMimeEq MimeJSON (Proxy :: Proxy OuterNumber)
-          propMimeEq MimeJSON (Proxy :: Proxy OuterString)
-          propMimeEq MimeJSON (Proxy :: Proxy Pet)
-          propMimeEq MimeJSON (Proxy :: Proxy ReadOnlyFirst)
-          propMimeEq MimeJSON (Proxy :: Proxy SpecialModelName)
-          propMimeEq MimeJSON (Proxy :: Proxy Tag)
-          propMimeEq MimeJSON (Proxy :: Proxy User)
-          propMimeEq MimeJSON (Proxy :: Proxy Cat)
-          propMimeEq MimeJSON (Proxy :: Proxy Dog)
-          
+  hspec $ modifyMaxSize (const 10) $ 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 Category)
+      propMimeEq MimeJSON (Proxy :: Proxy ClassModel)
+      propMimeEq MimeJSON (Proxy :: Proxy Client)
+      propMimeEq MimeJSON (Proxy :: Proxy EnumArrays)
+      propMimeEq MimeJSON (Proxy :: Proxy EnumClass)
+      propMimeEq MimeJSON (Proxy :: Proxy EnumTest)
+      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 OuterBoolean)
+      propMimeEq MimeJSON (Proxy :: Proxy OuterComposite)
+      propMimeEq MimeJSON (Proxy :: Proxy OuterEnum)
+      propMimeEq MimeJSON (Proxy :: Proxy OuterNumber)
+      propMimeEq MimeJSON (Proxy :: Proxy OuterString)
+      propMimeEq MimeJSON (Proxy :: Proxy Pet)
+      propMimeEq MimeJSON (Proxy :: Proxy ReadOnlyFirst)
+      propMimeEq MimeJSON (Proxy :: Proxy SpecialModelName)
+      propMimeEq MimeJSON (Proxy :: Proxy Tag)
+      propMimeEq MimeJSON (Proxy :: Proxy User)
+      propMimeEq MimeJSON (Proxy :: Proxy Cat)
+      propMimeEq MimeJSON (Proxy :: Proxy Dog)
+      
