12694 Commits

Author SHA1 Message Date
William Cheng
d1f23ef663
add mapping features to crystal client generator (#16253) 2023-08-05 13:34:34 +08:00
William Cheng
f6fb83878b
[Default] update isAdditionalPropertiesTrue tag to cover more types (#16227)
* enhance additional properties support

* update samples

* update tests

* add more tests

* update samples

* fix samples
2023-08-05 13:32:43 +08:00
Ken Kaizu
c080660cc1
[Scala] scala-akka-http-server support pekko-http using useApachePekko flag (#16255)
* introduce useApachePekko flag into scala-akka-http-server

* useApachePekko flag in scala-akka-http-server templates

* introduce scala-pekko-http-server samples
2023-08-05 13:32:02 +08:00
William Cheng
82516c75d2
Fix implements in oneof, anyof templates in java okhttp client generator (#16241)
* fix implements in oneof, anyof templates in java okhttp

* add tests

* update samples
2023-08-03 21:09:00 +08:00
hai22yu23
cb56e50e0c
support 32bit in postdata (#16238) 2023-08-03 18:13:42 +08:00
Masahiro Sakai
45d8027bb4
[haskell-servant][haskell-yesod] Use table-based conversion for field name conversion (#16232)
* [haskell-servant][haskell-yesod] use table-based conversion for field name conversion

Current fieldLabelModifier implementation always produces uncapitalize
name, but it is inappropriate if the original JSON field name begins
with a capital letter.

* [haskell-servant][haskell-yesod] regenerate samples
2023-08-03 13:29:33 +08:00
William Cheng
81c398e530
add model name mappings support to the elixir client generator (#16233) 2023-08-02 17:26:52 +08:00
William Cheng
1d39902930
Add name mappings support to JS client (#16234)
* add name mappings support to JS client

* update doc

* udpate doc

* update doc
2023-08-02 17:26:23 +08:00
martin-mfg
0ce1fef016
fix 2 sonar-reported bugs (#16229) 2023-08-02 14:27:27 +08:00
William Cheng
4602f18ca8
Add model name mapping feature to C# codegen (#16209)
* add model name mapping feature to C# codegen

* rename file

* update samples

* update doc
2023-08-02 10:06:11 +08:00
William Cheng
3278eea9a4
Add tests for #16217 (#16221)
* add tests for #16217

* add new files
2023-07-31 11:03:36 +08:00
ふぁ
77311c3d76
[python-nextgen] Fix allOf missing imports (#16217)
* [python-nextgen] fix allOf missing imports

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] remove circular import

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] Fix circular refs

Signed-off-by: ふぁ <yuki@yuki0311.com>

---------

Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-31 10:04:53 +08:00
Antti Leppä
c6a100cce2
Added support for using mutiny instead of coroutines for asynchronous kotlin server APIs (#15262) 2023-07-31 09:50:44 +08:00
William Cheng
bf181906e0
[Swift] property, parameter name mapping support (#16207)
* add property, parameter naming support to swift5 generator

* revert change

* remove files

* update samples
2023-07-30 22:44:19 +08:00
William Cheng
f3b3de2a29
add property, parameter name mapping to php generators (#16206) 2023-07-30 21:58:05 +08:00
William Cheng
243b5569ef
[Rust] add property, parameter name mapping (#16205)
* add name, parameter mapping to rust generators

* add, fix test

* undo cahnge
2023-07-30 21:57:35 +08:00
ふぁ
48ff57b4f6
[python-nextgen] fix #16010 circular refs lead to no imports (#16199)
* [python-nextgen] fix #16010 circular refs lead to no imports

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] remove unnecessary Postponed annotations

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] remove unnecessary Postponed annotations

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

---------

Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-30 00:42:46 +08:00
William Cheng
d41fe12c1f
[python] Add tests for simple object with additional properties (#16218)
* add tests for simple object without additional properties

* update logic
2023-07-29 11:43:37 +08:00
ふぁ
d9fc039dcf
[python-nextgen] fix #16151 Disallow additional properties if not present - missing Any and Dict import (#16208)
* [python-nextgen] fix #16151 Disallow additional properties if not present - missing Any and Dict import

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] remove unwanted imports

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] remove unwanted imports

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

---------

Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-29 10:51:28 +08:00
ふぁ
e411b2ac0a
[python-nextgen] Add type to actual instance (#16204)
* [python-nextgen] add type to actual_instance

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] fixed unnecessary type conversions

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python-nextgen] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

---------

Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-29 10:08:06 +08:00
Marc Miltenberger
adac3b127f
Support for multipart/form-data; charset="utf-8" in Java GSON Generator (#16211)
* Support for multipart/form-data; charset="utf-8"

Previously, it was only checked for an exact equal string, which failed when there were additional options such as charset.

* Update samples
2023-07-29 00:22:19 +08:00
William Cheng
7ca84e5c88
Add name, parameter name mapping to abstract go codegen (#16171)
* add name, parameter name mapping to abstract go codegen

* better code format
2023-07-28 09:57:23 +08:00
William Cheng
5d2e80977b
add name, parameter mapping to scala generators (#16194) 2023-07-28 09:51:50 +08:00
William Cheng
954d41b9aa
[C#] Add property, parameter naming support (#16196)
* add property, parameter naming support to c# generators

* update

* fix workflow

* update test

* update
2023-07-28 09:51:33 +08:00
William Cheng
184dfd2edd
[Kotlin] Add name, parameter mapping support (#16193)
* add name, parameter mapping support to abstract kotlin

* remove files
2023-07-28 09:42:08 +08:00
William Cheng
86cf4f1eb1
add mapping option to ada codegen (#16190) 2023-07-28 09:41:43 +08:00
Masahiro Sakai
f6a819686d
[haskell][haskell-yesod] Fix special char replacements (#16197)
* [haskell][haskell-yesod] remove fixOperatorChars()

fixOperatorChars() does not change input strings since special
characters have already been replaced in DefaultCodegen.fromModel().

* [haskell][haskell-yesod] do not prefix with quote ("'") when generating removeFieldLabelPrefix table

We switched from the conversion done by fixOperatorChars() to the
conversion done by DefaultCodegen.fromModel() and the latter does not
insert quote characters. So We modify the removeFieldLabelPrefix table
to conform the new mapping.

* [haskell][haskell-yesod] remove forParsing parameter from removeFieldLabelPrefix function

Aeson's fieldLabelModifier always convert Haskell field names to JSON
field names, whether at parse time or not. (Note that stripPrefix and
uncapitalize do not take such parameter)

* [haskell][haskell-yesod] perform replaceSpecialChars after stripping prefix

Because replaceSpecialChars can corrupt prefix if the prefix contains
a replacement string of a specfial character as a substring.

* [haskell][haskell-yesod] regenerate samples
2023-07-28 09:35:46 +08:00
William Cheng
d7311cd5cd
[Ruby] add property, parameter name mapping (#16191)
* add property, parameter name mapping support to ruby generators

* update samples
2023-07-27 09:48:53 +08:00
Adam Shannon
90eacb685c
fix(golang): make sure xml.Encoder is closed (#16141) 2023-07-26 15:48:46 +08:00
William Cheng
30c38ed7ad
fix potential npe in ada codegen (#16188) 2023-07-26 14:12:45 +08:00
Max Bowsher
7d6e7e4e75
Purge obsolete Go codegen code re github.com/antihax/optional (#16185)
I spotted a mention of `github.com/antihax/optional` in
AbstractGoCodegen. I was curious and investigated. However, it turns out
that this code is an obsolete remnant of the go-deprecated generator
removed before 6.0.0, so is now just a false lead. This PR cleans it up
so no-one else has to go down the same investigative pathway.
2023-07-26 09:53:14 +08:00
William Cheng
7ad8f6ef29
[Ada] remove static from logger (#16181)
* remove static from ada logger

* trigger build

* fix
2023-07-25 20:18:21 +08:00
Tom Milligan
f32be9df0b
rust: fix rust generation of optional additionalProperties in openapi 3.1.0 (#16143)
* rust: add regression test for 16119

* rust: fix rust generation of optional additionalProperties in openapi 3.1.0

* [review] fix gha sample path
2023-07-25 19:39:26 +08:00
William Cheng
9aa15d9f09
[ruby] Add tests to operation servers in ruby client (#16179)
* add tests to operation servers in ruby client

* update samples

* revert change in spec, remove invalid? check in anyof model

* fix hsot table

* fix circleci config

* fix

* fix host table

* fix host table

* minor fix

* fix

* reorder

* update

* fix
2023-07-25 19:29:06 +08:00
Alexey Makhrov
24656156ed
[typescript-angular] Add samples with composed schemas (#16156)
* Setup typescript-angular samples for various composed schemas

* generate samples

* restructure and regenerate samples

* add compilation tests

* update FILES in samples

* debug commit - verify that compilation will fail in CI

* revert debug commit

* remove unnecessary dependencies
2023-07-25 10:53:38 +02:00
Cameron Koegel
54d996732f
[Ruby] Fix Operation Servers (#16144)
* [Ruby] Fix Operation Servers

* user `server_index` instead of `index`

* use nil as default

* add tests

* revert tests

* add tests to custom file

* add test file to ruby-faraday
2023-07-25 12:18:23 +08:00
Luca
584f8448ee
[Java][Native] Fix multipart builder files array (#16055) (#16094)
* [Java] Fixed bug in native client generation when API accepts array of files (#16055)

* Adding test for java native client

* Updated samples
2023-07-24 15:57:21 +08:00
William Cheng
0a02860b50
add parameter name mapping (#16160) 2023-07-24 15:54:40 +08:00
Guillaume Turri
20d1743a36
Fix parsing of Accept header like '*/*;q=0.8' (#16169)
This fixes #15043

The issue is that browsers like "text/html,...,*/*;q=0.8" (see for
instance https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values
)

Without this commit we end up with an array of accepted type like
`("text/html", "*/*;q=0.8)` so when we then check if the array contains
`*/*` the check fails, and we return a 406 even though the client is
able to get the response.

This commit fixes it by removing the `;q=0.8` part.

(Ideally we should not just discard that part, we should extract that
 value, and order by it. See
 https://developer.mozilla.org/en-US/docs/Glossary/Quality_values for
 more info about that. However this could be done in a subsequent PR:
 this already fixes the 406 error, which is pretty blocking)
2023-07-24 11:34:12 +08:00
Tanmay Mohapatra
c71b48fe1a
[Julia] update samples test and a minor fix (#16152)
* [Julia] update samples test and a minor fix

- updating samples test for Julia generated code to use the latest OpenAPI.jl Julia package, which includes tests for file uploads
- also including a fix where generated code duplicated the `mandatory` flag in one of the method calls

* add blank line, trigger build with julia workflow

* more updates to julia samples tests

* add samples changes
2023-07-24 10:52:17 +08:00
William Cheng
f590ef1bcf
support nameMapping in abstract ts codegen (#16109) 2023-07-23 21:31:17 +02:00
devhl-labs
056475f0a4
removed incorrect cast (#16157) 2023-07-23 10:38:48 +08:00
Masahiro Sakai
476c1a9397
Fix DefaultCodegen.specialCharReplacements's comment to match the current behavior (#16164)
Translated words are not prefixed with quotation marks ("'").
2023-07-23 10:38:14 +08:00
Bernhard Wittmann
b7346d09eb
[typescript-nestjs] allow configuration with forRootAsync (#15269) (#16112) 2023-07-22 20:38:52 +02:00
Florent Chamfroy
3c5b119252
fix(typescript-client): handle special characters (#15893)
Adding a new option for typescript clients in order to handle '+' and '-' characters when computing the name of an enum value.

Fix https://github.com/OpenAPITools/openapi-generator/issues/5110
2023-07-22 22:35:45 +04:00
Nicolas Gimenez
b468e4bb15
fix: take into account customAxios baseURL in typescript-axios generator (#16125) 2023-07-22 20:32:12 +02:00
William Cheng
fb2c866dfc
Revert "fix(java): plus url encoding (#15539)" (#16158)
This reverts commit d000f90759202967ad5d719e5031307f486bf6fb.
2023-07-22 16:44:29 +08:00
Song Gie
d000f90759
fix(java): plus url encoding (#15539) 2023-07-22 16:27:36 +08:00
William Cheng
ce4a6a37c6
add oneOf lookup option in python client generator (#16154) 2023-07-22 15:29:04 +08:00
Masahiro Sakai
76989db77a
[haskell] fix exampe code in generated README.md (#16142)
* [haskell] fix exampe code in generated README.md

Since create{{title}}Client is not a monadic action, we need to use
"let" instead of "<-".

* regenerate samples
2023-07-21 18:10:11 +08:00