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
Philippe Latulippe
2faad6497d
[Swift3] Don't crash on invalid responses ( #4547 )
...
* [Swift 3] Return an error when dealing with invalid responses, instead of crashing.
Compatiblity: ErrorResponse.Error becomes ErrorResponse.HttpError
* Cleanup and work around existing swift3 generator bug/missing feature
* Generate PetStore samples for swift3
2017-01-13 11:29:25 +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
Griffin Schneider
5f6dcf07b2
[Swift3] Make extracting info from errors easier. ( #4502 )
...
* [Swift3] Make ErrorResponse a struct for cleaner useage. Specify Errors that are always ErrorResponse as ErrorResponse type to avoid casting.
* [Swift3] Regenerate Petstore after ErrorResponse changes.
2017-01-10 23:48:07 +08:00
Yuta HIGUCHI
de5ea8a9d6
[JAX-RS/jersey2] Fix for incorrect JSON field name capitalization ( #4458 )
...
* Fix for all capital field name
* Cosmetic: remove trailing spaces
* Adding ./bin/jaxrs-petstore-server.sh output.
2017-01-10 23:37:25 +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
J. Fiala
6b17b92bb6
add check for isInteger (integer/decimal)
2017-01-06 16:46:59 +01:00
J. Fiala
5b532fd10e
update language jaxrs (Jersey2) and samples
2017-01-06 15:16:39 +01:00
J. Fiala
dde24eb9c2
update jaxrs jersey1 templates and sample output #4091
2017-01-06 15:10:40 +01:00
Frédéric Rodrigo
c0f1716fe7
[html2] Open the description field that contains the description and required switch, in place of only show the field type by default ( #4489 )
2017-01-06 19:40:06 +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
Simon Morris
aa1dc0fdd2
Updated Nancy from 1.4.1 to 1.4.3 ( #4482 )
2017-01-06 01:09:32 +08:00
Brian Shamblen
b224474a43
Fixes #4481 ( #4493 )
2017-01-06 01:03:18 +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
wing328
864d22b2a4
comment out ts fetch default test
2017-01-05 23:41:28 +08:00
wing328
27b53478e9
resolve merge conflicts in ts fetch test cases
2017-01-05 22:52:27 +08:00
William Cheng
15cdbccf08
fix code styling in ts
2017-01-05 22:34:43 +08:00
William Cheng
b8f9985b8a
fix ts fetch missing , before options
2017-01-05 22:20:33 +08:00
William Cheng
52ee4ac984
fix ts fetch method signature
2017-01-05 22:06:07 +08:00
wing328
7335816826
remove problem class files from java api clients
2017-01-05 21:25:23 +08:00
William Cheng
a8bc09056b
update feign pom version
2017-01-05 20:55:38 +08:00
William Cheng
a7e4f542fb
fix feign pom
2017-01-05 19:54:08 +08:00
William Cheng
aae7e2ccca
fix optional parameters and collection format in go api client
2017-01-05 19:32:00 +08:00
William Cheng
db03c35973
fix pom for feign and okhttp-gson java api client
2017-01-05 18:56:14 +08:00
William Cheng
ce899e3776
Merge remote-tracking branch 'origin/master' into 2.3.0
...
Conflicts:
appveyor.yml
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SpringCodegen.java
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptAngular2ClientCodegen.java
modules/swagger-codegen/src/main/resources/Java/libraries/feign/pom.mustache
modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache
modules/swagger-codegen/src/main/resources/go/api.mustache
modules/swagger-codegen/src/main/resources/objc/api-body.mustache
modules/swagger-codegen/src/main/resources/objc/api-header.mustache
modules/swagger-codegen/src/main/resources/typescript-angular2/configuration.mustache
modules/swagger-codegen/src/main/resources/typescript-angular2/tsconfig.mustache
modules/swagger-codegen/src/test/java/io/swagger/codegen/swift/SwiftModelTest.java
modules/swagger-codegen/src/test/java/io/swagger/codegen/swift3/Swift3ModelTest.java
modules/swagger-codegen/src/test/java/io/swagger/codegen/typescript/typescriptangular2/TypeScriptAngular2ModelTest.java
samples/client/petstore-security-test/typescript-angular2/configuration.ts
samples/client/petstore/go/go-petstore/docs/FakeApi.md
samples/client/petstore/go/go-petstore/fake_api.go
samples/client/petstore/go/go-petstore/pet_api.go
samples/client/petstore/java/feign/pom.xml
samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/RFC3339DateFormat.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumTest.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/FormatTest.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java
samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java
samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/PetApi.java
samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m
samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h
samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h
samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h
samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m
samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h
samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m
samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h
samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m
samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h
samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h
samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.h
samples/client/petstore/qt5cpp/client/SWGPetApi.h
samples/client/petstore/qt5cpp/client/SWGStoreApi.h
samples/client/petstore/qt5cpp/client/SWGUserApi.h
samples/client/petstore/typescript-angular2/default/configuration.ts
samples/client/petstore/typescript-angular2/npm/README.md
samples/client/petstore/typescript-angular2/npm/configuration.ts
samples/client/petstore/typescript-angular2/npm/package.json
samples/client/petstore/typescript-angular2/npm/tsconfig.json
samples/client/petstore/typescript-fetch/builds/default/api.ts
samples/client/petstore/typescript-fetch/builds/es6-target/api.ts
samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts
samples/client/petstore/typescript-fetch/tests/default/test/PetApiFactory.ts
samples/client/petstore/typescript-fetch/tests/default/test/StoreApiFactory.ts
samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java
samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java
samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java
samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java
samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApiController.java
samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApi.java
samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApiController.java
2017-01-05 17:44:39 +08:00
Johannes Fiala
1a1d0aebc8
add beanvalidation to jersey1 and jersey2 #4091
2017-01-04 17:36:28 +01:00
Gayathri Sharma
4452fdbc02
Resteasy changes
2016-12-27 21:33:27 -06:00
mkarnik
45002ec1fd
[JAX-RS RESTEasy][issue #4447 ] Updated RESTEasy petstore samples
2016-12-23 10:37:17 +01:00
wing328
aed21bba73
better code format for nodejs server ( #4411 )
2016-12-23 02:05:10 +08:00
Jun Mukai
27f1b6ee98
Introduce NodeJS codegen for Google Cloud Functions. ( #4406 )
...
* Another approach: extending NodeJS server to support GCF.
This does not add a new language, but adding some client options
to support Google Cloud Functions (GCF).
* Add URLs for how to deploy the generated code.
Adds the client options help message and the README.md file.
2016-12-22 23:11:52 +08: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
Dan Wilson
774dd33af0
Add optional parameters to go client using map[string]interface{} ( #4415 )
...
* Add VSCode to the list of ignores.
* Move optional parameters into a map[string]interface{}
Refactor tests to new API and add concurrency test.
* Add optional check to postBody.
The pet-store does not create this scenario.
2016-12-20 16:32:44 +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
2bf3d051a9
update html2 sample
2016-12-16 18:14:55 +08:00
Brian Shamblen
bd81f3264d
[html2] Fix import statements for most languages ( #4243 )
...
* [html2] Clean up namespace issues in code samples
* pull c# and php package namespace from --additional-properties arg
phpInvokerPackage arg now sets the PHP namespace and packageName sets
the CSharp namespace. invokerPackage still works for Java and Android
namespace.
2016-12-16 18:06:28 +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