13140 Commits

Author SHA1 Message Date
Anakael
11caad92df
[CSharp] feat!: add useDateOnly flag (#17471)
* feat: DateOnly for client

* fix: generated doc for csharp

* doc: fix generators README for csharp

* add DateOnly option for aspnet

* refactor: update csharp docs

* refactor: fix typo

* finish

* finish

* finish

* regenerate

* rebuild and regenerate

* fix build error

* finish

* revert path

* regenerate

* remove exceed samples

* regenerate

* add DateOnly to nullable

* remove obsolete file from list

* update test files list

* remove obsolete sample build

* revert manual tests

* revert samples to master and regenerate

* remove new samples

* remove eol

* remove eol

* add new specs

* try fix test

* update tests

* update files

* remove eol

* revert

* remove eol

* regenerate

* add net6+ support to aspnetcore

* add jobs
2024-01-10 11:34:14 +08:00
Alexis Couvreur
9b62b9bb05
fix: ExampleGenerator correctly produces YYYY-MM-dd format for date with examples (#17495)
When an example was specified for a property with the `date` format, it's example would be generated to something like `2024-01-01T00:00:00.000+00:00` or `Sat Jan 30 01:00:00 CET 2021`.

It's because the resolved type for a Date example is a DateSchema, and a DateSchema uses `java.util.Date` to represents the Date. Which gets printed using .toString() not in the YYYY-MM-dd format.

Fixes #17494 #15342
2024-01-10 11:27:10 +08:00
Kernevez
e69c5269d5
Add tags on operation for template kotlin-spring (#17410)
* Add tags on kotlin-spring

* Fix review
2024-01-10 11:20:14 +08:00
Rugal Bernstein
1e0e8fe0eb
Add ability to append ServerHttpRequest for kotlin-spring generator (#17158)
* Add ability to append ServerHttpRequest for kotlin-spring generator

* Add generated doc & sample
2024-01-10 11:11:23 +08:00
Alexis Couvreur
dd5c7e3b9a
fix: ExampleGenerator correctly generates allOf composed schemas (#17499)
* fix: ExampleGenerator correctly generates allOf composed schemas

Changes the previous behavior of generating `null` examples for allOf composed schemas.

Fixes #17497

* fix: ExampleGenerator correctly generates anyOf and oneOf composed schemas

Changes the previous behavior of generating `null` examples for anyOf and oneOf composed schemas.

To generate a oneOf/anyOf example, we generate the example using the first valid schema available. In case of a $ref, we use the first valid reference.

Fixes #17497
2024-01-10 11:04:11 +08:00
Hansjörg Oppermann
8bab0ceb53
Generated methode ApiClient.parameterToPairs failed to handle empty collections #17460 (#17463)
* #17460 add missing empty collection check

* generate samples
2024-01-10 02:29:10 +08:00
Erik Booij
90f3b24edc
fix(go-server): ensure original filename can be deduced from tmp file (#17416) 2024-01-10 02:00:44 +08:00
Linh Tran Tuan
425011a50c
[Rust] [Axum] Remove redundant code in rust-axum generator (#17570) 2024-01-10 01:41:14 +08:00
Thomas Kläger
69a4a65bc7
fix spring generator dto annotations (#17054) 2024-01-09 16:47:10 +08:00
Jonathan Ballet
df7976c1a3
python: enable more mypy checks 1/n (#17556)
* python: more mypy checks

* mypy: check_untyped_defs

* mypy: disallow_subclassing_any

* mypy: disallow_untyped_decorators

* mypy: disallow_any_generics
2024-01-09 16:45:05 +08:00
Steven Sheehy
209344ba40
[java][native] Fix ObjectMapper deprecation warnings (#17558)
* Fix ObjectMapper deprecation warnings

Signed-off-by: Steven Sheehy <steven.sheehy@swirldslabs.com>

* Fix missing JsonMapper import

Signed-off-by: Steven Sheehy <steven.sheehy@swirldslabs.com>

---------

Signed-off-by: Steven Sheehy <steven.sheehy@swirldslabs.com>
2024-01-09 16:37:59 +08:00
Linh Tran Tuan
9827098057
[Rust] [Server] New generator bases on Axum (#17549)
* Rust Server - Axum based (#5)

* Fix typo

* Address comment

* Address comment
2024-01-09 11:38:54 +08:00
William Cheng
210044eb8a
fix description in allOf with single item (#17560) 2024-01-09 11:37:50 +08:00
Hui Yu
742c2c48e7
[C][Client] Update the API doc after some data types of parameters are changed from "int" to "int *" (#17540) 2024-01-06 19:04:36 +08:00
Jonathan Ballet
22a0fc1727
python: adjust basic typing information (#17511)
* python: adjust basic typing information

This is an initial pass to fix and adjust the typing information for the
generated client. This is enough to have mypy runnning without complains
on all the (modern) generated clients (Pydantic v1 code is not checked
for instance)

mypy is also now run directly in the CI, so further changes will also be
checked and thus, will need to be compliant with good typing
information.

Note that this doesn't *fully* type all the code: mypy is not run in
"strict" mode and there are still many functions/methods/attributes
which are still not fully typed, but it's a first good step in that
direction.

* ApiResponse's raw_data can't be None

* Fix indentation

* Revert test changes

* run mypy on tests/ directory

* don't forcefully convert the client response headers to dict

* override petstore ApiResponse model

* adjust type of 'any/one_of_schemas' fields
2024-01-06 15:40:42 +08:00
Sebastian Toepfer
cc946e3f61
fix typo in javadoc in RestTemplate/ApiClient (#17541) 2024-01-06 15:21:18 +08:00
Armand Mégrot
07a9257ee9
[Ruby][client] Handle enums (and other scalars) in oneOf and anyOf schemas (#17515)
* Handle enums in oneOf and anyOf schemas

* Update specs
2024-01-05 15:01:08 +08:00
William Cheng
5c571b0e1f
add enum name mapping support to ruby generators (#17537) 2024-01-05 15:00:52 +08:00
martin-mfg
64f2cad9e8
fix #17258 - use model class only if it is generated (#17490)
* fix  #16797 and #15796 spring child constructor missing parent params

* root cause and update the DefaultCodegen.java to add missing property when with multi inheritance

* rollback SpringCodegen.java

* update samples

* rollback with master cause #16992 fixed this issue too

* still using orignal design

* catchup master

* catchup master

* catchup master

* fix

* add tests

---------

Co-authored-by: dabdirb <dabdirb@gmail.com>
2024-01-05 10:30:28 +08:00
William Cheng
6317796cba
Remove optional path parameter in C# generichost template (#17525)
* remove optional path parameter in C# generichost template

* update
2024-01-05 09:58:28 +08:00
Ilamparithi Natarajan
ddc7d4b1b5
[java][resttemplate] rethrow original exception when retry limits exceeded (#17488)
in rest template, when the retry limits exceeded
rethrow the original exception

also add 429 (Too many requests) status code to the
retry logic

fix #17478
2024-01-05 09:57:24 +08:00
Dan Booker
34c3f8c7aa
[C][Client] Fix enum function names not matching headers in the model template (#17512)
- fixes #17510

Co-authored-by: Dan Booker <dan.booker@ncipher.com>
2024-01-05 09:49:04 +08:00
Antoine MARQUES
3d91fa8bd7
Update Configuration.mustache (#17529)
BUG: in getHostString : typo in variable usage : $hostsSettings instead of $hostSettings
2024-01-05 09:48:14 +08:00
Jonathan Ballet
063865973d
python: simplify module imports (#17507)
In #16624, I introduced a new mechanism to record imports to other
modules, instead of having specialized datetime/typing/pydantic objects
to manage imports for these modules.

This change reuses the mechanism from #16624 and replace the specialized
import managers by the generic one. Unused imports from various
.mustache templates are also cleaned up.
2024-01-03 21:22:53 +08:00
cureaid
dffb5c121f
Also escape '$' and '\' in normal Kotlin strings, … (#17434)
* also escape '$' and '\' in normal Kotlin strings, …

* rename `lambdaEscapeDoubleQuote` to `lambdaEscapeInNormalString`

* escape `$` and `\` in `@RequestMapping` annotation `value` property
2024-01-03 10:46:03 +08:00
Martin Delille
c56fc21517
[cpp-qt-client] Update minimum cmake version to 3.5 (#17480) 2024-01-03 10:22:46 +08:00
Aliaksei
48e9b9f408
[bugfix][jaxrs]: fix compile error for jaxrs samples (#17479) 2024-01-03 09:59:17 +08:00
William Cheng
218dccdb8b
not throwing ex when ignore file exists (#17501) 2024-01-03 09:56:13 +08:00
Mobile Team @ AOK Systems
6eeecc1d18
Fix decoding OpenAPIDateWithoutTime (#17146)
* Fix decoding OpenAPIDateWithoutTime which in previous implementation only worked when used with CodableHelper, because it encoded to String, but tried to decode from Date afterwards

* update samples

* Update OpenAPIDateWithoutTime.mustache

* Update sample projects

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Bruno Coelho <4brunu@users.noreply.github.com>
Co-authored-by: Bruno Coelho <4brunu@gmail.com>
2023-12-26 17:56:39 +00:00
ken_tunc
1105759a6f
[kotlin-client][jackson] Add support for unknown default enum value (#17404)
* [kotlin-client][jackson] Enable @JsonEnumDefaultValue

* Update samples
2023-12-26 16:36:44 +00:00
Ghufran Zahidi
35b47e6382
Fixed the HttpSigning issue for ECDSA key supplied as string. (#17459)
Co-authored-by: Aanisha Mishra <aanisha.mishra05@gmail.com>
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
Co-authored-by: Vikrant Balyan <vvb@users.noreply.github.com>
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
2023-12-26 17:50:14 +08:00
Ghufran Zahidi
c252216700
[go]: Accept APIKey as string, byte array or stream using io.Reader interface (#17432)
* Added support for APIKey as string or bytes stream for golang sdk.

* updated the sample code

* Update modules/openapi-generator/src/main/resources/go/signing.mustache

Co-authored-by: Vikrant Balyan <vvb@users.noreply.github.com>

* updated the sample code

---------

Co-authored-by: Aanisha Mishra <aanisha.mishra05@gmail.com>
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
Co-authored-by: Vikrant Balyan <vvb@users.noreply.github.com>
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
2023-12-26 17:39:53 +08:00
fizzet
2d50655d8c
[JaxRS] fix pojo equals (#17431)
* [JaxRS] fix Pojo equals

Fix equals for pojos that have the same name as one of their properties

* regen samples
2023-12-26 10:13:36 +08:00
Raphaël Ouazana
d0f659ec4d
[#17465] Fix Kotlin templates to be compatible with Kotlin K2 compiler (#17466) 2023-12-26 10:09:28 +08:00
Milad
8c014372aa
[Java RESTEasy client] updating test to use the Java RESTEasy echo api client (#17367) (#17470)
* updating test to use the Java RESTEasy echo api client (#17367)

* regenerated samples

* set source and target to 1.8 to fix workflow failure, adapted parser
2023-12-26 09:32:51 +08:00
Noor Dawod
a67e07e132
Stop using internal variable from okhttp3 (#17458) 2023-12-22 11:07:08 +00:00
William Cheng
5eab3cef19
Prepare 7.3.0-SNAPSHOT (#17456)
* Revert "v7.2.0 release (#17455)"

This reverts commit fe638d009363c142c246ff089032f243e0b4ee01.

* set version to 7.3.0-SNAPSHOT

* update doc
2023-12-22 16:55:58 +08:00
William Cheng
fe638d0093
v7.2.0 release (#17455) 2023-12-22 14:52:51 +08:00
Charles Treatman
da13013a27
[Go] fix validation of property names when a model has required fields and doesn't allow additional properties (#17267)
* update template for required field validation when additional properties are not allowed

* regenerate samples

* move bytes import from template to GoClientCodegen

* regenerate samples

* add test for model with required fields and additionalProperties: false
2023-12-22 12:35:52 +08:00
Mickael Magniez
38c33b92fe
Add scala-pekko client generator (#17417)
* feat: add scala-pekko client generator

* feat: add scala-pekko client to CI
2023-12-22 10:58:27 +08:00
Beppe Catanese
986a9146d7
Remove tests replaces with Python sample testing (#17453) 2023-12-22 10:57:25 +08:00
Stormshield-robinc
0a7140224c
Fix swift5 binary upload (#17422) 2023-12-21 22:27:47 +00:00
Nikita Shmakov
3099a2fcd3
webclient explode query parameters support (#17441) 2023-12-21 19:35:07 +08:00
Milad
106047980b
[Java RESTEasy client] added filename directive for Java RESTEasy file uploads (#17367) (#17435)
* added filename directive for Java RESTEasy file uploads (#17367)

* regenerated samples
2023-12-21 19:34:30 +08:00
Ween Jiann
bf4c98a82a
[go-server] Add ability to handle nullable query param (#17321)
* Update

* Regen
2023-12-21 19:13:05 +08:00
mya0
864c0db5e9
[typescript-axios] Fix Missing AxiosRequestConfig (#17450) 2023-12-21 10:58:05 +01:00
Beppe Catanese
a34eeaed77
[GO Gin Server] Webhooks support: add missing webhook handlers (#17411)
* Implement postProcessWebhooksWithModels

* Implement postProcessWebhooksWithModels

* Add missing webhook handlers

* Test webhook handler

* Generate samples
2023-12-21 16:10:09 +08:00
Emanuele Saccomandi
b20c8db281
[Zapier] Updated some dependencies (#17420)
* updated zapier dependencies

* updated zapier platform core to last version
2023-12-21 16:09:44 +08:00
William Cheng
6d9211a131
Update dependencies to newer versions (#17449)
* update dependencies to newer versions

* remove test
2023-12-21 16:09:18 +08:00
William Cheng
a62132ecd9
fix exception in request body with enum ref (#17438) 2023-12-21 15:22:28 +08:00