47 Commits

Author SHA1 Message Date
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
feech
34395c3173
Makes the maven plugin to generate Model-tests and API-tests in generated-test-sources (#11294)
* added support for independent test-folder

* generate updated docs

* generate updated docs

* generate updated docs

* trigger a new CI builds

Co-authored-by: William Cheng <wing328hk@gmail.com>
2022-01-26 16:32:09 +08:00
Justin Black
78f4748c06
Adds generator default template engine (#11366)
* Revert "Revert "Has generators set default template engine (#11245)" (#11316)"

This reverts commit 57987424a4eaa22d73337388489cd86d7f42a023.

* Only loads in the default template engine if the config file contains the generatorName

* Only sets templatingEngineName using condif default in one place

* Adds config files that lack generatorName

* Revert "Adds config files that lack generatorName"

This reverts commit 7dafc93c0f02c037d9be5d2c0a3ee7377c8b479d.

* Adds generator default templating engine to the generator metadata
2022-01-23 14:16:46 -08:00
cachescrubber
e1c5b220cd
[JAVA] new Feature interface: Documentation Provider and Annotation Library (#11258)
* Implement DocumentationProviderFeatures and integrate it in AbstractJavaCodegen

* Integrate DocumentationProviderFeatures in SpringCodegen

* Run new test config spring-boot-springdoc

* Do not use Locale.ROOT

* Do not use Locale.ROOT, use NONE instead of empty list

* Revert "Do not use Locale.ROOT"

This reverts commit a0d6aac92bea2370b4f164d18ada3fd9097f3a30.

* Do not use forbidden APIs

* Fix spring maven plugin example

* Introduce DocumentationProviderFeaturesTest.java

* replace AUTO with preferredAnnotationLibrary

* remove sout.println from Test

* Apply code style.

* Update spring sample configuration to use the new property

* Update samples after merge

* fix atBean import

* Generate all samples

* Add ParameterObject to test

* Allow Subclasses to opt out

* Use OpenAPI 2 (fka Swagger RESTful API Documentation Specification) instead of just "Swagger"

* export generator docs

* Fix typo

* Fix typo - update docs.
2022-01-22 08:51:17 +08:00
William Cheng
d77acf11b5 update samples 2022-01-17 10:42:49 +08:00
William Cheng
759883f804
minor enhancements to java camel generator (#11296) 2022-01-14 01:08:22 +08:00
William Cheng
dff3944d19 update doc 2022-01-13 18:16:48 +08:00
Giacomo
2e6e82161f
Apache Camel Server Generator (#11162)
* Created Apache Camel language

* Added unit test

* Fix template dir

* Fix description api

* Camel Dataformat Properties

* Apache Camel Doc

* Apache Camel Doc

* Apache Camel Doc

* Apache Camel maven plugin example

* Fix LOGGER

* Samples

* Camel 3.14

* Samples

* samples

* up to date

* Rename camel to java-camel

* up to date

* Fix SerializedName in modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
2022-01-13 01:28:02 +08:00