31 Commits

Author SHA1 Message Date
Jim Schubert
376e419d0b Support models with multi-level hierarchy (via roxspring) (#4503)
* Example of broken multi-level hierarchy

* Support for multiple levels of hierarchy in model objects

* Support for multiple levels of hierarchy in generators

* Regenerated samples

* Temporarily skip scalaz sample verification, which is having issue with Java version in CI container

* Re-enable scalaz in verify samples

Co-authored-by: Rob Oxspring <roxspring@imapmail.org>
2019-12-27 15:42:32 +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
Vincent Devos
8977d7b366 [JavaScript] fix index.js, ApiClient.js and test files generated to incorrect location (#2511)
remove outdated samples files
update test dependencies
2019-03-30 10:04:44 +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
William Cheng
6801741592
Add Bearer authentication support to JS client (#2020)
* add bearer authentication support to js client

* add bearer format to js client

* fix test case

* update php ze-ph samples
2019-01-31 15:27:24 +08:00
William Cheng
83d34bd8d7
Add multiple servers support to JS API client (#1974)
* add multiple servers support to JS ES6

* multiple server support in js es5

* using exports in es5

* fix index check

* add oas v3 js es6 client to travis
2019-01-29 11:19:21 +08:00
William Cheng
8f8d3547f6
Update JS client dependency (#1578)
* update js dep

* fix missing comma

* remove unused test files in JS

* remove StringBooleanMap.spec.js

* remove StringBooleanMap.spec.js
2018-11-30 18:47:32 +08:00
Akihito Nakano
21777f2759 [JavaScript] Update vulnerable dependencies (#784)
* Update vulnerable dependencies

* Update samples: javascript-es6

* Update samples: javascript-promise

* Update samples: javascript-promise-es6

* Update samples: javascript

* Update samples: petstore-security-test/javascript

* Rename operationId if it starts with a number

* Update samples

bin/javascript-petstore.sh
bin/javascript-es6-petstore.sh
bin/javascript-promise-petstore.sh
bin/javascript-promise-es6-petstore.sh
2018-08-10 21:50:33 +08:00
delenius
c607ea8b31 Add fixes for es6 generator (#180)
Various fixes for JS (ES6) generator
2018-06-17 01:59:23 +08:00
wing328
1dc3fb4f37 remove unused JS files 2017-10-08 17:16:48 +08:00
Halil İbrahim Şener
1f9f8c5a3e [JavaScript] Fix licenseNames (#6605)
* [JavaScript] Fix licenseName in package.mustache

* Fix invalid SPDX license expression in resources/2_0

* Update JavaScript samples
2017-10-08 17:15:21 +08:00
wing328
49dbb51957 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-26 23:39:04 +08:00
wing328
6eb987919f minor fix to js promise test cases 2017-06-26 21:48:44 +08:00
wing328
e1e5ac4d37 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-17 22:00:06 +08:00
Benjamin Douglas
07ba1eb6f8 Fixup generation of Javascript samples
The generation code was ignoring top-level aliases for any language config that
contained "java", which included "javascript", a completely different language.

Changed this to be those configs based on the JavaAbstractGenerator class.
2017-04-17 17:50:01 -07: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
acd10318f7 Merge remote-tracking branch 'origin' into sync_master_230 2017-02-10 23:31:36 +08:00
Michael Kourlas
7aebcfa7c7 [JavaScript] Fix for issue #4654: do not encode commas in CSV collection query parameters (#4725)
* Fix for issue #4654

* Update tests for fix for issue #4654
2017-02-06 23:53:13 +08:00
Albert Morlan
ccb3385081 Set embedded templates directory when generating Javascript code (#4585) 2017-01-19 18:07:58 +08:00
Jordan Yaker
5a2ec03549 fix(javascript): added check to see if the parsed response is really empty. 2016-11-19 15:06:36 -05:00
wing328
0a5cd19e97 update JS test cases 2016-08-12 10:30:33 +08:00
wing328
7a245e3189 [JavaScript] add enum tests cases for JS generator (java) (#3546)
* add enum tests cases for JS generator (java)

* fix typo quote
2016-08-08 18:52:24 +08:00
wing328
8e43f7c2f6 add new JS files 2016-06-29 22:09:27 +08:00
wing328
8085e11063 add license header to JS cient, update sample 2016-06-15 01:18:04 +08:00
xhh
5acef6d634 Update petstore sample for JS-promise client 2016-05-06 18:02:32 +08:00
wing328
8d9a09efb1 update JS test case 2016-04-30 21:36:25 +08:00
demonfiddler
3082702429 [JavaScript] Recommission integration tests for Issue#2258. 2016-03-18 18:49:17 +00: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
xhh
72b9e2dd81 Update petstore javascript-promise sample and tests 2016-02-25 10:43:45 +08:00
delenius
98fcaa2f15 Update tests for javascript-promise-petstore
This simply copies the new tests from javascript-petstore
into javascript-promise-petstore.
2016-02-18 08:35:07 -08:00
delenius
7301618671 Add petstore tests for usePromises version 2016-02-08 20:02:38 -08:00