20229 Commits

Author SHA1 Message Date
William Cheng
878f6e5709
[General] Better code format (#11612)
* better code format in java tests

* better code format in java client codegen

* better code format in java model tests

* better code format in abstract java codegen

* better code format in codegen parameter, property

* better code format in codegen response

* better code format in codegen model

* better code format in default generator

* better code format in default codegen

* update codegen model
2022-02-15 16:32:48 +08:00
Laurens-W
52e3265c34
[Java][RestTemplate] Use class level RestTemplate for uri encoding (#11606)
* Move static logic to initialization method when no RestTemplate is provided.
Otherwise, use the settings from the RestTemplate that was provided.

* Move code outside of withXml
Run required scripts

Co-authored-by: Westerlaken, H.L. (Laurens) <laurens.westerlaken@devolksbank.nl>
2022-02-15 16:31:51 +08:00
devhl-labs
d7b812ad42
[charp-netcore] Constructor Improvements (#11502)
* refactor nrt annotation

* enable nrt by default in .net6.0+

* use shorter nrt annotation

* build samples

* removed debugging lines

* fixed model and operatoin constructors

* reverted a commented line for comparison

* created library modelGeneric, removed debugging lines

* build samples

* build all samples

* avoid breaking changes

* publish and build samples

* added line break
2022-02-15 10:44:23 +08:00
William Cheng
a4fcd1c924
avoid Double Brace Initialization (DBI) (#11609) 2022-02-15 10:42:55 +08:00
Lennart Schwahn
ba04720898
fix #6134 by considering the type List<File> (#11361)
The method buildRequestBodyMultipart in ApiClient.java now recognizes if
an input parameter is an instance of List.
2022-02-15 10:35:46 +08:00
matthiasloeu
7555018aa6
Add default value (#11600) 2022-02-15 09:54:14 +08:00
William Cheng
5c0d861f96 add link to presentation 2022-02-15 09:45:01 +08:00
cachescrubber
00e23490bd
Decomission threetenbp support. (#11608) 2022-02-15 09:39:30 +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
Juan Treminio
905e59c238
[PHP] Allows passing filename to deserialize (#11582)
* Allows passing filename to deserialize

* Code review changes
2022-02-14 17:38:16 +08:00
William Cheng
ec51e9cd0b update samples 2022-02-14 12:54:26 +08:00
William Cheng
5346d0b6b7 update samples 2022-02-14 11:45:12 +08:00
jiangyuan
dce8b80af7
[Python] fix api file name & api var name (#11051)
* fix api filename

* fix PythonCodeGen toApiVarName

* add samples change
2022-02-14 11:27:13 +08:00
devhl-labs
140f633655
[csharp-netcore] Nrt (nullableReferenceTypes) refactor (#11452)
* refactor nrt annotation

* enable nrt by default in .net6.0+

* use shorter nrt annotation

* build samples

* removed debugging lines
2022-02-14 11:08:40 +08:00
Marek Hudik
c937bae888
fixes #11579: Java RestTemplate Mustache template doesn't use reserved words for local variables (#11583)
* fixes #11579: Java RestTemplate Mustache template doesn't use reserved words for local variables

* fixes #11579: Java RestTemplate samples

Co-authored-by: Marek Hudik <marek.hudik@broadcom.com>
2022-02-14 10:59:11 +08:00
William Cheng
73ed743818 update samples 2022-02-14 10:57:13 +08:00
upachler
2584c9d99d
add fromString() method to enums as required by JAX RS spec (#7494) 2022-02-14 10:54:32 +08:00
William Cheng
896504de51
Test Java (native) client in JDK 11 (#11599)
* test java native client in jdk11

* test java natvie async

* remove java native from pom.xml

* revert changes
2022-02-13 19:23:57 +08:00
William Cheng
d481aa3af4
Test Java Play framework in Github action (#11598)
* test play framework in github action

* trigger build

* add pom.xml

* revert readme
2022-02-13 19:23:11 +08:00
Akhil Nair
51a75c5481
[go_pbv_pbr_issue] (#11466)
There was a difference in logic for Unmarshalling the JSON.
The new logic is re-used here.
2022-02-13 16:50:27 +08:00
William Cheng
d228f3469f Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2022-02-12 17:43:27 +08:00
William Cheng
cefe7fb560
[Scala] test Scala clients, servers in GitHub workflow (#11592)
* add samples/server/petstore/spring-boot-nullable-set to github workflow

* add github workflow to test scala clients and servers

* trigger build

* remove module

* trigger build

* test with jdk8

* trigger build

* test with jdk11

* clean up pom.xml

* remove groovy from pom.xml

* update samples
2022-02-12 17:43:10 +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
deb578a32c Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2022-02-12 16:57:10 +08:00
William Cheng
b01bcfecde
[Groovy] add Groovy client tests to Github workflow (#11593)
* add samples/server/petstore/spring-boot-nullable-set to github workflow

* test groovy client in github workflow

* rename
2022-02-12 16:52:54 +08:00
William Cheng
4c330f4ca0 add samples/server/petstore/spring-boot-nullable-set to github workflow 2022-02-12 15:24:38 +08:00
Oleh Kurpiak
25270a0389
[Java] fix deserialization of readonly properties (#11495) 2022-02-12 15:23:29 +08:00
cachescrubber
703c9630c2
[spring] various bug fixes and enhancements (#11580)
* Bugfix: delay clearing *TemplateFiles with apiFirst #2407

* Bugfix: delay clearing *TemplateFiles with apiFirst #2407 (add test case)

* spring api.mustache: fix unhandledException #10860

* Generate samples

* add sample

* Generate samples

* Fixed mustache template for FormParams. Use paramName instead of baseName for variable name.
This will fix an issue when parameter name is one of the reserved keywords (#7506)

# Conflicts:
#	modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache
#	modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java

* Move and comment apiFrst

Co-authored-by: Andrii Hrytsiuk <andrii.hrytsiuk@gmail.com>
2022-02-12 15:17:58 +08:00
cachescrubber
9dfe8c63ee
[Bug][Java] defaultValues for date and date-time params (#11536)
* Add default value support to cookie and header params

* Generate Samples

* Replace "OffsetDateTime.parse(..)" with toString();

* Generate Samples

* Revert "Replace "OffsetDateTime.parse(..)" with toString();"

This reverts commit 2e37411b305343e99542c094a691e1419a67b1b5.

* Format java.util.Date to ISO Date in AbstractJavaCodegen.toDefaultParameterValue

* Generate Samples

* Generate Samples

* Use toParameterDefault()

* Generate Samples

* Implement testDateTimeFormParameterHasDefaultValue unit test

* Add more test coverage.

* Remove postProcessParameter() since is has no effect after using toDefaultParameterValue()

* Use LocalDate.parse() in toDefaultValue()

* Generate Samples

* Return a defaultValue only if dateTimeLibrary is java8.
2022-02-12 15:14:26 +08:00
William Cheng
4f0c07ff3c update java-vertx-web version to 4.2.4 2022-02-12 15:08:47 +08:00
Sean Brown
7bdf04db70
[java][vertx] moved HttpStatusException (vertx internal) to HttpException (public) (#11550)
* Update apiImpl.mustache

Vertx has moved HttpStatusException (vertx internal) to HttpException (public)

https://github.com/vert-x3/wiki/wiki/4.1.0-Deprecations-and-breaking-changes#iovertxextwebhandlerimplhttpstatusexception

* Update java vertx server verx version

Co-authored-by: Sean Brown <sbrown@axon.com>
2022-02-12 15:02:59 +08:00
Sergio del Amo
fbf4e56281
update micronaut to 3.3.1 (#11569) 2022-02-12 14:51:20 +08:00
Tal Kirshboim
01a8572f63
Upgrade Kotlin to version 1.6.0 (#11022) 2022-02-11 09:35:19 +00:00
Juan Treminio
15501f10c4
[PHP] Fix checking value of Configuration::getAccessToken() (#11486)
* Prevents empty access token from overriding basic auth
2022-02-10 11:01:16 +03:00
William Cheng
376bf6cd34 update samples 2022-02-10 14:46:51 +08:00
Ulrich Grave
bd48108818
Fix for multible tags in @Operation annotation (#11475)
* Check size of x-tags list

* Remove unused variable assigment

* Fix issue number in test method name

* Fix typo

* Add tag to @ApoOperation only if any tag is given

* Rename data provider method

* Remove unused import
2022-02-10 14:43:57 +08:00
William Cheng
ab482a0e7f
remove jdk6, 7 supports in kotlin templates (#11560) 2022-02-10 12:05:12 +08:00
William Cheng
25b55c8c2e
remove jdk 6 support (#11558) 2022-02-10 11:24:40 +08:00
William Cheng
fdb58f597c
replace tabs with spaces in js templates (#11559) 2022-02-10 11:04:59 +08:00
William Cheng
3cb4b7d08e
[Java] remove tabs from java templates (#11557)
* remove tabs from java templates

* replaces tabs with spaces in java templates
2022-02-10 10:47:08 +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
Bruno Coelho
441c069177
[Swift5][client] try to fix JsonEncondable (#11541) 2022-02-09 08:50:16 +00:00
sullis
bf5e701c3d
mockito 4.3.1 (#11549) 2022-02-09 14:27:29 +08:00
William Cheng
c06d00fe87 update doc 2022-02-08 13:53:42 +08:00
Boris Smidt
ff30df92f8
Upgrade sttp generator to sttp3 (#11260)
Remove CIRCE_VERSION from generator because it is taken in as a transitive dependency of `  "com.softwaremill.sttp.client3" %% "json4s" % "3.3.18"`

Co-authored-by: boris <borissmidt@hotmail.com>
2022-02-08 13:46:42 +08:00
William Cheng
b6c445cdc3
update swagger core, jackson to newer version (#11545) 2022-02-08 13:31:20 +08:00
William Cheng
c9118d6982
[C#] test .net6 projects in Github actions (#11544)
* test .net 6 in github workflow

* trigger workflow

* fix run

* fix test

* trigger build

* update samples
2022-02-08 11:14:11 +08:00
William Cheng
7c1f6c5d6a
update build.gradle, build.sbt in java okhttp-gson client (#11543) 2022-02-08 10:57:58 +08:00
William Cheng
51800471fa
[java][Okhttp] replace okhttp-gson with okhttp-gson-nextgen (#11538)
* replace okhttp-gson with okhttp-gson-nextgen

* add new files

* update doc

* clean up pom

* update test

* restore error handling in doc

* add back changes

* uncomment tests

* update samples
2022-02-08 00:05:44 +08:00
William Cheng
949b4e2008 Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2022-02-07 20:19:30 +08:00