11 Commits

Author SHA1 Message Date
William Cheng
2d4a01aa70 Revert "Prepare 6.0.0 beta release (#12039)"
This reverts commit 914b539eea7097ad2b4323d20c8f95144782cb68.
2022-04-04 12:17:12 +08:00
William Cheng
914b539eea
Prepare 6.0.0 beta release (#12039)
* update to 6.0.0-beta

* update samples
2022-04-04 10:29:49 +08:00
cachescrubber
7fb0fcb96c
Upgrade to Spring Boot 2.6.6/2.5.12 and Spring Cloud 2021.0.1. (#12027)
* Upgrade to Spring Boot 2.6.6/2.5.12 and Spring Cloud 2021.0.1.

* Generate Samples
2022-04-01 14:19:09 +08:00
cachescrubber
50bf764268
Spring Boot Dependency Upgrade (#11960)
* Dependency management: Upgrade Managed Versions

* spring-boot: add optional classifier to spring-boot maven plugin configuration

* Upgrade to spring-boot 2.5.10

* Generate Samples

* Upgrade to Spring Boot 2.5.11 / 2.6.5

* Generate Samples
2022-03-26 10:23:25 +08: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
cachescrubber
e07c7d1617
[Feature][Java/Spring] Support Discriminator Based OneOf Interface (#11650)
* Fix OpenAPITools#5381
added x-is-one-of-interface extension for oneOf interface in mustache
template

* Fix OpenAPITools#5381
fixed name of model from UNKNOWN_BASE_TYPE to right one in api: operationId + OneOf

Fix OpenAPITools#5381
parcelableModel is not required

* Fix OpenAPITools#5381
removed not needed methods

* Fix OpenAPITools#5381
catch NPE cases in preprocessOpenAPI
updated samples

* Fix OpenAPITools#5381
fixed generation of oneOf Models

* Fix OpenAPITools#5381
addOneOfInterfaceModel only for cases when useOneOfInterfaces is true and for spring

* Fix OpenAPITools#5381
NPE fix

* Fix OpenAPITools#5381
spring: fixed use of oneOf Models in API

* Fix OpenAPITools#5381
implementing oneOf for spring lib overriding methods with different behavior from default

* Fix OpenAPITools#5381
added x-is-one-of-interface extension for oneOf interface in mustache
template

* Fix OpenAPITools#5381
fixed name of model from UNKNOWN_BASE_TYPE to right one in api: operationId + OneOf

Fix OpenAPITools#5381
removed not needed methods

Fix OpenAPITools#5381
fixed generation of oneOf Models

Fix OpenAPITools#5381
addOneOfInterfaceModel only for cases when useOneOfInterfaces is true and for spring

Fix OpenAPITools#5381
NPE fix for tests

* Fix OpenAPITools#5381
fixed handing of composed schema with array

* Fix OpenAPITools#5381
fixed NPE in addOneOfInterfaceModel

* Fix OpenAPITools#5381
fixed generation of oneOf models with descriminator

* Initial merge of 5.0

* Aligned with master formatting

* Corrected spacing for class names to align with samples.

* Merged master

* Updated samples

* Consolidate methods from JavaClient and SpringCodegen (mov up to AbstractJavaCodegen)

* set useLegacyDiscriminator to false, format templates

* Suport JsonTypeName, fq class name for spring.io.Resource

* Generate Samples

* Test full qualified usage of the spring Resource interface.

* Add java-camel to samples.circleci.spring profile

* Add more complex example combining inheritance and oneof-interface

* Remove x-implements Serializable from JavaClientCodegen (moved to AbstractJavaCodegen)

* Fix spacing before opening brace after extends/implements

* Generate Samples

* Add more complex example combining inheritance and oneof-interface

* Generate Samples

* Fix JsonTypeName annotation handling in Java and JavaSpring

* 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

* Fix JsonTypeName annotation handling in Java and JavaSpring (merge)

* Generate Samples

* Generate Samples

* Add oneof sample

* Generate Samples

* Giv example oas spec a meaningful name, demo usage of oneOf in Model

* Generate Samples

* Remove unnecessary JsonTypeName include, add example for JsonTypeName (Bar_Create)

* Generate Samples

* Generate Samples

Co-authored-by: Alexej <oleksejk@gmail.com>
Co-authored-by: JBurgess <joel.burgess@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2022-03-16 22:50:05 +08:00
Reda
33b89148e5
[JavaSpring] Multipart causing HttpMediaTypeNotSupportedException when parameter is different than File or String (#11449)
* Generate @RequestParam when parameter is not a File

* Fix tests to use @RequestParam

* Enhance testMultipartBoot test case

* Update the Petstore sample

* Add MultipartMixedStatus files

* Use @RequestPart for spring-cloud when param is File

* Generate samples

* Delete spring-cloud formParams.mustache file

* Regenerate samples
2022-02-27 15:07:35 +08:00
William Cheng
df05e6f4bc
Update parser to 2.0.29 (#11388)
* update parser to 2.0.29

* better handling of null in dereferencing

* update parser to 2.0.30

* update core to newer version

* add new files

* rollback to previous stable version

* remove files

* Fixes for python-experimental NullableShape component

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2022-02-21 18:37:52 +08:00
cachescrubber
5afec1fec7
Spring hide controller impl (#11611)
* hide implementation behind undocumented flag (_api_controller_impl_) to temporarily preserve code.

* Generate Samples
2022-02-16 11:06:41 +08:00
William Cheng
380aaa55a1
Remove JDK7 support from Java Spring generators (#11561)
* remove jdk8 support from spring generators

* update tests, remove commented code in AbstractJavaCodegen

* add back implementation

* add back import

* generate code for non reactive
2022-02-14 17:54:31 +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