* Fixes so that a oneOf schema with a single sub-schema is simplified when SIMPLIFY_ONEOF_ANYOF is set to true
* Adjusts oneOf_array test to ensure that it is generated as an interface instead of being simplified
* Update ruby samples so that they no longer refer to a model that is now gone due to the schema being simplified
* 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.
* [java] generateClientAsBean for restclient and webclient
Added possibility to generate restclient and webclient as a @Component in the same fashion as resttemplate.
Fix#17885Fix#19229
* - Samples
* Revert "v7.12.0 release"
This reverts commit 073723cb4d41187f839fbb46565d109293fa22d7.
* set version to v7.13.0-SNAPSHOT
* update samples
* update doc
* 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
* replace removed forkMode
* remove junit runner where it's not needed
* update samples without skipping test files, but skip files named "FILES"
* revert overwriting custom tests, add custom java tests to list
* add one sample to CircleCI, fix various Java tests
* chore (JAVA SPRING WEBCLIENT): Remove comments used for debugging
* feat (JAVA SPRING WEBCLIENT): Add support for useSingleRequestParameter to Spring WebClient
* feat (JAVA SPRING WEBCLIENT): Generate samples and docs
* fix (JAVA SPRING WEBCLIENT): Fix missing return error & Fix JDK17 action webclient useSingleRequestParameter test path
* fix (JAVA SPRING WEBCLIENT): Fix code indention
* fix (JAVA SPRING WEBCLIENT): Fix code indention again
* fix (JAVA SPRING WEBCLIENT): Update samples
* feat (JAVA SPRING WEBCLIENT): Regenerate after pull rebase
* fixes(java/restclient) Force usage of custom converter
Insert custom converter at the beginning of the 'RestClientBuilder' converter list so as not to use default 'MappingJackson2HttpMessageConverter'
Close#20111
* update samples
---------
Co-authored-by: William Cheng <wing328hk@gmail.com>
* issue-1960: Add nullability annotations to Java generated clients
Motivations:
Have generated clients properly annotated for nullability to be able to check code using them with tools like NullAway
Modifications:
* Add nullable_var_annotations template to handle nullability annotation on vars
* Add pojo templates to use the nullability template
* Adapt tests
* issue-1960: Add nullability annotations to Java generated clients
Modifications:
* Run export_docs_generator.sh script to update samples
* Update ApiClient.mustache
* Update ApiClient.mustache
Jersey doesn't allow request entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* Update ApiClient.java
Jersey doesn't allow entities in method DELETE
* jersey ApiClient.mustache invoke DELETE without entity if empty
* jersey ApiClient.mustache invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* jersey ApiClient invoke DELETE without entity if empty
* [Java] Add a new additional property to configure Jackson's `failOnUnknownProperties`
* Move `FAIL_ON_UNKNOWN_PROPERTIES` property to JavaClientCodegen
* Template `FAIL_ON_UNKNOWN_PROPERTIES` for other libraries beside retrofit2
* Default `failOnUnknownProperties` to false for all Java Client libraries
* Fix integration tests
Add the `failOnUnknownProperties: true` additional properties to generate the
expected mapper
* Fix#16362
* Update samples
* Undo formatting changes
* Revert whitespace changes in samples
* make it work
---------
Co-authored-by: Jason Boileau <jason@boileau.dk>
Co-authored-by: Jason Boileau <spraot@users.noreply.github.com>
* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api multipart form single file test
* feat (JAVA SPRING RESTCLIENT) 18522: Add RestClient to README
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo all of Pet test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body free form object response string test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body pet test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body pet response string test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body string enum test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body tag response test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo form tests
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo header test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo path test
* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo query tests
* feat (JAVA SPRING RESTCLIENT) 18522: Regenerasted API Clients for RestClient with fixed import indentation
* javax.ws.rs:javax.ws.rs-api package was renamed on maven
* update dependencies for java okhttp pom, build.sbt
* update
* update dep
---------
Co-authored-by: Andres Aguilar <andresesfm@gmail.com>
* Add type annotations to raw types for jersey2 and jersey3 templates
* Update samples
* Add type parameters to anyof_model.mustache and oneof_model.mustache
---------
Co-authored-by: Kasper S. Nielsen <kasper.s.nielsen@secata.com>
* Fix XML annotations on model properties (JavaSpring)
* generate JAXB annotations for attributes and elements
* generate wrapper annotations (JAXB and Jackson)
* use XML config from items for annotations of containers
* Add test for Jackson XML wrapper correctness
* Add additional test cases to cover all xml applications in spec
Test now covers all use cases described in
- https://web.archive.org/web/20240424203304/https://swagger.io/docs/specification/data-models/representing-xml/
- https://spec.openapis.org/oas/v3.0.0#xml-arrays
* Fix basename used instead of xmlName when items.xmlName is unset
See last example in spec: https://spec.openapis.org/oas/v3.0.0#xml-arrays
* Harmonize spacing between Annotation attribute name and value
* Refactor and group JAXB vs. Jackson XML annotations, only generate latter if enabled
This is in line with the way the class annotations in `xmlAnnotations.mustache`
are rendered – which only renders the `@Jackson`… xml annotations if
additionalProperty jackson is true.
Also reorder annotation attributes in the following order:
- localName/name
- namespace (optional)
- isAttribute/useWrapping (optional)
* Explicitly render `useWrapping = true` to @JacksonXmlElementWrapper
This was slightly inspired by @jzrebiec via PR #5371.
Wrapping is the default since Jackson 2.1 – so explicitly rendering
this will:
- make generated model work out-of-the-box in Jackson 2.0 for instance
- ensure the models still work if the local `XmlWrapper` was
configured with `useXmlWrapper(false)`
* Move xml test spec to java resources folder (not spring specific)
* Make test class name match class-under-test
This makes discovery & cross-navigation in IDE easier.
* Add complete xml annotations test for Java generators
* Fix Java PKMST generator not generating @JacksonXmlElementWrapper
* Fix Java microprofile generator missing @JacksonXmlRootElement
* Fix Java microprofile generator not using wrapper annotations and namespaces
* Fix Java Micronaut Client creating invalid (unclosed) @XmlAttribute annotations
* Fix Micronaut Client using wrong localName for @JacksonXmlElementWrapper
* Fix Micronaut client rendering @JacksonXmlProperty annotation twice
* Make Java Micronaut render @JacksonXmlElementWrapper(useWrapping=false) for non-wrapped elements
* Fix Jackson element using `xml.name` when it should be `items.xml.name`
Closes#5989Closes#3223
Relates to #9371
* Fix JAXB element using `baseName` instead of `xmlName` when items.xmlName is unset
* Remove XML generation debug output from templates
* Remove redundant newline between XML class annotations and class
Brings the SpringCodegen in line with other Java Codegen's
* Remove redundant newline between XML setter annotations and setter
* Fix multiline JavaDoc block indentation and format
* Simplify / condense xml annotation template into single lines
May look a bit more complex, but cuts out a lot of repetitiveness.
Also reorders annotation attributes in the following order:
- localName/name
- namespace (optional)
- isAttribute/useWrapping (optional)
* Harmonize spacing between Annotation attribute name and value
* Remove unused jackson_annotations partial
Was not referenced anywhere in java-helidon resources folder
---------
Co-authored-by: Christian Schuster <christian@dnup.de>