Commit Graph

3661 Commits

Author SHA1 Message Date
wing328
7aee5b6ee7 update java petstore sample, reenable test for resttemplate-withxml 2017-08-03 17:09:38 +08:00
mobreza
b433afebdd withXml replaces useJaxbAnnotations (#6152)
* Regenerated bin/jaxrs-*

* Replace `useJaxbAnnotations` with `withXml`
2017-08-03 15:35:33 +08:00
wing328
54d00084f7 update php, ruby petstore 2017-08-02 23:38:46 +08:00
wing328
8c487d5dbe update python ,swift petstore sample 2017-08-02 21:23:06 +08:00
Chandan Singh
1c4e77585f Issue 6172 (#6173)
* Changes to allow field names as examples for string properties and multiple items in array during example generation

* Reverting the version to 2.3.0-SNAPSHOT and autogenerated petstore files
2017-08-02 17:59:54 +08:00
wing328
92b129708d update spring samples 2017-08-02 16:43:54 +08:00
lopesmcc
66d48a0c71 [Java-VertX] Java Vertx client (#6204)
* #6165 - Java Vertx client

* #6165 - Java Vertx client (samples)

* #6165 - Java Vertx client (tests generation)

* #6165 - Java Vertx client (fixed test samples)
2017-07-31 20:04:11 +08:00
wing328
fab49e80a8 update Java jersey 1,2 to handle */* 2017-07-31 13:26:56 +08:00
Halil İbrahim Şener
a6f981350e [Java][Client] Add PATCH method support for jersey2 (#6197) 2017-07-31 13:08:30 +08:00
wing328
443b0f142b remove ref to SO (#6209) 2017-07-29 18:53:08 +08:00
Pavel Tavoda
d412bcfd6c Fix to #6141 - [BASH] Bug generating access_token when "in: query" (#6187)
* Fix to #6141 - [BASH] Bug generating access_token when "in: query"

* Fresh petstore scripts
2017-07-28 16:00:44 +08:00
wing328
a6f594bfd2 use jersey 2.6 for java6 (#6198) 2017-07-28 01:59:31 +08:00
wing328
82835db670 fix issue with api key (query) in c# (#6199) 2017-07-28 01:51:39 +08:00
Mykola Yashchenko
bb2a53ac9c added additional properties to manage Android version numbers more easily (#6160) 2017-07-27 19:27:59 +08:00
Vaughn Dice
40ae715392 [go] add http request host override for api client (#6174) 2017-07-27 15:53:33 +08:00
wing328
927055a681 [Java] MIME type "*/*" default to JSON (#6188)
* update java petstore

* minor fix to docstring

* roll back resttemplate with xml petstore due to errors

* minor fix to resttemplate isjson check
2017-07-27 11:36:29 +08:00
Duan Shiqiang
f9eaef8f24 Ts node angular2 typings (#6178)
* removed typings for typescript-node language and updated typescript version

* updated sample of typescript-node by running .\bin\windows\typescript-node.bat
2017-07-26 20:29:46 +08:00
wing328
e807b81471 Better control on setter, getter (for boolean, non-boolean) (#6177)
* better control on setter, boolean getter

* improve test casees for getter and setter
2017-07-26 19:57:50 +08:00
Andrea Rossi
66f2f70634 Add execute permissions to gradlew (#6168)
Some of the gradlew files don't have execution permission, so this adds it.
2017-07-26 15:30:09 +08:00
Halil İbrahim Şener
7696ca1658 [Java][Client] Add Deprecated annotation and update samples (#6166) 2017-07-26 01:07:30 +08:00
Eric O'Connell
2540db8adf More flexible subclassing of ApiClient possible by s/private/protected/g (#6159)
* More flexible subclassing of ApiClient possible by s/private/protected/g

I found myself in a situation where I needed to change the configured `Feature`s, but
because of all the private variables I was not able to do so. Perhaps this is a bit too
broad of a stroke, but I changed all fields and methods to `protected` instead of `private`.
In this way, future extensibility should be improved.

Also, to solve my particular problem, I added a new empty method called
`performAdditionalClientConfiguration` which will allow subclasses to add specific features,
or do anything else possible with a `ClientConfig`.

* Updated samples
2017-07-25 14:56:34 +08:00
wing328
64658f0bea update eiffel petstore 2017-07-25 00:03:15 +08:00
wing328
5497ce5b23 update python petstore samples 2017-07-24 00:32:26 +08:00
wing328
43d8fe5047 update java (jersey2) petstore samples 2017-07-23 23:38:15 +08:00
wing328
570f0a9bee Squashed commit of the following:
commit e3210cf8cc679c54f5c0d8d4fda2db6af1ee5bcf
Author: wing328 <wing328hk@gmail.com>
Date:   Sun Jul 23 17:41:44 2017 +0800

    comment out failed kotlin test

commit ed6bd1b92464f56885bc3cfa5d30936ce4a3d53d
Author: wing328 <wing328hk@gmail.com>
Date:   Sun Jul 23 17:17:20 2017 +0800

    test kotlin the last

commit a601445d04d0935f6a80a5052f1b4c6c3ee514d2
Author: wing328 <wing328hk@gmail.com>
Date:   Sun Jul 23 16:56:40 2017 +0800

    add test for kotlin client
2017-07-23 18:25:36 +08:00
wing328
188e998683 add petstore samples for typescript aurelia 2017-07-23 15:52:02 +08:00
wing328
b54bd0581a update ts fetch petstore samples 2017-07-23 02:24:18 +08:00
roberterdin
e710405778 [TypeScript Fetch] Optional URL query parameters not sent anymore (#6032)
* [TypeScript Fetch] Optional URL query parameters not sent anymore
This prevents empty URL parameters from being sent, e.g. http://some-api/endpoint?param=SOMETHING?v= will now be http://some-api/endpoint?param=SOMETHING.
Solution suggested by @TiFu. Fixes #6003.

* Fixed indentation

* fixed missing semicolon
2017-07-23 02:12:41 +08:00
wing328
6c922fdae1 Squashed commit of the following:
commit b33232e52b9642e9edf724429dc99afe39d9df07
Merge: e3a1e30 3e76185
Author: wing328 <wing328hk@gmail.com>
Date:   Sun Jul 23 01:38:09 2017 +0800

    Merge branch 'add-petstore-support-typescript-jquery' of https://github.com/StingrayDigital/swagger-codegen into StingrayDigital-add-petstore-support-typescript-jquery

commit 3e76185d906d8b53cc3e7a198546b9e111a0cca4
Author: Jean-François Côté <jcote@stingray.com>
Date:   Thu Jul 20 13:50:01 2017 -0400

    Add working npm generator.

commit 5c27df7c4822fed10ddb81b8a35f60ca40b60914
Author: Jean-François Côté <jcote@stingray.com>
Date:   Fri Jul 7 14:39:39 2017 -0400

    Fix suggested by @wing328 's review

commit 41da37b3576a82ad6056434d36e9d579ef495492
Author: Jean-François Côté <jcote@stingray.com>
Date:   Wed Jul 5 15:47:40 2017 -0400

    Add petstore integration and updated sample
2017-07-23 01:39:36 +08:00
wing328
e3a1e308c4 update smaples, skip ts angular test. 2017-07-22 17:27:10 +08:00
Vladimir Pouzanov
1f133e8ecd [New Generator] Rust API client generator (#6092)
* Added rust client example

* Added a proper apiclient / configuration based example
2017-07-21 21:58:31 +08:00
Alessandro
faa62ee40c Swift3 code enhancements (#6034)
* Improve generated code in APIs so to use the most of Swift SDK
Improve generated code in APIHelper so to remove duplicated code and reuse existing checks

* run ./bin/swift3-petstore.sh

* Run ./bin/swift3-petstore-all.sh to update all the Petstore samples

* Restore old implementation and fix using .isEmpty in place of .count

* Run scripts to update pet store samples

* Reverte changes that use reduce

* Bug fixes on APIHelper template
2017-07-21 21:43:21 +08:00
ehyche
2be2ee080b Fixes for swift4 language (#6116)
* Fix build error in Xcode 9 beta 3, as .compact is no longer defined

* Add test schema for Swift 4 and associated script and config files

* Add test app for swift4Test.json schema

* Make integer, Integer, int, and Int32 types map to Swift Int type instead of Int32 type

* Add CodingKeys to model template, which allows us to serialize/deserialize variable names that are different than property names

* Make updates to Swift 4 test schema

* Fixes for unit test app for swift4Test.json Swift 4 test schema
2017-07-20 15:45:09 +08:00
David Pasztor
1fd5e79180 run ./bin/swift3-petstore-all.sh 2017-07-19 15:27:14 +01:00
David Pasztor
fa555cf452 shell script ran under /bin/swift3-petstore.sh 2017-07-18 17:20:42 +01:00
Greg Huang
dafefc06f1 fix issue #6029 (#6033) 2017-07-18 14:16:35 +08:00
Alex Nolasco
93415af92d [Objc] Class not identified due to Circular imports (#6069)
* [Objc] Class not identified due to Circular imports

* Pet store generated sample
2017-07-17 17:14:05 +08:00
Réda Housni Alaoui
a2d19a1feb Bugfix: Generated typescript-angular code fails to compile when models.ts file is empty (#6076)
* Fixed

* Fixed
2017-07-17 16:37:37 +08:00
wing328
a04dfe0ccc update ts angular2 petstore samples 2017-07-17 16:15:28 +08:00
wing328
11d9cbd597 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-16 16:10:08 +08:00
wing328
34e94fbed0 Updated versions for 2.2.3 release and other minor enhancements (#6070)
* update pom to prepare 2.2.3 release

* add header support to qt5, update samples

* update version in java help

* update to xcode 9

* rollback to xcode8.2
2017-07-16 01:03:40 +08:00
wing328
d9ed238ccc update ts fetch samples 2017-07-15 03:04:40 +08:00
wing328
c1825b417c use html-escaped description for C# (client, server), Java server (#6061) 2017-07-14 23:36:24 +08:00
Lars Wander
9c56bb63d8 [Java] Escape descriptions in javadocs (#6040)
The [java8 doclint](http://openjdk.java.net/jeps/172) rejects unescaped
HTML chars such as `<`, making some generated clients unbuildable with
java8. Seems a few property descriptions were using the `{{{` instead
of `{{` preventing those HTML chars from being escaped properly.
2017-07-14 22:07:19 +08:00
wing328
fd87359a1b update c# petstore sample to remove pattern check for byte array 2017-07-14 16:17:00 +08:00
wing328
921e4a779e update c# petstore samples 2017-07-14 15:49:03 +08:00
wing328
bd1ab72776 update c# petstore samples 2017-07-14 13:17:56 +08:00
wing328
523e42160e Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-14 13:11:47 +08:00
wing328
ba704e3ac8 add @summary tag to ts client (#6052) 2017-07-14 13:10:36 +08:00
wing328
094dbd00ed Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-13 23:35:22 +08:00
Isman Usoh
fdaf8ea65f [Typescript-Angular2] add @summary JSDoc tag (#6028)
* add @summary JSDoc tag

* updatee sample and create windows script for typescript-angular2

* Fix for Review
2017-07-13 23:33:08 +08:00
Tino Fuhrmann
c0039ed570 [ts-node] Fixed html escape bug in serialize/deserialize (#6043) 2017-07-13 23:32:06 +08:00
wing328
2a5913c0dd Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-07-13 23:27:12 +08:00
wing328
d8bae71b8e update JS petstore samples 2017-07-13 23:26:49 +08:00
wing328
21d33c4054 skip pattern check for byte array in C# (#6048) 2017-07-13 23:25:23 +08:00
wing328
6b07af8d4e [TypeScript] rename Angular, Angular2 generators (#6046)
* rename ts angular, angular2, update scripts

* update angular4 script
2017-07-13 23:24:21 +08:00
Javier Velilla
9f711ae7e8 [Eiffel] Add Eiffel API client generator (#6036)
* Initial Eiffel Client code generator
TODO API and Domain model

* Updated EiffelClientCodegen to support Eiffel code style.
Added mustaches templates for models and apis.
The last one still under development.

* Updated templates, initial API generation.
Added client request template.

* Updated api.mustache style

* Updated code generation with a new directory layout.
Added test case generation, clean code.

* Updated Code generator, added apidoc and modeldoc
Updated readme file

* Added a Basic JSON Deserializer
Updated API client to support by default a basic json (de)serializer and let
the user customize then if needed.

* Updated Eiffel code generator to use Eiffel feature name style.
Updated templates to follow Eiffel style.
Improved feature descriptions.

* Added model inheritance support.
Removed unused code.

* Updated Eiffel code templates, refactor remove obsolte feature calls.
Added Eiffel sample in samples/client/petstore/eiffel.

* Updated Java code style.

* Fixed formating, using spaces instead of tabs.

* Updated EiffelCodeGenarator typeMapping.
Added TestCases for EfiffelClientOption and ModelTest cases.
Updated sample code to use the lastest changes.

* Restore keyword `nil' in Go Language.
2017-07-13 22:51:24 +08:00
beatcracker
ef076c34b4 [csharp] Update nuget.exe URL for latest version (#6031)
* Set nuget.exe URL to latest version

Fix #6022

* Update samples
2017-07-13 22:49:56 +08:00
stkrwork
4f33a02868 Swagger version info (#6039) 2017-07-13 17:32:24 +08:00
wing328
e964702550 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-12 21:54:23 +08:00
wing328
42b77a303b [Java][resttemplate] fixed build.gradle (#6020)
* fix build.gradle for resttemplate

* rename pom.xml id to avoid dup
2017-07-11 18:33:53 +08:00
mobreza
5d32edd964 Java support for application/xml (#5962)
* WIP: CodegenProperty with XML

* WIP: CodegenModel XML bits

* WIP: Jackson XML

* WIP: Java templating

* WIP: Java client withXml flag

* WIP: resttemplate work

* WIP: withXml only when Jackson is used

* WIP: Tabs to spaces

* WIP: java-petstore-resttemplate-withxml sample

* WIP: language: spring

* WIP: language "spring" using library "spring-boot" should include apiPackage in @ComponentScan to detect the API

* WIP: javax.xml for non-Jackson Java and enabled payload logging for jersey2

* WIP: updated java petstore samples

* WIP: JavaSpring with non-jackson XML

* WIP: bin/spring-all-pestore.sh
2017-07-11 17:01:51 +08:00
wing328
0876c9d408 add integration tests for ts angular2, 4 (#6019) 2017-07-11 00:20:25 +08:00
serezha93
140826b47f minor fixes (#5981)
* Update configuration.mustache

added return tag in PHPDoc

* made sanitizeFilename as static method

* updated petstore
2017-07-09 16:23:18 +08:00
wing328
247cdf273b Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-09 02:08:22 +08:00
ehyche
2ce3365eaf Add a swift4 client generator (#6010)
* Add a swift4 client generator

* Updates per review comments:

- Changed Alamofire dependency from 4.0 to 4.5
- Added "Codable", "Encodable", and "Decodable" to list of reserved words in generator
- Ran "pod update" in default, promisekit, and rxswift samples test projects
2017-07-09 01:33:52 +08:00
wing328
b852e61ee9 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-09 00:59:41 +08:00
wing328
ed11da25fc Merge branch '2.3.0' into wing328-ts_angular2_typings 2017-07-08 19:03:31 +08:00
wing328
d8e7a11411 remove options to set token 2017-07-07 17:11:34 +08:00
wing328
e18cf6bd4f update rxjs version 2017-07-05 23:40:21 +08:00
Akhil Kedia
f9c9a08a1c Tizen client bugfixes (#5979)
* [Bugfix] Removed a debug print statement that sometimes caused crashes.

Change-Id: I62cf8d70faddfe855c7150927441465466dbaa53
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>

* [Workaround/Fallback] Fix conversion of string representation of Json to JsonNode

Changed the conversion to consider any non-parseable string as a single "json string" object.
This is just a fallback to handle non-ideal server responses.

Change-Id: I5339d385e57b6225706fbaaaba1c04003c3810e9
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>

* [Bugfix] Correct Handling of Non-String Value Types in Json Maps

Inside the Json Maps in server response, the earlier code was bugged if the "value" in the map was of a non-string type.

Change-Id: I8c34c7e9470fc0743b509917f8098b2ebe2bd4e5
Signed-off-by: Akhil <akhil.kedia@samsung.com>

* [BugFix/WorkAround] No "isPrimitiveType" in BodyParams

The "isPrimitiveType" value tells us whether the data type of a particular parameter is one if the primitive types.
This value is not present when iterating over all the body parameters, but is somehow present when
iterating over all parameters and filtering for only BodyParams.

Change-Id: I5b0a97e615b7300c33dc7f3d4673ad5e87c36f7e
Signed-off-by: Akhil <akhil.kedia@samsung.com>

* [Bugfix] Making Functions Static to Avoid Name Clashes

Multiple functions in different classes might named the same, hence leading to multiple functions of the same name.
Using static to have only internal linkage for these helper functions.

Change-Id: I97fb1dd64b176c4a2b95e6d923723469852bc85a
Signed-off-by: Akhil <akhil.kedia@samsung.com>

* [Enhancement] Minor Improvements to Documentation

Added Modules in Doxygen Doc, Improved MD documentation

Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>

* Regenrated petstore sample

Update the petstore sample with newest template files
Deleted older sample in samples/client/petstore/tizen/client/
The old samples use oblsolete APIs
(These are APIs for Tizen 2.0, removed in 2.4, current release is 3.0)

Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>

* [Bugfix] Fixes incorrect headers sent (#5980)

Regenerated the petstore as well.

Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>
2017-07-05 01:28:39 +08:00
Jan
2774d47a2b fix: es6 style of Array inheritance to fix transpiler error (#5977)
* fix: es6 style of Array inheritance to fix transpiler error

* fix: rebuild of promise-es6 petstore samples with fixed mustache
style: added space between classname and bracket

* style: rebuild javascript-all to reflect style changes in mustache
2017-07-05 01:04:07 +08:00
Julien Fouilhé
c2b575607c fix(swift3): add en_US_POSIX locale to date formatters (#5602) 2017-07-04 11:21:25 +08:00
wing328
45eb5fffc0 add ngVersion option 2017-07-04 01:00:35 +08:00
Jean-François Côté
616f57a592 Typescript-Jquery refactor/improvement proposition (#5751)
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.

* Fix suggestions in the PR discussion + add .bat and .sh file as requested.

* Updated Readme.md file

* Remove unused mustache file + fix baseName vs paramName in all the mustache files.

* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.

* Fix the problem with the Http.MultipartFormData.FilePart

* First iteration of updating the typescript-jquery template/generator

* first RC of the new version of Typescript-JQuery using better models.

* Minor fix to the generation

* first RC of the new version of Typescript-JQuery using better models.

* Add an options for people using this client in a legacy app and that already have jquery loaded with a script tag somewhere

* Generation of the samples based on the latest changes from the typescript-jquery generator

* Fix to the check if the value is null and undefined

* Small fix when using collection
2017-07-03 23:08:48 +08:00
Ryoga Kitagawa
6b40bc6d30 [Swift3] Add sample for unwrapRequired. (#5853) 2017-07-03 22:46:42 +08:00
Dennis Kieselhorst
3c6696be40 update Spring cloud dependency (#5947 missed the application.yml change) (#5970) 2017-07-03 21:51:31 +08:00
wing328
25a46374c5 Updated Spring, Boot, Fox and Cloud dependencies (#5969)
* updated Spring, Boot, Fox and Cloud dependencies

* run scripts for java, jaxrs-cxf and spring samples (although changes are not related to my changes)

* update jersey java8 petstore samples

* update java feign samples

* update java petstore samples

* add new files for java petstore clients

* roll back spring cloud dep version

* fix jaxrs-cxf error
2017-07-03 18:44:22 +08:00
wing328
76481d1d80 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-02 22:43:08 +08:00
wing328
e50a4cca36 update ts angular2 petstore 2017-07-02 22:39:18 +08:00
Paŭlo Ebermann
5de6f7b86e Change all sample-generators for typescript-angular2-* to use the YAML version. (#5859) 2017-07-02 22:32:58 +08:00
mmosemmle
94814176b7 [CPP] Fixing some more ordering of checks (#5951)
* Fix more ordering of checks.

* Update cpp petstores.
2017-07-02 22:30:42 +08:00
wing328
15382f5b77 Merge branch 'ts_angular2_typings' of https://github.com/wing328/swagger-codegen into wing328-ts_angular2_typings 2017-07-02 22:01:10 +08:00
wing328
f3d83eb925 update ruby gem dependency version (#5964) 2017-07-02 21:46:04 +08:00
wing328
304a7ae19a fix regex escape forward slash (#5963) 2017-07-02 20:51:45 +08:00
wing328
f0c40d4c7c update php security petstore sample 2017-07-02 15:10:17 +08:00
wing328
9269dac6cf Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-01 15:47:27 +08:00
Jordan Zimmerman
40369bb819 Add java8 option 2.3.0 (#5955)
* Closes #5863

The "dateLibrary" option for java, sadly, sets a mustache value "java8". This change updates this so that "java" in the mustache
libraries means what it should mean - use all java8 classes. In this case, there's no need for the third party Base64 library
as java8's JDK has this built in. In my view, the "dateLibrary" should be deprecated but that should be a separate PR.

* Closes #5954

built and ran tests/samples
2017-07-01 15:04:18 +08:00
wing328
b2366670d7 update ts fetch petstore samples 2017-06-29 23:06:25 +08:00
Sebastian List
f760d93cd7 Updated npm configuration to use new typescript2 typings system
This also removes the dependency to the typings project.
Issue #4761
2017-06-29 23:00:22 +08:00
Dennis Kieselhorst
407d728908 updated Spring and Spring Boot dependencies (#5948) 2017-06-29 22:28:08 +08:00
wing328
846ee63f38 [C#] Update C# API client dependencies to the latest version (#5935)
* update C# client dependency

* add back csproj file for c# petstore

* update test result

* downgrade version 1.51.3

* add logo as embedded resource
2017-06-29 21:37:24 +08:00
wing328
9f2d800435 Merge branch 'better_ci_conflicts' 2017-06-29 14:23:01 +08:00
wing328
8015744212 update java petstore samples 2017-06-29 13:53:37 +08:00
Jordan Zimmerman
b2efb70410 Support a true "java8" option (#5864)
* Closes #5863

The "dateLibrary" option for java, sadly, sets a mustache value "java8". This change updates this so that "java" in the mustache
libraries means what it should mean - use all java8 classes. In this case, there's no need for the third party Base64 library
as java8's JDK has this built in. In my view, the "dateLibrary" should be deprecated but that should be a separate PR.

* updated samples

* fixed tests for new CLI java8

* regenerated samples after master merge

* oops - left in an end tag after master merge

* rerun checks

* rerun checks
2017-06-29 13:23:44 +08:00
wing328
7b80557363 fix file not found 2017-06-29 13:22:26 +08:00
Dennis Kieselhorst
a64c7d7986 updated jackson-version (#5943) 2017-06-29 10:56:12 +08:00
Dennis Kieselhorst
e3da4f9fde updated maven-war-plugin (#5941) 2017-06-29 00:14:16 +08:00
wing328
5d7ff49658 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-28 16:23:55 +08:00
Dennis Kieselhorst
4f6e2857cc removed obsolete jersey2-version (#5933) 2017-06-28 16:22:29 +08:00
wing328
cd0ec4ed71 Merge branch '2.3.0' of https://github.com/swagger-api/swagger-codegen into 2.3.0 2017-06-28 15:36:14 +08:00
wing328
e7561a11f4 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-28 15:35:24 +08:00
Brendan Burns
91f470e41f Add a function for injecting your own Authentication into the Typescript-node client (#5865) 2017-06-28 00:23:40 +08:00
Tony Tam
1e2465735b [2.3.0] Update Swagger Codegen to v1.5.15 (#5929)
* updated versions

* match fix in 2.2.x branch

* updated with 73df07d64c

* regenerate pom.xml for jaxrs-cxf-petstore-server-annotated-base-path

* regenerate pom.xml for jaxrs-cxf-petstore-server-non-spring-application
2017-06-28 00:13:52 +08:00
Tony Tam
73df07d64c Merge branch 'master' into issue-5753 2017-06-26 13:15:00 -07:00
wing328
1011b3ae7c Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-27 00:42:19 +08:00
wing328
5fbb674cac fix retrofit okhttp version 2017-06-27 00:41:08 +08:00
wing328
e84b789f78 remove unused files from C# petstore folder 2017-06-26 23:41:22 +08:00
wing328
49dbb51957 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-26 23:39:04 +08:00
wing328
522d704f7a [Java] Update dependencies for Java clients (#5926)
* update dep for java jersey1, jersey2

* update sbt dependency for jersey2

* update dep for java okhttp-gson, resteasy, resttemplate

* update dep for java retrofit 1.x, 2.x

* update java petstore samples
2017-06-26 23:18:45 +08:00
wing328
6eb987919f minor fix to js promise test cases 2017-06-26 21:48:44 +08:00
Dennis Kieselhorst
68d878c244 update to latest CXF release (#5923) 2017-06-26 15:55:34 +08:00
wing328
02f30a27f9 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-23 22:09:45 +08:00
wing328
5b4e8a8ed5 [JavaScript] fix JS shell scripts, add log to show template version (#5907)
* fix JS shell script, add log to show es version

* change CLI option default value for useES6

* fix shell script in JS ES6 promise

* fix windows batch files

* set useES6 to false
2017-06-23 22:09:07 +08:00
wing328
f32dd6f7bc Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-23 15:24:04 +08:00
Stanislav Bondarenko
69ce921371 Python - Increase range of valid status codes (#5901)
swagger-client shouldn't throw ApiException if status code in range 200-299
2017-06-23 11:31:30 +08:00
wing328
9c3476b014 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-22 22:42:01 +08:00
wing328
999c4dbfb5 Merge branch '2.3.0' of https://github.com/swagger-api/swagger-codegen into 2.3.0 2017-06-22 22:41:51 +08:00
wing328
d35239c661 recursively add import for parameters (#5891) 2017-06-21 21:35:45 +08:00
Austin Green
81d69eef1c [Typescript-Angular2] Removed invalid BASE_PATH InjectionToken type (#5866) 2017-06-21 03:39:59 +08:00
wing328
8d0c7128b0 add option to specify c# client path in powershell generator (#5887) 2017-06-21 00:58:29 +08:00
wing328
adedaf6adc Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-20 22:20:23 +08:00
wing328
e53b3a03aa [PowerShell] Add PowerShell API client generator (WIP) (#5789)
* add powershell generator (wip)

* minor fix to api template

* rename model files

* Powershell generator fix (#11)

* Fix typo

pacakge -> package

* Add missing `petstore` subfolder to $ClientPath

* Resolve $ClientPath to absolute path

Start-Process needs WorkingDirectory to be absolute

* Fix spaces in variable name

${ somevar } is a vairable that literally has spaces in name. We need to
temporarily redifine mustache delimiters so we can generate var. names
without spaces.

* Fix typo

Remove stray `r`

* Fix *.ps1 import in module

Directory structure has changed + we should export functions using
manifest.

* Remove erroneous file

* various fixes and enhancements

* remove nullable for string

* change function name based on feedback by beatcracker

* set index to start at 0

* fix file type

* Powershell generator fix 1 (#12)

* Add closing curly brace

* Fix duplicated '['

* Get FunctionsToExport using AST

Discussion: swagger-api/swagger-codegen#5789

* add guid option to powershell generator

* add test files, remove docs

* fix array of items

* clean up powershell comment, update model/api test files
2017-06-20 22:20:05 +08:00
wing328
c4356dd9c3 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-20 22:18:28 +08:00
Vlad Frolov
c26b5a1e1b [JavaScript] Fixed *WithHttpInfo methods in 'usePromises' mode to be ES5 compatible (#3654) (#4902) (#5871) 2017-06-20 16:27:07 +08:00
Vlad Frolov
3546361b33 [JavaScript] Added README section for Webpack configuration (howto disable AMD) (#3466) (#5872) 2017-06-20 16:25:06 +08:00
stkrwork
8ab2b84c97 [CPP] [CPPREST] first steps on fixing the template (#5877)
* - Added Restbed Generator

* - Added Json processing functions to model
- Removed unnused code from restbed codegen class
- Added response header processing to api template

* Changed it to respect alphabetical order

* Made the string joining java 7 compatible

* Added samples

* First step in fixing the cpp rest template
regenerated new samples

TODO: Fix the other functions

* Updated samples
2017-06-20 01:29:42 +08:00
wing328
9f83a1adb1 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-19 23:17:35 +08:00
sabras75
24c55d1f0e Fix#5856 - Add support for PATCH (#5875)
* Changing QBuffer to use a QByteArray solves the issue for me since there is no real use-case for using a QBuffer.

Documentation of QT5 states:

QBuffer::QBuffer(QByteArray *byteArray, QObject *parent = Q_NULLPTR)

Constructs a QBuffer that uses the QByteArray pointed to by byteArray as its internal buffer, and with the given parent. The caller is responsible for ensuring that byteArray remains valid until the QBuffer is destroyed, or until setBuffer() is called to change the buffer. QBuffer doesn't take ownership of the QByteArray.

Since the variable “request_content” is allocated on the stack, this is clearly wrong and a bug. The construction of QBuffer is designed this way so that whenever you write to the buffer, it is also written to the byte array that it is pointing to

* Add a retro-compatible solution based on QNetworkAccessManager SourceCode

* update samples
2017-06-19 23:08:32 +08:00
wing328
4fb4887fec pod install for swift3 clients 2017-06-19 15:17:30 +08:00
wing328
502b6eac00 Redo #5569 to 2.3.0 branch (#5869) 2017-06-19 12:02:12 +08:00
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
b5411a94f0 update swfit3 petstore samples 2017-06-19 01:29:41 +08:00
wing328
3ad576a53d update js es6 samples 2017-06-19 01:21:22 +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
Tony Tam
9286e26162 updated versions 2017-06-16 11:49:32 -07: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
1f1e92d964 update run xcodebuild command for objc client to reduce log 2017-06-16 17:28:57 +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
Paŭlo Ebermann
1a803af54a Update samples for typescript-angular2. (#5826) 2017-06-15 22:17:02 +08:00
wing328
fee54157c0 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-15 17:14:39 +08:00
wing328
410b2d301f update c# petstore samples 2017-06-15 16:33:31 +08:00
wing328
5d03905a63 update spring petstore sample 2017-06-15 15:41:21 +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
wing328
e58342bacb udpate spring samples 2017-06-15 14:33:16 +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
wing328
b21e0ca763 update Java petstore samples 2017-06-15 00:24:37 +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
Paŭlo Ebermann
4b9988c4f2 Update samples for several language (just whitespace changes, reordering, VERSION) (#5828)
* Update samples for several languages.

Just whitespace changes and some reordering where the order doesn't matter.

* Adding generated .swagger-codegen/VERSION files.
2017-06-14 01:17:31 +08:00
Paŭlo Ebermann
29db258e65 Update samples for akka-scala. (#5825) 2017-06-14 00:48:31 +08:00
Paŭlo Ebermann
b288991c6c Updating samples for csharp. (#5822) 2017-06-14 00:41:53 +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
wing328
2bc4710e36 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-12 20:57:26 +08:00
wing328
2c7cd07cc3 add back petstore-security-test/typescript-angular 2017-06-12 20:55:53 +08:00
wing328
ab1ecbff38 remove petstore-security-test/typescript-angular folder 2017-06-12 20:52:40 +08:00
wing328
1da52bf8ba Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-11 21:43:34 +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
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
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
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
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
Vlad Frolov
6a986975e4 [javascript] Fixed fs files support for Electron (#5765) 2017-06-07 17:01:47 +08:00
wing328
6183960d86 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-06 17:11:49 +08:00
Kevin Murphy
6239ec0807 [javascript] Mark "fs" package as absent in browser in package.mustache (#5768) 2017-06-06 17:09:50 +08:00
Kevin Murphy
151d1b2783 [javascript] Fix documentation for ES6 ApiClient (#5783) 2017-06-06 16:03:36 +08:00
wing328
0b998f0684 add xcpretty to objc test output 2017-06-06 15:23:15 +08:00
wing328
001960a2c2 remove podfile for promisekit/rxswift of swift3 petstore 2017-06-06 00:34:22 +08:00
wing328
87bbbc1a1b Merge remote-tracking branch 'origin/master' into 230_merge_master 2017-06-05 23:27:11 +08:00
wing328
6ee332a513 [Swift] Fix issue with Swift Petstore integration tests due to pod install (#5774)
* add pod file for swift3

* skip pod install

* avoid pod install in swift3 petstore (promisekit,rxswift)

* use https instead of http for cocoapod spec

* avoid timeout in swift3 test
2017-06-05 22:22:56 +08:00
wing328
faf082589d Enable Travis CI tests for Swift, ObjC clients and move some tests to CircleCI (#5687)
* enable travis CI tests for swift, objc, move some tests to circleci

* fix comment in xml file

* use xcode8.3

* use ruby 2.2.5

* fix objc core data pom.xml

* use cocoapods 1.2.1

* use xcpretty for clearer test results

* fix pom with relative path to script

* comment out objc test

* fix xcpretty exit code

* add && exit ${PIPESTATUS[0]} for swift3 xcodebuild script

* use xcode 8.2

* update promisekit version for swift 2x, 3x

* add pod repo update

* remove Pods directory

* update swift dependencies to the latest version

* update podfile.lock

* rollback Alamofire to 4.0 for swift3

* fix swift3 rxswift api cliiet

* fix testDeletePet test in Swift3 rxswift petstore

* update clojure petstore

* comment out clojure test in travis (already covered in circleci)

* run pestore server locally

* use wing328/swagger-samples to run petstore

* run petstore server in the background

* test ruby petstore client

* add /Users/travis/.cocoapods/repos/master to cache

* add back ruby test, use public pestore server

* add back bash client test

* add npm config set registry to avoid time out

* use docker branch in swagger samples

* remove bash test

* show go version, reorder

* debug go petstore client

* reinstall go

* comment out pod repo update

* uncomment pod repo update

* test go in circleci

* remove go from travis test

* brew install sbt
2017-06-05 15:43:20 +08:00
wing328
40163b26d2 update objc petstore to use petstore.json 2017-06-05 12:25:51 +08:00
Zack Lemmon
f3da691a72 Fix typo in Ruby examples/mustache files (#5773) 2017-06-05 11:19:29 +08:00
wing328
4fd52d17c5 minor build warning fix for C# client 2017-06-05 01:05:19 +08:00
Jim Schubert
bc8fe0fd03 [csharp] date proper format (#5734)
* [csharp] Honor Swagger/OpenAPI 'date' format

Per spec
(https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types),
DateTime instances defined as 'date' datatype need to be serialized as
defined by full-date - RFC3339, which has the format:

full-date       = date-fullyear "-" date-month "-" date-mday

ref:
https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14

see #5513
see #5531

* [csharp] Regenerate sample

* [csharp] Include date format test
2017-06-05 00:57:00 +08:00
Arne Jørgensen
d5b3cc0534 [PHP] Fix date format serialization (#5754)
* [PHP] Honor Swagger/OpenAPI 'date' format

Per spec
(https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types),
DateTime instances defined as 'date' datatype need to be serialized as
defined by full-date - RFC3339, which has the format:

full-date       = date-fullyear "-" date-month "-" date-mday

ref:
https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14

see #5531
fixes #5607

* [PHP] Add `date` and `date-time` serializer tests

See #5531
See #5607

* [PHP] Improve codestyle of generated code

* [PHP] Regenerate PHP Petstore sample

* [PHP] Regenerate PHP Security sample
2017-06-05 00:47:56 +08:00
davidgri
00f2dc422d Issue5613 (#5616)
* Fixed Issue5162 consumes in GET-Methods

* Fixed Issue5613

* Ran the shell scripts under bin

* Tab removed
2017-06-05 00:38:43 +08:00
baartosz
d7202a7c76 [php] 2.3 - fix form params json encoding (#5701)
* fixed tests expectations not compatible with phpunit 4

* added test and endpoint definition, updated template

* regenerated sample

* regenerated security sample
2017-06-05 00:36:40 +08:00
Cliffano Subagio
9bc8f37aa6 [javascript] Fix empty response body when schema type is string (#5759)
* [javascript] Fix response body when return type is String.

* [javascript] Regenerate javascript petstores with fixed String return type.
2017-06-05 00:20:11 +08:00
Jim Schubert
ef07a02a01 [kotlin] Support nested enums in models (#5769)
* [kotlin] Add model enum support

Model variables marked isEnum=true are nested class enums. Top-level
enums will not be isEnum=true, but rather have a datatype specific to
the enum's type.

* [kotlin] Regenerate client sample
2017-06-05 00:04:58 +08:00
wing328
879149bb69 Revert "[javascript] Added README section for Webpack configuration (closes #3466) (#5767)" (#5770)
This reverts commit 54f5d73ee2.
2017-06-04 16:52:50 +08:00
Vlad Frolov
54f5d73ee2 [javascript] Added README section for Webpack configuration (closes #3466) (#5767) 2017-06-04 15:42:41 +08:00
sdoeringNew
ffc0d32b9c #5712 put @JsonValue to appropriate place in generated enum, add TypeAdapter for Gson enums, enhance tests (#5713) 2017-06-02 16:03:32 +08:00
wing328
08a11c1d75 fix c# net35 issue, add xml doc to new C# class (#5756) 2017-06-01 07:53:35 +08:00
wing328
98684d872c Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-01 07:10:03 +08:00
Jim Schubert
b671129557 [csharp] Refactor Configuration usage (#5740)
* [csharp] refactor ApiClient and Configuration usage

* # This is a combination of 2 commits.
# The first commit's message is:

[csharp] refactor ApiClient and Configuration usage

[csharp] Regenerate sample

# This is the 2nd commit message:

[csharp] Simplify setting apikey/prefix/headers

* # This is a combination of 2 commits.
# The first commit's message is:

[csharp] refactor ApiClient and Configuration usage
* Simplify setting apikey/prefix/headers
*  Regenerate sample

# This is the 2nd commit message:

[csharp] Pass-through configuration timeout to client

* [csharp] refactor ApiClient and Configuration usage

* Simplify setting apikey/prefix/headers
* Regenerate sample

* [csharp] Regenerate all client samples

* [csharp] regenerate .net standard/core samples

* [csharp] Fix Timeout diff between netstandard and non-netstandard

* [csharp] Resolve additional netStandard issues after merge

* [csharp] Update doc for Configuration usage
2017-06-01 06:06:36 +08:00
Jonathan Leitschuh
d6f2424152 Fix spring generated controller annotations only generating for first return type (#5399)
Fixes the spring java code generator so that the ApiResponse fields are populated correctly
on the controller.

Related to #4693
2017-05-31 17:27:32 +08:00
imgx64
bee999056a [typescript-angular2] Avoid tslint "Unused import" warnings (#5723)
Move the tslint comment that disables `no-unused-variable` to before the
import statements, to avoid "Unused import" warnings
2017-05-31 17:13:22 +08:00
stevecookform3
b185d03a1b update Spring petstore examples 2017-05-31 09:48:34 +01:00
wing328
0a8e845e47 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-31 16:30:52 +08:00
wing328
6473949737 Merge branch 'kotlin-api-model-docs' of https://github.com/jimschubert/swagger-codegen into jimschubert-kotlin-api-model-docs 2017-05-31 00:28:08 +08:00
Jim Schubert
23cf641e8a Kotlin client lists (#5729)
* [kotlin] array->List instead of Array

Serialization to/from primitive arrays can cause issues with valid
responses. This commit considers swagger 'array' types as 'List' which,
although not as memory efficient should provide a cleaner interface for
users (and avoid serialization issues).

Also, updates README.md to list new generator and excludes
folder at samples/client/kotlin/bin/, which is not used.

* [kotlin] Move sample under conventional directory

samples/client/kotlin/ -> samples/client/petstore/kotlin/

Updated new.sh to generate client/server/docs into similar structure.
Current documentation generators (cwiki, html, html.md, html2) aren't
following a convention like client/server generators.
2017-05-31 00:18:37 +08:00
wing328
4cffea4626 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-30 15:28:21 +08:00
Jim Schubert
87265d9ac7 [kotlin] api/model docs
This commit adds Api/Model/Auth documentation to the generated
README.md. Because auth support is not yet fully implemented (users can
manually set default headers globally), there aren't examples for helper
auth methods.

Models with inline enums document allowed values rather than pointing to
a generated enum class.

Two global additionalProperties were added (generateApiDocs,
generateModelDocs) to allow templates to conditionally display
documentatoin depending on these mutually exclusive settings. All
current generators supporting docs will attempt to link to generated
models when only api docs are specified.

This also moves the $@ bash parameter in bin/kotlin-client-petstore.sh
to the end of the args variable. This is because $@ can only be used to
pass System properties like -DdebugModels, can can already be passed as:

JAVA_OPTS="$JAVA_OPTS -DdebugModels" ./bin/kotlin-client-petstore.sh

By moving the $@ to the end of the args, it allows us to pass additional
properties and other switches directly to the script.
2017-05-29 22:12:55 -04:00
Jim Schubert
d6a98fa444 Kotlin client (#5727)
* Add new.sh helper script to create generator files

* [kotlin] Initial Kotlin client generator

* [kotlin] Generate sample

* [kotlin] Sample helper files not needed for generation, but for sample evaluation
2017-05-30 00:38:15 +08:00
wing328
18e6440bcc Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-30 00:12:34 +08:00
wing328
b84769d1e3 fix enum float value in C#, minor format fix in doc (#5726) 2017-05-29 22:16:42 +08:00
wing328
3df5b6f303 [Java] Fix float enum value by adding "f" (#5724)
* fix java float enum value

* update java petstore samples

* add comment explaining the fix
2017-05-29 19:34:04 +08:00
Cliffano Subagio
ea30a4a7f8 [Ruby] Chunked file download (#5718)
* [Ruby] Modify file download to be written in chunks in order to handle large files. #5704

* [Ruby] Update Ruby Petstore with file download improvement. #5704
2017-05-29 14:56:48 +08:00
René Winkelmeyer
3d97d83f7a Apex update for NamedCredentials and Salesforce DX (#5717)
* Added mustache file for namedCredentials

* Removed Basic and OAuth from Apex API in favor of NamedCredentials

* Moved old README to README for ant deployment

* Added SFDX OSS descriptor

* Removed remoteSite mustache

* Changed package.xml from RemoteSite to NamedCredential

* Update ApexClientCodegen to support SFDX and namedCredentials

* Created initial README for Salesforce DX

* Ran Petstore test for Apex commit

* Fixed error in README mustache
2017-05-29 11:16:06 +08:00
wing328
999f901d2b update clojure petstore cient 2017-05-27 00:33:49 +08:00
Michael Langford
b1ccaf69ac Updates http-client dependency to correctly handles certificates (#5707)
* Updates http-client dependency to one that correctly handles certificates

This is important as amazon AWS gateway and several other types of certificates will not work correctly due to the old java library used by the 2.0.0 version of http-client.

* Runs the petstore updates switch for clojure

* Runs the petstore updates switch for clojure
2017-05-27 00:27:11 +08:00
wing328
39d79de6f7 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-05-26 22:50:06 +08:00
wing328
54119a7ac1 roll back clojure petstore to use petstore.json 2017-05-26 22:49:30 +08:00
wing328
4d705081c8 [PHP] Fix broken links in the auto-generated documentation (#5715)
* remove trailing space in cpprest, update samples

* remove unused pom.xml in go pestore

* fix broken links in php api doc by fixing baseType

* fix csharp api doc

* fix php examples

* fix examples for abstract php generator
2017-05-26 21:47:49 +08:00
wing328
424a70bd8c Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-26 17:35:36 +08:00
Svarog
84df23f025 Made httpMethod in curl example actually upper case in html2 to support firefox (#5558) (#5705) 2017-05-26 17:19:09 +08:00
rompic
ef53f08b09 fixed #5692 and regenerated samples (#5698) 2017-05-24 23:26:33 +08:00
wing328
41527ead54 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-24 20:13:31 +08:00
wing328
b024288df2 JS ES6 enhancements 2017-05-24 16:50:32 +08:00
Dinuka De Silva
ca139ffc05 Gh-4044: Enabling ES6 in javascript client (#5593)
* gh-4044: Added useES6 as an option for javascript templates

* gh-4044: Enabled ES6 in `javascript/api.mustache`

* gh-4044: Enabled ES6 in `javascript/ApiClient.mustache`

* gh-4044: Enabled ES6 in `javascript/enumClass.mustache`

* gh-4044: Added useES6 cli option to `javascript` clients and updated the test cases

* gh-4044: Enabled ES6 in `javascript/index.mustache`

* gh-4044: Enabled ES6 in `javascript` model templates
* `javascript/model.mustache`
* `javascript/partial_model_generic.mustache`
* `javascript/partial_model_enum_class.mustache`
* `javascript/partial_model_inner_enum.mustache`

* gh-4044: Separated `javascript-es6` templates to another folder

* gh-4044: Updated `javascript-es6/index.mustache`

* gh-4044: Enabled ES6 in `javascript-es6/api_doc.mustache`

* gh-4044: Added required dependencies for ES6

* gh-4044: Updated Supportig files for ES6 and non ES6

* gh-4044: Added test scripts to verify `javascript` useEs6 option

* gh-4044: Commented `javascript-es6` scripts due to the permission issues.
2017-05-24 16:35:54 +08:00
wing328
bd227df4db update ts angualr2 petstore clients 2017-05-24 15:55:34 +08:00
wing328
f33e1d0026 add new files for C# API client 2017-05-23 22:20:08 +08:00
wing328
b18121ee9c Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-23 21:41:13 +08:00
kirpit
e12b22d5ce Implement generating interfaces option for api resources, closes #5453. (#5519)
* Implement generating interfaces option for api resources, closes swagger-api/swagger-codegen#5453.

This commit introduces another _system property_ for typescript-angular2, called `withInterfaces` that is default to `false`. You can activate this flag by:

```
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
-i http://petstore.swagger.io/v2/swagger.json \
-l typescript-angular2 -o samples/server/petstore/springboot/typescript-angular2 \
-D withInterfaces=true
```

If set to `true`, generated api resource classes will be implemented with their interfaces in separate files.

This change should not break and change the behaviour even though `withInterfaces` flag set to `true`. You are also welcome to create your own custom resource class by implementing those generated interfaces as they support defining new attributes with `[others: string]: any;` signature.

* Fix unit test for typescript/angular2 client options for "withInterfaces"

* Use double quote to follow coding standard

* Respect interface naming convention for typescript/angular2

 Create respectful interface names that ends with `Interface` suffix, instead of prefixing with `I` according to typescript naming convention. This is also consistent with their file names that also ends with `Interface.ts`.

 Also fixes the merge conflicts.

* Have better explanation for the `withInterfaces` system config
2017-05-23 21:40:21 +08:00
wing328
802641bf91 update apex petstore client 2017-05-21 16:12:47 +08:00
wing328
651a3e388b Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-21 01:35:13 +08:00
wing328
8314f4e78a Add removeOperationIdPrefix option (#5674)
* add removeOperationIdPrefix option

* remove removeOperationIdPrefix from cli option for generators
2017-05-21 01:28:06 +08:00
wing328
7edf744426 [Apex] add petstore samples, shell scripts, batch files (#5672)
* add apex petstore samples, shell scripts, batch files

* add wording "beta" to Apex help
2017-05-20 01:02:08 +08:00
Takuro Wada
ad0838f0a0 [ts-ng2] add check whether header parameter is undefined or not (#5668) 2017-05-19 18:23:17 +08:00
wing328
bd2f03f1c0 update objc, swift2,3 petstore samples 2017-05-18 17:22:20 +08:00
wing328
fdbd13b368 update objc, swift2,3 petstore samples 2017-05-18 17:18:43 +08:00
wing328
cc55dfbf13 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-18 16:22:42 +08:00
Harald Walker
4417bb6b32 #5649 Fix FileAlreadyExistsException when downloading file using jersey2 (#5654)
* #5649 Fix download file copy

* Include generated pet store samples and fix indentation

* Regenerate petstore sample to fix indentation
2017-05-18 15:12:53 +08:00
Jason Gavris
97a4bacc4e [Swift3] Use thread safe manager dictionary (#5610) 2017-05-17 23:35:49 +08:00
wing328
5c17cb3a78 Merge branch 'swift-2.3.0-models' of https://github.com/ButterflyNetwork/swagger-codegen into ButterflyNetwork-swift-2.3.0-models 2017-05-17 22:34:33 +08:00
wing328
2ff548d80b update C# petstore samples 2017-05-17 22:07:58 +08:00
wing328
e1e5ac4d37 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-17 22:00:06 +08:00
Cas Perl
a6b7f60ac7 Python improved (#5512)
* ignore .vscode

* fixed test case for models requiring mandatory attributes. added deserialize test for enum class

* construct model with mandatory attributes. improve class reflection (e.g. deserialize). disable generated empty model unit test for further FIXME

* rebuilt samples

* FIXME comment

* FIXME comment

* fix deserialization enum test
2017-05-17 21:18:51 +08:00
Benjamin Douglas
be3cfda3ce Disable Jackson FAIL_ON_INVALID_SUBTYPE in feign (#5597)
* Disable Jackson FAIL_ON_INVALID_SUBTYPE in feign

With this change, Jackson does not fail even if it doesn't recognize a
discriminator type name. This is helpful when upgrading a microservice with
a new subtype while keeping compatibility with its old clients. The instance
is returned as null instead of throwing an exception deep in the feign
framework, allowing clients to gracefully degrade.

* Disable FAIL_ON_INVALID_SUBTYPE for all Jackson-based projects
2017-05-16 21:20:05 +08:00
wing328
0a67696de8 Merge branch 'empty_classes' of https://github.com/bbdouglas/swagger-codegen into bbdouglas-empty_classes 2017-05-16 17:51:42 +08:00
wing328
1fc969b050 Merge branch 'sync_samples' of https://github.com/bbdouglas/swagger-codegen into bbdouglas-sync_samples 2017-05-16 16:51:41 +08:00
Brendan Burns
c5d1c5d73b Extract out a new helper method from java ApiClients (#5648) 2017-05-16 13:59:06 +08:00
Marcus Low Junxiang
2b56384887 Adding enum generation support for golang client (#5635)
* adding enum support for golang client

* indentation correction
2017-05-15 15:41:13 +08:00
wing328
96a8440a57 fix missing private datetime var in java okhttp client 2017-05-14 23:42:31 +08:00
wing328
7dd42483a4 update all petstore samples for java clients 2017-05-14 23:21:05 +08:00
wing328
67c61eed0b update java petstore 2017-05-14 22:53:25 +08:00
wing328
7fc36f1e1e Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-14 22:32:12 +08:00
Takuro Wada
a7d5684679 [Python] add an option to Config in order to specify safe chars for path parameter (#5628) 2017-05-14 11:54:26 +08:00
Adam Fanello
fb04b5a26a Fix for issue #5349. (#5560)
With this change, users providing custom configuration must provide an exported Configuration factory, rather than just an object. This is needed to be Angular AoT compatible.

Example use:

import * as api from '../api';

/** Configuration settings for the backend API */
export function backendConfigurationFactory(): api.Configuration {
    return new api.Configuration({basePath: '/api'});
}

@NgModule({
    imports: [api.ApiModule.forConfig(backendConfigurationFactory)],
...
2017-05-14 11:52:10 +08:00