Commit Graph

10 Commits

Author SHA1 Message Date
David Harrigan
fc01457d77 [JAVA][#5172] Allow vendor json media types (#5189)
* [#5172] Allow vendor json media types

* Revert unnecessary diffs

* Update petstore sample

* Didn't run mvn after some edits

* Rerun ' ./bin/java-petstore-all.sh' and './bin/security/java-petstore-okhttp-gson.sh'

* Added more realistic test cases for isJsonMime
2017-03-30 22:23:24 +08:00
XuXinkun
3c1a8daaf9 fix handleResponse to not leak okhttp connections (#4997) 2017-03-11 17:02:49 +08:00
Val Polouchkine
122194c30e Fix typo (#4956)
Authorizatoin should be Authorization
2017-03-07 13:49:42 +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
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
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
Ville Skyttä
0363858672 java: Javadoc fixes 2016-09-01 18:07:35 +03:00
Ville Skyttä
b4c139f19b Spelling fixes 2016-08-27 02:34:33 +03:00
Bochun Bai
f75a42f810 Remove more Java String comparison using "==" 2016-07-13 18:06:45 +08:00
wing328
77c4164b3c better code injection handling for java 2016-06-29 02:00:43 +08:00