Commit Graph

3098 Commits

Author SHA1 Message Date
Frode Danielsen
3236ade09d [Python] Improve model equality implementation (#4663)
* [Python] Improve model equality implementation

The model equality implementation template blindly tried accessing the
`__dict__` attribute of the variable to compare equality against. This
attribute does not exist for a lot of Python built-in types (`None`,
`str` etc.) and the equality check would simply crash.

This adds a simple guard to only continue with equality check if the
variable to compare is an instance of the model being compared against.

* Remove wrong auto-update of Python requirements
2017-01-28 00:42:53 +08:00
wing328
a45579d35e fix issue with pom.xml (spring cloud, boot) 2017-01-27 00:39:25 +08:00
jfiala
8952815b5f [Spring] Add beanvalidation annotations (#4600)
* update generated sample for spring boot #4091

* add beanvalidation annotations to spring #4091

* add tests for spring #4091

* cleanup spring-cloud (client lib) #4091

* update client sample spring-cloud #4091

* replace tabs

* add beanvalidation annotations to spring #4091

* add tests for spring #4091

* cleanup spring-cloud (client lib) #4091

* update client sample spring-cloud #4091

* replace tabs

* update spring-cloud sample
2017-01-26 23:45:36 +08:00
Ainun Nazieb
05eea2436c [PHP] Validate parent's model first, if any (#4659)
* if model has parent, valid() & listInvalidProperties() will check the parents' first

* Run the ./bin/security/php-petstore.sh
2017-01-26 22:49:38 +08:00
jaz-ah
f592fdb23e [Swift] two fixes to latest param mapping code (#4587)
* two fixes: 1) extra ?'s at end of some url's 2) enums not being called out w/ rawValue to get the proper string name

* update samples

* one step closer

* closer implementation
2017-01-26 01:17:58 +08:00
wing328
3be04e8a18 update JS petstore client 2017-01-25 16:08:22 +08:00
Tony Tam
3476e83a36 fix for allowable values, #4645 (#4646)
* fix for allowable values, #4645

* fixed string values

* rebuilt for #4645
2017-01-25 12:11:49 +08:00
Scott Williams
6e846e7463 Issue 4637 Fix for ci build (#4643) 2017-01-25 12:09:33 +08:00
wing328
9f8a1e27dd Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-01-23 19:00:31 +08:00
wing328
9abaab6bcf update ts angular2 petstore samples 2017-01-23 18:40:59 +08:00
keysolutions
933cc1ce9a Enum constructFromObject should return value (#4613)
When constructing an enum through constructFromObject the original value provided by the API response should be returned rather than extracting the value from the enum name. This resolves an issue where the constructed value is undefined when the name and value are not equivalent.
2017-01-23 16:45:38 +08:00
wing328
e83646064f update js promise petstore sample 2017-01-23 16:00:23 +08:00
tharders
30315c8570 Fix Issue 4554 - handle 204 server response in javascript (#4604)
* issues 4554: Handle 204 response and handle deserialize exceptions

* issue-4554: generate javascript client updated template

Used petstore-with-fake-endpoints-models-for-testing.yaml

* use petstore-with-fake-endpoints-models-for-testing.yaml like sh script
2017-01-23 15:14:06 +08:00
wing328
8e71dfb512 Fix model prefix/suffix with incorrect camelization (#4621)
* fix camelized name with suffix/prefix in java client

* fix php model name with prefix, suffix

* fix indentation in ts abstrat generator

* replace tab with spaces in ts abstract generator
2017-01-23 01:29:11 +08:00
wing328
2e50a65a1c better handling of reserved words in models, operationId (#4620) 2017-01-22 17:41:35 +08:00
Tony Tam
7936cfc206 Merge pull request #4619 from swagger-api/issue-4618
Fix name mangling for JSON processing with QT5
2017-01-21 20:31:18 -08:00
wing328
5306b11b4a [java] Improve pom.xml to qualify for publishing to Maven central (#4616)
* [java] Attach Javadoc to artifact generation.

* [java] Attach source to artifact generation.

* [java] Add gpg signing to artifact publishing.

* [java] Add artifact URL to pom.xml .

* [java] Add artifact description to pom.xml .

* [java] Add artifact URL and description params to Jax RSS.

* [java] Add developer info to pom.xml .

* [java] Parameterise SCM info in generated pom.xml .

* [java] Move GPG signing to verify phase so that .asc files are uploaded during deploy phase.

* [java] Change GPG signing to be an optional via Maven profile. Can't assume all users will perform a release/deploy from an environment with correct GPG key/pass.

* update java petstore smaples

* camelize tag name, remove invalid file

* add back missing files for okhttp-gson

* fix docstring in java feign client

* fix docstring with various java api clients
2017-01-22 11:40:59 +08:00
Tony Tam
62caf7dac5 rebuilt samples 2017-01-21 16:33:14 -08:00
wing328
4d19fb6b2f hide generation timestamp for perl (#4614) 2017-01-21 19:12:51 +08:00
Damien Pontifex
1f0ecb5180 Updating typescript-angular to export api classes (#4589)
* Updating typescript-angular to export api classes

* Fixing tsconfig for typescript-angular test case
2017-01-21 17:02:11 +08:00
wing328
9a8ede4189 update php sample 2017-01-19 21:22:20 +08:00
Albert Morlan
ccb3385081 Set embedded templates directory when generating Javascript code (#4585) 2017-01-19 18:07:58 +08:00
Jonathan Leitschuh
36c3fa05e0 Allows for generation of spring controller code using the delegate pattern (#4439)
* Allows for generation of spring conroller code using the decorator pattern

* Change Decorator to Delegate in spring codegen
2017-01-19 17:58:39 +08:00
wing328
157fcbc4aa fix invalid spec, update petstore samples (jaxrs, ruby) 2017-01-19 16:54:16 +08:00
Dan Mikita
0a559f0dd2 Add support for modifier within the Jaxb XMLElement annotation (#4433)
* fixes #4432 Adding support for the  modifier within the Jaxb XMLElement annotation. Updated README with JaxbAnnotations configuration option.

* #4432 Running the Petstore files
2017-01-17 15:26:30 +08:00
Damien Pontifex
55443daebc Extends obj using Object.assign (#4562) 2017-01-17 10:52:33 +08:00
Tomek Cejner
f0cddd21fd Swift3 Clener template of client methods (#4552)
* Swift3 template properly uploads files, making mustache template little cleaner

* [swift3] moved URL parameter encoder helper function to APIHelper.swift

* Swift3 - regenerated sample
2017-01-16 01:01:50 +08:00
Gene Chang
95987fc132 Added support for datetime query parameters in cpprest (#4556)
* Added support for datetime query parameters in cpprest

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>

* Update petstore sample app for cpprest using bin/cpprest-petstore.sh

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>
2017-01-14 00:07:06 +08:00
Richard Naeve
2e7e25801d Issue 4531 (#4539)
* ISSUE-4531
Arrays are now serialized according to the different collection formats. All api classes are also exported in a const array to make handling of large api libraries easier.

* Added petstore samples

* Fixed indentations and coding style
2017-01-13 23:41:54 +08:00
Bartek Kryza
0fb154e9a2 [Bash] Bash client script generator (#4541)
* Initial commit

* Remormatted petstore tests

* Added Bash codegen to main README.md

* Added bash to integration tests

* Fixed stdin detection in generated script

* Added back ruby module
2017-01-12 16:48:25 +08:00
Pete Holiday
2e4de0ca1e Remove unnecessary call to setHost() in the constructor (#4525)
* Remove unnecessary call to setHost() in the constructor

The default host will be automatically set on the client by the ApiClient constructor.

* Updated PHP API Classes corresponding to template updates in #4525.

* Additional changes generated by the petstore update unrelated to #4525, but seem to have not been included yet.

* Add test to prevent regressions of #4525
2017-01-12 16:17:17 +08:00
Krisztian Lachata
c1f854f7da Overriden objectmapper wasn't used in deserialisation (Scala) issue #4532 (#4534)
* Overriden objectmapper wasn't used in deserialisation

Use previously provided apiInvoker instead of creating a instance at deserialision stage

* update scala sample
2017-01-11 00:27:48 +08:00
Tomek Cejner
1e8c7180c5 [swift3] allow POST with both body and query parameters (#4490)
* [swift3] allow POST with both body and query parameters

* Correctly support non-string and optional query parameters.
2017-01-07 22:40:07 +08:00
Kevin Locke
409e1a504c Fix Gson parsing of Joda DateTime without millis (#4473)
* Fix Gson parsing of Joda DateTime without millis

The DateTimeFormatter returned by ISODateTimeFormat.dateTime() only
parses dates with millisecond values, and throws
IllegalArgumentException when milliseconds are not present.  The
date-time construct from RFC 3339 Section 5.6 referenced by the
Swagger/OpenAPI spec allows fractional second values to be omitted.
This results in valid date-time values being rejected by the generated
code.

This commit fixes the problem by using .dateOptionalTimeParser() for
parsing, which correctly handles date-time values without fractional
seconds.  A previous version of this commit used .dateTimeParser(),
which accepted a time without a date and was considered too liberal.
Note that .dateTime() must still be used for printing, which is not
supported by .dateTimeParser().

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* Fix akka-scala date-time parser with Joda

As in the previous commit, which fixed Java generators,
ISOISODateTimeFormat.dateOptionalTimeParser() should be used for
date-time parsing and ISOISODateTimeFormat.dateTime() for printing.
Apply the same change to akka-scala.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-01-07 21:56:14 +08:00
Kevin Locke
df0c54d043 Support the empty string as an enumeration value (#4450)
When a string enumeration has the empty string as one of its available
values, the generated code for many languages is invalid because the
empty string can not be used as an identifier.  As with numbers and
symbols, provide a mapping to an English name which can be used as a
replacement.  In this case, "empty" for the empty string/empty value.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-01-06 19:30:47 +08:00
Takuro Wada
6a080d3a0c add safe argument to quote method in python template to avoid unquoted parameter in path parameter (#4457)
Closes #4391
2017-01-06 00:55:55 +08:00
Gayathri Sharma
4452fdbc02 Resteasy changes 2016-12-27 21:33:27 -06:00
Anton Vasin
41701a15b0 Fix typo. Creactor -> Creator (#4443) 2016-12-22 23:08:06 +08:00
Ezekiel Templin
e189388371 [Ruby] Add Rakefile and Gemfile (#4448)
* Add Rakefile, Gemfile, and update client generator

* Update sample
2016-12-22 21:37:12 +08:00
wing328
204c05442d [ObjC] minor code style enhancement to ObjC API client (#4437)
* minor code style enhancement to objc api client

* update petstore sample

* remove datatype from docstring (objc)
2016-12-20 19:13:03 +08:00
wing328
4870cf4ab1 Merge branch 'Ignore_Javatypes_On_ModelPre_and_Suffixes' of https://github.com/d0x/swagger-codegen into d0x-Ignore_Javatypes_On_ModelPre_and_Suffixes 2016-12-20 17:46:52 +08:00
Vincent Giersch
7f980cd9dd fix(swift3): lowercase enum value before checking reserved words (#4357)
Signed-off-by: Vincent Giersch <vincent@giersch.fr>
2016-12-20 16:35:03 +08:00
Greg Rashkevitch
36b97c22af Fix warning docs return type (#4429)
* Objective C: Fix compilation warnings

If returnType is not provided, set the @return as void

* Run the `./bin/objc-petstore.sh`

* OBJECTIVE C SDK: Remove the return line for methods that return nothing all together

* obj-c sdk: Updated petstore sample
2016-12-20 16:10:47 +08:00
Johan Nystrom
ff70105484 Fix CSV collection parameter issues for scalatra server (#4426)
* Fix scalatra handling of CSV query parameters

* Ran petstore for scalatra server
2016-12-20 16:02:45 +08:00
wing328
43ff85db76 Merge pull request #4421 from wing328/fix_isfile_boolean
Fix `isPrimitiveType` for file property
2016-12-20 15:48:55 +08:00
wing328
7fd895b37d fix isPrimitiveType for file 2016-12-18 19:02:26 +08:00
wing328
8ccf9828e4 [Python] add hasConsumes/hasProduces to Python API template (#4419)
* add hasConsumes/hasProduces to python api template

* remove unused code in python

* fix isFile in the api doc (python)
2016-12-18 17:20:10 +08:00
Hamed Ramezanian Nik
6af43dc720 [csharp] Escape special characters in the API doc (#4183)
Special characters like <> should be HTML escaped.
2016-12-16 19:07:00 +08:00
wing328
ffbead3f9d Merge branch 'master' into typescript-angular2-build-to-dist-folder 2016-12-15 21:40:48 +08:00
wing328
131cbeb350 remove generation timestamp 2016-12-15 19:34:15 +08:00
wing328
7fc8b24001 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-12-15 00:42:51 +08:00
wing328
f63d962258 update ts angular2 sample 2016-12-15 00:42:08 +08:00
wing328
7b7e5e25ee Merge branch 'angular2-standalone-enums-support' of https://github.com/SamuelBeliveau/swagger-codegen into SamuelBeliveau-angular2-standalone-enums-support 2016-12-15 00:09:34 +08:00
wing328
a143e9c10c add int/long check for @min/@max in java model (#4395) 2016-12-14 22:21:52 +08:00
lukoyanov
a13dee7167 [Java] Play! Framework 2.4 WS client support + retrofit2 (#4270)
* implemented core integration with play 2.4 ws

* added shell script to test on CI

* added shell script to composite file for all java generators

* added some comments
changed promise param to Response<T> to allow access to http status code and raw response if needed

* removed unnecessary whitespace changes

* added java7 compatibility, play ws deps to pom.xml

* added generated play24 client

* fixed imports
2016-12-14 17:32:49 +08:00
Chris Putnam
4fa3595a41 [typescript-angular2] Fix syntax error (#4383)
* allow function so access token can be derived for each api call

* update tests

* update type for accessToken to be string or function that returns string

* fix syntax error
2016-12-14 11:50:02 +08:00
wing328
dbb66af73d [C#] Add auto-generated doc for c# 2.0 generator (#4354)
* add auto-generated doc for c# 2.0 generator

* update readme for c# 2.0

* update readme

* update namespace in the doc
2016-12-14 11:49:15 +08:00
wing328
a291d3113a [Android] better code format for Android (volley) API client (#4384)
* better code format for android volley

* better code format for apiinvoker, add docstring

* use 2-space indentation for pair class

* use 2 spaces indentation for other classes in android
2016-12-14 00:40:21 +08:00
Dan Wilson
e55664cdc9 Remove invalid code from mustache for arrays. (#4266)
Rewrite ParameterToString to handle other slice types other than just string.
2016-12-13 16:13:06 +08:00
wing328
5818f2c882 [C++] better code format for cpprest templates (#4379)
* replace tab with 4-space in cpprest templates

* remove trailing whitespaces from templates

* fix code indentation in cpprest templates

* remove empty block in cpprest templates
2016-12-13 16:09:56 +08:00
Scott Richter
da9d64d053 Fix for issue #4370 - Cpprest does not set Content-Type header on POST requests. (#4374)
* Fixed cpprest generator to include Content-Type header in requests.

* Fixing indent to use spaces.
2016-12-13 15:01:47 +08:00
Chris Putnam
0b5a6f25da [typescript-angular2] access token function (#4361)
* allow function so access token can be derived for each api call

* update tests

* update type for accessToken to be string or function that returns string
2016-12-13 00:39:09 +08:00
wing328
62aabfc6c1 Merge branch 'jfiala-beanval_2549' 2016-12-13 00:05:03 +08:00
Frederick Cai
8e200970d4 [typescript-angular2] build to dist folder 2016-12-11 23:39:18 +13:00
Vlad Frolov
4d2a13018b [Python] Make the code look Pythonic (#4352) 2016-12-09 17:26:23 +08:00
Jens Oberender
c3571b28a5 Some code cleanings of problems reported by SonarQube. (#4324)
* Some code cleanings of problems reported by SonarQube.

* Updated changes to the petshop sample.
2016-12-09 15:55:33 +08:00
wing328
a0f2b235f1 [C#] fix build.sh for PropertyChanged feature in C# API client (#4349)
* fix build.sh for PropertyChange in C#

* add new csharp files

* manual fix to enum ref in c# client
2016-12-09 00:03:38 +08:00
wing328
af2db27a83 remove trailing space in ts fetech api, add npm test to ci (#4348) 2016-12-08 18:09:20 +08:00
Christopher Chiche
a3d3082105 [Typescript/Fetch] Fix tslint issues in generated code (#4313)
* [Typescript/Fetch] Fix tslint issues in generated code

* Add security generated files.

* Use tslint version that doesn't require typescript 2

* Run build scripts
2016-12-08 16:01:50 +08:00
wing328
162352cb4b Fix maximum, minimum for Integer (#4335)
* fix int/long max, min value (removing decimal)

* fix integer min/max in parameter
2016-12-07 19:29:36 +08:00
Alvin
b7984e55a7 [Swift3][bug#4318] Bug when handling java date (#4332)
* fix bug #4318

* swift3 samples update
2016-12-07 17:58:21 +08:00
wing328
8153f0e89b Fix test spec issue (#4334)
* fix issue with swagger spec (number => integer)

* remove space from spec
2016-12-07 16:46:41 +08:00
Sebastian Haas
648f8df235 Fix for missing headers (#4328)
* Fix for  #4322

Signed-off-by: Sebastian Haas <sebastian@haas.tech>

* Run typescript-angular2-petstore.sh

Signed-off-by: Sebastian Haas <sebastian@haas.tech>

* Run typescript-angular2-petstore.sh

Signed-off-by: Sebastian Haas <sebastian@haas.tech>
2016-12-06 23:59:59 +08:00
Samuel Beliveau
964a9a9696 Support for standalone enums in Typescript-Angular2
Improved typescript primitive detection for tagging type with models namespace
2016-12-02 10:24:32 -05:00
wing328
31d31b9466 [Ruby] use hasConsumes, hasProduces in ruby client (#4310)
* use hasConsumes, hasProduces in ruby client

* add new ruby files
2016-12-02 17:22:46 +08:00
wing328
87cb779fd4 [Typscript][Angular2] Remove tab in TS Angular2 template (#4294)
* remove tab in ts angular2 template

* update petstore sample after basing on master
2016-12-01 19:09:22 +08:00
wing328
c6aea46fa0 fix import in sample code (dart) (#4292) 2016-11-30 18:30:30 +08:00
wing328
a603ccb595 [Dart] add auto-generated documentation (#4291)
* new files for dart client

* update doc for dart

* update api and model doc for dart

* update dart petstore sample

* update dart doc

* update dart petstore sample

* update dart petstore sample

* update dart client installation instruction
2016-11-30 17:41:55 +08:00
Christopher Chiche
b733334eee [Typescript/fetch][Issue4284] Handle query parameters containing colons (#4287)
Put query parameters between quotes and access object keys using square
brackets to make sure special characters are handled in parameter
names.
Closes #4284
2016-11-30 15:22:38 +08:00
wing328
1925928efa Merge pull request #4038 from alechill/4025-typescript-fecth-request-options
[TYPESCRIPT] Support passing custom RequestInit options in typescript-fetch client…
2016-11-29 22:32:03 +08:00
ChrisJamesC
e7397d208e Fix linting issues
Add missing semicolons and remove trailing space in generated code.
2016-11-28 16:48:30 +01:00
Robert Biehl
1ea9865a44 [PHP] Fix discriminator handling (#4246)
* [PHP] Fix discriminator handling

* [PHP] Fix discriminator handling (Update examples)
2016-11-25 16:12:41 +08:00
Daniel
c15743bfe6 Issue4254 (#4255)
* Issue 4254 - Added mechanism for cache bursting

* Issue 4254 - Updated petstore samples
2016-11-25 00:14:59 +08:00
wing328
5f372ef15e Merge pull request #4219 from jordanyaker/master
fix(javascript): add check to see if the parsed response is really empty.
2016-11-23 17:23:52 +08:00
menchauser
6ebc2fc051 Fix support for 'class' properties in Java codegen (#4237)
* Fix support for 'class' properties in Java codegen

Currently Java codegen works successfully for property named 'class' but
fails on '_class', '__class', etc, because of 'Object.getClass()'
overloading.

This fix is intended to avoid all Object method overloading cases.

* Regenerated samples for Java petstore-security-test
2016-11-23 00:18:40 +08:00
wing328
4e2c037e21 [Java] fix Java (Jersey1.x) test case (#4239)
* fix java jersey 1 test case

* fix test for java jersey2.x api client
2016-11-23 00:16:28 +08:00
wing328
58b66a0b0a python code style enhancement (#4238) 2016-11-22 23:01:41 +08:00
Ewan Mellor
9dc809bdc7 Add two override points inside AlamofireRequestBuilder in the Swift 3 template. (#4170)
* Add two override points inside AlamofireRequestBuilder in the Swift 3 template.

These allow the caller to control the request configuration (e.g.
to override the cache policy) and to control the Content-Type that is
given to an uploaded form part.

* Regenerate with ./bin/swift3-petstore-all.sh to match recent changes.

This includes a few minor changes that weren't made in this branch, so this
apparently wasn't run on master after some other recent changes.
2016-11-22 00:19:17 +08:00
Martin McWhorter
515e723fae Allow TypeScript noImplicitAny: true (#4205)
* Allow TypeScript noImplicitAny: true

* Update typescript-angular2 examples
2016-11-21 19:39:07 +08:00
szakrewsky
76965594b9 Issue #2449 SubClass annotations are missing from the base class (#4085)
* petstore up to latest

* Issue #2449 SubClass annotations are missing from the base class

* include child in all its super types
2016-11-21 17:03:26 +08:00
wing328
6ad38874c5 [ObjC] version update for ISO8601 (#4220)
* remove php apache license

* update iso8601 version for objc client
2016-11-21 00:43:41 +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
4ae3e57932 Merge branch 'beanval_2549' of https://github.com/jfiala/swagger-codegen into jfiala-beanval_2549 2016-11-19 16:39:31 +08:00
jfiala
b02d505ad9 Refine CXF Add Spring Annotation-Config + Jboss flag for CXF/Resteasy + fix OuterEnum (#4164)
* add json annotations

* add cli flag to check for jaxb annotations

* add CLI-flag for switching Spring-XML or annotation config #4088

* add cli flag for generating jboss depl. descriptor #4088

* add JbossFeature CLI flag to Resteasy #4088

* update/add tests #4088

* cleanup tabs #4088

* improve api formatting #4088

* refine formatting #4088

* refine formatting again #4088

* add separate CLI-flags for controlling junit test features #4088

* add json annotations

* add cli flag to check for jaxb annotations

* add CLI-flag for switching Spring-XML or annotation config #4088

* add cli flag for generating jboss depl. descriptor #4088

* add JbossFeature CLI flag to Resteasy #4088

* update/add tests #4088

* cleanup tabs #4088

* improve api formatting #4088

* refine formatting #4088

* refine formatting again #4088

* add separate CLI-flags for controlling junit test features #4088

* add check for void methods + assertNotNull(response) #4088

* add spaces for @Produces #4088

* allow build with no web.xml config #4088

* comment invocations of tests #4088

* update petstore sample jaxrs-cxf server with gen/java first #4088

* re-generate jaxrs-cxf with src/gen/java #4088

* add client jaxrs-cxf #4088

* add switch to load SwaggerUI automatically #4088

* update to CXF 3.1.8 including supportSwaggerUi flag #4088

* update to cxf 3.1.8 and swagger-core 1.5.10 #4088

* update generated petstore for jaxrs-cxf #4088

* change Spring Boot urls to root #4088

* fix spring xml config #4088

* fix external enum usage for jaxrs-cxf #4160

* cleanup jaxrs-annotations in impl class

* fix handling of multiparts #4088

* fix @Min/@Max comments in beanValidationQueryParams #4088

* add swagger-codegen-ignore file+add src/test/resources #4088

* add cli-flag for produces/consumes json in api #4088

* add test case for outerEnum #4160
2016-11-19 16:09:13 +08:00
Chester Husk III
7a7eb113b3 address unused parameters and possible-nullity warnings (#4210)
* address unused parameters and possible-nullity warnings that newer versions of typescript give for this file

* update example generated clients using the new nullability code
2016-11-19 15:50:22 +08:00
wing328
cde24f1113 Merge pull request #4189 from cbornet/spring_cloud_operations
[Spring] Use tag operation grouping for spring-cloud
2016-11-18 16:51:36 +08:00
Vincent Giersch
9e08b637ec fix(swift3): rename reserved enum values (#4201)
Example:
- case public = "public"
+ case _public = "public"

Signed-off-by: Vincent Giersch <vincent@giersch.fr>
2016-11-18 14:21:17 +08:00
Herman Schistad
2dafdffce5 Allow multiple requests in parallel in Python client (#4187)
* Allow multiple requests in parallel in Python client

If you tried to do two parallel calls to the same API object in the
Python client you would get an error from urllib3 connection pool:

  Connection pool is full, discarding connection: ***

Because the default maxsize=1:
f9409436f8/urllib3/connectionpool.py (L162)

By defaulting to a higher maxsize we mitigate for the common use case
where a user is running a couple of requests in parallel.

Ideally, in the future, this should be a configuration paramater
together with the pool size.

* Add sample code after changing maxsize
2016-11-18 13:38:32 +08:00
wing328
90512e6326 Remove Apache license from API client generators (#4197)
* remove php apache license

* remove apache license from C#

* remove apache license in objc code

* remove license from swift 3 code

* remove apache license from perl code

* remove license from scala code

* remove license from ts, go, android, cpp, scala

* remove license from java api client

* restore clojure petstore files

* remove license from travis file

* clean up apache-related terms in php, ruby, python mustache tempaltes

* remove license from JS API cilent
2016-11-16 21:44:49 +08:00
wing328
39ffc0ae62 [Ruby] remove apache2 license from ruby api client (#4149)
* remove apache2 license from ruby api client

* remove license from gem spec
2016-11-16 16:38:15 +08:00
cbornet
4a196a9187 [Spring] Use tag operation grouping for spring-cloud
Instead of basepath based grouping that is used by Spring boot/MVC
2016-11-15 18:46:48 +01:00
wing328
97924c78a0 update objc samples 2016-11-15 16:16:20 +08:00
wing328
07bec36deb [ObjC] AFNetworking pinnedCertificates API usage fix (#4143)
* Fixed afnetworking API usage: pinnedCertificates now declared as NSSet, not as NSArray

* Petstore updated
2016-11-15 16:10:19 +08:00
jfiala
a7252e7560 update check for performBeanValidation #2549 2016-11-12 23:31:49 +01:00
jfiala
9d8c419698 update generated petstore for ok-http-gson #2549 2016-11-12 23:20:03 +01:00
mbohlool
876669cd31 [Python] Add support for request timeout (#4173)
* [Python] Add support for request timeout

* Update python petstore api

* [Python] Add test for request timeout
2016-11-11 23:48:53 +08:00
Chakrit Wichian
f6a02f4339 [ruby] Make sure super is always called for ApiError class. (#4168)
* [ruby] Make sure super is always called for ApiError class.

* Add test for Petstore::ApiError
2016-11-11 17:39:45 +08:00
mbohlool
cfd8add825 Add test for _preload_content flag 2016-11-10 14:24:06 -08:00
mbohlool
ba9e449fd4 Support _preload_content flag in python client (#4166)
* Modify python client templates to support _preload_content flag

* Update python petstore
2016-11-10 23:43:32 +08:00
Anton WIMMER
6d6cfb4984 fix[dart]: send ISO8601 dates 2016-11-08 14:29:27 +01:00
Roman Truba
73276fd63a Merge branch 'master' into afnetworking-pinned-certificates-fix 2016-11-08 15:48:46 +03:00
wing328
935bdfe628 better handling of */* 2016-11-08 16:17:51 +08:00
mbohlool
37460ee833 Select application/json content-type in python generated client, if */* is in the list of content-types 2016-11-07 11:54:01 -08:00
Roman Truba
a1cd01916e [ObjC] Fix deprecated JSONModel API usage (#4133)
* Fixed deprecated usage -[JSONKeyMapper initWithDictionary:]

* Petstore regenerated

* Change minimal required version of JSONModel
2016-11-07 23:47:09 +08:00
Roman Truba
0c7ab63912 Petstore updated 2016-11-05 22:11:09 +03:00
keysolutions
ab9ea5b2c3 Add constructFromObject to Javascript enum generation. (#4120)
* Add constructFromObject to Javascript enum generation.

Generated code calls constructFromObject on enum types, but enum did not define the necessary function. Returns the value of the enum.

* Update Petstore JS API client
2016-11-05 23:14:48 +08:00
Roman Truba
1a2b345c57 [Obj-c] Generated code documentation fixes (#4130)
* Fixed missing parameters names for obj-c generated code

* Obj-c sample regenerated
2016-11-05 23:13:51 +08:00
Christophe Bornet
901a981f26 [feign] Use feign-form (#4124)
* [feign] Use feign-form

Fix #4108

* [feign] Convert java.util.Date params to rfc3339 with an Expander
2016-11-04 21:13:18 +08:00
ircecho
51b941cf88 DART: Removed the 'justIgnoreThisFlag' flag (#4116)
* feat[dart]: remove unused argument 'justIgnoreThisFlag'

* chore[dart]: petstore rebuild
2016-11-04 19:17:23 +08:00
Hamed R. Nik
af4b32178f [ruby] Validate array correctly
It never throws error with any values in array. Every element should be validated against the enum.
2016-11-03 17:03:48 +00:00
wing328
4eb75f8088 add back setter to spring model (readonly attr) 2016-11-02 15:40:00 +08:00
wing328
5c0ce022e9 update dart intl version 2016-11-02 11:17:04 +08:00
sutdisi
819a8648d5 Jersey2 Patch Support (#4110)
* Fix for issue 2848 Adding support for PATH in jersey2

* Updating petstore sample for PATCH update
2016-11-02 09:43:29 +08:00
wing328
0eaab90ba5 Merge branch 'retrofit2-vendor-mime-type' of https://github.com/Rajmohan/swagger-codegen into Rajmohan-retrofit2-vendor-mime-type 2016-11-01 21:40:22 +08:00
Cliffano Subagio
5c53513a30 [python] Add packageUrl option, replacing infoUrl in setup.py (#4101)
* [python] Add packageUrl option, replacing infoUrl in setup.py .

* [python] Regenerate Python petstore sample.

* [python] Regenerate Python petstore security test sample.
2016-11-01 18:21:53 +08:00
Maciej
c2780abd70 fixing issue#4037 - ts ng2 response type is always json (#4060)
* fixing issue#4037 - default response is always json

* updated documentation for new method

* updated comment for new method
2016-11-01 17:02:40 +08:00
wing328
e230ef9f50 Merge pull request #4072 from cbornet/spring_response_wrappers
[spring] add an option to choose the response wrapper type
2016-11-01 16:41:07 +08:00
Robert Biehl
6963bf8748 [Swift] Swift3 inheritance support (#4052)
* Swift3 inheritance support

* Mode inheritance support
* Handle 204 No Content without crashing
* Added some new reserved words for Swift (Error, URL)

* Update swift3 pet store example

* PR feedback fixes

* removed unnecessary newline from Models.swift
* removed unnecessary code comments
* ~~public~~ open

* Typo

* Fix review feedback

* fixed comment
2016-11-01 16:25:43 +08:00
cbornet
21ec2bc866 [spring] add an option to choose the response wrapper type
Also generate the spring-cloud sample with a HystrixCommand wrapper
2016-10-25 15:40:51 +02:00
wing328
aa46aca7cf update JS petstore samples 2016-10-25 16:52:32 +08:00
Mathieu MARACHE
8bee0de4e9 [Qt5/C++] Arrays of primitive types fix (#4046)
* Corrects issue #3410 when trying to create Arrays of primitive types

* Use c++11 nullptr keyword and various indentation issues resolved

* ran petstore on new mustaches
2016-10-22 22:58:39 +08:00
wing328
d1eca76974 add test for java6 jersey2 client 2016-10-20 11:12:31 +08:00
raj k
23fee386f2 Vendor Mime-type support in retrofit2 2016-10-19 16:19:41 -07:00
Alec Hill
41a7aaffcc Support passing custom RequestInit options in typescript-fetch client, to enable fetch API specific options (eg including credentials, enabling CORS etc) 2016-10-19 18:03:58 +02:00
wing328
bbb0cdc8c3 update gitignore to include PetStore.pro.user 2016-10-19 16:43:11 +08:00
wing328
7f36dd7852 increase timeout value for qt5 petstore test 2016-10-19 16:34:26 +08:00
wing328
702344ed75 better handling of reserved words for sintatra, dart 2016-10-18 17:58:19 +08:00
Jim Schubert
689da8f915 [csharp] Fix apiPackage,modelPackage,excludeTests (#4010)
* [csharp] Fix apiPackage,modelPackage,excludeTests

The apiPackage, modelPackage, and excludeTests values were not being
populated correctly from external configs (passing -c filename to
generator).

This commit allows those properties to work correctly with the Csharp
client generator. Previously the Api and Model namespaces were hard
coded after additionalProperties for these were evaluated.

The files which generate test files for models and api classes
didn't honor the excludeTests option.

* [csharp] Regenerate sample

* [csharp] Fix modelPackage in README template
2016-10-17 16:26:28 +08:00
wing328
2075204950 Merge pull request #4005 from wing328/ts_fix_header
[Typescript][Fetch] fix header parameters in TS Fetch API client
2016-10-16 15:43:25 +08:00
wing328
5719307799 Merge pull request #4004 from cbornet/spring_templates
Fix issues in spring templates
2016-10-16 15:33:38 +08:00
wing328
5a5d3fd5e5 fix header parameter in ts fetch 2016-10-16 15:27:11 +08:00
Ragnis Armus
dee2dd8d36 [Qt5 C++] Replace illegal characters in param names for Qt5 generator (#3978)
* Fix illegal characters in param names

* Re-generate the petstore sample
2016-10-15 18:23:36 +08:00
cbornet
12a0fd6471 fix issues in spring templates
Wrong indentation and extra lines in api templates
Java8 default methods are used if dateLibrary is java8

Fix #3408
2016-10-14 17:57:20 +02:00
Max Stoliar
0838523a35 [Swift] Adding Swift3 generator
* This address #3788
* Contains all changes made in #3823
* Also contains many changes made by @ewanmellor, thanks!
2016-10-14 18:32:47 +03:00
wing328
03ed192b98 [Android] fix URL encoding for Android API client (#3992)
* fix url encoding for android

* add exception handling for url encoding in android
2016-10-14 11:12:37 +08:00
wing328
7bbe3dcb53 Merge pull request #3982 from wing328/ruby_check_required_attr
[Ruby] fix required property check in Ruby models
2016-10-13 23:25:58 +08:00
wing328
47c387470c fix required prop check for ruby client 2016-10-13 16:38:39 +08:00
wing328
d0f3cd642d fix missing () in python doc 2016-10-13 15:28:11 +08:00
Hamed Ramezanian
34f1e36146 Sanitize tuples properly (#3949)
* Sanitize tuples properly
In Python, Tuples are fixed size in nature whereas lists are dynamic. So
they should be sanitize as same as lists.
Failure case here is when you have a query or post parameter as
Datetime.

* Update the Petstore sample

* Skip file sanitization

* Return tuple instead of list

* Sanitize all tuples, no exceptions
2016-10-13 14:41:40 +08:00
wing328
59502bb92b Merge pull request #3963 from olivervidovic/issue-890
issue-890 correct fix for deprecated Jersey method
2016-10-12 16:05:09 +08:00
wing328
47d3c3a767 update retrofit1,2 samples 2016-10-12 15:48:34 +08:00
wing328
a276c51cd8 Merge branch 'master' of https://github.com/punksta/swagger-codegen into punksta-master 2016-10-12 15:46:22 +08:00
Oliver Vidovic
da6e829c8e issue-890 correct fix for deprecated Jersey method
additionally
- fixed EnumValueTest to the directory structure based on the declared package
- regenerated samples/client/java/jersey1
2016-10-11 11:43:54 -04:00
Christophe Bornet
2680995825 [Java/Jackson] use a jdk6 compatible DateFormat for java.util.Date (#3768)
* [feign] use a jdk6 compatible serializer for java.util.Date

See #3727

Fix #3753

* [jersey] use a jdk6 compatible DateFormat for java.util.Date
2016-10-11 00:42:52 +08:00
Stas Shakirov
26faf6cf4e remove newline char in *.mustache; added generated code 2016-10-10 14:42:08 +03:00
Andreas Franzén
d21613c6ab Bugfix/3929 do not set multipart (#3932)
* Do not set Content-Type to multipart/form-data
It causes superagent to not add the boundary in the Content-Type

* Run shell-scripts
2016-10-08 12:36:56 +08:00
wing328
65f925f45c fix python required property check and validation for optional properties 2016-10-07 15:50:57 +08:00
vishal khawarey
0ca60352e2 required tag is used in model, allows null values (#3923)
* required tag is used in model, allows null values

* updated petstore api for CI

* dont raise exception for 0 or false
2016-10-07 15:26:05 +08:00
wing328
574349570a fix number format for dart model 2016-10-07 00:47:05 +08:00
sylvain-abadie
94cd2cb6a0 [Objc] Added support for lower case discriminator (#3927)
* [Objc] Added support for lower case discriminator

* Updated Objc petstore samples

* Fixed code style
2016-10-06 23:29:55 +08:00
wing328
cd6b5fec20 [Android][Volley] add serializeModel support to Android (#3933)
* add serializeModel support to Android

* add test for new android option
2016-10-06 17:35:33 +08:00
wing328
6ef0209dea add back java okhttp petstore client 2016-10-05 22:55:01 +08:00
wing328
8db0ec8b73 fix pom duplicated id issue 2016-10-05 22:55:01 +08:00
wing328
c915f8ecdc update pom to test java okhttp-gson parcelable models 2016-10-05 22:55:01 +08:00
wing328
8ce8082f7f fix bug with parcelable 2016-10-05 22:54:17 +08:00
Bartek Kryza
40a1879797 Bugfix/issue 3723 (#3726)
* Extended request generation logic with support for serialized body content types other than Json

* Updated the Petstore Python client tests

* Fixed body content type identification for strings
2016-10-02 17:02:03 +08:00
Charles
d4f9a16cf6 Cgardens nested object regex (#3879)
* stop parsing key of object at first comma.

* update samples
2016-10-02 16:32:17 +08:00
Scott Richter
b2e2643fd2 [Cpprest] Fixing issue #3773 (#3876)
* Fixed errors with cpprest client generation when generating a client that uses arrays of primitive types (vector) and file responses (HttpContent).

* Updated the petstore sample using script.

* Removed debug code.

* Removed extra newline to match master.

* Fixed binary file handling in cpprest. Updated petstore samples.

* Update readme to add Cummins to list

* Cleaning up for pull. Removing unnecessary changes.

* Fixing petstore

* Fixing error in build.

* Fixed error in stream copy for binary data

* Replaced tab with 4 spaces in all modified files.

Replaced tab with 4 spaces in all modified files.
2016-09-30 10:31:24 +08:00
wing328
f59c28d08a escape callback parameter for java(okhttp) and python 2016-09-29 17:41:47 +08:00
Dalibor Karlović
10d3dea89e [PHP] fix PHPUnit invocation, add basic phpunit.xml.dist (#3864)
* feature(phpunit) fix PHPUnit invocation, add basic phpunit.xml.dist

* fix(phpunit) add proper paths relative to phpunit.xml.dist
2016-09-28 19:44:07 +08:00
wing328
ec25bd793f [Java] Remove duplicated model description in Spring, JAX-RS models (#3887)
* fix duplicated description in spring model

* fix duplicated description in jaxrs models

* fix resteasy dependency
2016-09-28 19:34:38 +08:00
Dalibor Karlović
70fa2fb78e [PHP] Better PSR2 compatibility (#3863)
* feature(php-cs-fixer) add php-cs-fixer support

* feature(php-cs-fixer) tweak Mustache templates to fit PSR2

* feature(php-cs-fixer) bin/php-petstore.sh output
2016-09-27 08:23:44 +08:00
Jason Gavris
9e54dce92f [Swift] Use thread safe manager dictionary 2016-09-26 11:27:07 -04:00
wing328
fa12cd3787 Replace ^M with new line (\r) in mustache template (#3865)
* fix jaxrs line break

* fix java gradle bat line break

* fix scala gradle line break

* fix undertow crt line break

* fix spring line break

* fix undertow line break in pom

* rollback undertwo petstore to use petstore.yaml
2016-09-26 16:49:44 +08:00
wing328
dce532e8c7 fix trailing comma in go api client 2016-09-24 00:57:01 +08:00
wing328
f47208a75b Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-09-24 00:17:54 +08:00
wing328
110c22ea98 Merge branch 'issue-3690-additional-fields' of https://github.com/neilotoole/swagger-codegen into neilotoole-issue-3690-additional-fields 2016-09-24 00:17:18 +08:00
wing328
d1c1c9d08f fix typescript-fetch base path by removing ending slash 2016-09-23 19:12:40 +08:00
Kamil
9301db60e6 redundant quotation mark (#3837)
* Removed redundant quotation mark

This additional quotation mark is causing problems in out project and should be removed.

ngrep output:
```
Content-Disposition: form-data; name="file"; filename="file""
  ..Content-Transfer-Encoding: binary..Content-Type: image/jpg..Content-Length: 27855..........JFIF....
```

* updated petstore sample

* removed line break
2016-09-23 18:33:27 +08:00
Sergii Rustamov
fee23f2230 Support cpprest on Linux (#3847)
* Support cpprest on Linux

* Update petstore code
2016-09-23 18:32:33 +08:00
wing328
e3b891a924 Merge pull request #3850 from wing328/fix_swift_pod_file
[Swift] add default value to swift podspec
2016-09-22 19:26:24 +08:00
Kim Sondrup
9bb097fcf5 [PHP] Correct Composer license identifier (#3848)
* [PHP] Correct Composer license identifier

* Update petstore PHP
2016-09-22 18:49:08 +08:00
wing328
70ed52cee0 add default value to swift podspec 2016-09-22 18:41:53 +08:00
wing328
d11c7ad09a fix typescript angular2 model - optional/required 2016-09-21 20:08:27 +08:00
wing328
4293dff3a4 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-09-19 16:26:51 +08:00
wing328
1d748e47da fix copmile for C# model annotation 2016-09-19 16:25:47 +08:00
wing328
e4792555df add petstore jmeter sample 2016-09-19 14:59:48 +08:00
Anton Savchenko
945c9a1406 [typescript-angular2] npm publish missing files (#3791)
* [typescript-angular2] npm publish missing files

* [typescript-angular2] build to dist folder
2016-09-19 10:41:29 +08:00
geetikagupta16
1e4f30eb16 Fixed bug for handling optional header parameters (#3776)
* Fixed #3774
Refactored code to handle optional header parameters.

* Changed null check with pattern matching
2016-09-15 23:28:01 +08:00
timadamson
fe7acabc4b add authentication to typescript-angular2 (#3781)
* add authentication to typescript-angular2

* updated typescript-angular2 petstore example

* update typescript-angular2 with simplified conditionals
2016-09-15 00:35:14 +08:00
wing328
e6049d6d30 Merge pull request #3797 from xaviapa/bugfix/issue-3783
Added !is_null condition in setter conditions for non-required proper…
2016-09-14 20:54:05 +08:00
Xavi Aparicio
31a3436a8e Added !is_null condition in setter conditions for non-required properties 2016-09-14 13:41:05 +02:00
wing328
1dd9ee39af [C#] Add CI tests to cover C# Petstore client with "PropertyChanged" (#3796)
* add c# api client with proeprty changed to CI

* add shell script to update all C# petstore sample
2016-09-14 18:43:13 +08:00
wing328
19047c2eec [C#] fix the location of FodyWeavers.xml (#3782)
* fix fody weavers xml location

* update c# petstore sample
2016-09-13 18:05:42 +08:00
wing328
e14cf8a526 Merge branch 'csharp_fix_enum' of https://github.com/wing328/swagger-codegen into wing328-csharp_fix_enum 2016-09-13 16:46:27 +08:00
wing328
907db0dd5b [Scala] enhancement to indention and null check (#3775)
* fix scala api null check and indention

* minor format fix
2016-09-13 09:56:06 +08:00
wing328
3e0a1be8aa update typescript-angular2 petstore sample 2016-09-12 16:44:35 +08:00
Richard
bc2f614b92 apiInvoker : in getInstance, if instance is null initialize instance (#3766)
* apiInvoker : in getInstance, if instance is null initialize instance
build : replace the deprecated volley library by the android one
jsonUtil : Add in gsonBuider an adapter to deserialize Date class
And update petstore sample for volley library

* Update apiInvoker.mustache

Add a space after if,  to stick to the code style.

* Update ApiInvoker.java

Add a space after if, in petstore samples, to stick to the code style.
2016-09-12 15:56:35 +08:00
wing328
5bb203504c Merge pull request #3772 from wing328/scala_model_indent
[Scala] better format of model properties
2016-09-12 11:27:02 +08:00
Bartek Kryza
6d6832e7a6 Fix for #3712 - invalid enum array validation in Python client mustache model (#3713)
* Fixed invalid enum array validation in Python client mustache model

* Updated the Petstore Python client tests

* Removed superfluous array enum test

* Added test cases for Python client array and map enums

* Improved map enum error message
2016-09-12 11:00:49 +08:00
ataraxus
1d7d37409a Fix for issue #3743 (#3744)
* fix map usage in api generation #3694

* fix map usage in api generation #3695

* close impl gap between queryParam and formParam, to be more consistent

* use working copy constructor
2016-09-11 23:11:35 +08:00
wing328
ac69f45ddc better format of model properties 2016-09-11 18:44:36 +08:00
Paul Ebermann
65ca059221 Issue #3738: regenerate Scala samples (no code changes). 2016-09-08 13:00:40 +02:00
Ville Skyttä
735390f633 [Python, Ruby, PHP] Validate min/maxItems (#3734)
* python: Validate min/maxItems

* ruby: Validate min/maxItems

* lumen: Validate min/maxItems

* php: Validate min/maxItems
2016-09-08 17:33:59 +08:00
wing328
326b8020d2 fix property name 'result' for android using "this" 2016-09-07 18:55:19 +08:00
wing328
892c9e017a Merge pull request #3730 from scop/python-maxlength-msg
python: Fix model maxLength validation error message
2016-09-07 17:12:28 +08:00
wing328
3d1f621f8b Merge pull request #3729 from scop/spelling
Spelling fixes
2016-09-07 15:43:17 +08:00
Cliffano Subagio
92eb722ced [ruby] Add gemspec required_ruby_version setting. (#3718)
* [ruby] Add gemspec required_ruby_version setting.

* [ruby] Add gemspec required_ruby_version setting.

* Add gemRequiredRubyVersion option to Ruby client code generator.
2016-09-06 22:25:39 +08:00
Ville Skyttä
f436f0eee2 python: Fix model maxLength validation error message 2016-09-06 14:49:00 +03:00
Ville Skyttä
91b7494e3e Spelling fixes 2016-09-06 14:45:04 +03:00
wing328
fb3b91550c add back test cases for java jersey1 client 2016-09-06 18:51:28 +08:00
Ville Skyttä
ddc5b80438 [Lumen, PHP, Python, Ruby] Implement exclusiveMinimum/Maximum (#3717)
* Ignore exclusiveMinimum/Maximum in setting hasValidation

* python: Implement exclusiveMinimum/Maximum

* ruby: Implement exclusiveMinimum/Maximum

* lumen: Implement exclusiveMinimum/Maximum

* php: Implement exclusiveMinimum/Maximum
2016-09-06 14:57:35 +08:00
ataraxus
59891c7f66 fix map usage in api generation #3694 (#3714)
* fix map usage in api generation #3694

* fix map usage in api generation #3695

* close impl gap between queryParam and formParam, to be more consistent
2016-09-06 10:59:54 +08:00
Neil O'Toole
f751e50e2e Issue #3687 silence resty logging [Go] (#3705)
* disabling resty logger

* #3687 updating go-petstore
2016-09-05 17:11:34 +08:00
wing328
e68b364479 update ruby regular expression to use \A 2016-09-05 16:06:38 +08:00
Masahiro Saito
92aa8ed767 [Ruby] Fix ambiguous regex (#3716)
* ruby: Fix ambiguous regex

* ruby: Add test for strict regex
2016-09-05 15:37:54 +08:00
wing328
43bac10bb3 Merge pull request #3700 from scop/php
php: Fix syntax error when pattern contains a single quote
2016-09-03 16:37:40 +08:00
Kim Sondrup
1539986984 [PHP] Corrected PHPDoc type declarations (#3710)
* [PHP] Corrected PHPDoc type declarations

* Update petstore PHP
2016-09-03 16:06:07 +08:00
Neil O'Toole
8183d96088 #3690 adding RequestURL, Method, Operation and Payload fields to APIResponse 2016-09-02 06:49:39 -06:00
wing328
7a4a430c43 Merge pull request #3702 from scop/ruby
ruby: Fix syntax error when pattern contains a single quote
2016-09-02 16:22:47 +08:00
Ville Skyttä
c43286c569 Python collection formatting fixes/support (#3697)
* python: Rework form data collection formatting support

* python: Add/fix support for query string collection formatting

* python: Add/fix support for path collection formatting

* python: Add/fix support for header collection formatting
2016-09-02 16:17:46 +08:00
Ville Skyttä
2af822677f php: Fix syntax error when pattern contains a single quote 2016-09-02 10:42:08 +03:00
Ville Skyttä
6bb0ea2e8a ruby: Fix syntax error when pattern contains a single quote 2016-09-01 20:45:52 +03:00
wing328
b909252bb8 Merge pull request #3699 from scop/java
java: Javadoc fixes
2016-09-02 00:44:53 +08:00
Ville Skyttä
0363858672 java: Javadoc fixes 2016-09-01 18:07:35 +03:00
Ville Skyttä
e52a8e34cb Spelling fixes 2016-09-01 17:39:30 +03:00
Jyotsna Karan
062e6fc3ac Added functionality to handle optional parameters for Scala (#3683)
* 1. Modified api.mushtache to handle optional paramters for scala (#3665)
2. Updated petstore sample for scala

* Generated scala-petstore.sh (#3665)

* 1. Updated api.mustache to handle optional thing with headers and file parameters
2. Generated petstore sample for the above changes
2016-09-01 18:11:23 +08:00
Ville Skyttä
8e7d3d1a72 Python fixes (#3689)
* python: Fix unsupported method exception message

* python: Implement form data collection formatting
2016-09-01 15:05:52 +08:00
wing328
d464bfbd59 fix JS auth issue due to missig comma 2016-08-31 17:50:56 +08:00
wing328
eb59e2945e remove unnecessary change for c# codegen 2016-08-31 17:31:55 +08:00
wing328
8523c57f8c remove unnecessary change in JS closure codegen 2016-08-31 17:13:35 +08:00
wing328
5804fbc1dd remove unnecesary change in JS codegen 2016-08-31 16:52:46 +08:00
wing328
322862c4b6 add hided timestamp option to swfit codegen 2016-08-31 16:45:12 +08:00
wing328
da45cb7ff5 remove unnecessary changes for php codegen 2016-08-31 16:38:30 +08:00
wing328
4ea4488212 remove unnecessary change for ruby codegen 2016-08-31 15:57:04 +08:00
wing328
ebfddd0a58 remove unnecessary changes for python codegen 2016-08-31 15:49:22 +08:00
wing328
2ced9e1deb Don't HTML escape PHP pattern output (#3672)
* php: Do not HTML escape patterns

* php: Update petstore

* lumen: Do not HTML escape pattern

* lumen: Update petstore
2016-08-31 14:07:29 +08:00
wing328
429bc46a79 Merge branch 'python-patterns' of https://github.com/scop/swagger-codegen into scop-python-patterns 2016-08-31 13:54:47 +08:00
wing328
343ca03512 Merge branch 'issue-3647' of https://github.com/zbiro/swagger-codegen into zbiro-issue-3647 2016-08-31 00:25:06 +08:00
Ville Skyttä
fa0e0f4fcc python: Update petstore 2016-08-30 08:07:35 +03:00
Ville Skyttä
a95ade6d2a php: Update petstore 2016-08-30 08:05:04 +03:00
Daniel Ge
dd1ed12318 Make connection failures visible with generated Ruby SDKs (#3640)
* Make connection failures visible in Ruby SDK

The underlying HTTP library, Typhoeus, requires you to be explicit about
error handling. Unfortunately, this also means that we can't assume that
`response.success?` will be false only when the HTTP status code is not
a 200; it could also be false when the request fails (timeouts, TLS
verification issues, etc.). This commit adds explicit error handling for
these cases.

* Update samples
2016-08-30 10:28:07 +08:00
Ville Skyttä
224fd208e7 Various python cleanups (#3650)
* python: Let logging format messages on demand

* python: Use six more

* python: Remove unused imports

* python: flake8 fixes

* python: Make examples compatible with Python 3

* python: Spelling fixes
2016-08-30 10:16:17 +08:00
Zoltan Biro
b050ba9dc3 regenerate petstore sample 2016-08-29 16:47:22 +02:00
sidhantgoyal
8dfe230b7c [android] volley socket timeout configurable (#3646)
* [android] volley socket timeout configurable

* Updated Android Volley Petstore sample
2016-08-29 16:31:49 +08:00
Ville Skyttä
2fbec6d9eb Spelling fixes 2016-08-28 17:05:34 +03:00
Ville Skyttä
9c92bcb693 perl: Sync default user agent with other languages 2016-08-28 15:11:32 +03:00
wing328
598c21b06e add new perl petstore files 2016-08-28 16:02:09 +08:00
wing328
72d0cd7eb4 update petl sample 2016-08-28 15:57:50 +08:00
Ville Skyttä
b4c139f19b Spelling fixes 2016-08-27 02:34:33 +03:00
wing328
81f947e723 update android petstore sample, add this to volley's model 2016-08-25 23:12:23 +08:00
Tony Wang
beaf1fc7aa fix #3477, add RxSwift support for Swift (#3490)
* fix #3477, add RxSwift support for Swift

* make the SwaggerClient scheme shared
2016-08-25 19:34:12 +08:00
Jason Gavris
e89f914e8b [Swift] Handle String responses 2016-08-23 10:18:01 -04:00
Jason Gavris
3a457c6a7e [Swift] Handle Void responses 2016-08-23 10:03:51 -04:00
Ryan Martin
c1f3c51427 [Swift] Include HTTP status code and body data in response errors
This is useful when differentiating different error responses. Example:

if let e = error {
  switch e {
    case ErrorResponse.Error(400, _, _): responseLabel.text = "Unknown error"
    case ErrorResponse.Error(403, _, _): responseLabel.text = "Not logged in"
    default: responseLabel.text = "\(e)"
  }
}

The existing error is straight from Alamofire and only includes the HTTP
status code in the body of the message (not broken out as a separate value).
It also does not include the response body, which may be useful.
2016-08-22 12:30:03 -04:00
wing328
a58845bb0f add function to handle missing delimiter in regex 2016-08-22 18:01:06 +08:00
wing328
4e20bd9bab [Java][Spring][Inflector][Jax-RS] To fix various enum issues (#3615)
* fix spring enum deserialization issue

* fix enum class for spring

* update java inflector to fix enum tostring

* fix jaxrs jersey1 enum toString

* fix jaxrs jersey patch issue
2016-08-20 17:54:45 +08:00
Kevin Chabreck
64e03422c0 [Spring Boot] use port defined in spec file for server.port value (#3605)
* uncommented server.port property in application.mustache template and set it to serverPort value parsed from spec file

* update Petstore sample for Spring MVC and Boot
2016-08-19 17:29:36 +08:00
wing328
535de68701 update go petstore sample 2016-08-17 23:05:03 +08:00
Scott Williams
68d63ec783 Create setter for models inline with Issue 3210 2016-08-15 23:31:30 +01:00
Nekrasov Aleksander
91675c97e2 Fix resteasy offsetdatetime provier (#3332)
* Fix offsetDateTime and remove unnecessary override annotations

* Update petstore samples to CI for resteasy testing

* fix resteasy templates path

* add ability to hide generated annotations

* Update petstore resteasy samples

* Deduplicate artifact names in resteasy projects
2016-08-15 23:46:52 +08:00
wing328
3d717bd874 add symbolic enum support to csharp 2016-08-12 16:27:47 +08:00
wing328
2943177d06 Merge branch 'kartenkarsten-patch-1' 2016-08-12 15:37:46 +08:00
wing328
1c9c2eb09c update java jersey1 sample 2016-08-12 15:37:31 +08:00
wing328
621dee30a8 Merge branch 'patch-1' of https://github.com/kartenkarsten/swagger-codegen into kartenkarsten-patch-1 2016-08-12 15:33:02 +08:00
wing328
0a5cd19e97 update JS test cases 2016-08-12 10:30:33 +08:00
wing328
3c1e47c31d Merge branch 'feature/jack/update-swift-alamofire' of https://github.com/JackWink/swagger-codegen into JackWink-feature/jack/update-swift-alamofire 2016-08-12 08:59:12 +08:00
wing328
752ba61e67 [Go] Add more test cases and fix numeric form/header parameters (#3574)
* add more tests for go, fix numeric form/header parameters

* update go sample
2016-08-11 14:28:31 +08:00
wing328
d2d5553a45 [Go] prefix go local var with localVar (#3570)
* prefix go local var with localVar

* remove pom from go, minor fix to headerParams
2016-08-10 16:14:33 +08:00
wing328
31fd1df26b Merge pull request #3562 from wing328/add_enum_endpoint
[Java][Spring] Add enum test cases and fix formParam's enum value
2016-08-09 23:32:04 +08:00
wing328
dbeb82f976 Merge pull request #3564 from cliffano/fix-incorrect-param-update-params-for-auth
Fix unknown parameter on api_client's update_params_for_auth method.
2016-08-09 23:27:15 +08:00
Karsten Hinz
58f00efcc3 sample update 2016-08-09 15:09:48 +02:00
wing328
453f80a1d3 add new java client files 2016-08-09 18:59:59 +08:00
Cliffano Subagio
aba2d35a18 Fix unknown parameter on api_client's update_params_for_auth method. 2016-08-09 19:11:26 +10:00
wing328
817a78e3a7 minor indentation fix for java enum models 2016-08-09 16:50:21 +08:00
wing328
c4835ea52e [TypeScript] fix array enum (#3538)
* better enum support for typescript angular2

* fix enum property for TS

* fix non-array enum datatype for TS

* update build name for TS fetch petstore client

* restore TS fetch enum naming

* [TS fetch]add test cases, fix enum integer naming
2016-08-09 10:49:26 +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
39e0e22c57 Merge pull request #3534 from arnested/php-enums-in-containers
[PHP] Fix enum validation in container setters
2016-08-08 18:29:44 +08:00
Cliffano Subagio
3f7127b042 [Java] Add maven-javadoc-plugin to all Java clients. (#3503)
* Add maven-javadoc-plugin to all Java clients.

* Update sample petstores for other Java clients.

* Fix unknown parameter on api_client's update_params_for_auth method.

* Revert "Fix unknown parameter on api_client's update_params_for_auth method."
To be moved to a separate PR.

This reverts commit 1ee186694241bb6d9a0dccefcdca5afe3f5a1dd2.
2016-08-08 18:27:05 +08:00
wing328
d8cdcbf042 fix jsoncreator annotation issue with java api clients using gson 2016-08-08 00:16:12 +08:00
wing328
e8095c6a04 Merge pull request #3543 from guohuang/compile_issue2
[GO] Fixing compilation issue when pathParams  is not presented
2016-08-06 14:07:00 +08:00
wing328
c220dbb2f5 Merge pull request #3541 from expectedbehavior/configuration-misspelling
Fix spelling in ruby ApiClient: Configuraiton -> Configuration
2016-08-06 13:10:46 +08:00
Guo Huang
bef5c74da7 removed unneeded "errors" import 2016-08-05 21:34:04 -07:00
Guo Huang
ab96b318e2 [GO] Fixing compilation issue when pathParams is not presented 2016-08-05 14:53:05 -07:00
Joel Meador
950fb43fdf fix spelling in ruby ApiClient: Configuraiton -> Configuration 2016-08-05 14:36:08 -04:00
wing328
148a842f3b fix #2538 (#3535) 2016-08-05 18:09:00 +08:00
Arne Jørgensen
4008054209 [PHP] Regenerate petstore samples 2016-08-05 11:25:49 +02:00
Tony Tam
b74c1b98a2 updated version 2016-08-05 10:32:06 +02:00
Tony Tam
f82d4fa033 updated version 2016-08-05 09:09:45 +02:00
Tony Tam
ce7a5682d5 version update 2016-08-05 08:54:36 +02:00
wing328
d76c7cc5e8 add test cases for jersey1 enum 2016-08-05 11:49:34 +08:00
wing328
a2496df401 add test case for okthtp-gson enum 2016-08-05 11:45:51 +08:00
wing328
89fe3403a7 add enum test case for jersey2 2016-08-05 01:57:34 +08:00
wing328
670f103859 better enum naming for symbol (java) 2016-08-04 16:37:48 +08:00
wing328
3238fd2853 ignore 2 test cases in spring cloud client 2016-08-03 18:43:43 +08:00
wing328
0547f0d6d8 fix spring enum model 2016-08-03 16:38:02 +08:00
wing328
1fde95f997 fix java okhttp (array of enum property) 2016-08-03 01:36:34 +08:00
wing328
25fa3e86f9 add enumName to store the enum prefix 2016-08-03 01:36:13 +08:00
wing328
0b8acb5b0c set allowablevalues of inner enum's allowablevalues 2016-08-03 01:35:58 +08:00
wing328
7bd37468bc Merge pull request #3496 from Kvezon/jersey2-byte-array-deserialize
Support byte[] downloading in Java jersey2 client
2016-08-02 16:24:40 +08:00