forked from loafle/openapi-generator-original
[Elm] Add missing operation summary (#20147)
* Add missing operation summary * Regenerate samples * Print notes and or summary if any exists * Regenerate clients
This commit is contained in:
parent
23aa2e2cb2
commit
1ba18a09a1
@ -13,12 +13,12 @@ import Json.Decode
|
|||||||
import Json.Encode{{#includeUuid}}
|
import Json.Encode{{#includeUuid}}
|
||||||
import Uuid exposing (Uuid){{/includeUuid}}{{#includeFile}}
|
import Uuid exposing (Uuid){{/includeUuid}}{{#includeFile}}
|
||||||
import File exposing (File){{/includeFile}}
|
import File exposing (File){{/includeFile}}
|
||||||
|
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
{{#allParams}}
|
{{#allParams}}
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
|
|
||||||
|
|
||||||
{{>customType}}
|
{{>customType}}
|
||||||
|
|
||||||
|
|
||||||
@ -28,12 +28,15 @@ import File exposing (File){{/includeFile}}
|
|||||||
{{/operation}}
|
{{/operation}}
|
||||||
{{/operations}}
|
{{/operations}}
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
{{#operation}}
|
{{#operation}}{{#summary}}
|
||||||
|
{-| {{{summary}}}
|
||||||
{{#notes}}
|
{{#notes}}
|
||||||
{-| {{{notes}}}
|
|
||||||
-}
|
{{{notes}}}
|
||||||
|
|
||||||
{{/notes}}
|
{{/notes}}
|
||||||
|
-}{{/summary}}{{^summary}}{{#notes}}{-| {{{notes}}}
|
||||||
|
-}{{/notes}}{{/summary}}
|
||||||
{{#lambda.removeWhitespace}}
|
{{#lambda.removeWhitespace}}
|
||||||
{{operationId}} : {{#allParams}}{{>operationParameter}} -> {{/allParams}}
|
{{operationId}} : {{#allParams}}{{>operationParameter}} -> {{/allParams}}
|
||||||
{{#authMethods}}{{#isBasicBearer}}String -> {{/isBasicBearer}}{{/authMethods}}Api.Request
|
{{#authMethods}}{{#isBasicBearer}}String -> {{/isBasicBearer}}{{/authMethods}}Api.Request
|
||||||
|
@ -61,6 +61,8 @@ stringFromStatus model =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{-| Add a new pet to the store
|
||||||
|
-}
|
||||||
addPet : Api.Data.Pet -> Api.Request Api.Data.Pet
|
addPet : Api.Data.Pet -> Api.Request Api.Data.Pet
|
||||||
addPet pet_body =
|
addPet pet_body =
|
||||||
Api.request
|
Api.request
|
||||||
@ -73,6 +75,8 @@ addPet pet_body =
|
|||||||
Api.Data.petDecoder
|
Api.Data.petDecoder
|
||||||
|
|
||||||
|
|
||||||
|
{-| Deletes a pet
|
||||||
|
-}
|
||||||
deletePet : Int -> Maybe String -> Api.Request ()
|
deletePet : Int -> Maybe String -> Api.Request ()
|
||||||
deletePet petId_path apiKey_header =
|
deletePet petId_path apiKey_header =
|
||||||
Api.request
|
Api.request
|
||||||
@ -85,7 +89,10 @@ deletePet petId_path apiKey_header =
|
|||||||
(Json.Decode.succeed ())
|
(Json.Decode.succeed ())
|
||||||
|
|
||||||
|
|
||||||
{-| Multiple status values can be provided with comma separated strings
|
{-| Finds Pets by status
|
||||||
|
|
||||||
|
Multiple status values can be provided with comma separated strings
|
||||||
|
|
||||||
-}
|
-}
|
||||||
findPetsByStatus : List Status -> Api.Request (List Api.Data.Pet)
|
findPetsByStatus : List Status -> Api.Request (List Api.Data.Pet)
|
||||||
findPetsByStatus status_query =
|
findPetsByStatus status_query =
|
||||||
@ -99,7 +106,10 @@ findPetsByStatus status_query =
|
|||||||
(Json.Decode.list Api.Data.petDecoder)
|
(Json.Decode.list Api.Data.petDecoder)
|
||||||
|
|
||||||
|
|
||||||
{-| Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
{-| Finds Pets by tags
|
||||||
|
|
||||||
|
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
|
||||||
-}
|
-}
|
||||||
findPetsByTags : List String -> Api.Request (List Api.Data.Pet)
|
findPetsByTags : List String -> Api.Request (List Api.Data.Pet)
|
||||||
findPetsByTags tags_query =
|
findPetsByTags tags_query =
|
||||||
@ -113,7 +123,10 @@ findPetsByTags tags_query =
|
|||||||
(Json.Decode.list Api.Data.petDecoder)
|
(Json.Decode.list Api.Data.petDecoder)
|
||||||
|
|
||||||
|
|
||||||
{-| Returns a single pet
|
{-| Find pet by ID
|
||||||
|
|
||||||
|
Returns a single pet
|
||||||
|
|
||||||
-}
|
-}
|
||||||
getPetById : Int -> Api.Request Api.Data.Pet
|
getPetById : Int -> Api.Request Api.Data.Pet
|
||||||
getPetById petId_path =
|
getPetById petId_path =
|
||||||
@ -127,6 +140,8 @@ getPetById petId_path =
|
|||||||
Api.Data.petDecoder
|
Api.Data.petDecoder
|
||||||
|
|
||||||
|
|
||||||
|
{-| Update an existing pet
|
||||||
|
-}
|
||||||
updatePet : Api.Data.Pet -> Api.Request Api.Data.Pet
|
updatePet : Api.Data.Pet -> Api.Request Api.Data.Pet
|
||||||
updatePet pet_body =
|
updatePet pet_body =
|
||||||
Api.request
|
Api.request
|
||||||
@ -139,6 +154,8 @@ updatePet pet_body =
|
|||||||
Api.Data.petDecoder
|
Api.Data.petDecoder
|
||||||
|
|
||||||
|
|
||||||
|
{-| Updates a pet in the store with form data
|
||||||
|
-}
|
||||||
updatePetWithForm : Int -> Maybe String -> Maybe String -> Api.Request ()
|
updatePetWithForm : Int -> Maybe String -> Maybe String -> Api.Request ()
|
||||||
updatePetWithForm petId_path name status =
|
updatePetWithForm petId_path name status =
|
||||||
Api.request
|
Api.request
|
||||||
@ -151,6 +168,8 @@ updatePetWithForm petId_path name status =
|
|||||||
(Json.Decode.succeed ())
|
(Json.Decode.succeed ())
|
||||||
|
|
||||||
|
|
||||||
|
{-| uploads an image
|
||||||
|
-}
|
||||||
uploadFile : Int -> Maybe String -> Maybe File -> Api.Request Api.Data.ApiResponse
|
uploadFile : Int -> Maybe String -> Maybe File -> Api.Request Api.Data.ApiResponse
|
||||||
uploadFile petId_path additionalMetadata file =
|
uploadFile petId_path additionalMetadata file =
|
||||||
Api.request
|
Api.request
|
||||||
|
@ -27,7 +27,11 @@ import Http
|
|||||||
import Json.Decode
|
import Json.Decode
|
||||||
import Json.Encode
|
import Json.Encode
|
||||||
|
|
||||||
{-| For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
|
||||||
|
{-| Delete purchase order by ID
|
||||||
|
|
||||||
|
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
|
||||||
-}
|
-}
|
||||||
deleteOrder : String -> Api.Request ()
|
deleteOrder : String -> Api.Request ()
|
||||||
deleteOrder orderId_path =
|
deleteOrder orderId_path =
|
||||||
@ -41,7 +45,10 @@ deleteOrder orderId_path =
|
|||||||
(Json.Decode.succeed ())
|
(Json.Decode.succeed ())
|
||||||
|
|
||||||
|
|
||||||
{-| Returns a map of status codes to quantities
|
{-| Returns pet inventories by status
|
||||||
|
|
||||||
|
Returns a map of status codes to quantities
|
||||||
|
|
||||||
-}
|
-}
|
||||||
getInventory : Api.Request (Dict.Dict String Int)
|
getInventory : Api.Request (Dict.Dict String Int)
|
||||||
getInventory =
|
getInventory =
|
||||||
@ -55,7 +62,10 @@ getInventory =
|
|||||||
(Json.Decode.dict Json.Decode.int)
|
(Json.Decode.dict Json.Decode.int)
|
||||||
|
|
||||||
|
|
||||||
{-| For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
{-| Find purchase order by ID
|
||||||
|
|
||||||
|
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||||
|
|
||||||
-}
|
-}
|
||||||
getOrderById : Int -> Api.Request Api.Data.Order_
|
getOrderById : Int -> Api.Request Api.Data.Order_
|
||||||
getOrderById orderId_path =
|
getOrderById orderId_path =
|
||||||
@ -69,6 +79,8 @@ getOrderById orderId_path =
|
|||||||
Api.Data.orderDecoder
|
Api.Data.orderDecoder
|
||||||
|
|
||||||
|
|
||||||
|
{-| Place an order for a pet
|
||||||
|
-}
|
||||||
placeOrder : Api.Data.Order_ -> Api.Request Api.Data.Order_
|
placeOrder : Api.Data.Order_ -> Api.Request Api.Data.Order_
|
||||||
placeOrder order_body =
|
placeOrder order_body =
|
||||||
Api.request
|
Api.request
|
||||||
|
@ -31,7 +31,11 @@ import Http
|
|||||||
import Json.Decode
|
import Json.Decode
|
||||||
import Json.Encode
|
import Json.Encode
|
||||||
|
|
||||||
{-| This can only be done by the logged in user.
|
|
||||||
|
{-| Create user
|
||||||
|
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
-}
|
-}
|
||||||
createUser : Api.Data.User -> Api.Request ()
|
createUser : Api.Data.User -> Api.Request ()
|
||||||
createUser user_body =
|
createUser user_body =
|
||||||
@ -45,6 +49,8 @@ createUser user_body =
|
|||||||
(Json.Decode.succeed ())
|
(Json.Decode.succeed ())
|
||||||
|
|
||||||
|
|
||||||
|
{-| Creates list of users with given input array
|
||||||
|
-}
|
||||||
createUsersWithArrayInput : List Api.Data.User -> Api.Request ()
|
createUsersWithArrayInput : List Api.Data.User -> Api.Request ()
|
||||||
createUsersWithArrayInput user_body =
|
createUsersWithArrayInput user_body =
|
||||||
Api.request
|
Api.request
|
||||||
@ -57,6 +63,8 @@ createUsersWithArrayInput user_body =
|
|||||||
(Json.Decode.succeed ())
|
(Json.Decode.succeed ())
|
||||||
|
|
||||||
|
|
||||||
|
{-| Creates list of users with given input array
|
||||||
|
-}
|
||||||
createUsersWithListInput : List Api.Data.User -> Api.Request ()
|
createUsersWithListInput : List Api.Data.User -> Api.Request ()
|
||||||
createUsersWithListInput user_body =
|
createUsersWithListInput user_body =
|
||||||
Api.request
|
Api.request
|
||||||
@ -69,7 +77,10 @@ createUsersWithListInput user_body =
|
|||||||
(Json.Decode.succeed ())
|
(Json.Decode.succeed ())
|
||||||
|
|
||||||
|
|
||||||
{-| This can only be done by the logged in user.
|
{-| Delete user
|
||||||
|
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
-}
|
-}
|
||||||
deleteUser : String -> Api.Request ()
|
deleteUser : String -> Api.Request ()
|
||||||
deleteUser username_path =
|
deleteUser username_path =
|
||||||
@ -83,6 +94,8 @@ deleteUser username_path =
|
|||||||
(Json.Decode.succeed ())
|
(Json.Decode.succeed ())
|
||||||
|
|
||||||
|
|
||||||
|
{-| Get user by user name
|
||||||
|
-}
|
||||||
getUserByName : String -> Api.Request Api.Data.User
|
getUserByName : String -> Api.Request Api.Data.User
|
||||||
getUserByName username_path =
|
getUserByName username_path =
|
||||||
Api.request
|
Api.request
|
||||||
@ -95,6 +108,8 @@ getUserByName username_path =
|
|||||||
Api.Data.userDecoder
|
Api.Data.userDecoder
|
||||||
|
|
||||||
|
|
||||||
|
{-| Logs user into the system
|
||||||
|
-}
|
||||||
loginUser : String -> String -> Api.Request String
|
loginUser : String -> String -> Api.Request String
|
||||||
loginUser username_query password_query =
|
loginUser username_query password_query =
|
||||||
Api.request
|
Api.request
|
||||||
@ -107,6 +122,8 @@ loginUser username_query password_query =
|
|||||||
Json.Decode.string
|
Json.Decode.string
|
||||||
|
|
||||||
|
|
||||||
|
{-| Logs out current logged in user session
|
||||||
|
-}
|
||||||
logoutUser : Api.Request ()
|
logoutUser : Api.Request ()
|
||||||
logoutUser =
|
logoutUser =
|
||||||
Api.request
|
Api.request
|
||||||
@ -119,7 +136,10 @@ logoutUser =
|
|||||||
(Json.Decode.succeed ())
|
(Json.Decode.succeed ())
|
||||||
|
|
||||||
|
|
||||||
{-| This can only be done by the logged in user.
|
{-| Updated user
|
||||||
|
|
||||||
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
-}
|
-}
|
||||||
updateUser : String -> Api.Data.User -> Api.Request ()
|
updateUser : String -> Api.Data.User -> Api.Request ()
|
||||||
updateUser username_path user_body =
|
updateUser username_path user_body =
|
||||||
|
@ -54,7 +54,6 @@ stringFromHeaderType model =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type Enumeration
|
type Enumeration
|
||||||
= EnumerationA
|
= EnumerationA
|
||||||
| EnumerationB
|
| EnumerationB
|
||||||
@ -83,7 +82,6 @@ stringFromEnumeration model =
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type Enum
|
type Enum
|
||||||
= EnumA
|
= EnumA
|
||||||
| EnumB
|
| EnumB
|
||||||
@ -160,6 +158,8 @@ queryGet string_query int_query enum_query =
|
|||||||
(Json.Decode.succeed ())
|
(Json.Decode.succeed ())
|
||||||
|
|
||||||
|
|
||||||
|
{-| Secured endpoint
|
||||||
|
-}
|
||||||
securedPost : String -> Api.Request ()
|
securedPost : String -> Api.Request ()
|
||||||
securedPost auth_token =
|
securedPost auth_token =
|
||||||
Api.request
|
Api.request
|
||||||
|
@ -24,6 +24,7 @@ import Http
|
|||||||
import Json.Decode
|
import Json.Decode
|
||||||
import Json.Encode
|
import Json.Encode
|
||||||
|
|
||||||
|
|
||||||
update : Api.Data.Primitive -> Api.Request Api.Data.Primitive
|
update : Api.Data.Primitive -> Api.Request Api.Data.Primitive
|
||||||
update primitive_body =
|
update primitive_body =
|
||||||
Api.request
|
Api.request
|
||||||
|
Loading…
x
Reference in New Issue
Block a user