update default value for elixir (#319)

This commit is contained in:
William Cheng 2018-05-05 01:37:48 +08:00 committed by GitHub
parent e2251084f2
commit 5f2bc28779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 179 additions and 179 deletions

View File

@ -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. # 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" 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 java $JAVA_OPTS -jar $executable $args

View File

@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead. # 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" 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 java $JAVA_OPTS -jar $executable $ags

View File

@ -39,10 +39,10 @@ import java.util.regex.Pattern;
public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig { public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String apiVersion = "1.0.0"; protected String apiVersion = "1.0.0";
protected String moduleName; 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; // 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"; String supportedElixirVersion = "1.4";
List<String> extraApplications = Arrays.asList(":logger"); 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. * 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 * @return a string value of the type or complex model for this property

View File

@ -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: \&quot; \\ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \&quot; \\
## Installation ## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed 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 ```elixir
def deps do def deps do
[{:swagger_petstore, "~> 0.1.0"}] [{:openapi_petstore, "~> 0.1.0"}]
end end
``` ```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) 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 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).

View File

@ -2,13 +2,13 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.AnotherFake do defmodule OpenapiPetstore.Api.AnotherFake do
@moduledoc """ @moduledoc """
API calls for all endpoints tagged `AnotherFake`. API calls for all endpoints tagged `AnotherFake`.
""" """
alias SwaggerPetstore.Connection alias OpenapiPetstore.Connection
import SwaggerPetstore.RequestBuilder import OpenapiPetstore.RequestBuilder
@doc """ @doc """
@ -17,15 +17,15 @@ defmodule SwaggerPetstore.Api.AnotherFake do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- client (Client): client model - client (Client): client model
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.Client{}} on success {:ok, %OpenapiPetstore.Model.Client{}} on success
{:error, info} on failure {: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 def test_special_tags(connection, client, _opts \\ []) do
%{} %{}
|> method(:patch) |> method(:patch)
@ -33,6 +33,6 @@ defmodule SwaggerPetstore.Api.AnotherFake do
|> add_param(:body, :"Client", client) |> add_param(:body, :"Client", client)
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode(%SwaggerPetstore.Model.Client{}) |> decode(%OpenapiPetstore.Model.Client{})
end end
end end

View File

@ -2,13 +2,13 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.Fake do defmodule OpenapiPetstore.Api.Fake do
@moduledoc """ @moduledoc """
API calls for all endpoints tagged `Fake`. API calls for all endpoints tagged `Fake`.
""" """
alias SwaggerPetstore.Connection alias OpenapiPetstore.Connection
import SwaggerPetstore.RequestBuilder import OpenapiPetstore.RequestBuilder
@doc """ @doc """
@ -16,12 +16,12 @@ defmodule SwaggerPetstore.Api.Fake do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
- :body (boolean()): Input boolean as post body - :body (boolean()): Input boolean as post body
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.Boolean{}} on success {:ok, %OpenapiPetstore.Model.Boolean{}} on success
{:error, info} on failure {:error, info} on failure
""" """
@spec fake_outer_boolean_serialize(Tesla.Env.client, keyword()) :: {:ok, Boolean.t} | {:error, Tesla.Env.t} @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 ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
- :outer_composite (OuterComposite): Input composite as post body - :outer_composite (OuterComposite): Input composite as post body
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.OuterComposite{}} on success {:ok, %OpenapiPetstore.Model.OuterComposite{}} on success
{:error, info} on failure {: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 def fake_outer_composite_serialize(connection, opts \\ []) do
optional_params = %{ optional_params = %{
:"OuterComposite" => :body :"OuterComposite" => :body
@ -62,7 +62,7 @@ defmodule SwaggerPetstore.Api.Fake do
|> add_optional_params(optional_params, opts) |> add_optional_params(optional_params, opts)
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode(%SwaggerPetstore.Model.OuterComposite{}) |> decode(%OpenapiPetstore.Model.OuterComposite{})
end end
@doc """ @doc """
@ -70,12 +70,12 @@ defmodule SwaggerPetstore.Api.Fake do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
- :body (float()): Input number as post body - :body (float()): Input number as post body
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.Float{}} on success {:ok, %OpenapiPetstore.Model.Float{}} on success
{:error, info} on failure {:error, info} on failure
""" """
@spec fake_outer_number_serialize(Tesla.Env.client, keyword()) :: {:ok, Float.t} | {:error, Tesla.Env.t} @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 ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
- :body (String.t): Input string as post body - :body (String.t): Input string as post body
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.String{}} on success {:ok, %OpenapiPetstore.Model.String{}} on success
{:error, info} on failure {:error, info} on failure
""" """
@spec fake_outer_string_serialize(Tesla.Env.client, keyword()) :: {:ok, String.t} | {:error, Tesla.Env.t} @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 ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- query (String.t): - query (String.t):
- user (User): - user (User):
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
@ -132,7 +132,7 @@ defmodule SwaggerPetstore.Api.Fake do
{:ok, %{}} on success {:ok, %{}} on success
{:error, info} on failure {: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 def test_body_with_query_params(connection, query, user, _opts \\ []) do
%{} %{}
|> method(:put) |> method(:put)
@ -150,15 +150,15 @@ defmodule SwaggerPetstore.Api.Fake do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- client (Client): client model - client (Client): client model
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.Client{}} on success {:ok, %OpenapiPetstore.Model.Client{}} on success
{:error, info} on failure {: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 def test_client_model(connection, client, _opts \\ []) do
%{} %{}
|> method(:patch) |> method(:patch)
@ -166,7 +166,7 @@ defmodule SwaggerPetstore.Api.Fake do
|> add_param(:body, :"Client", client) |> add_param(:body, :"Client", client)
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode(%SwaggerPetstore.Model.Client{}) |> decode(%OpenapiPetstore.Model.Client{})
end end
@doc """ @doc """
@ -175,7 +175,7 @@ defmodule SwaggerPetstore.Api.Fake do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- number (float()): None - number (float()): None
- double (float()): None - double (float()): None
- pattern_without_delimiter (String.t): None - pattern_without_delimiter (String.t): None
@ -229,7 +229,7 @@ defmodule SwaggerPetstore.Api.Fake do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
- :enum_header_string_array ([String.t]): Header parameter enum test (string array) - :enum_header_string_array ([String.t]): Header parameter enum test (string array)
- :enum_header_string (String.t): Header parameter enum test (string) - :enum_header_string (String.t): Header parameter enum test (string)
@ -270,7 +270,7 @@ defmodule SwaggerPetstore.Api.Fake do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- request_body (String.t): request body - request_body (String.t): request body
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -294,7 +294,7 @@ defmodule SwaggerPetstore.Api.Fake do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- param (String.t): field1 - param (String.t): field1
- param2 (String.t): field2 - param2 (String.t): field2
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters

View File

@ -2,13 +2,13 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.FakeClassnameTags123 do defmodule OpenapiPetstore.Api.FakeClassnameTags123 do
@moduledoc """ @moduledoc """
API calls for all endpoints tagged `FakeClassnameTags123`. API calls for all endpoints tagged `FakeClassnameTags123`.
""" """
alias SwaggerPetstore.Connection alias OpenapiPetstore.Connection
import SwaggerPetstore.RequestBuilder import OpenapiPetstore.RequestBuilder
@doc """ @doc """
@ -17,15 +17,15 @@ defmodule SwaggerPetstore.Api.FakeClassnameTags123 do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- client (Client): client model - client (Client): client model
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.Client{}} on success {:ok, %OpenapiPetstore.Model.Client{}} on success
{:error, info} on failure {: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 def test_classname(connection, client, _opts \\ []) do
%{} %{}
|> method(:patch) |> method(:patch)
@ -33,6 +33,6 @@ defmodule SwaggerPetstore.Api.FakeClassnameTags123 do
|> add_param(:body, :"Client", client) |> add_param(:body, :"Client", client)
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode(%SwaggerPetstore.Model.Client{}) |> decode(%OpenapiPetstore.Model.Client{})
end end
end end

View File

@ -2,13 +2,13 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.Pet do defmodule OpenapiPetstore.Api.Pet do
@moduledoc """ @moduledoc """
API calls for all endpoints tagged `Pet`. API calls for all endpoints tagged `Pet`.
""" """
alias SwaggerPetstore.Connection alias OpenapiPetstore.Connection
import SwaggerPetstore.RequestBuilder import OpenapiPetstore.RequestBuilder
@doc """ @doc """
@ -16,7 +16,7 @@ defmodule SwaggerPetstore.Api.Pet do
## Parameters ## 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 - pet (Pet): Pet object that needs to be added to the store
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -24,7 +24,7 @@ defmodule SwaggerPetstore.Api.Pet do
{:ok, %{}} on success {:ok, %{}} on success
{:error, info} on failure {: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 def add_pet(connection, pet, _opts \\ []) do
%{} %{}
|> method(:post) |> method(:post)
@ -40,7 +40,7 @@ defmodule SwaggerPetstore.Api.Pet do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- pet_id (integer()): Pet id to delete - pet_id (integer()): Pet id to delete
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
- :api_key (String.t): - :api_key (String.t):
@ -69,7 +69,7 @@ defmodule SwaggerPetstore.Api.Pet do
## Parameters ## 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 - status ([String.t]): Status values that need to be considered for filter
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -77,7 +77,7 @@ defmodule SwaggerPetstore.Api.Pet do
{:ok, [%Pet{}, ...]} on success {:ok, [%Pet{}, ...]} on success
{:error, info} on failure {: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 def find_pets_by_status(connection, status, _opts \\ []) do
%{} %{}
|> method(:get) |> method(:get)
@ -85,7 +85,7 @@ defmodule SwaggerPetstore.Api.Pet do
|> add_param(:query, :"status", status) |> add_param(:query, :"status", status)
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode([%SwaggerPetstore.Model.Pet{}]) |> decode([%OpenapiPetstore.Model.Pet{}])
end end
@doc """ @doc """
@ -94,7 +94,7 @@ defmodule SwaggerPetstore.Api.Pet do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- tags ([String.t]): Tags to filter by - tags ([String.t]): Tags to filter by
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -102,7 +102,7 @@ defmodule SwaggerPetstore.Api.Pet do
{:ok, [%Pet{}, ...]} on success {:ok, [%Pet{}, ...]} on success
{:error, info} on failure {: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 def find_pets_by_tags(connection, tags, _opts \\ []) do
%{} %{}
|> method(:get) |> method(:get)
@ -110,7 +110,7 @@ defmodule SwaggerPetstore.Api.Pet do
|> add_param(:query, :"tags", tags) |> add_param(:query, :"tags", tags)
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode([%SwaggerPetstore.Model.Pet{}]) |> decode([%OpenapiPetstore.Model.Pet{}])
end end
@doc """ @doc """
@ -119,22 +119,22 @@ defmodule SwaggerPetstore.Api.Pet do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- pet_id (integer()): ID of pet to return - pet_id (integer()): ID of pet to return
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.Pet{}} on success {:ok, %OpenapiPetstore.Model.Pet{}} on success
{:error, info} on failure {: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 def get_pet_by_id(connection, pet_id, _opts \\ []) do
%{} %{}
|> method(:get) |> method(:get)
|> url("/pet/#{pet_id}") |> url("/pet/#{pet_id}")
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode(%SwaggerPetstore.Model.Pet{}) |> decode(%OpenapiPetstore.Model.Pet{})
end end
@doc """ @doc """
@ -142,7 +142,7 @@ defmodule SwaggerPetstore.Api.Pet do
## Parameters ## 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 - pet (Pet): Pet object that needs to be added to the store
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -150,7 +150,7 @@ defmodule SwaggerPetstore.Api.Pet do
{:ok, %{}} on success {:ok, %{}} on success
{:error, info} on failure {: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 def update_pet(connection, pet, _opts \\ []) do
%{} %{}
|> method(:put) |> method(:put)
@ -166,7 +166,7 @@ defmodule SwaggerPetstore.Api.Pet do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- pet_id (integer()): ID of pet that needs to be updated - pet_id (integer()): ID of pet that needs to be updated
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
- :name (String.t): Updated name of the pet - :name (String.t): Updated name of the pet
@ -196,17 +196,17 @@ defmodule SwaggerPetstore.Api.Pet do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- pet_id (integer()): ID of pet to update - pet_id (integer()): ID of pet to update
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
- :additional_metadata (String.t): Additional data to pass to server - :additional_metadata (String.t): Additional data to pass to server
- :file (String.t): file to upload - :file (String.t): file to upload
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.ApiResponse{}} on success {:ok, %OpenapiPetstore.Model.ApiResponse{}} on success
{:error, info} on failure {: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 def upload_file(connection, pet_id, opts \\ []) do
optional_params = %{ optional_params = %{
:"additionalMetadata" => :form, :"additionalMetadata" => :form,
@ -218,6 +218,6 @@ defmodule SwaggerPetstore.Api.Pet do
|> add_optional_params(optional_params, opts) |> add_optional_params(optional_params, opts)
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode(%SwaggerPetstore.Model.ApiResponse{}) |> decode(%OpenapiPetstore.Model.ApiResponse{})
end end
end end

View File

@ -2,13 +2,13 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.Store do defmodule OpenapiPetstore.Api.Store do
@moduledoc """ @moduledoc """
API calls for all endpoints tagged `Store`. API calls for all endpoints tagged `Store`.
""" """
alias SwaggerPetstore.Connection alias OpenapiPetstore.Connection
import SwaggerPetstore.RequestBuilder import OpenapiPetstore.RequestBuilder
@doc """ @doc """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Api.Store do
## Parameters ## 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 - order_id (String.t): ID of the order that needs to be deleted
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -41,7 +41,7 @@ defmodule SwaggerPetstore.Api.Store do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -64,22 +64,22 @@ defmodule SwaggerPetstore.Api.Store do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- order_id (integer()): ID of pet that needs to be fetched - order_id (integer()): ID of pet that needs to be fetched
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.Order{}} on success {:ok, %OpenapiPetstore.Model.Order{}} on success
{:error, info} on failure {: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 def get_order_by_id(connection, order_id, _opts \\ []) do
%{} %{}
|> method(:get) |> method(:get)
|> url("/store/order/#{order_id}") |> url("/store/order/#{order_id}")
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode(%SwaggerPetstore.Model.Order{}) |> decode(%OpenapiPetstore.Model.Order{})
end end
@doc """ @doc """
@ -87,15 +87,15 @@ defmodule SwaggerPetstore.Api.Store do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- order (Order): order placed for purchasing the pet - order (Order): order placed for purchasing the pet
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.Order{}} on success {:ok, %OpenapiPetstore.Model.Order{}} on success
{:error, info} on failure {: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 def place_order(connection, order, _opts \\ []) do
%{} %{}
|> method(:post) |> method(:post)
@ -103,6 +103,6 @@ defmodule SwaggerPetstore.Api.Store do
|> add_param(:body, :"Order", order) |> add_param(:body, :"Order", order)
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode(%SwaggerPetstore.Model.Order{}) |> decode(%OpenapiPetstore.Model.Order{})
end end
end end

View File

@ -2,13 +2,13 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Api.User do defmodule OpenapiPetstore.Api.User do
@moduledoc """ @moduledoc """
API calls for all endpoints tagged `User`. API calls for all endpoints tagged `User`.
""" """
alias SwaggerPetstore.Connection alias OpenapiPetstore.Connection
import SwaggerPetstore.RequestBuilder import OpenapiPetstore.RequestBuilder
@doc """ @doc """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Api.User do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- user (User): Created user object - user (User): Created user object
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -25,7 +25,7 @@ defmodule SwaggerPetstore.Api.User do
{:ok, %{}} on success {:ok, %{}} on success
{:error, info} on failure {: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 def create_user(connection, user, _opts \\ []) do
%{} %{}
|> method(:post) |> method(:post)
@ -41,7 +41,7 @@ defmodule SwaggerPetstore.Api.User do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- user ([User]): List of user object - user ([User]): List of user object
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -49,7 +49,7 @@ defmodule SwaggerPetstore.Api.User do
{:ok, %{}} on success {:ok, %{}} on success
{:error, info} on failure {: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 def create_users_with_array_input(connection, user, _opts \\ []) do
%{} %{}
|> method(:post) |> method(:post)
@ -65,7 +65,7 @@ defmodule SwaggerPetstore.Api.User do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- user ([User]): List of user object - user ([User]): List of user object
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -73,7 +73,7 @@ defmodule SwaggerPetstore.Api.User do
{:ok, %{}} on success {:ok, %{}} on success
{:error, info} on failure {: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 def create_users_with_list_input(connection, user, _opts \\ []) do
%{} %{}
|> method(:post) |> method(:post)
@ -90,7 +90,7 @@ defmodule SwaggerPetstore.Api.User do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- username (String.t): The name that needs to be deleted - username (String.t): The name that needs to be deleted
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -113,22 +113,22 @@ defmodule SwaggerPetstore.Api.User do
## Parameters ## 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. - username (String.t): The name that needs to be fetched. Use user1 for testing.
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.User{}} on success {:ok, %OpenapiPetstore.Model.User{}} on success
{:error, info} on failure {: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 def get_user_by_name(connection, username, _opts \\ []) do
%{} %{}
|> method(:get) |> method(:get)
|> url("/user/#{username}") |> url("/user/#{username}")
|> Enum.into([]) |> Enum.into([])
|> (&Connection.request(connection, &1)).() |> (&Connection.request(connection, &1)).()
|> decode(%SwaggerPetstore.Model.User{}) |> decode(%OpenapiPetstore.Model.User{})
end end
@doc """ @doc """
@ -136,13 +136,13 @@ defmodule SwaggerPetstore.Api.User do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- username (String.t): The user name for login - username (String.t): The user name for login
- password (String.t): The password for login in clear text - password (String.t): The password for login in clear text
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
{:ok, %SwaggerPetstore.Model.String.t{}} on success {:ok, %OpenapiPetstore.Model.String.t{}} on success
{:error, info} on failure {:error, info} on failure
""" """
@spec login_user(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, String.t} | {:error, Tesla.Env.t} @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 ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
## Returns ## Returns
@ -185,7 +185,7 @@ defmodule SwaggerPetstore.Api.User do
## Parameters ## Parameters
- connection (SwaggerPetstore.Connection): Connection to server - connection (OpenapiPetstore.Connection): Connection to server
- username (String.t): name that need to be deleted - username (String.t): name that need to be deleted
- user (User): Updated user object - user (User): Updated user object
- opts (KeywordList): [optional] Optional parameters - opts (KeywordList): [optional] Optional parameters
@ -194,7 +194,7 @@ defmodule SwaggerPetstore.Api.User do
{:ok, %{}} on success {:ok, %{}} on success
{:error, info} on failure {: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 def update_user(connection, username, user, _opts \\ []) do
%{} %{}
|> method(:put) |> method(:put)

View File

@ -2,9 +2,9 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Connection do defmodule OpenapiPetstore.Connection do
@moduledoc """ @moduledoc """
Handle Tesla connections for SwaggerPetstore. Handle Tesla connections for OpenapiPetstore.
""" """
use Tesla use Tesla

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Deserializer do defmodule OpenapiPetstore.Deserializer do
@moduledoc """ @moduledoc """
Helper functions for deserializing responses into models Helper functions for deserializing responses into models
""" """

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.AdditionalPropertiesClass do defmodule OpenapiPetstore.Model.AdditionalPropertiesClass do
@moduledoc """ @moduledoc """
""" """
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.AdditionalPropertiesClass do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.AdditionalPropertiesClass do defimpl Poison.Decoder, for: OpenapiPetstore.Model.AdditionalPropertiesClass do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Animal do defmodule OpenapiPetstore.Model.Animal do
@moduledoc """ @moduledoc """
""" """
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.Animal do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Animal do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Animal do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.AnimalFarm do defmodule OpenapiPetstore.Model.AnimalFarm do
@moduledoc """ @moduledoc """
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.AnimalFarm do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.AnimalFarm do defimpl Poison.Decoder, for: OpenapiPetstore.Model.AnimalFarm do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ApiResponse do defmodule OpenapiPetstore.Model.ApiResponse do
@moduledoc """ @moduledoc """
""" """
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.ApiResponse do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ApiResponse do defimpl Poison.Decoder, for: OpenapiPetstore.Model.ApiResponse do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ArrayOfArrayOfNumberOnly do defmodule OpenapiPetstore.Model.ArrayOfArrayOfNumberOnly do
@moduledoc """ @moduledoc """
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.ArrayOfArrayOfNumberOnly do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ArrayOfArrayOfNumberOnly do defimpl Poison.Decoder, for: OpenapiPetstore.Model.ArrayOfArrayOfNumberOnly do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ArrayOfNumberOnly do defmodule OpenapiPetstore.Model.ArrayOfNumberOnly do
@moduledoc """ @moduledoc """
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.ArrayOfNumberOnly do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ArrayOfNumberOnly do defimpl Poison.Decoder, for: OpenapiPetstore.Model.ArrayOfNumberOnly do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ArrayTest do defmodule OpenapiPetstore.Model.ArrayTest do
@moduledoc """ @moduledoc """
""" """
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.ArrayTest do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ArrayTest do defimpl Poison.Decoder, for: OpenapiPetstore.Model.ArrayTest do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Capitalization do defmodule OpenapiPetstore.Model.Capitalization do
@moduledoc """ @moduledoc """
""" """
@ -27,7 +27,7 @@ defmodule SwaggerPetstore.Model.Capitalization do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Capitalization do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Capitalization do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Cat do defmodule OpenapiPetstore.Model.Cat do
@moduledoc """ @moduledoc """
""" """
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.Cat do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Cat do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Cat do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Category do defmodule OpenapiPetstore.Model.Category do
@moduledoc """ @moduledoc """
""" """
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.Category do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Category do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Category do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ClassModel do defmodule OpenapiPetstore.Model.ClassModel do
@moduledoc """ @moduledoc """
Model for testing model with \&quot;_class\&quot; property Model for testing model with \&quot;_class\&quot; property
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.ClassModel do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ClassModel do defimpl Poison.Decoder, for: OpenapiPetstore.Model.ClassModel do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Client do defmodule OpenapiPetstore.Model.Client do
@moduledoc """ @moduledoc """
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.Client do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Client do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Client do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Dog do defmodule OpenapiPetstore.Model.Dog do
@moduledoc """ @moduledoc """
""" """
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.Dog do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Dog do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Dog do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.EnumArrays do defmodule OpenapiPetstore.Model.EnumArrays do
@moduledoc """ @moduledoc """
""" """
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.EnumArrays do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.EnumArrays do defimpl Poison.Decoder, for: OpenapiPetstore.Model.EnumArrays do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.EnumClass do defmodule OpenapiPetstore.Model.EnumClass do
@moduledoc """ @moduledoc """
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.EnumClass do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.EnumClass do defimpl Poison.Decoder, for: OpenapiPetstore.Model.EnumClass do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.EnumTest do defmodule OpenapiPetstore.Model.EnumTest do
@moduledoc """ @moduledoc """
""" """
@ -25,11 +25,11 @@ defmodule SwaggerPetstore.Model.EnumTest do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.EnumTest do defimpl Poison.Decoder, for: OpenapiPetstore.Model.EnumTest do
import SwaggerPetstore.Deserializer import OpenapiPetstore.Deserializer
def decode(value, options) do def decode(value, options) do
value value
|> deserialize(:"outerEnum", :struct, SwaggerPetstore.Model.OuterEnum, options) |> deserialize(:"outerEnum", :struct, OpenapiPetstore.Model.OuterEnum, options)
end end
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.FormatTest do defmodule OpenapiPetstore.Model.FormatTest do
@moduledoc """ @moduledoc """
""" """
@ -41,8 +41,8 @@ defmodule SwaggerPetstore.Model.FormatTest do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.FormatTest do defimpl Poison.Decoder, for: OpenapiPetstore.Model.FormatTest do
import SwaggerPetstore.Deserializer import OpenapiPetstore.Deserializer
def decode(value, options) do def decode(value, options) do
value value
|> deserialize(:"date", :date, nil, options) |> deserialize(:"date", :date, nil, options)

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.HasOnlyReadOnly do defmodule OpenapiPetstore.Model.HasOnlyReadOnly do
@moduledoc """ @moduledoc """
""" """
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.HasOnlyReadOnly do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.HasOnlyReadOnly do defimpl Poison.Decoder, for: OpenapiPetstore.Model.HasOnlyReadOnly do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.MapTest do defmodule OpenapiPetstore.Model.MapTest do
@moduledoc """ @moduledoc """
""" """
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.MapTest do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.MapTest do defimpl Poison.Decoder, for: OpenapiPetstore.Model.MapTest do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do defmodule OpenapiPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do
@moduledoc """ @moduledoc """
""" """
@ -21,11 +21,11 @@ defmodule SwaggerPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do defimpl Poison.Decoder, for: OpenapiPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do
import SwaggerPetstore.Deserializer import OpenapiPetstore.Deserializer
def decode(value, options) do def decode(value, options) do
value value
|> deserialize(:"map", :map, SwaggerPetstore.Model.Animal, options) |> deserialize(:"map", :map, OpenapiPetstore.Model.Animal, options)
end end
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Model200Response do defmodule OpenapiPetstore.Model.Model200Response do
@moduledoc """ @moduledoc """
Model for testing model name starting with number Model for testing model name starting with number
""" """
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.Model200Response do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Model200Response do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Model200Response do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Name do defmodule OpenapiPetstore.Model.Name do
@moduledoc """ @moduledoc """
Model for testing model name same as property name Model for testing model name same as property name
""" """
@ -23,7 +23,7 @@ defmodule SwaggerPetstore.Model.Name do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Name do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Name do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.NumberOnly do defmodule OpenapiPetstore.Model.NumberOnly do
@moduledoc """ @moduledoc """
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.NumberOnly do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.NumberOnly do defimpl Poison.Decoder, for: OpenapiPetstore.Model.NumberOnly do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Order do defmodule OpenapiPetstore.Model.Order do
@moduledoc """ @moduledoc """
""" """
@ -27,7 +27,7 @@ defmodule SwaggerPetstore.Model.Order do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Order do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Order do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.OuterComposite do defmodule OpenapiPetstore.Model.OuterComposite do
@moduledoc """ @moduledoc """
""" """
@ -21,7 +21,7 @@ defmodule SwaggerPetstore.Model.OuterComposite do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.OuterComposite do defimpl Poison.Decoder, for: OpenapiPetstore.Model.OuterComposite do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.OuterEnum do defmodule OpenapiPetstore.Model.OuterEnum do
@moduledoc """ @moduledoc """
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.OuterEnum do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.OuterEnum do defimpl Poison.Decoder, for: OpenapiPetstore.Model.OuterEnum do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Pet do defmodule OpenapiPetstore.Model.Pet do
@moduledoc """ @moduledoc """
""" """
@ -27,12 +27,12 @@ defmodule SwaggerPetstore.Model.Pet do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Pet do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Pet do
import SwaggerPetstore.Deserializer import OpenapiPetstore.Deserializer
def decode(value, options) do def decode(value, options) do
value value
|> deserialize(:"category", :struct, SwaggerPetstore.Model.Category, options) |> deserialize(:"category", :struct, OpenapiPetstore.Model.Category, options)
|> deserialize(:"tags", :list, SwaggerPetstore.Model.Tag, options) |> deserialize(:"tags", :list, OpenapiPetstore.Model.Tag, options)
end end
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.ReadOnlyFirst do defmodule OpenapiPetstore.Model.ReadOnlyFirst do
@moduledoc """ @moduledoc """
""" """
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.ReadOnlyFirst do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.ReadOnlyFirst do defimpl Poison.Decoder, for: OpenapiPetstore.Model.ReadOnlyFirst do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Return do defmodule OpenapiPetstore.Model.Return do
@moduledoc """ @moduledoc """
Model for testing reserved words Model for testing reserved words
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.Return do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Return do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Return do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.SpecialModelName do defmodule OpenapiPetstore.Model.SpecialModelName do
@moduledoc """ @moduledoc """
""" """
@ -17,7 +17,7 @@ defmodule SwaggerPetstore.Model.SpecialModelName do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.SpecialModelName do defimpl Poison.Decoder, for: OpenapiPetstore.Model.SpecialModelName do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.Tag do defmodule OpenapiPetstore.Model.Tag do
@moduledoc """ @moduledoc """
""" """
@ -19,7 +19,7 @@ defmodule SwaggerPetstore.Model.Tag do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.Tag do defimpl Poison.Decoder, for: OpenapiPetstore.Model.Tag do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.Model.User do defmodule OpenapiPetstore.Model.User do
@moduledoc """ @moduledoc """
""" """
@ -31,7 +31,7 @@ defmodule SwaggerPetstore.Model.User do
} }
end end
defimpl Poison.Decoder, for: SwaggerPetstore.Model.User do defimpl Poison.Decoder, for: OpenapiPetstore.Model.User do
def decode(value, _options) do def decode(value, _options) do
value value
end end

View File

@ -2,7 +2,7 @@
# https://openapi-generator.tech # https://openapi-generator.tech
# Do not edit the class manually. # Do not edit the class manually.
defmodule SwaggerPetstore.RequestBuilder do defmodule OpenapiPetstore.RequestBuilder do
@moduledoc """ @moduledoc """
Helper functions for building Tesla requests Helper functions for building Tesla requests
""" """

View File

@ -1,8 +1,8 @@
defmodule SwaggerPetstore.Mixfile do defmodule OpenapiPetstore.Mixfile do
use Mix.Project use Mix.Project
def project do def project do
[app: :swagger_petstore, [app: :openapi_petstore,
version: "0.1.0", version: "0.1.0",
elixir: "~> 1.4", elixir: "~> 1.4",
build_embedded: Mix.env == :prod, build_embedded: Mix.env == :prod,