Commit Graph

67 Commits

Author SHA1 Message Date
wing328 cf5eba87bd update circleci to cover java google-api client, update Java petstore
samples
2017-11-03 18:49:32 +08:00
Brian Kim 044bfdac39 Fix #6166 by adding @Deprecated annotations in Java jersey2, okhttp-gson, resteasy libraries (#6801) 2017-10-25 11:10:03 +08:00
wing328 2f98ade693 fix inconsistent java naming (#6624) 2017-10-06 11:03:15 +08:00
Gökberk Karaca b0333af8bd Fix unexpected text error in javadoc by replacing url with html tag (#6279) 2017-08-11 08:50:36 +08:00
wing328 7aee5b6ee7 update java petstore sample, reenable test for resttemplate-withxml 2017-08-03 17:09:38 +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 a6f594bfd2 use jersey 2.6 for java6 (#6198) 2017-07-28 01:59:31 +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
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 43d8fe5047 update java (jersey2) petstore samples 2017-07-23 23:38:15 +08:00
wing328 e964702550 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-12 21:54:23 +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 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 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 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 9c3476b014 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-22 22:42:01 +08:00
wing328 d35239c661 recursively add import for parameters (#5891) 2017-06-21 21:35:45 +08:00
wing328 1da52bf8ba Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-11 21:43:34 +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
wing328 87bbbc1a1b Merge remote-tracking branch 'origin/master' into 230_merge_master 2017-06-05 23:27:11 +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 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 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
wing328 e1e5ac4d37 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-05-17 22:00:06 +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 7dd42483a4 update all petstore samples for java clients 2017-05-14 23:21:05 +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
nbruno ddc309ec19 Add support for Spring's RestTemplate in Java client codegen (#5404)
* Add support for Spring's RestTemplate in Java client codegen

Resolves #1176

* Update all Java samples to include change for Jackson enums

Currently enums are deserialized from a String value with an
explicit @JsonCreator. However, they are not being serialized with
this String value. This change introduces the @JsonValue annotation
on the toString() method of enums, so they will be serialized as a
String with the correct value.
2017-04-24 14:40:47 +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
wing328 bfa18a0ce8 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-04-01 16:39:54 +08:00