Commit Graph

20 Commits

Author SHA1 Message Date
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