openapi-generator/samples/client/petstore/elixir
Benjamin Douglas 9058099e5b Add alias type definitions for Java
When a spec defines a Model at the top level that is a non-aggretate type (such
as string, number or boolean), it essentially represents an alias for the simple
type. For example, the following spec snippet creates an alias of the boolean
type that for all intents and purposes acts just like a regular boolean.

    definitions:
      JustABoolean:
        type: boolean

This can be modeled in some languages through built-in mechanisms, such as
typedefs in C++. Java, however, just not have a clean way of representing this.

This change introduces an internal mechanism for representing aliases. It
maintains a map in DefaultCodegen that tracks these types of definitions, and
wherever it sees the "JustABoolean" type in the spec, it generates code that
uses the built-in "Boolean" instead.

This functionality currenlty only applies to Java, but could be extended to
other languages later.

The change adds a few examples of this to the fake endpoint spec for testing,
which means all of the samples change as well.
2017-04-17 12:58:31 -07:00
..
config [WIP] Add elixir client (#4675) 2017-01-30 17:40:55 +08:00
lib/swagger_petstore Add alias type definitions for Java 2017-04-17 12:58:31 -07:00
test [WIP] Add elixir client (#4675) 2017-01-30 17:40:55 +08:00
.swagger-codegen-ignore [WIP] Add elixir client (#4675) 2017-01-30 17:40:55 +08:00
mix.exs [WIP] Add elixir client (#4675) 2017-01-30 17:40:55 +08:00
README.md [WIP] Add elixir client (#4675) 2017-01-30 17:40:55 +08:00

SwaggerPetstore

TODO: Add description

Installation

If available in Hex, the package can be installed by adding swagger_petstore to your list of dependencies in mix.exs:

def deps do
  [{:swagger_petstore, "~> 0.1.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/swagger_petstore.