19065 Commits

Author SHA1 Message Date
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
Dylan Kwon
83ccfb820c
Added useSettingsGradle property in kotlin-client. (#15003)
* Added useSettingsGradle property in kotlin-client.

* kotlin docs update.
- add kotlinx_serialization in serializationLibrary.
2023-03-21 11:45:35 +00:00
devhl-labs
d24ae6b27a
fixed bug (#15006) 2023-03-21 15:44:10 +08:00
William Cheng
b3bfa1ef3b
use Any instead of StrictStr in any type (#14995) 2023-03-21 14:52:54 +08:00
William Cheng
17fa35c78d
Add AWS to the user list (#14996)
* add AWS to the user list

* add new file
2023-03-20 16:59:08 +08:00
William Cheng
e780d59352
add auto-generated api spec file (#14994) 2023-03-20 16:58:13 +08:00
Mintas
3ea346e1bb
[SPRING] resolved ambiguous beanValidation Email annotation imports; fix #13379 (#13962)
* resolved ambiguous beanValidation Email annotation imports; fix #13379

* [Java][Spring] fix email import

---------

Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
2023-03-19 05:18:11 -07:00
César Revert
6e649af9a7
[java-spring] Move JsonProperty annotation from field to getter (#13781) (fix #5705)
* 5705: Move JsonProperty annotation to the getters

* Regenerate samples

* Add jackson check

* Add test

* Minor fix

* Fix test

* Fix version

* [Java][Spring] update test & samples; add serialization/deserialization test

---------

Co-authored-by: Oleh Kurpiak <oleh.kurpiak@gmail.com>
2023-03-19 04:59:48 -07:00
William Cheng
162623e49b
increase timeout (#14991) 2023-03-18 21:10:23 +08:00
Tomáš Karásek
aa066ab6fa
[python-nextgen] Fix validation of list of enums (#14809)
* [python-nextgen] check enum arrady values better

* [python-nextgen] re-generate exapmles for #14809
2023-03-18 20:27:26 +08:00
William Cheng
e1719f2b7b
[JavaSpring] migrate config files to use 3.0 spec (#14981)
* update spring config file to use 3.0 spec

* migrate spring config file to use 3.0 spec

* update github workflow to cover more samples
2023-03-17 16:02:27 +08:00
devhl-labs
02b6248510
moved null checks (#14980) 2023-03-17 15:12:27 +08:00
William Cheng
3d4f7b3ce0
[java] fix optional array property's default value (#14961)
* fix optional array property default value

* fix default values

* more fixes

* update default value for jersey2, 3, okhttp-gson

* update default value

* fix java okhttp-gson

* fix jersey2, 3
2023-03-17 11:58:49 +08:00
William Cheng
d0f7bd18ba
[spring] fix default value for nullable containers (#14959)
* fix default value, update spec to 3.0

* add tests for container default value

* update java camel samples

* remove samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable

* remove ./bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml

* remove samples/openapi3/server/petstore/springboot-useoptional

* remove samples/openapi3/server/petstore/springboot-reactive

* update github workflow

* fix default in add, put operation
2023-03-17 10:16:17 +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
dependabot[bot]
217d052bf7
Bump actions/setup-go from 3 to 4 (#14972)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 16:49:57 +08:00
devhl-labs
9787388f77
removed TryGet from deserialization methods (#14974) 2023-03-16 16:49:21 +08:00
devhl-labs
b6ccf078ef
fixed nrt bug (#14973) 2023-03-16 08:59:12 +08:00
Peter Lamby
5c4529259f
[BUG][typescript-fetch] wrong response for simple types (#14659)
See #9364
See #2870
2023-03-15 09:47:34 +01:00
William Cheng
5eb2819744 update go doc 2023-03-15 15:11:35 +08:00
Jason D'Amour
1268b5135d
Enable bearer security schema for Go client (#14957) 2023-03-15 14:46:05 +08:00
devhl-labs
388147f822
suffixed variables with LocalVar to avoid conflicts (#14958) 2023-03-15 10:58:09 +08:00
martin-mfg
f1d05fc7f8
Allow Java apache-httpclient users to supply additional HTTP headers per call, updated (#14929)
* Allow Java apache-httpclient users to supply additional HTTP headers per API call

* fix 'unexpected return value' problem

* make "fullJavaUtil" work

* Revert 'make "fullJavaUtil" work'

This reverts commit 60c8846.

---------

Co-authored-by: Jigar Joshi <jigarjm@gmail.com>
2023-03-14 20:20:31 +02:00
igokoro
b172f622b9
Do not use default locale in kotlin generated code (#14668)
Using default locale for non-user visible text transformations is not safe
and can result in bugs, in particular with Turkish locale.

More details in
https://mattryall.net/blog/the-infamous-turkish-locale-bug

Closes #14667
2023-03-14 16:47:15 +00:00
Christian Mösl
85ff3de157
[java][webclient/resttemplate] fix dependencies for gradle with jakarta (#14925) 2023-03-14 17:57:08 +02:00
William Cheng
3826d712ad show error only in travis build to reduce log size 2023-03-14 17:24:13 +08:00
Oleh Kurpiak
bda2501455
[Java][Spring] option whether to generate required args constructor (#14941) (fix #14934) 2023-03-14 10:39:58 +02:00
Cameron Mackenzie
3d12510e1f
Update README Angular compatible version (#14947)
Update version to 2.x-15.x in README to match latest version in docs: https://openapi-generator.tech/docs/generators/typescript-angular
2023-03-14 16:28:03 +08:00
William Cheng
644bccfd92
Reduce log level to avoid Travis CI build failure (#14946)
* reduce log level to avoid travis build failure

* add new file
2023-03-14 12:40:37 +08:00
devhl-labs
dc1386c134
better deserialization (#14945) 2023-03-14 11:40:40 +08:00
William Cheng
8b1e80d360 Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2023-03-14 11:36:24 +08:00
William Cheng
de35cbd010 update samples 2023-03-14 11:36:17 +08:00
Guillaume Turri
9fd989e297
[PHP-Symfony] Fixes #14930 (#14933)
* [PHP-Symfony] fixes validation of date-time parameter

This fixes parts of #14930.

Without this patch a parameter declared as date-time
is validated against Symfony's "DateTime" constraint,
which always fails. Because this constraint expects
a string with format "Y-m-d H:i:s".
It fails because the generated code performs the check
after the deserialization, so the variable checked is not
a string anymore.

Besides this, even if we performed that validation on the
string, that would not work well because OpenApi
specification expects date-time to conform to RFC 3339
and that "Y-m-d H:i:s" would reject RFC 3339 compliant dates.

With this change we ensure that the string provided by the
web user could be parsed by PHP to DateTime, which solves both issues.

(Note however that it means that it now accepts more formats than just
RFC 3339 compliant ones for those parameters (it would accept all formats
accepted by PHP DateTime). That being said it's compliant with the guideline
""be conservative in what you send, be liberal in what you accept")

* [PHP-Symfony] Fix handling of null date-time parameter

This fixes one of the issue described on #14930, namely that
the deserializeString method of the generated class JsmSerializer returns null
for other types of string, but not for date-time. Instead it returns a DateTime
which represents "now" (because that what `new DateTime(null)` does).

Consequently when an API declares a date-time parameter as non-required and
when that endpoint is called without that parameters, then the user code
would end up having "now" instead of "null" for this parameter.
2023-03-14 11:17:34 +08:00
martin-mfg
f5d31c5214
Log Warn Messages for ineffective Schema Validations, updated (#14759)
* Implement WARN messages for ineffective schema validation constraints

* Implement tests String, Number, Object schema validations

* Implement HashSet to store Validations for different types

* Revert Validation Helper functions; Add Test cases for Any and Boolean

* Implement Unit Test for Array with inffective schema validations

* Reformat Code; Optimize Imports

* Add assertions to ineffective validation tests

* Add Test case for Null Schema Validations

* Adjust log level and message

* Merge commit ... into issue-6491

---------

Co-authored-by: Chidu Nadig <chidu.nadig@gmail.com>
2023-03-14 11:16:18 +08:00
Yannick Wiesner
ecd28b2090
JAX-RS Spec: Stop generating @NotNull Validation for required & optional properties (#12575)
* Stop generating @NotNull Validation for required & optional properties

* correct linebreak and add tests

* add samples in a separate folder
2023-03-14 00:39:31 +08:00
Eskild Diderichsen
e53b6fa7fa
Setup GitHub Codespaces (#13533)
* Setup GitHub Codespaces

* updated devcontainer to new format
2023-03-14 00:35:44 +08:00
Mathias Dierickx
e52a9fd961
Add missing ConfigureAwaits for csharp-netcore generator (#13664) 2023-03-14 00:29:03 +08:00
William Cheng
dbc6c82446
minor fix to isPassword (#14942) 2023-03-13 23:37:40 +08:00
Romain Bioteau
59be28cc8a
feat(password): add isPassword codegen property (#13982)
Expose `isPassword` codegen property. This property can be used in the
mustache templates to handle specific generation use case. _e.g._:
* hiding the string value of password fields in generated toString()
methods
* use more specific types like `char[]` instead of `String` in
[Java](https://stackoverflow.com/a/8881376)

Closes https://github.com/OpenAPITools/openapi-generator/issues/9124
2023-03-13 23:23:48 +08:00
Sascha Peilicke
df58ee3829
[Kotlin-Spring]: Dont't make readOnly properties nullable (#14509)
Resolves #14280
2023-03-13 23:14:02 +08:00
KlausH09
245851116f
[Kotlin-Spring] add skip-default-interface option (#14662) 2023-03-13 22:51:49 +08:00
Nick Ufer
23cf8368e8
[Rust] fix: removes replacement which makes x-tag-name incompatible with spec (#14746) 2023-03-13 22:40:16 +08:00
Jonas Reichert
f45523dd1a
[swift5] fix modelNamePrefix and -suffix for reserved types (#14768)
* only add suffix or prefix if type is not a primitive or from dependency

* add tests

* add sample

* add second API with prefix and suffix

* add primitives

* add missing pom

* add missing shell script

* fix cycle dependency

* generate samples
2023-03-13 09:42:24 +00:00
Robin Karlsson
564939a4a8
[java][jersey] Remove double brace initialization and some more jersey cleanup (#14783)
* Remove double brace initialization

* Use diamond operator

* Less clutter in generated api classes

* Optimize isJsonMime

* Revert change in escapeString

Skip toString() on string parameters.

* Fix edge-cases

A ServerVariable without enumValues and/or operationServers
with any ServerVariables would lead to invalid code.
2023-03-13 16:42:37 +08:00
William Cheng
9a53625fcc update erlang proper samples 2023-03-13 16:07:14 +08:00
William Cheng
6d71db3d6d update samples 2023-03-13 15:46:31 +08:00
David Weinstein
43697d2cfb
[erlang-client] Fix Path (#14821) 2023-03-13 15:40:43 +08:00
devhl-labs
e9fed506b3
used the date format (#14936) 2023-03-13 15:25:29 +08:00
devhl-labs
8785acea7c
added samples for unsigned (#14938) 2023-03-13 15:24:45 +08:00
William Cheng
0f2156191f
add tests to jaxrs-cxf-cdi generator (#14937) 2023-03-12 23:43:39 +08:00