* spring-http-interface: introduce `springHttpClientAdapter`, fix `paramDoc.mustache`
---
### What
- Introduce `springHttpClientAdapter` for `spring-http-interface`
- This property is used for selecting HTTP client implementation in Spring HTTP interfaces, with separate templates for each client configuration
- Added an `spring-http-interface`-specific **empty** `paramDoc.mustache`
---
### Why
- Enable selecting different HTTP client implementations when generating Spring HTTP client interfaces
- Provides additional flexibility for users who want to generate non-reactive Spring Boot applications.
---
### How
- `springHttpClientAdapter`: Allows users to choose between different HTTP client implementations used in `HttpInterfacesAbstractConfigurator`:
- `web-client` (set by default, to ensure **backward compatibility**)
- `rest-client`
- `rest-template`
- Separate templates for each `HttpInterfacesAbstractConfigurator` implementation:
- `httpInterfacesRestClientConfiguration.mustache`
- `httpInterfacesRestTemplateConfiguration.mustache`
- `httpInterfacesWebClientConfiguration.mustache`
- Log warning for configuration mismatch
- When `reactive: false` is used in combination with the reactive `web-client`, it warns users of potential configuration mismatches, and suggests switching to `rest-template` or `rest-client` for non-reactive configurations.
- Remove unnecessary paramDoc
- Added an `spring-http-interface`-specific **empty** `paramDoc.mustache` in `JavaSpring/libraries/spring-http-interface/paramDoc.mustache`
- This prevents inheriting the `@Parameter` annotations from the default Spring template located at `JavaSpring/paramDoc.mustache`.
- Otherwise, the generated code includes `@Parameter` annotations on request body parameters, which were causing compile errors due to missing imports
---
### Testing Done
- **Manual testing**: Verified that the generated code uses `WebClient`, `RestTemplate`, or `RestClient` based on the value of the `springHttpClientAdapter` property.
- **Tested different configurations**:
- **`reactive: false` & `web-client`**: Logs a warning, suggesting the use of `rest-client` or `rest-template`.
- **`springHttpClientAdapter: rest-template`**: Generates code with `RestTemplateAdapter` using the `httpInterfacesRestTemplateConfiguration.mustache`.
- **`springHttpClientAdapter: web-client` (default)**: Generates code using `WebClientAdapter` from `httpInterfacesWebClientConfiguration.mustache` and ensures backward compatibility.
- **Tested `paramDoc.mustache` change**: Verified that the empty `paramDoc.mustache` prevents the generation of `@Parameter` annotations on request body parameters and resolves the compile errors caused by missing imports.
---
### PR checklist
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
- [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
```
./mvnw clean package
./bin/generate-samples.sh ./bin/configs/*.yaml
./bin/utils/export_docs_generators.sh
```
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
Commit all changed files.
This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming `7.x.0` minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.
* fix imports
* Update SpringCodegen.java
* fix docs and default value
* fix docs and default value
* revert to HttpServiceProxyFactory.builder for backward compatibility
* spring-http-interface: introduce `useHttpServiceProxyFactoryInterfacesConfiguration` config
* spring-http-interface: introduce `useHttpServiceProxyFactoryInterfacesConfigurator` config
* spring-http-interface: introduce `useHttpServiceProxyFactoryInterfacesConfigurator` config
* spring-http-interface: fix generated files
* remove unnecessary imports from httpServiceProxyFactoryInterfacesConfigurator.mustache and parentOverrides from spring-http-interface-useHttpServiceProxyFactoryInterfacesConfiguration.yaml
* remove unnecessary paramDoc.mustache, update `useHttpServiceProxyFactoryInterfacesConfigurator` parameter docs of `spring-http-interface` library
* [java][spring] Spring HTTP Interface library: Validate Spring Boot version (3 or 4) and fail early if unsupported
* Set `useSpringBoot3: "true"` for all sample configs using `library: spring-http-interface`
* Regenerate samples using `library: spring-http-interface`
* Update "spring-http-interface" docs "Spring 6 HTTP interfaces (testing)" -> "Spring 6 HTTP interfaces (testing). Requires Spring Boot 3 or 4." in java-camel.md and spring.md
---------
Co-authored-by: Bragolgirith <6455473+Bragolgirith@users.noreply.github.com>
* add 'useJackson3' option
* add 'useSpringBoot4' option
* add support for RestClient in spring-http-interfaces
* add 'jacksonPackage' template variable set from useJackson3 option
See #22294
* fix: conditionally add jackson JsonIgnoreProperties for base class polymorphism
* fix: rename flag
* fix: rename flag
* fix: remove newline
* fix: regenerate example models
* fix: regenerate
* Add spring api versioning support
* Do not add version if not requested
* Fix duplicate VendorExtensions
* Improve description
* Fix removal of RequestMapping version attribute if x-spring-api-version: '' is set at the operation level
* fix(java): x-discriminator-value should not produce @JsonTypeName
* fix(java): Remove unused getDiscriminatorValue()
* build at Fednot
* build at Fednot
* build at Fednot: skip sonar
* scm for release at fednot
* build fednot not 7.5.0-FEDNOT-SNAPSHOT
* build fednot not 7.5.0-FEDNOT-SNAPSHOT
* test all vars
* rollback custom pom.xml
* commit master
* commit test
* Samples for deduction
* add files for deduction
* small improvements
* Merge changes from martin-mfg
Merge master
* Merge changes from martin-mfg
Merge master
* Merge changes from martin-mfg
Add comment to force rebuild
* Merge master
* regenerate doc
* regenerate client
* regenerate client
---------
Co-authored-by: Jean-Paul Finne <jean-paul.finne@fednot.be>
Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
* Autosets the parameters with the only value specified as enum if the parameter is also marked as required
* Autosets the parameters with the only value specified as enum if the parameter is also marked as required
* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.
* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.
* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.
* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.
* Update beanValidationCore.mustache
Update to use x-pattern-message for message customization
* Update spring.md
Update this page adding documentation for x-pattern-message
* added unit test
meet requested corrections
* build the project
* remove space
---------
Co-authored-by: Rodrigo de Almeida - RMA3 <rodrigo.ma3@gmail.com>
Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
* Added the useResponseEntity additional parameter for Spring generator
* Changed the mustache templates using the new useResponseEntity property
* Added the new property to the documentation
* Merging with remote master
* #11537 Added missing configuration for the delegate pattern case
* #11537 Added autogenerated @ResponseStatus on Spring methods
* #11537 Fixed borsch comments
* #11537 Added the default 200 HTTP Status for empty response HTTP code
* [Java][Spring] useResponseEntity sample + remove blank line
* [Java][Spring] useResponseEntity sample + remove blank line
* [Java][Spring] useResponseEntity sample + remove blank line
---------
Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
* Fix#14276 Java Templates uses jakarta or javax package if useJakartaEe
is true
* generated samples after useJakartaEe changes
* generated docs after useJakartaEe changes