wing328
18e6440bcc
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-05-30 00:12:34 +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
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
wing328
e1e5ac4d37
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-05-17 22:00:06 +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
7fc36f1e1e
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-05-14 22:32:12 +08:00
sdoeringNew
98d53bc8d2
#5619 added getValue() method in generated Enum classes in Java ( #5620 )
2017-05-13 00:03:44 +08:00
wing328
e969b35ea2
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-04-24 18:07:17 +08:00
wing328
30d0b11801
update java petstore samples
2017-04-24 16:22:11 +08:00
Benjamin Douglas
9058099e5b
Add alias type definitions for Java
...
When a spec defines a Model at the top level that is a non-aggretate type (such
as string, number or boolean), it essentially represents an alias for the simple
type. For example, the following spec snippet creates an alias of the boolean
type that for all intents and purposes acts just like a regular boolean.
definitions:
JustABoolean:
type: boolean
This can be modeled in some languages through built-in mechanisms, such as
typedefs in C++. Java, however, just not have a clean way of representing this.
This change introduces an internal mechanism for representing aliases. It
maintains a map in DefaultCodegen that tracks these types of definitions, and
wherever it sees the "JustABoolean" type in the spec, it generates code that
uses the built-in "Boolean" instead.
This functionality currenlty only applies to Java, but could be extended to
other languages later.
The change adds a few examples of this to the fake endpoint spec for testing,
which means all of the samples change as well.
2017-04-17 12:58:31 -07:00
wing328
50c6f87d98
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-04-13 17:48:34 +08:00
Benjamin Douglas
ab69ce5dc3
Add null pointer check to add/put methods ( #5385 ) ( #5386 )
...
Commit e3d04ee01 (issue #5240 ) introduced unsafe add/put methods for optional
list/map parameters. This change maintains the spirit of issue #5240 (optional
containers are null by default) while still making add/put calls safe. It does
this by checking for null first and, if so, initializing it with an empty
container.
Also updated the affected samples using the various scripts in bin/.
2017-04-13 17:37:49 +08:00
wing328
1f4261d20b
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-04-11 22:29:28 +08:00
wing328
e3d04ee01f
[Java] remove initialization for optional list property ( #5363 )
...
* set list to null in java if not required
* update petstore sample for java server stub
* update sample for msf4j
* add null assignment to new list/map in java
2017-04-11 19:07:48 +08:00
wing328
cf8a9a0de0
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-04-03 14:54:50 +08:00
wing328
7db3388fdc
Update maven compiler plugin to the latest version (3.6.1) ( #5300 )
...
* update maven compiler plugin to the latest version
* update feign petstore
2017-04-02 21:39:48 +08:00
Paŭlo Ebermann
ce41a343d8
Updating all samples (except feign) ( #5281 )
2017-04-02 17:01:15 +08:00
wing328
ad4de91d92
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-03-30 09:57:07 +08:00
Paŭlo Ebermann
db71d97370
Updating samples after #5232 . ( #5243 )
...
* Updating samples after #5232 .
* Fix tests after #5232 .
* Fix Javascript client tests.
* JaxRS server: set serverPort only when not given from outside.
* Update JaxRS sample creator scripts to fix serverPort.
* Preliminary test fix for JaxRS server generators.
* Updating samples for JaxRS with Jersey1/2.
* Updating JaxRS samples again.
2017-03-30 01:28:53 +08:00
wing328
41a505a1f8
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-03-25 14:37:59 +08:00
Joseph Moore
b7fc11b089
Modify retrofit OAuth templates for #5039 ( #5082 )
...
The updateAccessToken method returns `true` when it means `false` and
vice versa.
2017-03-23 23:27:04 +08:00
Paŭlo Ebermann
9be178b26a
Merge branch 'master' into new-sync-master-to-2.3.0
2017-03-13 21:42:41 +01:00
Paŭlo Ebermann
3a48ba8bfd
Update all the samples.
...
(except clojure + scalatra, because those are broken, will fixed with later master merge.)
2017-03-13 19:50:10 +01:00
Tony Tam
0dcd91adbf
null out the string null
in examples. Rebuilt java clients and made a whole bunch of changes
2017-03-10 11:07:30 -08:00
Tony Tam
041da8998a
rebuilt
2017-03-01 09:55:42 -05:00
wing328
8f2e9bce6d
remove trailing whitespaces in java api client ( #4784 )
2017-02-13 18:53:34 +08:00
wing328
ef40bdb7b0
remove invalid java file
2017-02-11 00:10:43 +08:00
wing328
acd10318f7
Merge remote-tracking branch 'origin' into sync_master_230
2017-02-10 23:31:36 +08:00
Jan
0d14496bd6
[Java-retrofit] Fix for #4750 String comparison with equals ( #4751 )
...
* [Java-Feign] Fixed String comparison using equals instead of == operator
* [Java-Feign] Updated ApiClient with ./bin/java-petstore-feign.sh
* [Java-retrofit] Fix for #4750 String comparison with equals
2017-02-08 21:54:56 +08:00
wing328
882c3ecba5
update java petstore with new uuid mapping
2017-02-08 16:07:09 +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
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
wing328
7335816826
remove problem class files from java api clients
2017-01-05 21:25:23 +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
wing328
131cbeb350
remove generation timestamp
2016-12-15 19:34:15 +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
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
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
Christophe Bornet
70d93883cf
[Java] Threetenbp dates support ( #4029 )
...
* [feign] add threetenbp support for feign clients
* [okhttp] add threetenbp support for okhttp clients
* [jersey] add threetenbp support for jersey clients
* [retrofit2] add threetenbp support for retrofit2 clients
* [spring] add threetenbp support for spring generators
* add a workaround in tests for a bug in the petstore
The petstore doesn't manage fractional digits of dates correctly when there are less than 3
2016-11-04 17:55:16 +08:00
wing328
b3caf1d0c0
Merge remote-tracking branch 'origin/master' into 2.3.0
2016-10-12 17:54:16 +08:00
wing328
47d3c3a767
update retrofit1,2 samples
2016-10-12 15:48:34 +08:00
Stas Shakirov
26faf6cf4e
remove newline char in *.mustache; added generated code
2016-10-10 14:42:08 +03:00
Brent Ryan
d334524adc
Re-apply fix after major conflicts upstream
2016-09-17 16:06:23 -04:00
Ville Skyttä
0363858672
java: Javadoc fixes
2016-09-01 18:07:35 +03:00
wing328
453f80a1d3
add new java client files
2016-08-09 18:59:59 +08:00
wing328
817a78e3a7
minor indentation fix for java enum models
2016-08-09 16:50:21 +08:00
wing328
d8cdcbf042
fix jsoncreator annotation issue with java api clients using gson
2016-08-08 00:16:12 +08:00
cbornet
3b4465d999
add fluent methods to add items to list and put items to maps
2016-07-27 18:18:48 +02:00