Commit Graph

74 Commits

Author SHA1 Message Date
wing328
8085e11063 add license header to JS cient, update sample 2016-06-15 01:18:04 +08:00
wing328
9f3b8bab2b add travis.yml for JS api client 2016-06-15 00:03:11 +08:00
wing328
a566b086cf add new files for JS client 2016-05-29 20:54:43 +08:00
wing328
a27cda68ce update nodejs/ts package license to use Apache-2.0 2016-05-29 18:08:32 +08:00
xhh
020a9fcdc0 Fix enum model docs for JS and Java clients 2016-05-06 18:41:15 +08:00
xhh
3dbab1b893 JavaScript client: fix exporting of outer enum model 2016-05-06 17:45:03 +08:00
wing328
acb34e3db0 better JS enum class support 2016-05-03 11:21:17 +08:00
wing328
d35e30d578 better enum support for JS 2016-05-03 11:21:17 +08:00
wing328
d64af1b836 fix typescript tmeplate folder 2016-05-02 22:16:07 +08:00
wing328
ab7b73ca21 update js samples 2016-05-01 12:09:23 +08:00
wing328
2d5cc50bd1 Merge branch 'master' of https://github.com/demonfiddler/swagger-codegen into demonfiddler-master
Conflicts:
	samples/client/petstore/javascript-promise/README.md
	samples/client/petstore/javascript-promise/docs/PetApi.md
	samples/client/petstore/javascript-promise/docs/StoreApi.md
	samples/client/petstore/javascript-promise/src/api/PetApi.js
	samples/client/petstore/javascript-promise/src/index.js
	samples/client/petstore/javascript/README.md
	samples/client/petstore/javascript/docs/PetApi.md
	samples/client/petstore/javascript/docs/StoreApi.md
	samples/client/petstore/javascript/src/api/PetApi.js
	samples/client/petstore/javascript/src/index.js
2016-05-01 12:05:49 +08:00
wing328
8d9a09efb1 update JS test case 2016-04-30 21:36:25 +08:00
wing328
7f09a86a1e update wording related to git 2016-04-30 20:23:35 +08:00
wing328
83567861e0 update JS readme to use gitUserId instead 2016-04-30 20:15:45 +08:00
Kevin Glinski
2beeabb33a fixing typeos 2016-04-14 08:22:56 -04:00
wing328
0e1f1606cd update js code gen to handle different type, format 2016-04-11 22:20:30 +08:00
demonfiddler
77638bc21d Merge https://github.com/swagger-api/swagger-codegen 2016-03-31 14:38:15 +01:00
wing328
f23031fc96 add new files for JS 2016-03-30 21:54:38 +08:00
wing328
2104ef3192 doc for new models 2016-03-30 21:09:34 +08:00
wing328
20f1e97df3 fix typo in readme 2016-03-30 20:58:18 +08:00
demonfiddler
14ceb4bf84 Fix, tests for Issue#2240 "Support invokerPackage configuration option" 2016-03-25 16:36:06 +00:00
wing328
eb5c689fac update js sample 2016-03-24 19:54:25 +08:00
wing328
04e56a165e update js doc 2016-03-19 11:11:18 +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
5665c03d19 Fix test 2016-03-17 12:11:19 +08:00
xhh
90bd843be6 JavaScript: add auto-generated documentation in Markdown 2016-03-16 19:42:27 +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
dfe57bfd6b JS client: remove "undefined" from model dependency arguments
Closes #2279
2016-03-07 15:57:13 +08:00
xhh
8d964cff52 Handle arbitrary object in JS client
Closes #2165

Other changes:

* Update JS client of the Petstore sample
* Add test cases for getPetByIdInObject and getInventoryInObject
2016-03-04 18:40:03 +08:00
delenius
067d0a9318 Remove toJson method from JS client
Also regenerates the petstore samples.
2016-03-01 07:41:31 -08:00
Rastislav Kostrab
734681ad59 Javascript samples updated 2016-03-01 14:39:16 +01:00
xhh
432fb84a06 Handle reserved operationId/model name in JS client 2016-02-26 19:56:52 +08:00
xhh
baf5d2895e JS client: support optional parameters with object syntax
Closes #2027
2016-02-24 20:55:46 +08:00
delenius
079addb6db More fine-grained fix
Instead of just ignoring default values in the generated
model constructors, we modify the generator code in Java.
The template checks for null before outputting a default value.
2016-02-18 11:12:01 -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
xhh
bb70073ca3 JavaScript: fix call to buildCollectisnParam
Closes #2166
2016-02-18 10:31:21 +08:00
xhh
33d7d7b4b1 JavaScript: update Petstore sample and fix tests 2016-02-18 10:20:01 +08:00
xhh
7beb7373c2 Merge branch 'master' into javascript-auth
Conflicts:
	modules/swagger-codegen/src/main/resources/Javascript/ApiClient.mustache
	modules/swagger-codegen/src/main/resources/Javascript/api.mustache
2016-02-16 17:08:58 +08:00
delenius
59931ef0f7 Correct exporting of enum classes
Fixes #2102.
2016-02-15 07:46:14 -08:00
wing328
a159998293 Merge pull request #2115 from delenius/enums
Use objects for enums, not constructor functions
2016-02-15 10:29:34 +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
86154f87c3 Use objects for enums, not constructor functions
Fixes #2101.
2016-02-12 07:53:51 -08:00
delenius
c7766457bd Don't set missing optional params in models
Fixes #2103.

In the constructFromObject methods, we were always setting all the
parameters, including optional ones that were missing in the `data`
object. Because of the `convertToType` calls, this had the effect
of producing the *strings* `"undefined"` or `"null"` as property
values on the constructed object! This obviously leads to difficult
bugs.

This commit makes sure that we first check that the data field
exists in the data object. Note that both `null` and `undefined`
values will be skipped.
2016-02-10 17:18:31 -08:00
delenius
aab96ec772 Remove unused callback param when using promises 2016-02-08 23:39:05 -08:00
delenius
153faebc6d Modify JS PetStore tests for prototypes change
This is just the result of running ./bin/javascript-petstore.sh
after the fix for #2044.
2016-02-08 12:39:30 -08:00
xhh
d52ebdf684 JavaScript client: Add authentications support
Closes #1952
2016-02-06 16:26:15 +08:00
xhh
47f25efb25 JavaScript client: support collectionFormat for parameters
Closes #1953
2016-02-04 16:30:41 +08:00
xhh
2eb125681e JavaScript client: handle response deserialization
to support array of models and Date property in model

Closes #1951
2016-02-04 12:36:44 +08:00