openapi-generator/samples/client/petstore/ruby/docs
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
..
200Response.md add new sample files 2016-05-02 22:41:50 +08:00
AdditionalPropertiesClass.md update ruby samples by running the bin/ruby-petstore.sh 2016-06-29 13:19:37 -07:00
Animal.md regenerate ruby sample after remove tailing 2016-05-17 20:13:38 +08:00
AnimalFarm.md fix double byte characters in description, upgrade to lang3 2016-05-06 16:36:45 +08:00
ApiResponse.md new ruby file 2016-04-14 16:24:06 +08:00
ArrayOfArrayOfNumberOnly.md fix #3215 and enum array issue in parameter check 2016-06-26 19:17:25 +08:00
ArrayOfNumberOnly.md fix #3215 and enum array issue in parameter check 2016-06-26 19:17:25 +08:00
ArrayTest.md update ruby samples by running the bin/ruby-petstore.sh 2016-06-29 13:19:37 -07:00
Capitalization.md fix invalid spec, update petstore samples (jaxrs, ruby) 2017-01-19 16:54:16 +08:00
Cat.md regenerate ruby sample after remove tailing 2016-05-17 20:13:38 +08:00
Category.md Some fixes to Ruby docs on links and File parameter 2016-03-09 19:36:28 +08:00
ClassModel.md [Ruby] use hasConsumes, hasProduces in ruby client (#4310) 2016-12-02 17:22:46 +08:00
Client.md update ruby samples 2016-07-14 16:19:05 +08:00
Dog.md regenerate ruby sample after remove tailing 2016-05-17 20:13:38 +08:00
EnumArrays.md Fix unknown parameter on api_client's update_params_for_auth method. 2016-08-09 19:11:26 +10:00
EnumClass.md fix double byte characters in description, upgrade to lang3 2016-05-06 16:36:45 +08:00
EnumTest.md [Ruby] use hasConsumes, hasProduces in ruby client (#4310) 2016-12-02 17:22:46 +08:00
FakeApi.md Add alias type definitions for Java 2017-04-17 12:58:31 -07:00
FormatTest.md fix uuid for java, php, ruby and csharp 2016-05-02 22:06:33 +08:00
HasOnlyReadOnly.md fix #3215 and enum array issue in parameter check 2016-06-26 19:17:25 +08:00
InlineResponse200.md udpate ruby api doc 2016-03-19 11:09:49 +08:00
List.md clear import mapping for gnereators that do not use it 2016-07-26 14:40:29 +08:00
MapTest.md add option to set ssl host setting in ruby client 2016-07-04 22:13:25 +08:00
MixedPropertiesAndAdditionalPropertiesClass.md update ruby samples by running the bin/ruby-petstore.sh 2016-06-29 13:19:37 -07:00
Model200Response.md fix #3215 and enum array issue in parameter check 2016-06-26 19:17:25 +08:00
ModelReturn.md Some fixes to Ruby docs on links and File parameter 2016-03-09 19:36:28 +08:00
Name.md regenerate ruby sample after remove tailing 2016-05-17 20:13:38 +08:00
NumberOnly.md fix #3215 and enum array issue in parameter check 2016-06-26 19:17:25 +08:00
Order.md update ruby test case 2016-04-14 16:19:39 +08:00
OuterBoolean.md Add alias type definitions for Java 2017-04-17 12:58:31 -07:00
OuterComposite.md Add alias type definitions for Java 2017-04-17 12:58:31 -07:00
OuterEnum.md [Ruby] use hasConsumes, hasProduces in ruby client (#4310) 2016-12-02 17:22:46 +08:00
OuterNumber.md Add alias type definitions for Java 2017-04-17 12:58:31 -07:00
OuterString.md Add alias type definitions for Java 2017-04-17 12:58:31 -07:00
Pet.md Some fixes to Ruby docs on links and File parameter 2016-03-09 19:36:28 +08:00
PetApi.md Updating samples after #5232. (#5243) 2017-03-30 01:28:53 +08:00
ReadOnlyFirst.md update ruby api client to use apache v2 license 2016-05-24 17:50:28 +08:00
SpecialModelName.md Some fixes to Ruby docs on links and File parameter 2016-03-09 19:36:28 +08:00
StoreApi.md Updating all samples (except feign) (#5281) 2017-04-02 17:01:15 +08:00
Tag.md Some fixes to Ruby docs on links and File parameter 2016-03-09 19:36:28 +08:00
User.md Some fixes to Ruby docs on links and File parameter 2016-03-09 19:36:28 +08:00
UserApi.md Updating samples after #5232. (#5243) 2017-03-30 01:28:53 +08:00