232 Commits

Author SHA1 Message Date
Ruben Hönle
278d7ae4c9
java-client: fix some javadoc comments (#21932)
* java-client: fix some javadoc comments

* update samples
2025-09-10 01:44:36 +08:00
William Cheng
6e443f1354
fix: honor required fields in jackson @JsonProperty annotations (#21876)
* fix: honor required fields in jackson @JsonProperty annotations

* add samples

* fix: trigger build

* fix: undo

* update to handle nullable as well

---------

Co-authored-by: Erik Lagerholm <erik.lagerholm@volvocars.com>
2025-09-03 16:41:59 +08:00
Jochen Schalanda
babb3e272b
[Java] Add missing Locale to String.format() invocations (#21871)
* [Java] Add missing Locale to String.format() invocations

* chore: ./bin/generate-samples.sh ./bin/configs/*.yaml
2025-09-03 14:52:49 +08:00
William Cheng
20be2decde
Prepare v7.16.0 release (#21794)
* Revert "v7.15.0 release (#21792)"

This reverts commit 2c816f89cbd6c4670aaf6e3387c88daadae6cbad.

* prepare 7.15.0 release

* update samples
2025-08-22 19:17:23 +08:00
Adam Juraszek
dbe0419034
[Java][HttpClient] Fix memory leak with virtual threads (#21729) (#21752) 2025-08-22 14:41:12 +08:00
Mattias Sehlstedt
4d9fd4df92
Support Json-serialized query parameters in Spring client RestClient and WebClient (#21725)
* Add so that a query parameter can be serialized as Json in the Spring clients RestClient and WebClient

* Update samples

* Add clientCodeGen test
2025-08-12 10:26:33 +08:00
Mattias Sehlstedt
8874df4702
Codegen parameter for query json serialization (#21718)
* Add endpoints with query parameters that require Json-serialization

* Add property for query json-serialization

* Update samples

* Adjust indentation for specification
2025-08-10 22:47:51 +08:00
phactum-mnestler
f659457f90
[spring] Adapt HttpHeaders access to remain compatible with Spring 7 (#21691)
* [spring] Adapt HttpHeaders access to remain compatible with Spring 7

* update pom.xml patch version
2025-08-06 15:46:37 +08:00
Rui Ventura
bf6e83ea63
feat(java): Generate servers for restclient library (#21699) 2025-08-06 15:36:38 +08:00
Iurii Ignatko
f5da0ea4a1
Remove [this-escape] warnings in generated ApiClient classes (#21620) 2025-07-28 16:43:14 +08:00
Ilya Nemtsev
ef22749345
[Java][native] Add ability to add header to specific calls (#21495)
* add bearer capability

* avoid using shared state

* revert needless change

* Revert authentication changes from unused root Java/api.mustache template

* applied change to correct lib type

* updated test files

* made security method more generic for flexibility

* regenerated samples

* further cleanup

* code style

* regenerated samples

* made header assignment more explicit, per each method

* fixed extra comma

* fixed commas, regenerated samples

* moved header population to utility method

* moved static class inside main class

* regenerated samples

* added comments, fixed indentation

* regenerated samples

---------

Co-authored-by: Ilya Nemtsev <ilyanemtsev@192.168.1.34>
2025-07-27 11:18:39 +08:00
William Cheng
d63459c051
update common langs dep to newer version (#21552) 2025-07-14 17:11:11 +08:00
William Dutton
6fdb632fb9
fix: #21345 Java Native Client, handle Byte[] and File response types correctly (#21346) 2025-07-04 00:34:08 +08:00
Mattias Sehlstedt
050dcae3ab
Move the singleRequestParameter template into a separate file (#21489)
* Move the singleRequestParameter template into a separate file

* Update formatting of non-singleRequestParameter webclient and restclient samples
2025-07-02 15:18:52 +08:00
Ron Reynolds
cfe476f32d
immutable Pair, better performant HttpBearerAuth, consistent code-style (#20743)
* make Pair immutable and in google-code-style

* apply google-code-style to JavaTimeFormatter (to make it consistent with most other auto-generated java)

* move upperCaseBearer to ctor (scheme is final and private; only needs to be fixed once); also replaced Optional with ternary (perf and cleaner code)

* apply google-code-style to Authentication to make it consistent with rest of auth code

* fresh samples
2025-06-26 17:10:36 +08:00
William Cheng
046be5dba1
Prepare 7.15.0 (#21445)
* Revert "v7.14.0 release (#21443)"

This reverts commit 5eb083e5ce1dd99659fadc03d7c6e809d3077af6.

* prepare v7.15.0 snapshot

* update samples

* update readme

* update doc
2025-06-25 21:34:58 +08:00
Steven Blakowski
cef971cf9a
[Java][RestTemplate] Gradle Build include non-compatible Spring Dependency with jakarta disabled (#21426)
* [Java][resttemplate] fix spring-web dependency for gradle without jakarta enabled

* fix samples
2025-06-19 16:11:37 +08:00
William Cheng
623463a6ed
[Java] Fix content for enum in MultiPart (#21428)
* [Java] Fix content for enum in addPartToMultiPartBuilder ([#19973](https://github.com/OpenAPITools/openapi-generator/issues/19973))

* [Java] Fix content for enum with restclient (#19973)

* [Java] Fix content for enum with restclient (#19973)

* [Java] Fix content for enum with restclient (#19973)

* update samples

---------

Co-authored-by: Michael Bornholdt Nielsen <michaelbornholdtnielsen@gmail.com>
Co-authored-by: Michael Bornholdt Nielsen <jarryDk@users.noreply.github.com>
2025-06-18 16:52:54 +08:00
William Cheng
055687935b
update spring web version in resttemplate (#21417) 2025-06-16 10:20:01 +08:00
William Cheng
b57c23b121
update java restemplate dependencies to newer versions (#21368) 2025-06-04 02:28:52 +08:00
William Dutton
b929970db2
fix: #21329 Java Native, Provide Null Check before toString on param variables (#21330)
* fix: #21329 Java Native, Provide Null Check before toString on param variables

* #21329 - Samples Generated
2025-06-02 16:56:22 +08:00
William Cheng
bce88c93ba
update swagger pareer to 2.1.28 (#21325) 2025-06-02 15:33:27 +08:00
martin-mfg
dac1e6b7d3
optimize regex (#21188) 2025-05-20 16:27:19 +08:00
Ondřej Šimon
68c1d8970e
[20808] add Autowired annotations guard to skip generation (#21198)
annotation import and usage is not generated when API is not a Spring Bean
2025-05-15 18:51:25 +08:00
Alex B
57bf6925bb
[Java] Make Java ApiClient extendable (#21251)
* Make all Java ApiClients in templates extendable

* Make all Java ApiClients in samples extendable

* Fix compilation of enum constructor

* Fix compilation of enum constructor in templates
2025-05-11 22:47:40 +08:00
ksn-partisia
ecd5d253a8
[Bug] [Java] Fix java compilation warnings in RFC3339JavaTimeModule and RFC3339InstantDeserializer (#21243)
* Fix java compilation warnings in RFC3339JavaTimeModule and RFC3339InstantDeserializer

* Regen missing samples
2025-05-09 11:00:07 +08:00
Devon
104ceb9c16
Java: Optimize HashSet Initialization (#21205)
* Optimize HashSet Initialization

Noticed this while debugging - we can avoid wasting memory/cpu creating 16 buckets when we only need one or a few.

* generate samples

* use Arrays.asList
2025-05-04 22:56:33 +08:00
William Cheng
dbf720c093
Prepare 7.14.0 release (#21159)
* Revert "v7.13.0 release (#21157)"

This reverts commit 4b805ff6b7ac5bd2557555810357569fe2677311.

* prepare v7.14.0 release

* update samples
2025-04-27 22:04:03 +08:00
Mattias Sehlstedt
10fc9d07c7
Single request parameter equals and hashcode (#20833)
* Align indentation

* Add equals and hashcode to singleRequestParameter static class

* Add missing sample updates that were affected by new imports

* add restclient sample

* update FILES, chmod=+x

* Update samples with jakarta annotations

* Updates samples

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2025-04-27 16:46:01 +08:00
Michael Düsterhus
27a705efd5
[fix][java]Add missing generated annotation to Authentication.mustache (#21125)
* Add generated annotation to Authentication.mustache

* Update Authentication.mustache jersey2

* Update Authentication.mustache jersey3

* Update Authentication.mustache okhttp

* Update Authentication.mustache restclient

* Update Authentication.mustache resttemplate

* Update Authentication.mustache vertx

* Update Authentication.mustache webclient

* doc: regenerate samples
2025-04-25 16:35:51 +08:00
William Cheng
3b6b55144d
fix gradle.properties in java client (#21129) 2025-04-23 17:05:04 +08:00
João Brilhante
d2e20253e4
[java][restclient] Fix model combining properties and additional properties (#20947) 2025-04-23 15:57:57 +08:00
Kevin Lin
b844d8d4cd
[Java] ApiClient: support deserializing from InputStream instead of String to bypass 2GB Java String limit (#21115)
* ApiClient: support deserializing JSON from InputStream instead of String to bypass 2GB Java String limit

* Update test_file_list.yaml
2025-04-23 14:59:02 +08:00
Nicolas Vervelle
8ca3543436
Issue 20804: Add java nullability annotations (#20806)
* issue-20804: Add nullability annotations to Java generated clients

Motivation:
Be able to use generated clients in code checked by tools like NullAway.

* issue-20804: Add nullability annotations to Java generated clients

Motivation:
Be able to use generated clients in code checked by tools like NullAway.

* issue-20804: Add nullability annotations to Java generated clients

Motivation:
Be able to use generated clients in code checked by tools like NullAway.
2025-03-25 23:01:17 +08:00
kenji yoshida
7d977b63dc
Update scala version (#20953) 2025-03-24 13:55:46 +08:00
kenji yoshida
c749919812
fix deprecated old sbt build file syntax (#20949) 2025-03-23 18:03:29 +08:00
Yobyn Roetz
191eba4afa
replace all UriComponentsBuilder.fromHttpUrl() with UriComponentsBuilder.fromUriString() because UriComponentsBuilder.fromHttpUrl will be removed in the near future. (#20893) 2025-03-16 16:04:04 +08:00
Josh Keighley
7d9e1ecc22
Bump feign version to 13.5 from 10.12. (#20849) 2025-03-12 16:35:36 +08:00
sabra
f2bbb9e0a2
[java] generateClientAsBean for restclient and webclient (#20754)
* [java] generateClientAsBean for restclient and webclient

Added possibility to generate restclient and webclient as a @Component in the same fashion as resttemplate.

Fix #17885
Fix #19229

* - Samples
2025-03-05 17:50:24 +08:00
William Cheng
3ad5303f99 update samples 2025-03-03 19:29:07 +08:00
martin-mfg
2b8d496c80
[#19921] Add RFC 3339 compatible Jackson module for java.time types, regenerate samples (#20700)
Co-authored-by: Christian Beikov <christian.beikov@gmail.com>
2025-03-03 17:42:18 +08:00
Ron Reynolds
5cef0803b8
Java client enhanced Configuration with ApiClient Supplier (#20738)
* enhanced Configuration.mustache (thread-safe, lazy-eval, plugable factory

* removed comment in Configuration.mustache

* fresh samples
2025-03-03 13:52:10 +08:00
Iurii Ignatko
af536f6205
Finalize [this-escape] warnings fixes in apache-httpclient (#20774) 2025-03-03 13:01:08 +08:00
William Cheng
a79aad8420
Prepare 7.13.0 (#20758)
* Revert "v7.12.0 release"

This reverts commit 073723cb4d41187f839fbb46565d109293fa22d7.

* set version to v7.13.0-SNAPSHOT

* update samples

* update doc
2025-02-28 13:48:36 +08:00
wandi34
fb7aa580bf
[Java][RestClient] Enable access token refresh (#20733) 2025-02-26 17:05:50 +08:00
Ron Reynolds
eb668b6a76
reuse Configuration.defaultApiClientin no-arg Api ctors and make ref volatile (fixes issue #20633) (#20635)
* made Configuration.defaultApiClient volatile so that if it's changed the new value is immediately visible to all other threads

* made no-arg api ctor use Configuration.getDefaultApiClient() instead of creating new ApiClient every time

* replaced all use of URLEncoder.encode with ApiClient.urlEncode; just code cleanup; no functional changes

* disabled AbstractJavaCodegenTest.testGeneratedExampleValues as it fails, possibly due to timezone (Locale.ROOT) of local system

* replaced thread-unsafe SimpleDateFormat with DateTimeFormatter and re-enabled unit-test

* removed unused import

* ran the generate-sample scripts and generated a HUGE number of changes!

* added missing import of Configuration to api.mustache (and, thus, all native samples)

* added missing import for ApiClient to anyof and oneof model mustaches
2025-02-19 14:47:55 +08:00
João Brilhante
a5c9c6d531
[java][resttemplate] Fix model combining properties and additional properties (#19706) 2025-02-15 00:13:13 +08:00
Iurii Ignatko
bc70f04848
Additional [this-escape] warnings fixes (#20515) 2025-01-22 01:05:54 +08:00
William Cheng
1fa07bf46c
Prepare 7.12.0 (#20512)
* Revert "v7.11.0 release (#20508)"

This reverts commit a7240eeefeedeefe7fc80ef22747dfc67e126324.

* prepare 7.12.0 snapshot version

* update samples

* update readme
2025-01-21 00:10:09 +08:00
Iurii Ignatko
fa3e38a4b7
[JAVA] Address [rawtypes] and [this-escape] warnings in generated API clients (#20466)
* Address [rawtypes] and [this-escape] warnings in generated API clients

* Commit updated sample files
2025-01-18 15:00:16 +08:00