forked from loafle/openapi-generator-original
update default value for elixir (#319)
This commit is contained in:
parent
e2251084f2
commit
5f2bc28779
@ -32,6 +32,6 @@ rm -Rf "samples/client/petstore/elixir/lib/swagger_petstore/lib/"
|
||||
|
||||
# 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"
|
||||
args="generate -t modules/openapi-generator/src/main/resources/elixir -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l elixir -o samples/client/petstore/elixir/ $@"
|
||||
args="generate -t modules/openapi-generator/src/main/resources/elixir -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l elixir -o samples/client/petstore/elixir/ --additional-properties invokerPackage=OpenapiPetstore $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $args
|
||||
|
@ -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 -t modules/openapi-generator/src/main/resources/ze-ph -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l php-ze-ph -o samples/server/petstore/ze-ph"
|
||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/ze-ph -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -l php-ze-ph -o samples/server/petstore/ze-ph"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
@ -39,10 +39,10 @@ import java.util.regex.Pattern;
|
||||
public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
protected String apiVersion = "1.0.0";
|
||||
protected String moduleName;
|
||||
protected static final String defaultModuleName = "Swagger.Client";
|
||||
protected static final String defaultModuleName = "OpenAPI.Client";
|
||||
|
||||
// This is the name of elixir project name;
|
||||
protected static final String defaultPackageName = "swagger_client";
|
||||
protected static final String defaultPackageName = "openapi_client";
|
||||
|
||||
String supportedElixirVersion = "1.4";
|
||||
List<String> extraApplications = Arrays.asList(":logger");
|
||||
@ -480,7 +480,7 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional - swagger type conversion. This is used to map swagger types in a `Schema` into
|
||||
* Optional - OpenAPI type conversion. This is used to map OpenAPI types in a `Schema` into
|
||||
* either language specific types via `typeMapping` or into complex models if there is not a mapping.
|
||||
*
|
||||
* @return a string value of the type or complex model for this property
|
||||
|
@ -1,18 +1,18 @@
|
||||
# SwaggerPetstore
|
||||
# OpenapiPetstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
## Installation
|
||||
|
||||
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
|
||||
by adding `swagger_petstore` to your list of dependencies in `mix.exs`:
|
||||
by adding `openapi_petstore` to your list of dependencies in `mix.exs`:
|
||||
|
||||
```elixir
|
||||
def deps do
|
||||
[{:swagger_petstore, "~> 0.1.0"}]
|
||||
[{:openapi_petstore, "~> 0.1.0"}]
|
||||
end
|
||||
```
|
||||
|
||||
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
|
||||
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
|
||||
be found at [https://hexdocs.pm/swagger_petstore](https://hexdocs.pm/swagger_petstore).
|
||||
be found at [https://hexdocs.pm/openapi_petstore](https://hexdocs.pm/openapi_petstore).
|
||||
|
@ -2,13 +2,13 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Api.AnotherFake do
|
||||
defmodule OpenapiPetstore.Api.AnotherFake do
|
||||
@moduledoc """
|
||||
API calls for all endpoints tagged `AnotherFake`.
|
||||
"""
|
||||
|
||||
alias SwaggerPetstore.Connection
|
||||
import SwaggerPetstore.RequestBuilder
|
||||
alias OpenapiPetstore.Connection
|
||||
import OpenapiPetstore.RequestBuilder
|
||||
|
||||
|
||||
@doc """
|
||||
@ -17,15 +17,15 @@ defmodule SwaggerPetstore.Api.AnotherFake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- client (Client): client model
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.Client{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.Client{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec test_special_tags(Tesla.Env.client, SwaggerPetstore.Model.Client.t, keyword()) :: {:ok, SwaggerPetstore.Model.Client.t} | {:error, Tesla.Env.t}
|
||||
@spec test_special_tags(Tesla.Env.client, OpenapiPetstore.Model.Client.t, keyword()) :: {:ok, OpenapiPetstore.Model.Client.t} | {:error, Tesla.Env.t}
|
||||
def test_special_tags(connection, client, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:patch)
|
||||
@ -33,6 +33,6 @@ defmodule SwaggerPetstore.Api.AnotherFake do
|
||||
|> add_param(:body, :"Client", client)
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode(%SwaggerPetstore.Model.Client{})
|
||||
|> decode(%OpenapiPetstore.Model.Client{})
|
||||
end
|
||||
end
|
@ -2,13 +2,13 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Api.Fake do
|
||||
defmodule OpenapiPetstore.Api.Fake do
|
||||
@moduledoc """
|
||||
API calls for all endpoints tagged `Fake`.
|
||||
"""
|
||||
|
||||
alias SwaggerPetstore.Connection
|
||||
import SwaggerPetstore.RequestBuilder
|
||||
alias OpenapiPetstore.Connection
|
||||
import OpenapiPetstore.RequestBuilder
|
||||
|
||||
|
||||
@doc """
|
||||
@ -16,12 +16,12 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
- :body (boolean()): Input boolean as post body
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.Boolean{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.Boolean{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec fake_outer_boolean_serialize(Tesla.Env.client, keyword()) :: {:ok, Boolean.t} | {:error, Tesla.Env.t}
|
||||
@ -43,15 +43,15 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
- :outer_composite (OuterComposite): Input composite as post body
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.OuterComposite{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.OuterComposite{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec fake_outer_composite_serialize(Tesla.Env.client, keyword()) :: {:ok, SwaggerPetstore.Model.OuterComposite.t} | {:error, Tesla.Env.t}
|
||||
@spec fake_outer_composite_serialize(Tesla.Env.client, keyword()) :: {:ok, OpenapiPetstore.Model.OuterComposite.t} | {:error, Tesla.Env.t}
|
||||
def fake_outer_composite_serialize(connection, opts \\ []) do
|
||||
optional_params = %{
|
||||
:"OuterComposite" => :body
|
||||
@ -62,7 +62,7 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|> add_optional_params(optional_params, opts)
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode(%SwaggerPetstore.Model.OuterComposite{})
|
||||
|> decode(%OpenapiPetstore.Model.OuterComposite{})
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -70,12 +70,12 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
- :body (float()): Input number as post body
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.Float{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.Float{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec fake_outer_number_serialize(Tesla.Env.client, keyword()) :: {:ok, Float.t} | {:error, Tesla.Env.t}
|
||||
@ -97,12 +97,12 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
- :body (String.t): Input string as post body
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.String{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.String{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec fake_outer_string_serialize(Tesla.Env.client, keyword()) :: {:ok, String.t} | {:error, Tesla.Env.t}
|
||||
@ -123,7 +123,7 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- query (String.t):
|
||||
- user (User):
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
@ -132,7 +132,7 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
{:ok, %{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec test_body_with_query_params(Tesla.Env.client, String.t, SwaggerPetstore.Model.User.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
@spec test_body_with_query_params(Tesla.Env.client, String.t, OpenapiPetstore.Model.User.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
def test_body_with_query_params(connection, query, user, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:put)
|
||||
@ -150,15 +150,15 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- client (Client): client model
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.Client{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.Client{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec test_client_model(Tesla.Env.client, SwaggerPetstore.Model.Client.t, keyword()) :: {:ok, SwaggerPetstore.Model.Client.t} | {:error, Tesla.Env.t}
|
||||
@spec test_client_model(Tesla.Env.client, OpenapiPetstore.Model.Client.t, keyword()) :: {:ok, OpenapiPetstore.Model.Client.t} | {:error, Tesla.Env.t}
|
||||
def test_client_model(connection, client, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:patch)
|
||||
@ -166,7 +166,7 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|> add_param(:body, :"Client", client)
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode(%SwaggerPetstore.Model.Client{})
|
||||
|> decode(%OpenapiPetstore.Model.Client{})
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -175,7 +175,7 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- number (float()): None
|
||||
- double (float()): None
|
||||
- pattern_without_delimiter (String.t): None
|
||||
@ -229,7 +229,7 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
- :enum_header_string_array ([String.t]): Header parameter enum test (string array)
|
||||
- :enum_header_string (String.t): Header parameter enum test (string)
|
||||
@ -270,7 +270,7 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- request_body (String.t): request body
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -294,7 +294,7 @@ defmodule SwaggerPetstore.Api.Fake do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- param (String.t): field1
|
||||
- param2 (String.t): field2
|
||||
- opts (KeywordList): [optional] Optional parameters
|
@ -2,13 +2,13 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Api.FakeClassnameTags123 do
|
||||
defmodule OpenapiPetstore.Api.FakeClassnameTags123 do
|
||||
@moduledoc """
|
||||
API calls for all endpoints tagged `FakeClassnameTags123`.
|
||||
"""
|
||||
|
||||
alias SwaggerPetstore.Connection
|
||||
import SwaggerPetstore.RequestBuilder
|
||||
alias OpenapiPetstore.Connection
|
||||
import OpenapiPetstore.RequestBuilder
|
||||
|
||||
|
||||
@doc """
|
||||
@ -17,15 +17,15 @@ defmodule SwaggerPetstore.Api.FakeClassnameTags123 do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- client (Client): client model
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.Client{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.Client{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec test_classname(Tesla.Env.client, SwaggerPetstore.Model.Client.t, keyword()) :: {:ok, SwaggerPetstore.Model.Client.t} | {:error, Tesla.Env.t}
|
||||
@spec test_classname(Tesla.Env.client, OpenapiPetstore.Model.Client.t, keyword()) :: {:ok, OpenapiPetstore.Model.Client.t} | {:error, Tesla.Env.t}
|
||||
def test_classname(connection, client, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:patch)
|
||||
@ -33,6 +33,6 @@ defmodule SwaggerPetstore.Api.FakeClassnameTags123 do
|
||||
|> add_param(:body, :"Client", client)
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode(%SwaggerPetstore.Model.Client{})
|
||||
|> decode(%OpenapiPetstore.Model.Client{})
|
||||
end
|
||||
end
|
@ -2,13 +2,13 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Api.Pet do
|
||||
defmodule OpenapiPetstore.Api.Pet do
|
||||
@moduledoc """
|
||||
API calls for all endpoints tagged `Pet`.
|
||||
"""
|
||||
|
||||
alias SwaggerPetstore.Connection
|
||||
import SwaggerPetstore.RequestBuilder
|
||||
alias OpenapiPetstore.Connection
|
||||
import OpenapiPetstore.RequestBuilder
|
||||
|
||||
|
||||
@doc """
|
||||
@ -16,7 +16,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- pet (Pet): Pet object that needs to be added to the store
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -24,7 +24,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
{:ok, %{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec add_pet(Tesla.Env.client, SwaggerPetstore.Model.Pet.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
@spec add_pet(Tesla.Env.client, OpenapiPetstore.Model.Pet.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
def add_pet(connection, pet, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:post)
|
||||
@ -40,7 +40,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- pet_id (integer()): Pet id to delete
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
- :api_key (String.t):
|
||||
@ -69,7 +69,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- status ([String.t]): Status values that need to be considered for filter
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -77,7 +77,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
{:ok, [%Pet{}, ...]} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec find_pets_by_status(Tesla.Env.client, list(String.t), keyword()) :: {:ok, list(SwaggerPetstore.Model.Pet.t)} | {:error, Tesla.Env.t}
|
||||
@spec find_pets_by_status(Tesla.Env.client, list(String.t), keyword()) :: {:ok, list(OpenapiPetstore.Model.Pet.t)} | {:error, Tesla.Env.t}
|
||||
def find_pets_by_status(connection, status, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:get)
|
||||
@ -85,7 +85,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|> add_param(:query, :"status", status)
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode([%SwaggerPetstore.Model.Pet{}])
|
||||
|> decode([%OpenapiPetstore.Model.Pet{}])
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -94,7 +94,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- tags ([String.t]): Tags to filter by
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -102,7 +102,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
{:ok, [%Pet{}, ...]} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec find_pets_by_tags(Tesla.Env.client, list(String.t), keyword()) :: {:ok, list(SwaggerPetstore.Model.Pet.t)} | {:error, Tesla.Env.t}
|
||||
@spec find_pets_by_tags(Tesla.Env.client, list(String.t), keyword()) :: {:ok, list(OpenapiPetstore.Model.Pet.t)} | {:error, Tesla.Env.t}
|
||||
def find_pets_by_tags(connection, tags, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:get)
|
||||
@ -110,7 +110,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|> add_param(:query, :"tags", tags)
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode([%SwaggerPetstore.Model.Pet{}])
|
||||
|> decode([%OpenapiPetstore.Model.Pet{}])
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -119,22 +119,22 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- pet_id (integer()): ID of pet to return
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.Pet{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.Pet{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec get_pet_by_id(Tesla.Env.client, integer(), keyword()) :: {:ok, SwaggerPetstore.Model.Pet.t} | {:error, Tesla.Env.t}
|
||||
@spec get_pet_by_id(Tesla.Env.client, integer(), keyword()) :: {:ok, OpenapiPetstore.Model.Pet.t} | {:error, Tesla.Env.t}
|
||||
def get_pet_by_id(connection, pet_id, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:get)
|
||||
|> url("/pet/#{pet_id}")
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode(%SwaggerPetstore.Model.Pet{})
|
||||
|> decode(%OpenapiPetstore.Model.Pet{})
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -142,7 +142,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- pet (Pet): Pet object that needs to be added to the store
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -150,7 +150,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
{:ok, %{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec update_pet(Tesla.Env.client, SwaggerPetstore.Model.Pet.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
@spec update_pet(Tesla.Env.client, OpenapiPetstore.Model.Pet.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
def update_pet(connection, pet, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:put)
|
||||
@ -166,7 +166,7 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- pet_id (integer()): ID of pet that needs to be updated
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
- :name (String.t): Updated name of the pet
|
||||
@ -196,17 +196,17 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- pet_id (integer()): ID of pet to update
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
- :additional_metadata (String.t): Additional data to pass to server
|
||||
- :file (String.t): file to upload
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.ApiResponse{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.ApiResponse{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec upload_file(Tesla.Env.client, integer(), keyword()) :: {:ok, SwaggerPetstore.Model.ApiResponse.t} | {:error, Tesla.Env.t}
|
||||
@spec upload_file(Tesla.Env.client, integer(), keyword()) :: {:ok, OpenapiPetstore.Model.ApiResponse.t} | {:error, Tesla.Env.t}
|
||||
def upload_file(connection, pet_id, opts \\ []) do
|
||||
optional_params = %{
|
||||
:"additionalMetadata" => :form,
|
||||
@ -218,6 +218,6 @@ defmodule SwaggerPetstore.Api.Pet do
|
||||
|> add_optional_params(optional_params, opts)
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode(%SwaggerPetstore.Model.ApiResponse{})
|
||||
|> decode(%OpenapiPetstore.Model.ApiResponse{})
|
||||
end
|
||||
end
|
@ -2,13 +2,13 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Api.Store do
|
||||
defmodule OpenapiPetstore.Api.Store do
|
||||
@moduledoc """
|
||||
API calls for all endpoints tagged `Store`.
|
||||
"""
|
||||
|
||||
alias SwaggerPetstore.Connection
|
||||
import SwaggerPetstore.RequestBuilder
|
||||
alias OpenapiPetstore.Connection
|
||||
import OpenapiPetstore.RequestBuilder
|
||||
|
||||
|
||||
@doc """
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Api.Store do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- order_id (String.t): ID of the order that needs to be deleted
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -41,7 +41,7 @@ defmodule SwaggerPetstore.Api.Store do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
@ -64,22 +64,22 @@ defmodule SwaggerPetstore.Api.Store do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- order_id (integer()): ID of pet that needs to be fetched
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.Order{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.Order{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec get_order_by_id(Tesla.Env.client, integer(), keyword()) :: {:ok, SwaggerPetstore.Model.Order.t} | {:error, Tesla.Env.t}
|
||||
@spec get_order_by_id(Tesla.Env.client, integer(), keyword()) :: {:ok, OpenapiPetstore.Model.Order.t} | {:error, Tesla.Env.t}
|
||||
def get_order_by_id(connection, order_id, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:get)
|
||||
|> url("/store/order/#{order_id}")
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode(%SwaggerPetstore.Model.Order{})
|
||||
|> decode(%OpenapiPetstore.Model.Order{})
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -87,15 +87,15 @@ defmodule SwaggerPetstore.Api.Store do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- order (Order): order placed for purchasing the pet
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.Order{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.Order{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec place_order(Tesla.Env.client, SwaggerPetstore.Model.Order.t, keyword()) :: {:ok, SwaggerPetstore.Model.Order.t} | {:error, Tesla.Env.t}
|
||||
@spec place_order(Tesla.Env.client, OpenapiPetstore.Model.Order.t, keyword()) :: {:ok, OpenapiPetstore.Model.Order.t} | {:error, Tesla.Env.t}
|
||||
def place_order(connection, order, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:post)
|
||||
@ -103,6 +103,6 @@ defmodule SwaggerPetstore.Api.Store do
|
||||
|> add_param(:body, :"Order", order)
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode(%SwaggerPetstore.Model.Order{})
|
||||
|> decode(%OpenapiPetstore.Model.Order{})
|
||||
end
|
||||
end
|
@ -2,13 +2,13 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Api.User do
|
||||
defmodule OpenapiPetstore.Api.User do
|
||||
@moduledoc """
|
||||
API calls for all endpoints tagged `User`.
|
||||
"""
|
||||
|
||||
alias SwaggerPetstore.Connection
|
||||
import SwaggerPetstore.RequestBuilder
|
||||
alias OpenapiPetstore.Connection
|
||||
import OpenapiPetstore.RequestBuilder
|
||||
|
||||
|
||||
@doc """
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- user (User): Created user object
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -25,7 +25,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
{:ok, %{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec create_user(Tesla.Env.client, SwaggerPetstore.Model.User.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
@spec create_user(Tesla.Env.client, OpenapiPetstore.Model.User.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
def create_user(connection, user, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:post)
|
||||
@ -41,7 +41,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- user ([User]): List of user object
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -49,7 +49,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
{:ok, %{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec create_users_with_array_input(Tesla.Env.client, list(SwaggerPetstore.Model.User.t), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
@spec create_users_with_array_input(Tesla.Env.client, list(OpenapiPetstore.Model.User.t), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
def create_users_with_array_input(connection, user, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:post)
|
||||
@ -65,7 +65,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- user ([User]): List of user object
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -73,7 +73,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
{:ok, %{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec create_users_with_list_input(Tesla.Env.client, list(SwaggerPetstore.Model.User.t), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
@spec create_users_with_list_input(Tesla.Env.client, list(OpenapiPetstore.Model.User.t), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
def create_users_with_list_input(connection, user, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:post)
|
||||
@ -90,7 +90,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- username (String.t): The name that needs to be deleted
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
@ -113,22 +113,22 @@ defmodule SwaggerPetstore.Api.User do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- username (String.t): The name that needs to be fetched. Use user1 for testing.
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.User{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.User{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec get_user_by_name(Tesla.Env.client, String.t, keyword()) :: {:ok, SwaggerPetstore.Model.User.t} | {:error, Tesla.Env.t}
|
||||
@spec get_user_by_name(Tesla.Env.client, String.t, keyword()) :: {:ok, OpenapiPetstore.Model.User.t} | {:error, Tesla.Env.t}
|
||||
def get_user_by_name(connection, username, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:get)
|
||||
|> url("/user/#{username}")
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> decode(%SwaggerPetstore.Model.User{})
|
||||
|> decode(%OpenapiPetstore.Model.User{})
|
||||
end
|
||||
|
||||
@doc """
|
||||
@ -136,13 +136,13 @@ defmodule SwaggerPetstore.Api.User do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- username (String.t): The user name for login
|
||||
- password (String.t): The password for login in clear text
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
{:ok, %SwaggerPetstore.Model.String.t{}} on success
|
||||
{:ok, %OpenapiPetstore.Model.String.t{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec login_user(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, String.t} | {:error, Tesla.Env.t}
|
||||
@ -162,7 +162,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
@ -185,7 +185,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
|
||||
## Parameters
|
||||
|
||||
- connection (SwaggerPetstore.Connection): Connection to server
|
||||
- connection (OpenapiPetstore.Connection): Connection to server
|
||||
- username (String.t): name that need to be deleted
|
||||
- user (User): Updated user object
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
@ -194,7 +194,7 @@ defmodule SwaggerPetstore.Api.User do
|
||||
{:ok, %{}} on success
|
||||
{:error, info} on failure
|
||||
"""
|
||||
@spec update_user(Tesla.Env.client, String.t, SwaggerPetstore.Model.User.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
@spec update_user(Tesla.Env.client, String.t, OpenapiPetstore.Model.User.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
def update_user(connection, username, user, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:put)
|
@ -2,9 +2,9 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Connection do
|
||||
defmodule OpenapiPetstore.Connection do
|
||||
@moduledoc """
|
||||
Handle Tesla connections for SwaggerPetstore.
|
||||
Handle Tesla connections for OpenapiPetstore.
|
||||
"""
|
||||
|
||||
use Tesla
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Deserializer do
|
||||
defmodule OpenapiPetstore.Deserializer do
|
||||
@moduledoc """
|
||||
Helper functions for deserializing responses into models
|
||||
"""
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.AdditionalPropertiesClass do
|
||||
defmodule OpenapiPetstore.Model.AdditionalPropertiesClass do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.AdditionalPropertiesClass do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.AdditionalPropertiesClass do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.AdditionalPropertiesClass do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Animal do
|
||||
defmodule OpenapiPetstore.Model.Animal do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.Animal do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Animal do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Animal do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.AnimalFarm do
|
||||
defmodule OpenapiPetstore.Model.AnimalFarm do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.AnimalFarm do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.AnimalFarm do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.AnimalFarm do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.ApiResponse do
|
||||
defmodule OpenapiPetstore.Model.ApiResponse do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.ApiResponse do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ApiResponse do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.ApiResponse do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.ArrayOfArrayOfNumberOnly do
|
||||
defmodule OpenapiPetstore.Model.ArrayOfArrayOfNumberOnly do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.ArrayOfArrayOfNumberOnly do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ArrayOfArrayOfNumberOnly do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.ArrayOfArrayOfNumberOnly do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.ArrayOfNumberOnly do
|
||||
defmodule OpenapiPetstore.Model.ArrayOfNumberOnly do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.ArrayOfNumberOnly do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ArrayOfNumberOnly do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.ArrayOfNumberOnly do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.ArrayTest do
|
||||
defmodule OpenapiPetstore.Model.ArrayTest do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.ArrayTest do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ArrayTest do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.ArrayTest do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Capitalization do
|
||||
defmodule OpenapiPetstore.Model.Capitalization do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -27,7 +27,7 @@ defmodule SwaggerPetstore.Model.Capitalization do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Capitalization do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Capitalization do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Cat do
|
||||
defmodule OpenapiPetstore.Model.Cat do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.Cat do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Cat do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Cat do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Category do
|
||||
defmodule OpenapiPetstore.Model.Category do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.Category do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Category do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Category do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.ClassModel do
|
||||
defmodule OpenapiPetstore.Model.ClassModel do
|
||||
@moduledoc """
|
||||
Model for testing model with \"_class\" property
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.ClassModel do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ClassModel do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.ClassModel do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Client do
|
||||
defmodule OpenapiPetstore.Model.Client do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.Client do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Client do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Client do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Dog do
|
||||
defmodule OpenapiPetstore.Model.Dog do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.Dog do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Dog do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Dog do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.EnumArrays do
|
||||
defmodule OpenapiPetstore.Model.EnumArrays do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.EnumArrays do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.EnumArrays do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.EnumArrays do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.EnumClass do
|
||||
defmodule OpenapiPetstore.Model.EnumClass do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.EnumClass do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.EnumClass do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.EnumClass do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.EnumTest do
|
||||
defmodule OpenapiPetstore.Model.EnumTest do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -25,11 +25,11 @@ defmodule SwaggerPetstore.Model.EnumTest do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.EnumTest do
|
||||
import SwaggerPetstore.Deserializer
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.EnumTest do
|
||||
import OpenapiPetstore.Deserializer
|
||||
def decode(value, options) do
|
||||
value
|
||||
|> deserialize(:"outerEnum", :struct, SwaggerPetstore.Model.OuterEnum, options)
|
||||
|> deserialize(:"outerEnum", :struct, OpenapiPetstore.Model.OuterEnum, options)
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.FormatTest do
|
||||
defmodule OpenapiPetstore.Model.FormatTest do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -41,8 +41,8 @@ defmodule SwaggerPetstore.Model.FormatTest do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.FormatTest do
|
||||
import SwaggerPetstore.Deserializer
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.FormatTest do
|
||||
import OpenapiPetstore.Deserializer
|
||||
def decode(value, options) do
|
||||
value
|
||||
|> deserialize(:"date", :date, nil, options)
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.HasOnlyReadOnly do
|
||||
defmodule OpenapiPetstore.Model.HasOnlyReadOnly do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.HasOnlyReadOnly do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.HasOnlyReadOnly do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.HasOnlyReadOnly do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.MapTest do
|
||||
defmodule OpenapiPetstore.Model.MapTest do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.MapTest do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.MapTest do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.MapTest do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do
|
||||
defmodule OpenapiPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -21,11 +21,11 @@ defmodule SwaggerPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do
|
||||
import SwaggerPetstore.Deserializer
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do
|
||||
import OpenapiPetstore.Deserializer
|
||||
def decode(value, options) do
|
||||
value
|
||||
|> deserialize(:"map", :map, SwaggerPetstore.Model.Animal, options)
|
||||
|> deserialize(:"map", :map, OpenapiPetstore.Model.Animal, options)
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Model200Response do
|
||||
defmodule OpenapiPetstore.Model.Model200Response do
|
||||
@moduledoc """
|
||||
Model for testing model name starting with number
|
||||
"""
|
||||
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.Model200Response do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Model200Response do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Model200Response do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Name do
|
||||
defmodule OpenapiPetstore.Model.Name do
|
||||
@moduledoc """
|
||||
Model for testing model name same as property name
|
||||
"""
|
||||
@ -23,7 +23,7 @@ defmodule SwaggerPetstore.Model.Name do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Name do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Name do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.NumberOnly do
|
||||
defmodule OpenapiPetstore.Model.NumberOnly do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.NumberOnly do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.NumberOnly do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.NumberOnly do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Order do
|
||||
defmodule OpenapiPetstore.Model.Order do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -27,7 +27,7 @@ defmodule SwaggerPetstore.Model.Order do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Order do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Order do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.OuterComposite do
|
||||
defmodule OpenapiPetstore.Model.OuterComposite do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.OuterComposite do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.OuterComposite do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.OuterComposite do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.OuterEnum do
|
||||
defmodule OpenapiPetstore.Model.OuterEnum do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.OuterEnum do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.OuterEnum do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.OuterEnum do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Pet do
|
||||
defmodule OpenapiPetstore.Model.Pet do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -27,12 +27,12 @@ defmodule SwaggerPetstore.Model.Pet do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Pet do
|
||||
import SwaggerPetstore.Deserializer
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Pet do
|
||||
import OpenapiPetstore.Deserializer
|
||||
def decode(value, options) do
|
||||
value
|
||||
|> deserialize(:"category", :struct, SwaggerPetstore.Model.Category, options)
|
||||
|> deserialize(:"tags", :list, SwaggerPetstore.Model.Tag, options)
|
||||
|> deserialize(:"category", :struct, OpenapiPetstore.Model.Category, options)
|
||||
|> deserialize(:"tags", :list, OpenapiPetstore.Model.Tag, options)
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.ReadOnlyFirst do
|
||||
defmodule OpenapiPetstore.Model.ReadOnlyFirst do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.ReadOnlyFirst do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ReadOnlyFirst do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.ReadOnlyFirst do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Return do
|
||||
defmodule OpenapiPetstore.Model.Return do
|
||||
@moduledoc """
|
||||
Model for testing reserved words
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.Return do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Return do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Return do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.SpecialModelName do
|
||||
defmodule OpenapiPetstore.Model.SpecialModelName do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.SpecialModelName do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.SpecialModelName do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.SpecialModelName do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.Tag do
|
||||
defmodule OpenapiPetstore.Model.Tag do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.Tag do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Tag do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.Tag do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.Model.User do
|
||||
defmodule OpenapiPetstore.Model.User do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
@ -31,7 +31,7 @@ defmodule SwaggerPetstore.Model.User do
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: SwaggerPetstore.Model.User do
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.User do
|
||||
def decode(value, _options) do
|
||||
value
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule SwaggerPetstore.RequestBuilder do
|
||||
defmodule OpenapiPetstore.RequestBuilder do
|
||||
@moduledoc """
|
||||
Helper functions for building Tesla requests
|
||||
"""
|
@ -1,8 +1,8 @@
|
||||
defmodule SwaggerPetstore.Mixfile do
|
||||
defmodule OpenapiPetstore.Mixfile do
|
||||
use Mix.Project
|
||||
|
||||
def project do
|
||||
[app: :swagger_petstore,
|
||||
[app: :openapi_petstore,
|
||||
version: "0.1.0",
|
||||
elixir: "~> 1.4",
|
||||
build_embedded: Mix.env == :prod,
|
||||
|
Loading…
x
Reference in New Issue
Block a user