1605 Commits

Author SHA1 Message Date
Charles Treatman
c8b3da7388
[Java][okhttp-gson] remove unreachable code from templates (#17057)
* Remove checks for jackson and jsonb from okhttp-gson templates

* regenerate samples
2023-11-14 11:13:28 +08:00
William Cheng
91ac75ff05
Fix NPE in request body (#17055)
* fix null request body NPE

* fix typo
2023-11-14 10:41:21 +08:00
William Cheng
53289263d9
Prepare v7.2.0 (#17050)
* update version to 7.2.0-SNAPSHOT

* update samples

* update doc
2023-11-13 18:53:20 +08:00
William Cheng
ec3c484ce9
Add enum name mapping to Java generators (#17018)
* add enum name mapping to java generators

* update doc

* update description
2023-11-13 10:53:50 +08:00
Charles Treatman
166ebc50b0
[Java][okhttp-gson] validateJsonElement does not validate enum values (#16865)
* validate enum properties in validateJsonElement

* regenerate samples

* add test for enum validation in okhttp-gson models
2023-11-08 14:14:48 +08:00
Marc Weiß
74163f0ac8
bump gson-fire to 1.9.0 (#17002) 2023-11-07 22:35:05 +08:00
William Cheng
de8599906e
Better handling of API response in 3.1 spec (#16986)
* better handling of API response in 3.1 spec

* update PR template

* add tests
2023-11-05 15:24:02 +08:00
William Cheng
5d03c4ac82
[java-okhttp] Restore integration tests (#16985)
* restore java okhttp tests

* update PR template, update sha
2023-11-04 22:50:23 +08:00
dabdirb
739390a682
java exclude password field from toString (#16942) 2023-10-31 17:50:30 +08:00
Ben Madore
d6421411c9
chore: remove unused commons logging imports from java webclient (#16839)
Co-authored-by: Ben Madore <ben.madore@glassdoor.com>
2023-10-17 13:33:34 +08:00
Robert Danci
87f9d53c3a
[Java][client] Fix feign classcastexception when getting headers (#16745)
* Avoid ClassCastException when getting headers (the header values are Collection<String> and not List<String>)
Delete unused classes

* Remove feign10x

* Add unit test
Refactor to avoid creating the headers map when ApiResponse is not used
2023-10-10 14:53:32 +08:00
martin-mfg
e3db882ed4
[JAVA][KOTLIN][SPRING] upgrade dependencies (#16759)
* upgrade spring-boot-starter-parent

* upgrade springdoc and swagger-ui

* upgrade v3 swagger-annotations

* generate samples

* upgrade jackson

* fix spring cloud, remove temp comment

Putting "8" instead of "1.8" should be ok, because Spring Boot 3 requires Java 17 anyway, so it should be able to understand that 8 is the same as 1.8.

* generate samples

* upgrade JUnit 5, remove commons-io dependency, remove outdated samples/client/petstore/java/feign/feign10x/ files, generate samples

commons-io dependency was introduced in https://github.com/OpenAPITools/openapi-generator/pull/8484, but I don't see why it would be needed now or back then.

* update gson, generate samples

* update logback

* update feign

* update scribejava

* generate samples

* update httpmime

* okhttp-gson: update commons-lang & okhttp & junit-platform, remove mockito; generate samples

It seems Mockito is not used at all there.

* okhttp-gson: remove unnecessary sample files, generate sample files

* upgrade google-api-client & jersey-common, restore ClientTest, generate samples

* misc. upgrades in jersey2 and jersey3

jersey 3.1.3 is available already, but IntelliJ reports security problems in 3.1.3 and 3.1.2, so I used 3.1.1 instead.

* align some gradle&sbt files with poms, generate samples

* whitespace fix
2023-10-09 14:55:32 +08:00
William Cheng
a1d00e4785
[Java][okhttp-gson] fix AWS auth issue (#16721)
* fix samples

* fix awsauth in okhttp gson java client

* update github workflow
2023-10-04 18:28:50 +08:00
Jan Gosmann
7087b332f0
Replace deprecated Gradle properties (#16695)
* destinationDir -> destinationDirectory (scheduled to be removed in Gradle 9.0)
* archiveName -> archiveFileName (removed in Gradle 8.0)

Cp. https://docs.gradle.org/current/userguide/upgrading_version_7.html
2023-10-04 16:24:05 +08:00
martin-mfg
1cff462d90
remove jersey 1 (#16646) 2023-09-26 09:10:11 +08:00
martin-mfg
2ca99bdf8e
use model class for request body with additionalProperties (#16613)
* try out simple fix

* add test case

* generate samples
2023-09-23 13:07:53 +08:00
William Cheng
5e8e2d7f6d
Prepare v7.1.0 in master (#16608)
* prepare v7.1.0 in master

* update
2023-09-18 17:37:36 +08:00
martin-mfg
d6695056fe
add test case for nullable parent property (#16552)
* add nullable case to spring test spec

* generate samples for changed spring input

* add nullable case to general test spec

* generate samples for changed general input

* generate samples again

* generates samples again

* re-build from new sources, generates samples again
2023-09-12 15:59:58 +08:00
William Cheng
5ee18156db
[Java-Feign]: model combining properties and additionalProperties (#16546)
* [Java-Feign]: model combining properties and additionalProperties (#6146)

* update samples

---------

Co-authored-by: François Dodé <francois.dode@dawex.com>
2023-09-09 16:11:54 +08:00
William Cheng
14cfca7b06
[java][feign] Update feign client dependencies to newer version (#16545)
* update javae feign client dependencies to new versions

* update feign
2023-09-09 15:39:02 +08:00
William Cheng
c614b9d9b1
[Java][resteasy] Add tests to upload files (#16534)
* add test to upload files (resteasy)

* remove resteasy tests from github workflow
2023-09-08 15:57:10 +08:00
William Cheng
026fa514c3 update java resteasy samples 2023-09-08 15:12:54 +08:00
Alex Wood
6ea8ff3a17
[java-client][resteasy] fix multipart requests (#16517)
This patch fixes two issues with the Resteasy generated client code.
The first is the usage of a deprecated method, getFormData.  The fix for
this issue was originally conceived by @peter-seitz.

The second issue was a problem in how the Content-Disposition header was
being constructed.  If we had a file named "test.txt" and were uploading
it to a field named "myFile", the Content-Disposition header should look
like

Content-Disposition: form-data; name="myFile"

Instead, the code was using the file's name (rather than the field name)
in the name directive and the header looked like

Content-Disposition: form-data; name="test.txt"

The Content-Disposition header can take an optional directive, filename,
but I have not included that here as that directive is mostly useful for
file downloads and not uploads.
2023-09-08 15:07:49 +08:00
William Cheng
fbff32c5d7
update java resttemplate dep to newer versions (#16523) 2023-09-07 14:36:19 +08:00
Mike Friesen
0192baed42
Issue: #16268 (#16507)
Bug fix AWS4Auth to support query parameters and updated to use AWS SDK V2 from V1
2023-09-06 09:45:02 +08:00
William Cheng
4b7a808a9f
[openapi-normalizer] add a rule to better handle openapi 3.1 spec (#16495)
* add samples

* update samples

* openapi 3.1 beta support

* update .gitignore

* fix composed schema, add oneof, allof tests in opeanpi 3.1 spec

* add allof tests, more fixes

* add null check

* update artifact id

* better null check
2023-09-05 23:27:00 +08:00
Théophane Charbonnier
4418b59b47
[java] Microprofile - fix optional array property's default value (#16500) 2023-09-05 10:15:10 +08:00
Tomohiko Ozawa
09704951f0
[Java][resttemplate] Enable access token refresh (#16485)
* use supplier to enable refreshing token

* update samples

* fix param name and doc

* update samples
2023-09-04 23:23:22 +08:00
William Caine
134dc98a71
fix: Using Map.Entry to avoid "reference to Entry is ambiguous" (#16445)
* fix: Using Map.Entry to avoid "reference to Entry is ambiguous"

when spec defines a model Entry it conflicts.  Also rest of mustache
uses  Map.Entry to matching it

* fix: Map.Entry - update samples
2023-08-30 12:57:53 +08:00
William Cheng
8386a6eaaf
[java] improve petstore tests with openapi v3 spec (#16447)
* regenerate tests in jersey2-java8 client

* update samples

* fix java google api client tests

* update java resteasy to use v3 spec for tests

* update java vertx to test with v3 spec

* update java resttemplate to test with v3 spec

* add new files

* regenerate jersey1 tests
2023-08-30 12:33:01 +08:00
William Cheng
b1564d8002
Fix UUID default value cast exception (swift5) (#16436) 2023-08-29 12:32:01 +01:00
William Cheng
b5867ebf2b
fix cast exception in array default value (java gen) (#16434) 2023-08-29 14:31:24 +08:00
William Cheng
80121aa88f
Prepare v7.0.1 (#16409)
* prepare 7.0.1 in master

* update doc
2023-08-25 16:11:29 +08:00
Chris
7f7717498f
[BUG] [java][jersey2/3] clientBuilder gets overwritten after call to customizeClientBuilder (#16355)
* [java][jersey2/3] call customizeClientBuilder after default config init

* regenerate the samples
2023-08-20 22:50:05 +08:00
William Cheng
ff19825610
[java] Remove hardcoded arrays in template (#16340)
* remove hardcoded arrays in template

* better model import in java client

* update

* better code format

* minor refactoring

* update
2023-08-19 10:20:48 +08:00
William Cheng
e69c58623f update samples 2023-08-17 12:03:43 +08:00
Théophane Charbonnier
057bc8e626
[Java][Client] Microprofile Jackson serialization (#15940) 2023-08-12 12:15:59 +08:00
William Cheng
3ad3cf7dd9
add tests for array of number in java okhttp client (#16298) 2023-08-10 23:37:12 +08:00
Marc Miltenberger
7a7309edb8
Fix Java GSON client not accepting optional null arrays (#16213)
* Add check for null JSON array in GSON Java api client

* Update samples
2023-08-10 22:58:23 +08:00
William Cheng
5b2ceac93d
fix anyOf in handling primitive types in java client (#16264) 2023-08-06 13:48:13 +08:00
William Cheng
f0b100a9ad
Add a test for BigDecimal parameter in java client (#16263)
* add a test for BigDecimal parameter in java client

* update tests
2023-08-06 12:14:21 +08:00
karzang
e299382a42
[Java][Client] Fix handling of 'number' types in oneOf (#16202) 2023-08-06 11:16:50 +08:00
William Cheng
f6fb83878b
[Default] update isAdditionalPropertiesTrue tag to cover more types (#16227)
* enhance additional properties support

* update samples

* update tests

* add more tests

* update samples

* fix samples
2023-08-05 13:32:43 +08:00
Marc Miltenberger
adac3b127f
Support for multipart/form-data; charset="utf-8" in Java GSON Generator (#16211)
* Support for multipart/form-data; charset="utf-8"

Previously, it was only checked for an exact equal string, which failed when there were additional options such as charset.

* Update samples
2023-07-29 00:22:19 +08:00
William Cheng
0a02860b50
add parameter name mapping (#16160) 2023-07-24 15:54:40 +08:00
William Cheng
fb2c866dfc
Revert "fix(java): plus url encoding (#15539)" (#16158)
This reverts commit d000f90759202967ad5d719e5031307f486bf6fb.
2023-07-22 16:44:29 +08:00
Song Gie
d000f90759
fix(java): plus url encoding (#15539) 2023-07-22 16:27:36 +08:00
William Cheng
6983a3acf3
Add nameMapping option to Java client, server generators (#16103)
* add nameMapping to java codegen

* update doc

* update samples

* fix typo

* update toParamName
2023-07-17 11:37:49 +08:00
William Cheng
7258b3c171
Fix allOf with a single $ref (#16096)
* new test

* fix allOf with a single ref in inline model resolver
2023-07-14 19:54:58 +08:00
karzang
e9d98666a1
[Java][Client] Fix #12556 Support primitives and arrays in oneOf (#13897)
* [Java][Client] Fix #12556 Support primitives and arrays in oneOf

* Regenerate petstore samples

* Regenerate petstore test samples

* Treat 'BigDecimal' as primtive datatype

* Fix integration tests
2023-06-29 16:46:55 +08:00