11973 Commits

Author SHA1 Message Date
matthiasloeu
7555018aa6
Add default value (#11600) 2022-02-15 09:54:14 +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
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
upachler
2584c9d99d
add fromString() method to enums as required by JAX RS spec (#7494) 2022-02-14 10:54:32 +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
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
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
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
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
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
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
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
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
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
cghislai
95c996f866
Revert supports for delete body in typescript-angular client (#10976)
* Update generated angular 12 client version

* Revert "Delete body angular (#10751)"

This reverts commit edb88d919381d56a4ff885030f9b0e6f43b2898c.

* Update generated files
2022-01-31 07:53:07 +01:00
William Cheng
0e1164ff6b Merge remote-tracking branch 'origin/6.0.x' 2022-01-31 14:26:14 +08:00
William Cheng
4a36be7002
Prepare 5.4.0 release (#11457)
* prepare 5.4.0 release

* update gradle tests
2022-01-31 13:04:25 +08:00
cachescrubber
b261b29efb
[Java/Spring] Revert to fully qualified import for org.springframework.core.io.Resource (#11461)
* Revert to fully qualified import for org.springframework.core.io.Resource

* Generate Samples
2022-01-31 11:14:34 +08:00
Armel Soro
ed14ce4dec
[Kotlin] Use mutable container types when 'modelMutable' is enabled (#11154)
* [Kotlin] Use Mutable container types when 'modelMutable' is enabled

* Generate sample 'kotlin' project with mutable models

* Generate sample 'kotlin-server' project with mutable models

* Generate sample 'kotlin-vertx' project with mutable models

* Generate sample 'ktorm-schema' project with mutable models

Co-authored-by: Bruno Coelho <4brunu@users.noreply.github.com>
2022-01-30 12:06:03 +00:00
William Cheng
c8b84c4d03 Merge remote-tracking branch 'origin/master' into 6.0.x 2022-01-30 18:01:35 +08:00
William Cheng
3ed6343933
remove deprecated options in java client generator (#11456) 2022-01-30 15:57:02 +08:00
William Cheng
91087b59c5
remove swift4 generator (#11455) 2022-01-30 15:56:08 +08:00