From 05db32fea2a6b3751ff9f37fe90ce1fdaf9a7c75 Mon Sep 17 00:00:00 2001 From: Alexey Alekhin Date: Mon, 6 Aug 2018 12:17:59 +0200 Subject: [PATCH] [Elm] Template improvements (#661) * Add elm template parameter to the samples testing script * Update elm-date-extra package; fixes #458 * Update generated elm samples * Use Elm doc comments; remove some unneccessary newlines * Update generated Elm samples * Remove unnecessary parenthesis around non-optional container type --- bin/elm-petstore.sh | 2 +- .../src/main/resources/elm/DateOnly.mustache | 10 +++---- .../src/main/resources/elm/DateTime.mustache | 10 +++---- .../main/resources/elm/aliasDecoder.mustache | 6 +++-- .../src/main/resources/elm/api.mustache | 11 ++++---- .../main/resources/elm/elm-package.mustache | 2 +- .../main/resources/elm/licenseInfo.mustache | 8 ++++-- .../src/main/resources/elm/model.mustache | 11 +++----- .../resources/elm/modelTypeAlias.mustache | 6 ++--- .../resources/elm/modelTypePrimitive.mustache | 4 +-- .../petstore/elm/.openapi-generator/VERSION | 2 +- samples/client/petstore/elm/elm-package.json | 2 +- .../petstore/elm/src/Data/ApiResponse.elm | 6 +---- .../client/petstore/elm/src/Data/Category.elm | 6 +---- .../client/petstore/elm/src/Data/Order_.elm | 6 +---- samples/client/petstore/elm/src/Data/Pet.elm | 8 ++---- samples/client/petstore/elm/src/Data/Tag.elm | 6 +---- samples/client/petstore/elm/src/Data/User.elm | 6 +---- samples/client/petstore/elm/src/DateOnly.elm | 10 +++---- samples/client/petstore/elm/src/DateTime.elm | 10 +++---- .../client/petstore/elm/src/Request/Pet.elm | 27 +++---------------- .../client/petstore/elm/src/Request/Store.elm | 15 +++-------- .../client/petstore/elm/src/Request/User.elm | 27 +++---------------- 23 files changed, 57 insertions(+), 144 deletions(-) diff --git a/bin/elm-petstore.sh b/bin/elm-petstore.sh index 714ec137b1f..b2020dd868c 100755 --- a/bin/elm-petstore.sh +++ b/bin/elm-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -o samples/client/petstore/elm $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm $@" java $JAVA_OPTS -jar $executable $ags diff --git a/modules/openapi-generator/src/main/resources/elm/DateOnly.mustache b/modules/openapi-generator/src/main/resources/elm/DateOnly.mustache index 01e596c97ea..59551c7aa71 100644 --- a/modules/openapi-generator/src/main/resources/elm/DateOnly.mustache +++ b/modules/openapi-generator/src/main/resources/elm/DateOnly.mustache @@ -4,6 +4,7 @@ import Date import Date.Extra exposing (fromIsoString, toFormattedString) import Json.Decode as Decode exposing (Decoder) import Json.Encode as Encode +import Result type alias DateOnly = @@ -24,11 +25,8 @@ dateOnlyEncoder model = decodeIsoString : String -> Decoder DateOnly decodeIsoString str = case fromIsoString str of - Just date -> + Result.Ok date -> Decode.succeed date - Nothing -> - Decode.fail <| - "Cannot convert " - ++ str - ++ " to DateOnly" + Result.Err msg -> + Decode.fail msg diff --git a/modules/openapi-generator/src/main/resources/elm/DateTime.mustache b/modules/openapi-generator/src/main/resources/elm/DateTime.mustache index e976d4aeee1..d3638500a89 100644 --- a/modules/openapi-generator/src/main/resources/elm/DateTime.mustache +++ b/modules/openapi-generator/src/main/resources/elm/DateTime.mustache @@ -4,6 +4,7 @@ import Date import Date.Extra exposing (fromIsoString, toIsoString) import Json.Decode as Decode exposing (Decoder) import Json.Encode as Encode +import Result type alias DateTime = @@ -24,11 +25,8 @@ dateTimeEncoder model = decodeIsoString : String -> Decoder DateTime decodeIsoString str = case fromIsoString str of - Just date -> + Result.Ok date -> Decode.succeed date - Nothing -> - Decode.fail <| - "Cannot convert " - ++ str - ++ " to DateTime" + Result.Err msg -> + Decode.fail msg diff --git a/modules/openapi-generator/src/main/resources/elm/aliasDecoder.mustache b/modules/openapi-generator/src/main/resources/elm/aliasDecoder.mustache index 9d98b5a1d0a..8a37eef1084 100644 --- a/modules/openapi-generator/src/main/resources/elm/aliasDecoder.mustache +++ b/modules/openapi-generator/src/main/resources/elm/aliasDecoder.mustache @@ -1,5 +1,7 @@ {{classVarName}}Decoder : Decoder {{classname}} {{classVarName}}Decoder = decode {{classname}} -{{#allVars}}{{^discriminatorValue}} |> {{>fieldDecoder}} -{{/discriminatorValue}}{{/allVars}} \ No newline at end of file +{{#allVars}} +{{^discriminatorValue}} |> {{>fieldDecoder}} +{{/discriminatorValue}} +{{/allVars}} diff --git a/modules/openapi-generator/src/main/resources/elm/api.mustache b/modules/openapi-generator/src/main/resources/elm/api.mustache index 00e26f284a1..df085dfa437 100644 --- a/modules/openapi-generator/src/main/resources/elm/api.mustache +++ b/modules/openapi-generator/src/main/resources/elm/api.mustache @@ -10,13 +10,14 @@ import Json.Decode as Decode basePath : String basePath = "{{basePath}}" - - {{#operations}} {{#operation}} -{- - {{notes}} + + +{{#notes}} +{-| {{{notes}}} -} +{{/notes}} {{operationId}} : {{#pathParams}}{{dataType}} -> {{/pathParams}}{{#bodyParam}}{{dataType}} -> {{/bodyParam}}Http.Request {{^responses}}(){{/responses}}{{#responses}}{{#-first}}{{^dataType}}(){{/dataType}}{{#isMapContainer}}(Dict.Dict String {{/isMapContainer}}{{#isListContainer}}(List {{/isListContainer}}{{dataType}}{{#isListContainer}}){{/isListContainer}}{{#isMapContainer}}){{/isMapContainer}}{{/-first}}{{/responses}} {{operationId}} {{#pathParams}}{{paramName}} {{/pathParams}}{{#bodyParam}}model {{/bodyParam}}= { method = "{{httpMethod}}" @@ -28,7 +29,5 @@ basePath = , withCredentials = False } |> Http.request - - {{/operation}} {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/elm/elm-package.mustache b/modules/openapi-generator/src/main/resources/elm/elm-package.mustache index 3a60279d7da..6cc67985f73 100644 --- a/modules/openapi-generator/src/main/resources/elm/elm-package.mustache +++ b/modules/openapi-generator/src/main/resources/elm/elm-package.mustache @@ -12,7 +12,7 @@ "elm-lang/core": "5.1.1 <= v < 6.0.0", "elm-lang/html": "2.0.0 <= v < 3.0.0", "elm-lang/http": "1.0.0 <= v < 2.0.0", - "justinmimbs/elm-date-extra": "2.0.3 <= v < 3.0.0" + "justinmimbs/elm-date-extra": "3.0.0 <= v < 4.0.0" }, "elm-version": "0.18.0 <= v < 0.19.0" } diff --git a/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache index ab4d7b671fd..c65ebe4189d 100644 --- a/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache @@ -2,8 +2,12 @@ {{{appName}}} {{{appDescription}}} - {{#version}}OpenAPI spec version: {{{version}}}{{/version}} - {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + {{#version}} + OpenAPI spec version: {{{version}}} + {{/version}} + {{#infoEmail}} + Contact: {{{infoEmail}}} + {{/infoEmail}} NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git diff --git a/modules/openapi-generator/src/main/resources/elm/model.mustache b/modules/openapi-generator/src/main/resources/elm/model.mustache index fa5418a8ee1..5a0f0722605 100644 --- a/modules/openapi-generator/src/main/resources/elm/model.mustache +++ b/modules/openapi-generator/src/main/resources/elm/model.mustache @@ -6,19 +6,14 @@ module Data.{{classname}} exposing ({{#models}}{{#model}}{{classname}}{{#hasChil import Json.Decode.Pipeline exposing (decode, optional, required) import Json.Encode as Encode import Maybe exposing (map, withDefault) - - {{#models}} {{#model}} + + {{#description}} -{- - {{{description}}} +{-| {{{description}}} -} {{/description}} {{#isEnum}}{{>modelTypeUnion}}{{/isEnum}}{{^isEnum}}{{#hasChildren}}{{>modelTypeDiscriminator}}{{/hasChildren}}{{^hasChildren}}{{#isAlias}}{{>modelTypePrimitive}}{{/isAlias}}{{^isAlias}}{{#isArrayModel}}{{>modelTypeArray}}{{/isArrayModel}}{{^isArrayModel}}{{>modelTypeAlias}}{{/isArrayModel}}{{/isAlias}}{{/hasChildren}}{{/isEnum}} {{/model}} -{{^-last}} - - -{{/-last}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/elm/modelTypeAlias.mustache b/modules/openapi-generator/src/main/resources/elm/modelTypeAlias.mustache index 5c92a9f49e1..fc796b4c23d 100644 --- a/modules/openapi-generator/src/main/resources/elm/modelTypeAlias.mustache +++ b/modules/openapi-generator/src/main/resources/elm/modelTypeAlias.mustache @@ -1,7 +1,5 @@ - - type alias {{classname}} = - { {{#vars}}{{^-first}} , {{/-first}}{{name}} : {{^required}}Maybe {{/required}}{{#isContainer}}(List {{/isContainer}}{{#isEnum}}{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{dataType}}{{/isEnum}}{{#isContainer}}){{/isContainer}} + { {{#vars}}{{^-first}} , {{/-first}}{{name}} : {{^required}}Maybe {{#isContainer}}({{/isContainer}}{{/required}}{{#isContainer}}List {{/isContainer}}{{#isEnum}}{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{dataType}}{{/isEnum}}{{^required}}{{#isContainer}}){{/isContainer}}{{/required}} {{/vars}} } {{#vars}} {{#isEnum}} @@ -25,4 +23,4 @@ type alias {{classname}} = {{>unionEncoder}} {{/isEnum}} -{{/vars}} \ No newline at end of file +{{/vars}} diff --git a/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache b/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache index 20ca2bbb89a..a1d872f1451 100644 --- a/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache +++ b/modules/openapi-generator/src/main/resources/elm/modelTypePrimitive.mustache @@ -1,5 +1,3 @@ - - type alias {{classname}} = {{dataType}} @@ -11,4 +9,4 @@ type alias {{classname}} {{classVarName}}Encoder : {{classname}} -> Encode.Value {{classVarName}}Encoder = - {{vendorExtensions.x-encoder}} \ No newline at end of file + {{vendorExtensions.x-encoder}} diff --git a/samples/client/petstore/elm/.openapi-generator/VERSION b/samples/client/petstore/elm/.openapi-generator/VERSION index 096bf47efe3..4395ff59232 100644 --- a/samples/client/petstore/elm/.openapi-generator/VERSION +++ b/samples/client/petstore/elm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elm/elm-package.json b/samples/client/petstore/elm/elm-package.json index 3a60279d7da..6cc67985f73 100644 --- a/samples/client/petstore/elm/elm-package.json +++ b/samples/client/petstore/elm/elm-package.json @@ -12,7 +12,7 @@ "elm-lang/core": "5.1.1 <= v < 6.0.0", "elm-lang/html": "2.0.0 <= v < 3.0.0", "elm-lang/http": "1.0.0 <= v < 2.0.0", - "justinmimbs/elm-date-extra": "2.0.3 <= v < 3.0.0" + "justinmimbs/elm-date-extra": "3.0.0 <= v < 4.0.0" }, "elm-version": "0.18.0 <= v < 0.19.0" } diff --git a/samples/client/petstore/elm/src/Data/ApiResponse.elm b/samples/client/petstore/elm/src/Data/ApiResponse.elm index bb11506e43b..ce052917546 100644 --- a/samples/client/petstore/elm/src/Data/ApiResponse.elm +++ b/samples/client/petstore/elm/src/Data/ApiResponse.elm @@ -3,7 +3,6 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 - NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git @@ -19,11 +18,8 @@ import Json.Encode as Encode import Maybe exposing (map, withDefault) -{- - Describes the result of uploading an image resource +{-| Describes the result of uploading an image resource -} - - type alias ApiResponse = { code : Maybe Int , type_ : Maybe String diff --git a/samples/client/petstore/elm/src/Data/Category.elm b/samples/client/petstore/elm/src/Data/Category.elm index 2a09dad327e..8cac70ea451 100644 --- a/samples/client/petstore/elm/src/Data/Category.elm +++ b/samples/client/petstore/elm/src/Data/Category.elm @@ -3,7 +3,6 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 - NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git @@ -19,11 +18,8 @@ import Json.Encode as Encode import Maybe exposing (map, withDefault) -{- - A category for a pet +{-| A category for a pet -} - - type alias Category = { id : Maybe Int , name : Maybe String diff --git a/samples/client/petstore/elm/src/Data/Order_.elm b/samples/client/petstore/elm/src/Data/Order_.elm index d6e02d68942..c343084f39d 100644 --- a/samples/client/petstore/elm/src/Data/Order_.elm +++ b/samples/client/petstore/elm/src/Data/Order_.elm @@ -3,7 +3,6 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 - NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git @@ -20,11 +19,8 @@ import Json.Encode as Encode import Maybe exposing (map, withDefault) -{- - An order for a pets from the pet store +{-| An order for a pets from the pet store -} - - type alias Order_ = { id : Maybe Int , petId : Maybe Int diff --git a/samples/client/petstore/elm/src/Data/Pet.elm b/samples/client/petstore/elm/src/Data/Pet.elm index 9f87dfa03af..7f15ea44168 100644 --- a/samples/client/petstore/elm/src/Data/Pet.elm +++ b/samples/client/petstore/elm/src/Data/Pet.elm @@ -3,7 +3,6 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 - NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git @@ -21,16 +20,13 @@ import Json.Encode as Encode import Maybe exposing (map, withDefault) -{- - A pet for sale in the pet store +{-| A pet for sale in the pet store -} - - type alias Pet = { id : Maybe Int , category : Maybe Category , name : String - , photoUrls : (List String) + , photoUrls : List String , tags : Maybe (List Tag) , status : Maybe Status } diff --git a/samples/client/petstore/elm/src/Data/Tag.elm b/samples/client/petstore/elm/src/Data/Tag.elm index 1eb09ddcc4e..74f6de18287 100644 --- a/samples/client/petstore/elm/src/Data/Tag.elm +++ b/samples/client/petstore/elm/src/Data/Tag.elm @@ -3,7 +3,6 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 - NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git @@ -19,11 +18,8 @@ import Json.Encode as Encode import Maybe exposing (map, withDefault) -{- - A tag for a pet +{-| A tag for a pet -} - - type alias Tag = { id : Maybe Int , name : Maybe String diff --git a/samples/client/petstore/elm/src/Data/User.elm b/samples/client/petstore/elm/src/Data/User.elm index b7debad3d59..851f3a51022 100644 --- a/samples/client/petstore/elm/src/Data/User.elm +++ b/samples/client/petstore/elm/src/Data/User.elm @@ -3,7 +3,6 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 - NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git @@ -19,11 +18,8 @@ import Json.Encode as Encode import Maybe exposing (map, withDefault) -{- - A User who is purchasing from the pet store +{-| A User who is purchasing from the pet store -} - - type alias User = { id : Maybe Int , username : Maybe String diff --git a/samples/client/petstore/elm/src/DateOnly.elm b/samples/client/petstore/elm/src/DateOnly.elm index 01e596c97ea..59551c7aa71 100644 --- a/samples/client/petstore/elm/src/DateOnly.elm +++ b/samples/client/petstore/elm/src/DateOnly.elm @@ -4,6 +4,7 @@ import Date import Date.Extra exposing (fromIsoString, toFormattedString) import Json.Decode as Decode exposing (Decoder) import Json.Encode as Encode +import Result type alias DateOnly = @@ -24,11 +25,8 @@ dateOnlyEncoder model = decodeIsoString : String -> Decoder DateOnly decodeIsoString str = case fromIsoString str of - Just date -> + Result.Ok date -> Decode.succeed date - Nothing -> - Decode.fail <| - "Cannot convert " - ++ str - ++ " to DateOnly" + Result.Err msg -> + Decode.fail msg diff --git a/samples/client/petstore/elm/src/DateTime.elm b/samples/client/petstore/elm/src/DateTime.elm index e976d4aeee1..d3638500a89 100644 --- a/samples/client/petstore/elm/src/DateTime.elm +++ b/samples/client/petstore/elm/src/DateTime.elm @@ -4,6 +4,7 @@ import Date import Date.Extra exposing (fromIsoString, toIsoString) import Json.Decode as Decode exposing (Decoder) import Json.Encode as Encode +import Result type alias DateTime = @@ -24,11 +25,8 @@ dateTimeEncoder model = decodeIsoString : String -> Decoder DateTime decodeIsoString str = case fromIsoString str of - Just date -> + Result.Ok date -> Decode.succeed date - Nothing -> - Decode.fail <| - "Cannot convert " - ++ str - ++ " to DateTime" + Result.Err msg -> + Decode.fail msg diff --git a/samples/client/petstore/elm/src/Request/Pet.elm b/samples/client/petstore/elm/src/Request/Pet.elm index 9d4303057f0..0a4b5c1769e 100644 --- a/samples/client/petstore/elm/src/Request/Pet.elm +++ b/samples/client/petstore/elm/src/Request/Pet.elm @@ -3,7 +3,6 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 - NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git @@ -25,9 +24,6 @@ basePath = "http://petstore.swagger.io/v2" -{- - --} addPet : Pet -> Http.Request () addPet model = { method = "POST" @@ -41,9 +37,6 @@ addPet model = |> Http.request -{- - --} deletePet : Int -> Http.Request () deletePet petId = { method = "DELETE" @@ -57,8 +50,7 @@ deletePet petId = |> Http.request -{- - Multiple status values can be provided with comma separated strings +{-| Multiple status values can be provided with comma separated strings -} findPetsByStatus : Http.Request (List Pet) findPetsByStatus = @@ -73,8 +65,7 @@ findPetsByStatus = |> Http.request -{- - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. +{-| Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -} findPetsByTags : Http.Request (List Pet) findPetsByTags = @@ -89,8 +80,7 @@ findPetsByTags = |> Http.request -{- - Returns a single pet +{-| Returns a single pet -} getPetById : Int -> Http.Request Pet getPetById petId = @@ -105,9 +95,6 @@ getPetById petId = |> Http.request -{- - --} updatePet : Pet -> Http.Request () updatePet model = { method = "PUT" @@ -121,9 +108,6 @@ updatePet model = |> Http.request -{- - --} updatePetWithForm : Int -> Http.Request () updatePetWithForm petId = { method = "POST" @@ -137,9 +121,6 @@ updatePetWithForm petId = |> Http.request -{- - --} uploadFile : Int -> Http.Request ApiResponse uploadFile petId = { method = "POST" @@ -151,5 +132,3 @@ uploadFile petId = , withCredentials = False } |> Http.request - - diff --git a/samples/client/petstore/elm/src/Request/Store.elm b/samples/client/petstore/elm/src/Request/Store.elm index f6048f45f88..2e98105a2f4 100644 --- a/samples/client/petstore/elm/src/Request/Store.elm +++ b/samples/client/petstore/elm/src/Request/Store.elm @@ -3,7 +3,6 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 - NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git @@ -24,8 +23,7 @@ basePath = "http://petstore.swagger.io/v2" -{- - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +{-| For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -} deleteOrder : String -> Http.Request () deleteOrder orderId = @@ -40,8 +38,7 @@ deleteOrder orderId = |> Http.request -{- - Returns a map of status codes to quantities +{-| Returns a map of status codes to quantities -} getInventory : Http.Request (Dict.Dict String Int) getInventory = @@ -56,8 +53,7 @@ getInventory = |> Http.request -{- - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +{-| For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -} getOrderById : Int -> Http.Request Order_ getOrderById orderId = @@ -72,9 +68,6 @@ getOrderById orderId = |> Http.request -{- - --} placeOrder : Order_ -> Http.Request Order_ placeOrder model = { method = "POST" @@ -86,5 +79,3 @@ placeOrder model = , withCredentials = False } |> Http.request - - diff --git a/samples/client/petstore/elm/src/Request/User.elm b/samples/client/petstore/elm/src/Request/User.elm index e35df86fadb..e6bbbb32ed5 100644 --- a/samples/client/petstore/elm/src/Request/User.elm +++ b/samples/client/petstore/elm/src/Request/User.elm @@ -3,7 +3,6 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec version: 1.0.0 - NOTE: This file is auto generated by the openapi-generator. https://github.com/openapitools/openapi-generator.git @@ -24,8 +23,7 @@ basePath = "http://petstore.swagger.io/v2" -{- - This can only be done by the logged in user. +{-| This can only be done by the logged in user. -} createUser : User -> Http.Request () createUser model = @@ -40,9 +38,6 @@ createUser model = |> Http.request -{- - --} createUsersWithArrayInput : User -> Http.Request () createUsersWithArrayInput model = { method = "POST" @@ -56,9 +51,6 @@ createUsersWithArrayInput model = |> Http.request -{- - --} createUsersWithListInput : User -> Http.Request () createUsersWithListInput model = { method = "POST" @@ -72,8 +64,7 @@ createUsersWithListInput model = |> Http.request -{- - This can only be done by the logged in user. +{-| This can only be done by the logged in user. -} deleteUser : String -> Http.Request () deleteUser username = @@ -88,9 +79,6 @@ deleteUser username = |> Http.request -{- - --} getUserByName : String -> Http.Request User getUserByName username = { method = "GET" @@ -104,9 +92,6 @@ getUserByName username = |> Http.request -{- - --} loginUser : Http.Request String loginUser = { method = "GET" @@ -120,9 +105,6 @@ loginUser = |> Http.request -{- - --} logoutUser : Http.Request () logoutUser = { method = "GET" @@ -136,8 +118,7 @@ logoutUser = |> Http.request -{- - This can only be done by the logged in user. +{-| This can only be done by the logged in user. -} updateUser : String -> User -> Http.Request () updateUser username model = @@ -150,5 +131,3 @@ updateUser username model = , withCredentials = False } |> Http.request - -