1541 Commits

Author SHA1 Message Date
William Cheng
ae86945653
Add test for RFC3999DateFormat clone method (#11706)
* add test for RFC3999DateFormat clone method

* better comment
2022-02-24 13:15:07 +08:00
Chris White
d153134dec
Fixed RFC3999DateFormat clone NPE (#11705) 2022-02-24 12:29:23 +08:00
William Cheng
df39875502
fix buils warning in java native client (#11688) 2022-02-22 17:04:14 +08:00
William Cheng
df05e6f4bc
Update parser to 2.0.29 (#11388)
* update parser to 2.0.29

* better handling of null in dereferencing

* update parser to 2.0.30

* update core to newer version

* add new files

* rollback to previous stable version

* remove files

* Fixes for python-experimental NullableShape component

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2022-02-21 18:37:52 +08:00
sullis
3c8f249c6c
[java] logback 1.2.10 (#11659)
Latest version of logback
https://logback.qos.ch/news.html
2022-02-19 18:52:39 +08:00
Paul-Etienne François
d45cb6511f
[Java][Native] Fix an issue leading to an altered String parameter when consuming formatted strings like XML (#11640)
* Fix the generated request builder when using a string body parameter

* Update the samples according to the fix for #11638
2022-02-18 11:50:15 +08:00
William Cheng
b979eccf68
Add Github action file to test Java clients (#11633)
* add github action file to test java clients

* update tests
2022-02-17 15:49:34 +08:00
Laurens-W
52e3265c34
[Java][RestTemplate] Use class level RestTemplate for uri encoding (#11606)
* Move static logic to initialization method when no RestTemplate is provided.
Otherwise, use the settings from the RestTemplate that was provided.

* Move code outside of withXml
Run required scripts

Co-authored-by: Westerlaken, H.L. (Laurens) <laurens.westerlaken@devolksbank.nl>
2022-02-15 16:31:51 +08:00
Lennart Schwahn
ba04720898
fix #6134 by considering the type List<File> (#11361)
The method buildRequestBodyMultipart in ApiClient.java now recognizes if
an input parameter is an instance of List.
2022-02-15 10:35:46 +08:00
Marek Hudik
c937bae888
fixes #11579: Java RestTemplate Mustache template doesn't use reserved words for local variables (#11583)
* fixes #11579: Java RestTemplate Mustache template doesn't use reserved words for local variables

* fixes #11579: Java RestTemplate samples

Co-authored-by: Marek Hudik <marek.hudik@broadcom.com>
2022-02-14 10:59:11 +08:00
cachescrubber
9dfe8c63ee
[Bug][Java] defaultValues for date and date-time params (#11536)
* Add default value support to cookie and header params

* Generate Samples

* Replace "OffsetDateTime.parse(..)" with toString();

* Generate Samples

* Revert "Replace "OffsetDateTime.parse(..)" with toString();"

This reverts commit 2e37411b305343e99542c094a691e1419a67b1b5.

* Format java.util.Date to ISO Date in AbstractJavaCodegen.toDefaultParameterValue

* Generate Samples

* Generate Samples

* Use toParameterDefault()

* Generate Samples

* Implement testDateTimeFormParameterHasDefaultValue unit test

* Add more test coverage.

* Remove postProcessParameter() since is has no effect after using toDefaultParameterValue()

* Use LocalDate.parse() in toDefaultValue()

* Generate Samples

* Return a defaultValue only if dateTimeLibrary is java8.
2022-02-12 15:14:26 +08:00
William Cheng
3cb4b7d08e
[Java] remove tabs from java templates (#11557)
* remove tabs from java templates

* replaces tabs with spaces in java templates
2022-02-10 10:47:08 +08:00
William Cheng
8455c1cd23
Remove the option to support JDK7 from Java generator and templates (#11547)
* remove java8 from java client generator and templates

* update tests

* remove threetenbp

* update spring templates to remove java8

* remove java8 from jaxrs template

* fix jaxrs spec

* fix feign

* remove CustomInstantDeserializer.java

* fix jersey1

* fix undertow

* various update

* fix jaxrs jersey1

* fix java inflector

* fix jaxrs cxf

* add new files

* update doc
2022-02-10 10:35:29 +08:00
William Cheng
b6c445cdc3
update swagger core, jackson to newer version (#11545) 2022-02-08 13:31:20 +08:00
William Cheng
7c1f6c5d6a
update build.gradle, build.sbt in java okhttp-gson client (#11543) 2022-02-08 10:57:58 +08:00
William Cheng
51800471fa
[java][Okhttp] replace okhttp-gson with okhttp-gson-nextgen (#11538)
* replace okhttp-gson with okhttp-gson-nextgen

* add new files

* update doc

* clean up pom

* update test

* restore error handling in doc

* add back changes

* uncomment tests

* update samples
2022-02-08 00:05:44 +08:00
cachescrubber
194b3fda26
[Bug][Java/Spring] OAS3 related bugfixes and enhancements (#11526)
* Content mediatype is hardcoded in api.mustache #11511

* Generate Samples

* OAS3 incorrect data type when providing a default value #11367

* Generate Samples

* Fix JsonTypeName annotation handling in Java and JavaSpring

* Generate Samples

* getIsClassnameSanitized: use null safe equals
2022-02-05 17:29:58 +08:00
William Cheng
e2d32b2061
fix javadoc warnings in feign client (#11527) 2022-02-05 15:18:36 +08:00
William Cheng
31f2f11beb update samples 2022-02-05 14:47:51 +08:00
ruijlpires
92ccb629e9
Fix duplicated Authorization headers when renewing a token on a retry (#11513)
Add a leeway time to avoid a skew in the local clock
2022-02-05 14:28:05 +08:00
William Cheng
c8b84c4d03 Merge remote-tracking branch 'origin/master' into 6.0.x 2022-01-30 18:01:35 +08:00
William Cheng
3ed6343933
remove deprecated options in java client generator (#11456) 2022-01-30 15:57:02 +08:00
William Cheng
5d2a3698e2
[java][okttp-gson-nextgen] update docstring in ApiClient, RetryingOAuth (#11395)
* update docstring in apiclient, retryingoauth (java client)

* update samples
2022-01-25 17:04:32 +08:00
William Cheng
b7c8de9425 update samples 2022-01-21 17:45:53 +08:00
William Cheng
33bce99b8e
Avoid using import mapping in model generation (#11217)
* remove import mapping logic in model generation, better handle of file, list

* add new files for file, list

* fix some tests

* update tests, doc

* skip file as reserved word in feign client

* add new files

* remove file from reserved word list in spring generator
2022-01-16 23:57:53 +08:00
mvistein
c12456de8e
[Java-okhttp-gson] Do not set content-type if content type is null #2 (#11315)
* Fixing empty Content-Type in HTTP requests

* Updating samples
2022-01-16 10:29:47 +08:00
jiangyuan
0427681bc4
fix java apache-httpclient set basePath (#11277) 2022-01-16 10:23:15 +08:00
Paul-Etienne François
249968e397
[Java][Native] Fix the Content-Type and Accept headers that were forced to application/json (#11303)
* [Java][Native] Fix the Content-Type and Accept headers that were forced to application/json

* Update the generated samples after fixing issue no. 6779
2022-01-16 00:51:40 +08:00
Sorin Florea
a4325ec520
ISSUE-11242: Fix Java native path param encoding (#11257) 2022-01-10 21:23:28 +08:00
S2021Git
361b593da2
Not creating "Accept:null" header for Java-Jersey2 generator (#11084)
* updated ApiClient.mustache for jersey2

* updated samples

* corrected indentation

* updated samples
2022-01-04 16:41:24 +08:00
William Cheng
d17a472b89 Merge remote-tracking branch 'origin/master' into 6.0.x 2022-01-03 18:03:00 +08:00
William Cheng
2db3e6bb25 update java samples 2022-01-02 17:55:26 +08:00
William Cheng
238639a500 update java sampes 2022-01-02 17:28:17 +08:00
William Cheng
5f5a83a592
fix enum name in okhttp-gson-nextgen (#11210) 2022-01-02 16:37:16 +08:00
William Cheng
12e03b1937 Merge remote-tracking branch 'origin/master' into 6.0.x 2022-01-02 15:41:37 +08:00
Justin Black
ac55ac9d55
Samples and docs regenerated (#11194) 2021-12-28 11:39:13 -08:00
William Cheng
6269a9810c
Prepare 5.3.1 release (#11161)
* prepare v5.3.1 release

* update samples
2021-12-21 18:20:13 +08:00
William Cheng
b72eba90cd
[java][okhttp-gson-nextgen] better oneOf implementation (#11146)
* add validJsonObject method

* add check for null

* fix list model generation

* fix optional fields validation

* add tests

* fix variable naming

* update tests

* add fromJson in oneOf, add tests

* convert JSON to static

* remove trailing space

* add fromString methods to all models

* add toJson, fix anyOf template

* remove workarounds

* undo changes to tests

* skip file schema test

* add new file
2021-12-18 23:22:55 +08:00
William Cheng
b2daa5a836
update jackson-databind-nullable to 0.2.2 (#11121) 2021-12-15 11:41:16 +08:00
William Cheng
e5d58a35a2
update dependencies to newer versions (java) (#11116) 2021-12-14 18:32:37 +08:00
Justin Black
cee5f75912
Feat adds content and header properties to CodegenResponse (#11046)
* Adds responseHeaders to codegenResponse

* Sets response headers in codegenResponse

* Samples updated

* Adds test of response headers

* Adds content to CodegenResponse

* Sets codegenResponse content

* Tests added, test content-data.yaml spec update

* Adds mediaTypeSchemaSuffix input to getContent

* Tests updated

* Updates how response content schema names are set

* Adds missing Locale to String.format invocations
2021-12-10 13:49:29 -08:00
William Cheng
550c0781dc
[okhttp-gson-next-gen] new option for error object (#10995)
* add error body and type to api exception class

* add option to specify error object

* add option, update api doc with better error handling

* update samples

* update doc
2021-12-10 02:08:17 +08:00
William Cheng
2ff6f833e2
add more tests for oneOf (#11068) 2021-12-08 09:39:42 +08:00
William Cheng
a489a2e828
[java][okhttp-gson-next-gen] better error message in oneOf/anyOf (#11059)
* better error message

* update tests
2021-12-07 21:38:54 +08:00
William Cheng
192126be6b
[java][okhttp-gson-next-gen] fix serialization, add tests (#11057)
* fix serialization, add tests

* add new files
2021-12-07 16:22:46 +08:00
William Cheng
000a18d3b9
[java][okhttp-gson-nextgen] Better null handling in oneOf, anyOf model (#11056)
* better null handling in oneOf model

* update anyof with better null handling

* add null test
2021-12-07 15:11:06 +08:00
William Cheng
0eec937845 update samples 2021-12-07 00:28:43 +08:00
William Cheng
e00efe7c8d Merge remote-tracking branch 'origin/5.4.x' into 6.0.x 2021-12-07 00:12:13 +08:00
William Cheng
676da0e778 update samples 2021-12-07 00:11:40 +08:00
William Cheng
2b7910c875 Merge remote-tracking branch 'origin/master' into 5.4.x 2021-12-06 23:57:07 +08:00