21 Commits

Author SHA1 Message Date
wing328
aa46aca7cf update JS petstore samples 2016-10-25 16:52:32 +08:00
wing328
5804fbc1dd remove unnecesary change in JS codegen 2016-08-31 16:52:46 +08: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
delenius
c888434580 Improve jsdoc for API return values (#3327)
* Add jsdoc for usePromises, add @link for callbacks

* Update petstore samples

* Improve jsdoc for void return type + usePromises

* Add back curly brackets correctly in model template

* Add link to Promise doc in jsdoc comment

* Fix jsdoc annotation for callApi method

The return type annotation was also broken here.
2016-07-20 20:14:51 +08:00
delenius
8a8e9432e1 Generate type annotations in JS model constructors
Fixes #3207
2016-06-29 13:53:33 -07:00
wing328
73f88f0bff update js promise petstore client 2016-06-29 21:44:13 +08:00
Ferris Tseng
c30c586f94 update petstore sample 2016-06-17 15:46:36 -04: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
ab7b73ca21 update js samples 2016-05-01 12:09:23 +08:00
wing328
7f09a86a1e update wording related to git 2016-04-30 20:23:35 +08:00
wing328
0e1f1606cd update js code gen to handle different type, format 2016-04-11 22:20:30 +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
dfe57bfd6b JS client: remove "undefined" from model dependency arguments
Closes #2279
2016-03-07 15:57:13 +08:00
delenius
067d0a9318 Remove toJson method from JS client
Also regenerates the petstore samples.
2016-03-01 07:41:31 -08:00
delenius
692c865c76 Handle empty response.body from superagent
Superagent does not always produce a `body`. See
http://visionmedia.github.io/superagent/ for details. When it
doesn't, we should deserialize the raw `response.text` rather
than returning `null`. Currently, the JS client always returns
`null` when the return type is String! This commit fixes
that.
2016-02-17 22:39:53 -08:00
delenius
fa2333717a Use static model factory methods
The `constructFromObject` factory methods should be class methods
(or "static" methods), not instance methods.

With this commit, ApiClient no longer calls the model constructors
directly. Instead, it calls the new static factory method to get the
new instance. If there is no data on the top level, null is returned.

It is still possible for users to call the model constructors
directly, of course.
2016-02-12 07:54:04 -08:00
delenius
aab96ec772 Remove unused callback param when using promises 2016-02-08 23:39:05 -08:00
delenius
7301618671 Add petstore tests for usePromises version 2016-02-08 20:02:38 -08:00