diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/API.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/API.mustache index f5869983182..06cad2f8d0c 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/API.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/API.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} {-| Module : {{title}}.API -} diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/Client.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/Client.mustache index c56f377451b..c2e6655e790 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/Client.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/Client.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} {-| Module : {{title}}.Client -} diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/Lens.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/Lens.mustache index a10d79faf99..458c33eb96b 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/Lens.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/Lens.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} {-| Module : {{title}}.Lens -} @@ -43,4 +44,4 @@ type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t {{/vars}} {{/model}} -{{/models}} \ No newline at end of file +{{/models}} diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/LoggingKatip.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/LoggingKatip.mustache index 470df933b09..3b3877a41ce 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/LoggingKatip.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/LoggingKatip.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} {-| Module : {{title}}.Logging Katip Logging functions diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/LoggingMonadLogger.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/LoggingMonadLogger.mustache index a9737b70e01..e0a15329c13 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/LoggingMonadLogger.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/LoggingMonadLogger.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} {-| Module : {{title}}.Logging monad-logger Logging functions diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/MimeTypes.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/MimeTypes.mustache index 18a4c99cf3c..b111a1da1e5 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/MimeTypes.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/MimeTypes.mustache @@ -1,4 +1,4 @@ - +{{>partial_header}} {-| Module : {{title}}.MimeTypes -} diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/Model.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/Model.mustache index 26ce58b91b7..3cf877fd2ce 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/Model.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/Model.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} {-| Module : {{title}}.Model -} @@ -240,4 +241,4 @@ _readBinaryBase64 = P.either P.fail (pure . Binary) . BL64.decode . BL.fromStric _showBinaryBase64 :: Binary -> Text _showBinaryBase64 = T.decodeUtf8 . BL.toStrict . BL64.encode . unBinary -{-# INLINE _showBinaryBase64 #-} \ No newline at end of file +{-# INLINE _showBinaryBase64 #-} diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/TopLevel.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/TopLevel.mustache index 83e2c8ed979..2522a571fba 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/TopLevel.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/TopLevel.mustache @@ -1,3 +1,4 @@ +{{>partial_header}} {-| Module : {{title}} -} diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/partial_header.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/partial_header.mustache new file mode 100644 index 00000000000..7fc0581b639 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/partial_header.mustache @@ -0,0 +1,17 @@ +{- + {{#appName}} + {{{appName}}} + + {{/appName}} + {{#appDescription}} + {{{appDescription}}} + + {{/appDescription}} + {{#version}} + OpenAPI spec version: {{{version}}} + {{/version}} + {{#infoEmail}} + Contact: {{{infoEmail}}} + {{/infoEmail}} + Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) +-} diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore.hs index cb5e7c140c1..6e1700d709b 100644 --- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore.hs +++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore.hs @@ -1,3 +1,13 @@ +{- + 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: 1.0.0 + Contact: apiteam@swagger.io + Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) +-} + {-| Module : SwaggerPetstore -} diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API.hs index c0408b8fb9e..320722d1a21 100644 --- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API.hs +++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/API.hs @@ -1,3 +1,13 @@ +{- + 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: 1.0.0 + Contact: apiteam@swagger.io + Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) +-} + {-| Module : SwaggerPetstore.API -} diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Client.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Client.hs index b68ce51a7bd..041f7a11013 100644 --- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Client.hs +++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Client.hs @@ -1,3 +1,13 @@ +{- + 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: 1.0.0 + Contact: apiteam@swagger.io + Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) +-} + {-| Module : SwaggerPetstore.Client -} diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Lens.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Lens.hs index b645d189d7a..105cb19b0b2 100644 --- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Lens.hs +++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Lens.hs @@ -1,3 +1,13 @@ +{- + 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: 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/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Logging.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Logging.hs index 7ab4bac9186..2842b5ee15f 100644 --- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Logging.hs +++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Logging.hs @@ -1,3 +1,13 @@ +{- + 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: 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/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/MimeTypes.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/MimeTypes.hs index d7abb7681bb..1eac4d19189 100644 --- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/MimeTypes.hs +++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/MimeTypes.hs @@ -1,3 +1,12 @@ +{- + 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: 1.0.0 + Contact: apiteam@swagger.io + Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) +-} {-| Module : SwaggerPetstore.MimeTypes diff --git a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Model.hs index 8942406f205..24e45353039 100644 --- a/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/SwaggerPetstore/Model.hs @@ -1,3 +1,13 @@ +{- + 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: 1.0.0 + Contact: apiteam@swagger.io + Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) +-} + {-| Module : SwaggerPetstore.Model -} @@ -1413,4 +1423,4 @@ _readBinaryBase64 = P.either P.fail (pure . Binary) . BL64.decode . BL.fromStric _showBinaryBase64 :: Binary -> Text _showBinaryBase64 = T.decodeUtf8 . BL.toStrict . BL64.encode . unBinary -{-# INLINE _showBinaryBase64 #-} \ No newline at end of file +{-# INLINE _showBinaryBase64 #-} diff --git a/samples/client/petstore/haskell-http-client/swagger.json b/samples/client/petstore/haskell-http-client/swagger.json index 305643090e8..4af4303cdb8 100644 --- a/samples/client/petstore/haskell-http-client/swagger.json +++ b/samples/client/petstore/haskell-http-client/swagger.json @@ -108,8 +108,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -680,8 +680,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_form_string", @@ -699,8 +699,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_header_string", @@ -718,8 +718,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_query_string", @@ -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" : {