Commit Graph

5251 Commits

Author SHA1 Message Date
wing328
c988afa766 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-19 11:23:58 +08:00
wing328
3a32857790 PR to roll back #5569 (#5868) 2017-06-19 11:19:21 +08:00
wing328
84334146f9 better code format for cpprest 2017-06-19 09:59:19 +08:00
wing328
3808d67953 move javascript-es6 templates under subfolder in Javascript 2017-06-19 01:28:39 +08:00
Kevin Murphy
6fef7acf9f [javascript] Fix usages of exports in generated ES6 code (#5835) 2017-06-19 00:28:12 +08:00
Kevin Murphy
aa37b9747f [javascript] Use arrow function with usePromises in ES6 ApiClient.js for superagent callback to preserve this context (#5814) 2017-06-19 00:27:52 +08:00
Ahmet Taha Sakar
3ced146a65 Swift3 configuration (#5725)
* added headers to makeRequest function for swift3 template

* Added configuration file to Swift3 template

* added comments about the value read only once

* added comments about the value read only once

* comments fix

* Added Configuration.swift to Project File

* swift 3 promisekit, rxswift updates
2017-06-17 00:25:03 +08:00
wing328
f27143fc08 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-06-16 23:15:45 +08:00
wing328
0bb610494e Merge branch 'user/shawkins/fix/dont_modify_parameter_names' of https://github.com/shawkinsl/swagger-codegen into shawkinsl-user/shawkins/fix/dont_modify_parameter_names 2017-06-16 23:12:17 +08:00
Paŭlo Ebermann
ec448a6167 [CLI] #5147: make -D work like system properties (#5191)
* Issue #5147: allow empty values for properties.

* Issue #5147: Allow multiple `-D` options.

* Issue #5147: take advantage (and demonstrate) the new usage of -D.

* Issue #5147: also update windows script and security ones.
2017-06-16 17:29:44 +08:00
SiMing Weng
32a6f19933 [Java][RestTemplate] fix compilation issue with API client (resttemplate) (#5832)
* adapt the resttemplate target for the threeten Time API

* add threeten dependencies to build.gradle

* fix missing dollar sign

* fix missing dollar sign
2017-06-16 00:58:11 +08:00
wing328
fee54157c0 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-15 17:14:39 +08:00
wing328
29a0159add change PythonClientCodegen.java file format to unix 2017-06-15 17:10:43 +08:00
miguelvaladez
85850b2846 Feature/es6 angular (#5495)
* module code added for es6-angular client code generation

* typescript wiped out the core gitignore file

* added USE_ES6 cli option to javascript-closure-angular, will use the javascript-es6-angular templates instead

* fixed issue with module file

* added annotations to the templates

* moved default output folder declaration

* moved es6 template folder under closure-angular
2017-06-15 16:44:34 +08:00
Lorenzo Nicora
01100d56f0 [spring] improve build-time code generation, for CI and maven integration (#5545)
* Do not generate pom.xml and README.md when interfaceOnly=true #5542

* New swaggerDocketConfig option, to generate Spring configuration class for Swagger Docket bean. Ignored when interfaceOnly=false or library=spring-cloud #5542

* Updated tests running ./bin/spring-all-petstore.sh

* Run ./bin/spring-all-petstore.sh
2017-06-15 15:37:10 +08:00
Elizabeth Thomas
b752c0a030 Adding the generator version template to api mustache file (#5691) 2017-06-15 13:59:42 +08:00
Elizabeth Thomas
c4f7c4f3f9 Example Generator to populate model for all references of a given model (#5667)
* Example Generator to populate model for all references of a given model

* Fixing the space
2017-06-15 13:59:21 +08:00
wing328
5c10e24337 use file.separator instead of "/" (#5846) 2017-06-15 00:55:47 +08:00
Moscagus
f2276e5b35 Fix for issue #5777 - java/jersey2 ApiClient.invokeAPI doesn´t close the Response object (#5782)
* Update ApiClient.mustache

Fix for issue #5777

* Update ApiClient.mustache

* Create ApiClient.mustache

* Run java-petstore-jersey2.sh
2017-06-15 00:45:14 +08:00
Michael Kourlas
d20f83e643 [Java] Fix for issue #3638: Generated Java APIs incorrectly encode commas in certain query parameters (#4908)
* Fix for issue #3638

* Update tests for fix for issue #3638

* Fix bug when queryParams and collectionQueryParams are both specified

* Update tests

* Add certain tests back, address CI failures
2017-06-15 00:20:04 +08:00
wing328
77c14bca39 use file.separator, minor code format enhancement (#5844) 2017-06-15 00:10:32 +08:00
wing328
c74fc6e0ee Merge branch 'master' of https://github.com/JuH33/swagger-codegen into JuH33-master 2017-06-14 23:23:24 +08:00
JuH33
e0d7c7dbd5 Html2 speed Up | Raw html using java parser instead of JS parser 2017-06-14 17:06:53 +02:00
Sebastiano Miano
e66eceeaaa [C++] Server Stub Code Generator based on Pistache (#5838)
* Added C++ generator for Pistache

* Revert of CodegenOperation

* Updated template

* Removed isRestful from method declaration

* Updated httpMethod variable

* Changed isRestfulCreate
2017-06-14 22:40:00 +08:00
wing328
d6c717263c [Python] add project name to setup.py in python client (#5836)
* add project name to setup.py in python client

* update python README to use project name

* add cli option project name for python
2017-06-14 00:18:54 +08:00
Alex Chauvin
b61dfefa5b serverPort add from cli (#5821)
in order to change the serverPort from the codegen cli
2017-06-13 15:57:55 +08:00
Austin Green
1a421112ed [Typescript-Angular2] Removed models namespace from inheritance template (#5728) 2017-06-13 15:51:08 +08:00
wing328
2bc4710e36 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-12 20:57:26 +08:00
mmosemmle
62db9a09ee Fix issue 5793 (#5794)
* cast character to string.

* Check if variable name is reversed.

* Guard against reservedWordsMappings.
2017-06-11 22:06:19 +08:00
wing328
1da52bf8ba Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-11 21:43:34 +08:00
Cliffano Subagio
dc7c1f8cb9 [JS] Fix JavaScript string return type (#5819)
* [javascript] Fix response body when return type is String.

* [javascript] Regenerate javascript petstores with fixed String return type.

* [javascript-es6] Fix response body when return type is string.
2017-06-11 21:42:36 +08:00
wing328
8224688ca3 Merge branch '2.3.0' of https://github.com/swagger-api/swagger-codegen into 2.3.0 2017-06-11 21:40:46 +08:00
wing328
12bcb18e9e Merge branch 'java-spring-throw-exceptions-#5686' of https://github.com/stevecookform3/swagger-codegen into stevecookform3-java-spring-throw-exceptions 2017-06-11 17:30:53 +08:00
wing328
2d385d8bcb update retrofit2 dep (#5820) 2017-06-11 16:12:04 +08:00
manuc66
c5335081ea fix the mustache file (#5736) 2017-06-11 15:34:09 +08:00
wing328
b7fe612cc7 minor code format enhancement to swift3 client 2017-06-11 13:31:45 +08:00
Jason Gavris
ef8365ecd2 [Swift3] Fix handling of query item with array value (#5684) 2017-06-11 12:30:51 +08:00
wing328
7cddd17acc [Java] Add JSON-patch support to other Java API clients (#5808)
* add JSON-patch support to other Java API clients

* minor fix to java jersey1 json check
2017-06-09 21:46:40 +08:00
Brendan Burns
53bd931f5c Add JSON-patch as a JSON mime-type (#5764) 2017-06-09 16:47:38 +08:00
Björn Petersen
e9a0d7ea83 Add android dependency to pom if 'parcelableModel' is set (#5801) (#5802)
* Add android dependency to pom if 'parcelableModel' is set

* Update java-okhttp-gson-parcelableModel sample
2017-06-09 16:16:53 +08:00
Mads Hvelplund
8f7e2a1563 Allow overriding the service delegate (#5662)
* Added support for injecting service implementations via web.xml

* Updated samples
2017-06-09 16:09:27 +08:00
Jim Schubert
dabf01c3fa [kotlin] support collection format multi (#5792)
* [kotlin] support collectionFormat:multi

Adds "multi" support to collections.

Also changes generic lists (List<T>) to arrays. Generic lists and nested
lists can be problematic and require customized json factories. The
previous implement appeared to work because the results in the test were
LinkedHashMap with count greather than 0. The functional test has been
updated to force serialization and verify the results.

* [kotlin] Regenerate sample

* [kotlin] Update model test for Array changes
2017-06-09 15:40:18 +08:00
wing328
022eb0d379 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-09 15:24:53 +08:00
harishchoragudi
2d008be181 Fix for issue#5788 -CPPRest generated models are not using inheritance as specified in contract (#5791)
* fixed map to use value instead of mapentry while doing fromJson.

* cpprest models now use inheritance properly instead of always extending from ModelBase

* cpprest models now use inheritance properly instead of always extending from ModelBase

* removed a sysout used for debugging

* toJson() and fromJson() now leverages parent class's corresponding methods

* virtual is not needed as override essentially does the same thing.

* added docstring for getModelByName

* corrected the javadoc

* fixed @param issue in javadoc

* fixed @param uncapitalized P in param in javadoc
2017-06-09 01:41:20 +08:00
Romain d'Alverny
73f5266596 [Swift3] Set more liberal Swift3 decoder, behind lenientTypeCast option (#5795)
* [Swift3] Add lenientTypeCast option

When set to true, this generates a client JSON decoder
that will accept and cast mistyped values.

Here:
 - String => Bool ("true" instead of true),
 - String => Int ("123" instead of 123),
 - NSNumber => String (123 instead of "123").

The point is to allow the same client code to handle several
server implementations that may (sadly) not be up to spec,
or still be "evolving".

The conversion is not guaranteed if the input

Not a perfect/complete solution, not sure if it should be
activated along other casts, so kept behind an option.

* Update Petstore client code
2017-06-08 09:10:21 +08:00
Akihito Nakano
4612c12560 [PHP] Add support for async requests (#5771)
* Add xxxAsyncWithHttpInfo

* Add xxxAsync

* Tweak doc comment

* apply DRY principle to the creation process for request

* Fix undefined variable $statusCode

* error handling

* Fix undefined variable $url

* Tweak syntax

* Update samples

run './bin/php-petstore.sh'

* Update samples (security)

run './bin/security/php-petstore.sh'

* Fix doc comment

xxx(Async|AsyncWithHttpInfo) returns \GuzzleHttp\Promise\PromiseInterface

* Update samples (./bin/php-petstore.sh)

* Update samples (./bin/security/php-petstore.sh)

* Add AsyncTest
2017-06-07 20:35:28 +08:00
Ralph Langendam
ec19e8f407 Fixed minor compiler error and warning (#5762)
* 5762 Fixed minor compiler error and warning

* 5762 Regenerated cpprest petstore client
2017-06-07 18:37:45 +08:00
Julien - JuH
9f81aa4bfc StaticHtml2Gen | Speed up appDescription rendering (#5722) 2017-06-07 18:35:17 +08:00
Trent Albright
676e2a04f5 Fix issue with buffered sink handling in OkHttp (#5786)
* Fix issue with buffered sink handling in okhttp

Fixes unexpected end of stream exceptions when using the okhttp-gson library
and making asynchronous calls.

* update petstore samples for okhttp-gson

$ ./bin/java-petstore-okhttp-gson.sh
$ ./bin/security/java-petstore-okhttp-gson.sh

* WIP: trigger ci
2017-06-07 18:15:06 +08:00
Jean-François Côté
ccf2f2ff07 Add basic support for collection. (#5776) 2017-06-07 17:12:30 +08:00