57 Commits

Author SHA1 Message Date
Lucas Reeh
f656afcde3
Add original enumPropertyNamingType config for java enum generation (#20824) 2025-04-27 15:00:51 +08:00
30p87
ee7927a525
[Java][Spring] remove 'size', 'page' and 'sort' query params if using 'x-spring-paginated' (#8315) (#21016)
* [Java][Spring] remove 'size', 'page' and 'sort' query params if using 'x-spring-paginated' (#8315)

* Properly implement samples, fixing build issues

---------

Co-authored-by: Tobias Fischer <t.fischer@goldflam.de>
2025-04-23 15:47:17 +08:00
Pavel
868074212a
[Java] Extend JavaSpring apiClient.mustache with option to override contextId for FeignClient (#20943) 2025-03-22 11:36:30 +08:00
takashno
6e3b1996ed
[java][spring] add useSpringBuiltInValidation option to disable @Validated at class level (fix #20899) (#20901)
* [java][spring] add useSpringBuiltInValidation option to disable @Validated at class level (fix #20899)

* Add sample and github workflow maintenance.
2025-03-20 17:41:02 +08:00
William Cheng
1c3eade94d
[java][spring] Add option optionalAcceptNullable to accept null values (#20746)
* add option to rollback accept null values

* update doc

* update tests
2025-02-27 17:21:51 +08:00
Alex
cd7cdb1e24
Add option to generate a fully sealed model in the JavaSpring generator (#20503)
* Generated sealed interfaces for oneOf

* Add generated data

* Add also  modifier

* Allow sealed for everything

* Fully seal model

* Disable html escaping

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>

* Update docs

* Check all oneOf scenarios

* Fix failed scenario

* Fix comments

* Remove unused import

* Adapt pom.xml also

* Add comment and remove unused function

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2025-02-19 15:15:09 +08:00
DielN
b9f6fe6b1f
[Java] [Microprofile] Add Json-B polymorphism type info annotations (#20164)
* [Microprofile] Add Json-B polymorphism annotations

* [Microprofile] Set openApiNullable in configs to false

* [Microprofile] Bump JSON Bind version to 3.0

* [Microprofile] Only apply JSON-B polymorphism for MP 3.0

* Update samples

* [Microprofile] Update documentation/configs for openApiNullable

* Update docs
2024-12-03 12:02:54 +08:00
William Cheng
711e53a90c
[Java] Add option to fallback to legacy enum naming (#20172)
* add option to fallback legacy enum naming (java)

* fix tests
2024-11-29 17:12:12 +08:00
Rodrigo de Almeida - RMA3
21d3cfe924
Fix Issue 18224 - Load x-field-extra-annotation in the operation parameter (#18967)
* fix issue 18959

* fix issue 18224

* fix issue 18224

* fix spaces

---------

Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2024-06-30 16:27:14 +08:00
Rodrigo de Almeida - RMA3
5532203f9f
fix issue 18959 (#18962)
Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2024-06-24 16:58:02 +08:00
William Cheng
51ef8683fb
[java] implement #18032 add builder pattern to java client and spring generator (#18650)
* add builder pattern to java client and spring generator

* regenerate samples

* update doc

---------

Co-authored-by: jpfinne <jeanpaul@finne.be>
2024-05-14 11:38:30 +08:00
William Cheng
2a1b4f90df
Add new option allArgConstructor for java client, spring generators (#18538)
* allArgConstructor for java

* Remove leftover from builder pattern branch

* Rename generateConstructorWithAllArgs and use x- in vendorExtensions

* Test issue #18340

* Add evidences for allVars issue (#18340)

* remove eol

* update doc

---------

Co-authored-by: jpfinne <jeanpaul@finne.be>
2024-05-01 18:10:35 +08:00
William Cheng
b2a7f435c8
"==" enum value generates "_" in Java which is invalid since Java 9 (#18338)
* #17276 "==" enum value generates "_" in Java which is invalid since Java 9

* update doc

---------

Co-authored-by: Julien BÉTI <jbeti@cosium.com>
2024-04-09 12:21:54 +08:00
martin-mfg
aad345f0bd
expand documentation for option "artifactVersion" (#17845)
* update documentation strings

* re-generate docs
2024-02-13 16:18:05 +08:00
Tiffany Marrel
42f72192ca
add security feature AWSV4Signature to documentation (#15603) 2023-12-13 15:07:18 +08:00
William Cheng
70bffffc5a
remove option, update doc (#16592) 2023-09-15 15:01:21 +08:00
prashant-pant
4b87606665
Autoset constants (Required fields having single valid enum value) Java (OkHttp) Implementation of #16547 (#16550)
* 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.
2023-09-15 14:41:17 +08:00
Rodrigo de Almeida - RMA3
d955ff6988
Add annotations to the operation - case permission validation - Fix 12219 15822 (#16259)
* fix #12219 #15822

* add test with array

* update samples

---------

Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2023-08-09 17:21:57 +03:00
William Cheng
6a8039c672 update doc 2023-08-09 14:38:56 +08:00
Dennis Melzer
e77f9ea783
Add new OAuth2RequestInterceptor to remove deprecated open feign classes (#16011)
* Add new OAuth2RequestInterceptor to remove deprecated open feign classes

* Add override

* Add version

* Add older version

* Update docs

* Fix issue with multiple security schemes

* Move cli option to spring code gen

* Fix documentation options

* Remove resource folder

* Fix duplicate annotation

* Add an enable flag

* Remove generator setting

* Revert codgen changes

* Revert config generator changes
2023-07-13 08:35:39 +08:00
martin-mfg
ad5cc827f0
remove fullJavaUtil (#15033) 2023-05-22 14:40:35 +08:00
Tiffany Marrel
00676870a3
add HTTP signature to SecurityFeature (#15542) 2023-05-17 00:48:58 +08:00
Rodrigo de Almeida - RMA3
e07069731d
[JAVA] Enumeration comparison in Java using equalsIgnoreCase when String - Fix issue 8084 (#15273)
* fix issue 8084

* add config

* add config

---------

Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2023-04-28 17:27:41 +03:00
Matheus Teles
33e0c6775f
Update beanValidationCore.mustache (#13631) (fix #3519)
* 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>
2023-04-21 10:08:27 +03:00
Robbert van Waveren
8a426b2f4a
allow to specify the useOneOfInterfaces option for java (#15042) 2023-04-12 15:21:34 +03:00
William Cheng
88da3649b2
[csharp-netcore] Add option skip generating getter for sub-schemas (#15007)
* add option skip generating getter for sub-schemas

* fix openapi-yaml

* update samples

* update samples
2023-03-21 22:41:29 +08:00
Riccardo Cardin
e626b43e27
Added a property to the Spring generator to avoid the use of the ResponseEntity type (#11537)
* 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>
2023-03-16 14:00:10 +02:00
Oleh Kurpiak
bda2501455
[Java][Spring] option whether to generate required args constructor (#14941) (fix #14934) 2023-03-14 10:39:58 +02:00
Oleh Kurpiak
ca3e8be1bc
[Java][Spring] version parameter (#14847) 2023-03-02 13:29:01 +02:00
William Cheng
fd45b74128
[Java] better default value handling (#14130)
* add test for array default value

* update null return

* minor fixes

* move default value tests to echo api spec

* add new files

* remove unused files

* fix enum array default, add tests

* better array init

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>

* revert the fix

* improve default value handling

* update native samples, add tests

* update samples

* fix tests

* use conditional test for timezone

* add tests to apache http client echo api

* add option to default container to null

* fix map default value

* minor refactoring

* update samples

* fix javadoc

* fix pom.xml

* add tests in java native echo client

* add java apache client echo tests

* fix test

* fix test

---------

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>
2023-01-30 20:19:00 +08:00
Oleh Kurpiak
28493dfa95
[Spring] Spring HTTP Interface library (#14485) 2023-01-30 10:37:00 +02:00
Paul Parenko
c2c91e2d2e
[Java][Spring] Fix #14362 when useSpringBoot3=true, then useJakartaEe=true (#14373) 2023-01-12 19:54:42 +08:00
Paul Parenko
456cca1a28
[Java] Fix #14276 Java Templates uses jakarta or javax package if useJakartaEe is enabled (#14343)
* Fix #14276 Java Templates uses jakarta or javax package if useJakartaEe
is true

* generated samples after useJakartaEe changes

* generated docs after useJakartaEe changes
2023-01-02 16:28:44 +08:00
Oleh Kurpiak
7c587ce061
[Java] configurable Javax/Jakarta package (#14310) 2022-12-30 22:33:55 +08:00
Oleh Kurpiak
95b566a3a9
[Java] fix additional annotations for oneOf interfaces (#13958) 2022-11-20 12:44:47 +08:00
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos (#13915)
* Fix typos

* Remove repeated words

* Minor grammar fixes
2022-11-07 21:30:24 +08:00
cachescrubber
b54299fffa
Spring request mapping mode (#13838)
* Introduce RequestMappingMode option

* generate docs

* Add test case using interfaceOnly

* Generate Samples

* Add requestMappingMode: iface to bin/configs/spring-boot-oas3.yaml

* Restore #12250: Move Feign Client url parameter under condition.

* Rename iface to api_interface.
2022-11-01 09:44:01 +08:00
Thibault Duperron
574a70c315
[JAVA] Handle camlCase with $ as first char (#13292)
* Lowercase first char and not first letter for variable names

* Samples

* Limit caml case fix impact with cli a property
2022-10-28 21:36:04 +08:00
William Cheng
8f3dd48772 update samples, docs 2022-06-06 12:20:21 +08:00
cachescrubber
71ea659195
[Java/Spring] Support Spring Boot 3 and Jakarta EE 9 (#12407)
* Migrate annotation.Generated

* Upgrade jakarta.servlet and jakarta.validation

* Prepare pom.xml for spring boot 3

* Introduce spring-boot-3 sample config.

* Create spring-boot-3 sample.

* Introduce useSpringBoot3 cli option.

* Generate Docs

* Add spring milestone repo

* Generate Samples

* Adjust Unit Tests

* Add Spring Boot 3 Support to spring-cloud library

* generate spring cloud 3 sample

* Remove springfox

* Fix typo.

* No longer support SpringFox and Swagger1 with Spring Boot > 3.x

* Generate Docs

* Use Spring Boot 3.0.0-M3

* Generate Samples
2022-05-27 00:07:19 +08:00
Eugene Aleinikov
1cca865a69
Move Feign Client url parameter under condition. (#12250) 2022-05-07 00:10:52 +08:00
Justin Black
e2e7609bac
Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
2022-04-17 09:36:09 -07:00
Justin Black
eef7cddd6f
Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated

* Adds test_UUIDString uuid model test

* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type

* Adds maps data type back in

* Adds missing Null and AnyType definitions and adds them to python-experimental

* Generator docs updated, added missing uuid, null, anytype, and object

* Adds uuid support description

* Docs updated
2022-04-16 14:55:49 -07:00
William Cheng
5d8b80a5cd
[Java] rename x-contentType to x-content-type (#11895)
* rename x-contentType to x-content-type

* undo changes
2022-03-18 09:50:42 +08:00
Oleh Kurpiak
860b6340a8
[Java] update list of vendor extensions (#11891) 2022-03-17 09:31:45 +08:00
Oleh Kurpiak
fb2c41c720
[Java] implicit headers regex (#11819) 2022-03-10 10:49:52 +08:00
Oleh Kurpiak
382e2a22a8
Document all used vendor extensions in specific generator (#11797) 2022-03-06 23:21:55 +08:00
William Cheng
4d6b733d91
fix typo with camelUseDefaultValidationtErrorProcessor (#11728) 2022-02-26 14:51:02 +08:00
cachescrubber
0ed147e7a4
Implement Source DocumentationProvider, spring-mvc decommission (#11531)
* - Upgrade swagger-ui to 4.4.1
- Bring homeController.mustache up-to-date
- Main class is now OpenApiGeneratorApplication
- Introduce SpringBootTest.mustache
- Remove option swaggerDocketConfig/openapiDocketConfig in favor of documentationProvider.

* Generate Samples

* Restore generator-online classes
Fix spring-mvc builds

* Generate Samples

* Do not generate SpringFoxConfiguration.java when reactive ist set.

* Fix generation of SpringFoxConfiguration

* Generate Documentation

* Reactive support: add dependency management for springdoc-openapi-webflux-ui

* Generate Samples

* Change SpringBootApplication to OpenApiGeneratorApplication

* Generate Samples

* Implement SwaggerUIFeatures in SpringCodegen

* Generate Samples

* Add useSwaggerUI: true to some test configs

* Generate Samples

* Update Documentation

* Update Documentation

* Update README.mustache

* Generate Samples

* useSwaggerUI is true by default

* Generate Samples

* Update Documentation

* Add deprecation warnings to cli opts; Log a deprecation warning

* Update Documentation

* Generate Samples

* Remove spring-mvc library

* Remove spring-mvc from project and CI configs

* Check whether the selected documentation provider requires us to boostrap swagger-ui.

* Generate Samples

* Generate samples

* Generate samples

* Generate samples
2022-02-12 17:25:21 +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