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
wing328
157fcbc4aa
fix invalid spec, update petstore samples (jaxrs, ruby)
2017-01-19 16:54:16 +08:00
wing328
31d31b9466
[Ruby] use hasConsumes, hasProduces in ruby client ( #4310 )
...
* use hasConsumes, hasProduces in ruby client
* add new ruby files
2016-12-02 17:22:46 +08:00
wing328
1fde95f997
fix java okhttp (array of enum property)
2016-08-03 01:36:34 +08:00
wing328
9489f7d3eb
clear import mapping for gnereators that do not use it
2016-07-26 14:40:29 +08:00
wing328
7c8333e2f8
update ruby samples
2016-07-14 16:19:05 +08:00
wing328
f04df9a163
fix #3215 and enum array issue in parameter check
2016-06-26 19:17:25 +08:00
wing328
aeaf60713f
Merge branch 'feature/ruby_enum_support2' of https://github.com/zlx/swagger-codegen into zlx-feature/ruby_enum_support2
...
Conflicts:
samples/client/petstore/ruby/README.md
samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb
samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb
2016-05-26 17:20:49 +08:00
wing328
105b4b9199
new test case to cover model with array properties
2016-05-25 01:18:50 +08:00
wing328
c7110debee
update ruby api client to use apache v2 license
2016-05-24 17:50:28 +08:00
Newell Zhu
24a0ced972
regenerate ruby spec file
2016-05-23 21:30:40 +08:00
Newell Zhu
a9b8150442
regenerate ruby client sample
2016-05-23 20:54:45 +08:00
wing328
31daa2b092
update ruby test files
2016-05-10 14:56:14 +08:00
wing328
d54877b5d3
add ruby spec for configuration, api client, replace should with expect
2016-05-10 14:18:06 +08:00
wing328
d6158c4c55
fix uuid for java, php, ruby and csharp
2016-05-02 22:06:33 +08:00
wing328
e143c6cd2f
add validation to ruby model
2016-04-25 17:07:42 +08:00
wing328
5d4c68b98a
new ruby file
2016-04-14 16:24:06 +08:00
wing328
8f70230906
update ruby test case
2016-04-14 16:19:39 +08:00
wing328
68cb030609
add new files for format test model
2016-04-11 22:11:53 +08:00
wing328
eef07f4d84
add new files for perl, php, ruby
2016-03-30 22:38:53 +08:00
wing328
d78113be95
fix summary tab in ruby api
2016-03-19 11:16:02 +08:00
wing328
9e45a99e60
udpate ruby api doc
2016-03-19 11:09:49 +08:00
xhh
4100a8537b
Display parameter's default value for operations
...
Done for Java clients (default, jersey2, okhttp-gson), Ruby client and
JavaScript client.
2016-03-17 16:22:36 +08:00
wing328
47bb5689d9
better hanlding of model name starting with number
2016-03-17 11:49:06 +08:00
wing328
e10c28596c
update user-agent for Ruby
2016-03-15 11:41:47 +08:00
xhh
7505b167b7
Ruby docs: add require and print statements
2016-03-14 15:42:59 +08:00
wing328
a529d9dfe0
push new git_push and .gitinore file
2016-03-12 18:01:53 +08:00
wing328
637bdd2f50
add git_push and gitignore to most client generators
2016-03-12 17:35:25 +08:00
xhh
1df0923525
Ruby: improve handling of default values and examples for parameters in docs
2016-03-11 15:23:55 +08:00
xhh
96707e1fea
Remove obsolete test files
2016-03-09 19:53:19 +08:00
xhh
2c64b885bb
Ruby: add auto-generated documentation in Markdown
2016-03-09 17:18:15 +08:00
xhh
53d8a31bd3
Ruby client: update Petstore sample, fix model import
2016-03-04 15:41:27 +08:00
xhh
8e4f9fdc7c
Add test cases for empty "object" type to Ruby Petstore
...
And fix the deserialization of empty "object" property
2016-03-03 20:36:15 +08:00
wing328
5a53814346
add api info as file header to ruby templates
2016-01-31 17:08:47 +08:00
wing328
e4a991da0c
add auto-generated test case for ruby
2016-01-26 23:15:02 +08:00