Oren Samuel
5e32f0c366
[java][resttemplate] using uriBuilderFactory to encode all template values ( #11922 )
...
* issue 11921 - encode all template values
* add test for url and query param encoding
2022-03-21 23:42:56 +08:00
Radek Postołowicz
c22997b9b8
Cleanup Jackson type info mess fixes ( #9441 ) ( #11691 )
...
* Cleanup Jackson type info mess fixes (#9441 )
* fixup! add import mapping for JsonIgnoreProperties
2022-03-07 09:36:05 +08:00
Chris White
d153134dec
Fixed RFC3999DateFormat clone NPE ( #11705 )
2022-02-24 12:29:23 +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
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
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
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
c8b84c4d03
Merge remote-tracking branch 'origin/master' into 6.0.x
2022-01-30 18:01:35 +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
William Cheng
12e03b1937
Merge remote-tracking branch 'origin/master' into 6.0.x
2022-01-02 15:41:37 +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
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
e00efe7c8d
Merge remote-tracking branch 'origin/5.4.x' into 6.0.x
2021-12-07 00:12:13 +08:00
Berlin Cho
8e303150ae
[Java][resttemplate] Support URL queryParams Comma encoding ( #10958 )
...
* Java Encode comma (with unit tests)
* fix PMD warnings
2021-11-25 16:12:55 +08:00
WILLIAM CHENG
eb75515715
Merge branch '5.4.x' into 6.0.x
2021-11-21 09:50:47 +08:00
Oleh Kurpiak
e7c3bdacc2
[Java] fix deserialization of readonly properties ( #10113 )
...
* [Java] fix deserialization of readonly properties
* [Java] fix deserialization of readonly properties
* [Java] fix deserialization of readonly properties
* [Java] fix deserialization of readonly properties
2021-11-14 22:05:25 +08:00
Oleh Kurpiak
3bdbf0339a
[Java] deserialize to LinkedHashSet when unique items ( #10241 )
...
* [Java] deserialize to LinkedHashSet when unique items
* [Java] fix deserialization of readonly properties
* [Java] deserialize to LinkedHashSet when unique items
2021-11-14 22:03:02 +08:00
Vincent Galloy
955aadc284
10788: ApiClient for resttemplate should not produce warning ( #10789 )
...
Motivation:
Remove useless warnings for webclient and resttemplate
2021-11-09 14:38:57 +08:00
William Cheng
48f81eef45
use IllegalArgumentException instead ( #10745 )
2021-11-02 12:47:15 +08:00
William Cheng
150e304b4c
update samples
2021-09-25 13:56:00 +08:00
RomainPruvostMHH
04e67acd0a
Fix issue 8352: [Java][RestTemplate][WebClient] Incorrect handling of free form query parameters ( #10428 )
...
* [Java][RestTemplate][WebClient] fix issue #8352 handling of free-form
query parameters with Java
* replace tab by spaces
* commit samples files generated by the generate-samples.sh script
2021-09-21 11:40:56 +08:00
Kaijia Feng
8cc2bc4fa7
[Java][RestTemplate][WebClient] Fix typo in comments ( #10311 )
2021-09-02 21:03:29 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos ( #10272 )
2021-08-28 22:58:24 +08:00
Thomas Zeeman
f2b50faeec
Fix unchecked conversion ( #10246 )
...
* Fix unchecked conversion
Update restttemplate and webclient templates to use <>-operator.
Also update samples.
* Update samples
2021-08-25 10:09:53 +08:00
William Cheng
0204bf4ae2
Squashed commit of the following:
...
commit c5a0d0f7394aa742fa336fff7e7c1d3049761868
Merge: 8c4991ba3ed f8ff8c87609
Author: William Cheng <wing328hk@gmail.com>
Date: Tue Aug 17 18:28:12 2021 +0800
Merge branch 'mustache-linting' of https://github.com/NathanBaulch/openapi-generator into NathanBaulch-mustache-linting
commit f8ff8c87609b1ca36fa26fb8474806999638195e
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:12:47 2021 +1000
Reorder tags that handle missing values
commit f5d8a33709d6a3f846a9fe4520b78c3d637051d9
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:08:59 2021 +1000
Use dot notation where possible
commit 493d14921e2333f3ae19ef6fc89318b7e263a80c
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:10:49 2021 +1000
Remove empty tags
commit 32480dc53f48227d55531b94e307d72671373737
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 10:41:58 2021 +1000
Remove redundant sections
commit a8edabd722c34aa094b4aeb11c22664529c3a219
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Wed Aug 4 22:02:22 2021 +1000
Trim extra EOF new lines
commit e89bd7458e3594bf0d30e580bc9408e45b018a57
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Wed Aug 4 21:59:26 2021 +1000
Trim trailing whitespace
2021-08-17 18:37:51 +08:00
William Cheng
f0ebcd56d1
[Java][resttemplate] better code format ( #10033 )
...
* java restemplate: better code format
* update samples
2021-07-25 16:07:04 +08:00
Oleh Kurpiak
9e314d165b
[Java][Server] remove snapshot dependency ( #9997 )
2021-07-21 22:53:23 +08:00
Jorge Rodríguez Martín
e568376a01
[Java][RestTemplate][WebClient] Templatized query params for metrics and evicts oom ( #9871 )
...
* [Java][RestTemplate] Templatized query params for metrics and evicts oom
* [Java][WebClient] Templatized query params for metrics and evicts oom
* [Java][RestTemplate] Templatized query params for metrics and evicts oom
* Update samples
* [Java] Add javadoc
* [Java] Update samples
2021-07-21 17:03:19 +08:00
Marcel Stör
c5f5d3dd6a
[Java] Add @javax.annotation.Nonnull to required getters ( #9593 )
...
* Add @javax.annotation.Nonnull to required getters
* Add updated samples
* Consider the nullable constraint
2021-07-19 10:48:58 +08:00
Jon Jensen
bd070308d9
[Java][*] Annotate deprecated operations and schemas ( #9478 )
...
Refs #3358
Ensure `deprecated` operations are annotated/documented as such on the
generated methods. Libraries updated:
* [feign]
* [google-api-client]
* [microprofile]
* [okhttp-gson]
* [resttemplate]
* [retrofit]
* [retrofit/play*]
* [webclient]
* [vertx]
Ensure `deprecated` schemas are annotated/documented as such on the
generated classes/fields. Libraries updated:
* [feign]
* [google-api-client]
* [jersey2]
* [microprofile]
* [native]
* [okhttp-gson]
* [rest-assured]
* [resteasy]
* [resttemplate]
* [retrofit*]
* [webclient]
* [vertx]
Also fix two minor bugs to get the java sample tests working:
* Fix an invalid jackson-datatype-threetenbp version number in vertx/pom.mustache
* Fix a bad return type in webclient/api_test.mustache when uniqueItems=true
Since this commit updates petstore-with-fake-endpoints-models-for-testing.yaml,
several other samples were updated, but it's just new files to reflect the
deprecated schemas, so there should be no consequential differences.
Relevant bits of the spec:
* https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-operationdeprecated
* https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-schemadeprecated
2021-07-19 10:27:03 +08:00
desmese
4f1d8f4699
- added localVar prefix to the contentType variable defined in the api.mustache template in the java resttemplate library ( #9568 )
...
- rerun generate-samples.sh and export_docs_generators.sh
2021-05-27 10:24:38 +08:00
William Cheng
08467928de
update samples
2021-05-17 18:25:07 +08:00
Jakob
0af45b3823
[Java] add jackson annotations to setters ( #9041 )
...
* [Java] add jackson annotations to setters
Closes #6856
* [Java] fix conflictiong setter with JsonNullable
2021-03-30 11:17:15 +08:00
Oleh Kurpiak
cfe86d9594
[Java][Server] fix default value ( #8577 )
...
* [Java][Server] fix default value
* [Java][Server] fix default value
2021-03-15 21:25:48 +08:00
Dheeraj Nalluri
264b017eec
[Java][Client] JSON-B serialization support ( #8729 )
...
* Added JSON-B support.
* Mention jsonb in docs
2021-02-27 15:32:46 +08:00
Oleh Kurpiak
f0b9e21b6b
[Java] fix generation for JavaTimeFormatter ( #8348 )
...
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
2021-01-29 11:22:37 +08:00
William Cheng
84813be309
remove supportJava6 option ( #8514 )
2021-01-26 10:27:09 +08:00
Arnaud Jeansen
0c5cec8f75
7141: filter out problem+json mime type from JSON mime types fast tra… ( #7976 )
...
* 7141: filter out problem+json mime type from JSON mime types fast tracked into the Accept header (resttemplate)
* 7141: ran ensure-up-to-date
* 7141: minimize changes with master (keep using isJsonMime for MediaType)
2021-01-04 11:02:39 +08:00
William Cheng
3d36d491df
replace tab with spaces ( #7625 )
2020-10-08 23:00:36 +08:00
William Cheng
26c17c5774
[Java] remove deprecated jackson classes ( #7304 )
...
* [java/resttemplate] Generate valid code if no Authentication implementations present
Take the logic used to decide which instances to add to the authentications map and re-use to not import classes or offer non-functional util methods
* parameterize formParams
fixes #5782
* replace use of ISO8601DateFormat and ISO8601Utils with StdDateFormat
fixes #5779
* add constructor to intialise calendar
* Revert "[java/resttemplate] Generate valid code if no Authentication implementations present"
This reverts commit 6e450907bae1d831a4a8c9b66f6b707424f0a39a.
* Revert "parameterize formParams"
This reverts commit 7a26ce5dd21ce147ed33728cd0091a29175367a4.
* also override single arg parse method to avoid throwing exception
* also override single arg parse method to avoid throwing exception
* update samples
* update samples
* fix jersey1 tests
* fix jersey2 test
* update resteasy dependencies
* fix java jersey2 oas3 tests
* use java8 in springboot-beanvalidation
Co-authored-by: Jon Freedman <jon.freedman@zoho.com>
2020-08-27 23:13:56 +08:00
Niels Pardon
d868fd6dc8
[Java][clients] remove java.lang prefix from Object ( #6806 )
2020-08-24 22:06:19 -04:00
Jon Freedman
9ba34b2805
[Java] parameterize formParams ( #5784 )
...
* parameterize formParams
fixes #5782
* sync generated code
* update to latest version of spring, replace MultiValueMap#put with #addAll, remove unused imports
* restore java.util.HashMap import
* update spring version in pom/gradle templates
* re-generate resttemplate samples
* fix test
* fix test
* parameterize an additional usage of LinkedMultiValueMap
* re-generate resttemplate samples
* re-generate webclient samples
* manually edit FILES to replace \ with /
2020-08-12 15:55:53 +08:00
mikesaurus
34f0d02f38
ISSUE-4222: Prevent conflicts with accept(s) local variables in generated Java RestTemplate ApiClient ( #7101 )
...
* ISSUE-4222: Change accept(s) to localVarAccept(s) in Java/resttemplate/api.mustache
* ISSUE-4222: Regenerate samples
2020-08-04 09:52:16 +08:00
William Cheng
2ab35e0386
add JsonTypeName ( #6995 )
2020-07-21 14:21:10 +08:00
William Cheng
44d3f717f8
update java samples
2020-07-18 22:02:16 +08:00
Jorge Rodríguez Martín
068ad02bc8
[BUG] [JAVA] Fix multiple files upload ( #4803 ) ( #6808 )
...
* gh-4803: Fix bug java client multiple files upload
* gh-4803: Fix bug java client multiple files upload
* gh-4803: Fix bug java client multiple files upload
* gh-4803: Fix bug java client multiple files upload
* gh-4803: Fix bug java client multiple files upload
2020-07-03 00:23:17 +08:00
Jochen Schalanda
32adeddd8f
Fix usage of javax.annotation ( #6645 )
...
* Fix usage of javax.annotation:javax.annotation-api
* Regenerate samples
```
bin/generate-samples.sh bin/configs/java-* bin/configs/jaxrs-* bin/configs/spring-* bin/configs/kotlin-* bin/configs/other/java-* bin/configs/other/jaxrs-* bin/configs/other/kotlin-* bin/configs/other/openapi3/jaxrs-cxf-client.yaml bin/configs/other/openapi3/kotlin-*
```
2020-06-14 17:01:18 +08:00
Jim Schubert
835dab4b50
Fix typescript generator for parameter collectionFormat for pipes ssv ( #6553 )
...
Co-authored-by: David Biesack <David.Biesack@apiture.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Vikrant Balyan <vvb@users.noreply.github.com>
Co-authored-by: Michele Albano <michele.albano@gmail.com>
Co-authored-by: Esteban Gehring <esteban.gehring@bithost.ch>
2020-06-05 19:32:32 -04:00