Commit Graph

56 Commits

Author SHA1 Message Date
William Cheng 8e11fd9fe4 Prepare 4.0.3-SNAPSHOT (#3185)
* update version to 4.0.3-SNAPSHOT

* update readme

* update gradle, maven plugin

* update release schedule

* update samples
2019-06-20 18:50:49 +08:00
Jérémie Bresson dc81574f2b Update version to 4.0.2-SNAPSHOT (#3047)
* Update version to 4.0.2-SNAPSHOT

* Update samples

* Change AppVeyor script (test of gradle sample)

* Fix release version bump script (gradle plugin, sample poms)

* Include sonatype snapshots in maven examples which reference 4.0.2-SNAPSHOT
2019-06-01 21:32:44 -04:00
William Cheng cbe39ba881 Set version to 4.0.1-SNAPSHOT (#2882) 2019-05-14 10:28:32 +02:00
William Cheng dc0c24b955 Minor wording change (#2875)
* better wording for version of openapi doc

* update petstore samples
2019-05-13 15:59:59 +08:00
Matthieu Berthomé ee43cc1520 handle composed schemas in InlineModelResolver (#2112)
* handle composed schemas in InlineModelResolver

* fix unit test -> TestUtils.parseSpec

* update samples

* fix samples

* update samples

* update samples

* add new files
2019-05-08 10:19:15 +08:00
Akira Tanimura 94c267ee42 [Ruby] Auto recreate directories in Ruby samples (#2476)
* purge lib, doc, spec directories before generate Ruby client sample

* update Ruby client samples
2019-03-23 18:35:47 +08:00
Justin Black b67318ef21 Adds spec additionalProperties + nullable examples (#2405)
* Adds v2 spec additionalproperties examples, adds v3 spec nulllable model example, updates samples

* Remaining samples updates

* Adds csharp generator update to handle models with multilevel parent types, which works for the AdditionalPropertiesObject model, samples updated
2019-03-20 15:31:28 +08:00
Akira Tanimura 33a8939bd5 [Ruby] Fix enum expansion in Ruby client (#2081) (#2104)
* use double-quote string for enum value (#2081)

* use enumVars in templates for Ruby client (#2081)

* delete unnecessary line in enum model of Ruby client (#2081)

* update samples of Ruby client (#2081)
2019-02-12 00:32:36 +08:00
Akira Tanimura 7dcffff20b [Ruby] Fix Ruby client to prevent Rubocop's rule violations (#2100) (#2102)
* [Ruby] Delete empty lines and trailing newline in template to prevent Rubocop's rule violation (#2100)

* [Ruby] update samples of Ruby client (#2100)
2019-02-10 09:29:34 +09:00
Justin Black 9ec594eec5 [Spec] adds XmlItem model and route for xml testing (#1883)
* Adds xmlitem model and route, rest-assured Api suffix fix, updates pytest and pytest-cov versions

* Adds python client sample files

* Adds samples update

* Adds rest-assured sample client update

* Adds sample updates in ensure-up-to-date

* Changes rest-assured files back to master version, removes fix for issue #13

* Updates samples
2019-01-26 17:26:38 +08:00
Justin Black 539ec23298 [python-client] Add model default values (#1776)
* Adds two models to the v2.0 spec, uses examples as defaults in python client

* Adds array default and type_holder_default and type_holder_example tests

* Re-generated python security client with ./bin/security/python-petstore.sh

* Changes comment text, rebased master

* Updates client + server samples

* Adds missing samples updates

* Changes python client to look for true or false with booleans in toDefaultValue

* Changes boolean casting to use Boolean.valueOf

* Adds deserialization fix for python tests

* Changes Mock to namedtuple in python deserialization tests

* Actually remove unittest.mock
2019-01-09 11:18:35 +08:00
William Cheng 8c599ebf12 Add support for multiple inheritance (#1664)
* add all parent names

* clean up supportsInheritance

* fix npe

* fix allVars, fix test cases

* add more tests, remove comments

* update docker m2 cache dir, add more tests, fix mandatory

* update samples

* regenerate js spec files

* add logic to detect self reference

* add isSelfReference flag to codegen property

* add ruby tests for cat model

* remove debugging info

* fix JS allvars not have x-js-doctype

* update samples

* update js samples
2018-12-15 00:24:36 +08:00
William Cheng 46a4ffe64c Skip model generation if it's a top-level map or array (#1296)
* update samples

* remove string boolean map spec

* add logic to skip array alias being generated as model

* fix alias to array

* remove unused ruby files

* remove unused ruby (oas3) files

* unalias response schema

* fix NPE when no model defined

* fix ruby openapi3 script

* update samples

* add global openapi, schemas for unaliasing

* minor code cleanup/refactoring using globalSchemas

* Revert "minor code cleanup/refactoring using globalSchemas"

This reverts commit 20a2bbc6fc.
2018-11-26 22:01:53 +08:00
meganemura b9949e1a8e Generate a ruby-client sample for OpenAPI 2.0 (#1482)
* Move output directory for bin/openapi3/ruby-client-petstore.sh

$ git mv sample/client/petstore/ruby sample/openapi3/client/petstore/ruby-client

* $ bin/ruby-client-petstore.sh

* Run bin/ruby-client-petstore.sh in bin/utils/ensure-up-to-date
2018-11-19 17:02:19 +08:00
Guy Gershoni 0e2e1bf715 Added tests and fix for issue #1392. Fix regex generated in Ruby client. (#1393)
* Added tests and fix for issue #1392. Param validation with regex not recognizing \d correctly in Ruby client.

* Added generated files to pass ./bin/utils/ensure-up-to-date which is run by circleci
2018-11-07 12:08:23 +08:00
William Cheng 3d7a019524 update samples and reenable ensure-up-to-date (#1304) 2018-10-24 13:56:24 +08:00
John Wang 0bffdf2463 [Golang][client] fix for schema definition name file (#433)
* fix schema/definition name as 'file'

* update samples

* Trigger CI due to previous Shippable race condition

* add fix with toModelName(openAPIType)

* update tests for file schema/definition name

* Update 3.0 test spec

* update samples

* update samples for jaxrs-cxf

* Trigger CI due to previous Shippable race condition

* add back explode
2018-07-05 20:32:24 +08:00
William Cheng a897feef50 Fix alias to map in the model's properties (#360)
* add test case for ref to map (boolean) in fake petstore spec

* fix alias to map in model properties

* remove logging from new method

* update samples for the new map test case

* fix javadoc string

* skip testSanitizeNestedInvalidValue in php test

* skip test in php oas3 client

* add logic to handle outer enum

* update samples

* fix alias in model's allOf

* generate models for map def

* update petstore samples

* update petstore samples
2018-06-21 22:59:02 +08:00
William Cheng e2d4f5b5ca update ruby with oas2 before ci test (#231) 2018-04-26 13:15:04 +08:00
Jeremie Bresson 53597764c3 Add OpenAPI spec 3.0 support (beta)
Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com>
Co-authored-by: Jeremie Bresson <dev@jmini.fr>
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
Co-authored-by: Martin Delille <martin@phonations.com>
Co-authored-by: Tomasz Prus <tomasz.prus@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2018-04-17 09:19:10 +02:00
Zack Lemmon f3da691a72 Fix typo in Ruby examples/mustache files (#5773) 2017-06-05 11:19:29 +08:00
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