18059 Commits

Author SHA1 Message Date
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
William Cheng
018fa543ed update readme 2022-02-07 20:19:19 +08:00
William Cheng
859c1969fd
add numary as bronze sponsor of the project (#11539) 2022-02-07 15:43:35 +08:00
Jason Finch
dbb63dc077
tidy [csharp-netcore]: Remove unused UrlEncode method. Possible breaking change: Method is public so upstream consumer *may* of used it, but library does not. (#11453) 2022-02-07 15:18:24 +08:00
devhl-labs
8ecd619eb3
[csharp-nancyfx] Delete NancyFX (#11438)
* removed all nancyfx references

* didnt save one file

* removed two more nancyfx files
2022-02-07 15:06:47 +08:00
Julian G
9e1972bb1d
fix float literals in C++ Pistache codegen (#11483) 2022-02-07 12:21:11 +08:00
Ethan Keller
9f5422d688
Add cycle detection (#7532) (#11500)
* Add cycle detection (#7532)

* Review feedback

* Including ContextAwareNodes to detect cycles more accurately.

* Add test

* Add forest to test.

* No longer need ContextAwareNode

* Review feedback

* Update samples
2022-02-06 13:21:17 -05:00
devhl-labs
fcce44ab9b
[csharp-netcore] Add generichost samples (#11451)
* added generichost samples

* build samples

* added guid

* build samples
2022-02-05 17:53:26 +08:00
cachescrubber
194b3fda26
[Bug][Java/Spring] OAS3 related bugfixes and enhancements (#11526)
* 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
2022-02-05 17:29:58 +08:00
William Cheng
e177a4b757 update samples 2022-02-05 16:37:56 +08:00
zarlo
092100694e
Update __init__model.mustache (#11474)
fix a error in the template
2022-02-05 16:04:07 +08:00
William Cheng
e2d32b2061
fix javadoc warnings in feign client (#11527) 2022-02-05 15:18:36 +08:00
William Cheng
31f2f11beb update samples 2022-02-05 14:47:51 +08:00
lbilger
1a14d9e5ca
Fix ClassCastException if expected type is Object (#11510)
The currently generated code will throw a `ClassCastException` if `type` is `Object`. I'm not quite sure why `isAssignableFrom` is used here but I tried to keep the change minimal - in my understanding, the result would be the same if the line was 
```
if(Types.getRawType(type).equals(ApiResponse.class)) {
``` 
because the `ApiResponse` only extends `Object` and implements no interfaces. Maybe it was meant to be `ApiResponse.class.isAssignableFrom(Types.getRawType(type))`? This would also permit subclasses of `ApiResponse`, but then it would be more complicated to determine the actual type parameter (because `type` itself may not be parameterized) and to create the object to return (because it would have to be an instance of the subclass).
2022-02-05 14:43:25 +08:00
ruijlpires
92ccb629e9
Fix duplicated Authorization headers when renewing a token on a retry (#11513)
Add a leeway time to avoid a skew in the local clock
2022-02-05 14:28:05 +08:00
Justin Black
6cf4e79f14
[python-experimental] adds missing bases, performance improvements (#11517)
* Adds bases for int32, int64, float32, and float64

* Samples updated

* Removes print statements

* When creating properties and items do not call _from_openapi_data or model __new__

* Update speed improvement

* cast_to_allowed_types speeed improvements

* _get_new_instance_without_conversion order swap for speed

* Fixes test errors

* Small fixes about path_to_schemas
2022-02-04 07:47:16 -08:00
y-tomida
7843a45b89
[TypeScript] Fix type array with uniqueItems (#11515)
* fix type mapping

* add missing primitive type Set

* add testcase

* generate new samples

* update typescript generator document

* regenerate samples and documents
2022-02-04 08:04:51 +01:00
Justin Black
4d9a500c95
Adds inline composition examples to python-experimental (#11420)
* Adds component with composition in property example

* Adds endpoint parameter examples

* Adds request body examples

* Adds inpline composition example in response body

* Fixes UNKNOWNBASETYPE import bug

* Updates allof inline schemas to be type object with minProperties

* Removes newline

* Adds test_ObjectWithInlineCompositionProperty

* Updates inline schema to be type string, adds partial test_inline_composition

* Fixes accept_content_types input value

* Adds test_ObjectWithInlineCompositionProperty, adds test_inline_composition and starts deserialization of multipart

* Fixes test_inline_composition, adds simple multipat/form-data deserialization
2022-02-03 08:27:52 -08:00
Bernd Hacker
dc1df25f29
[typescript-rxjs] add rxjs 7 support (#9958)
* feat(typescript-rxjs): add support for rxjs 7.2.0, use type imports

* feat(typescript-rxjs): regenerate samples

* feat(typescript-rxjs): use generic T instead of any in BaseAPI

* feat(typescript-rxjs): regenerate samples
2022-02-03 09:52:01 +01:00
Kasper Peulen
80082c73c4
Typescript-fetch: date is only converted to javascript date with runtime checks enabled (#11481)
* date is only converted to javascript date with runtime checks enabled

* fix test

* fix test
2022-02-02 07:50:45 +01:00
William Cheng
8a2131f25f update slack url 2022-02-01 01:28:57 +08:00