8692 Commits

Author SHA1 Message Date
Pascal Bachor
61bdc6bf84
[Python] adjust multi-constraint dependency syntax to comply with PEP 508 (#20458)
Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2025-01-14 12:44:46 +08:00
Marcel Märtens
78ea8afa84
[Rust] harden against name collisions while generate cleaner rust code, fix #20337 (#20396)
* prevent all name clashes by using a prefix for all parameters, this way they CANNOT clash with anything locally, as our hardcoded stuff in mustache files doesnt start with "p_" ,
when using the grouped option, we just use the params directly and dont unpack the variables at all, prevending furthur name clashes.

* get rid of "local_var" prefix, now that we no longer clash with paramater names

* fix a typo and remove the r# generated to the paramName when we create the identifier

* java code formatting and added a fake-endpoint parameter test

* update rust samples
2025-01-13 17:43:13 +08:00
William Cheng
09530b4781
Set removeEnumValuePrefix to false by default (#20452)
* set removeEnumValuePrefix to false by default

* update tests
2025-01-13 16:25:10 +08:00
Junfeng Qiao
1bc5eae034
Fix Julia template for binary string (#20355)
* Fix Julia template for binary format

* Update julia samples

* fix missing check for the isBinary flag

Fix missing check for the isBinary flag in some places of the templates for julialang. The code would now be generated as Vector{UInt8} uniformly for binary strings. Binary strings that are also marked as files get generated as `String` data type on the client. That is because the Julia client expects a file name to be passed there.

* Fix Julia template for file

* Update julia samples

---------

Co-authored-by: tan <tanmaykm@gmail.com>
2025-01-11 20:31:53 +08:00
William Cheng
066a840dd8
Revert "fix ref to allOf wrapper, add tests (#19986)" (#20446)
This reverts commit 48e8375166d3ef4475450c97a61d0845c7d3ee00.
2025-01-11 19:17:21 +08:00
William Cheng
121c82f8fe
fix sbt setup in workflow (#20447) 2025-01-11 19:16:01 +08:00
John Vandenberg
eb47b9d836
Fix typos (#20442) 2025-01-11 15:44:42 +08:00
William Cheng
9fcbdb95d9
[C#] avoid duplicated header in csharp client (restsharp) (#20421)
* avoid duplicated header in csharp client

* set env

* install openssl

* switch to windows
2025-01-09 15:36:49 +08:00
Julian Vennen
3d2ff493e6
Use conditional access for enumref query params (#20418) 2025-01-09 13:22:43 +08:00
Juuso Alasuutari
40d4703950
C overhead fixes (#20402)
* [C][Client] Remove redundant casts

Don't explicitly cast void pointers as it's unnecessary in C, but
leave printf arguments untouched to avoid setting off -Wformat.

* [C][Client] Cosmetic: remove unnecessary parens, align some lines

* [C][Client] Reduce number of unnecessary strlen() calls
2025-01-09 12:01:06 +08:00
Jakub Lipiński
00c76de2a9
Bump Ktor to 3.0.3 for Kotlin client. (#20410) 2025-01-07 21:34:53 +08:00
Andriy Slobodyanyk
cba756ffa6
Adds @Nullable annotation to Spring Boot generator (#20345)
* Adds @Nullable annotation to Spring Boot generator

* issue-14427: [REQ][spring] Null-Safety annotations
* issue-17382: [REQ] spring generator add Nullable annotations

Motivations:
* Have Spring Boot generator client properly annotated for nullability to be able to check code using them with tools like NullAway
* As it is related to Spring then the `org.springframework.lang.Nullable` annotation was chosen to avoid discussion which `@Nullable` one is true one
* `@NonNull` wasn't used as I didn't see much benefit of it. Anyhow, an empty constructor and/or setters allow to put a `null` value there

Modifications:
* Adds nullableAnnotation template to handle nullability annotation on vars
* Adjust pojo templates to use the nullability template
* Adapts tests

Modifications:
* Runs export_docs_generator.sh script to update samples

* samples update

* excludes Spring @Nullable from java-camel

* ones with defaults shouldn't be annotated as @Nullable

* updates samples

* adds AllArgConstructor generation tests

* adds container tests
2025-01-06 20:08:01 +08:00
Ernesto Fernández
e154903743
Fix a few issues with the C generator (part 8) (#20378)
* [C] Deprecate *_create() to avoid *_free() confusion

The behaviour of *_free() doesn't match *_create(), so the user should
avoid using them together. But they still need *_free() to clean up
library-allocated objects, so add a _library_owned flag to each struct
as an attempt to tell them apart. This isn't perfect though, because the
user may neglect to zero the field, but they would still see a warning
once in a while so it serves its purpose.

To prevent the new deprecation warnings (intended for the user) from
showing up during the library build itself, define a new family of
*_create_internal() functions, and turn *_create() into simple wrappers.

* Update samples

* add eafer to c technical committee

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-01-06 10:53:36 +08:00
William Cheng
85c81bee5b
[python] Close test API clients (#20400)
* close api client

* update samples

* update python pydantic v1 test files

* update python disallow additional property tests

* update python tests

* update python tests

* update python aiohttp tests

* update python pydantic aiohttp tests

* update python pydantic v1 tests

* revert sync teardown

* update python disallow tests

* update FILES

* update python echo api tests

* update python tests

---------

Co-authored-by: Huan-Cheng Chang <changhc84@gmail.com>
2025-01-04 17:08:29 +08:00
Juuso Alasuutari
43f59bab81
[C][Client] Remove broken intToStr() macro, update samples (#20383)
Note: this does not fix anything else; for example all numerical
types, including float and double, are still incorrectly cast to
to long int before string conversion.
2025-01-02 22:25:06 +08:00
William Cheng
8f4cfa3955
[swift] fix typos, minor code format enhancement (#20387)
* fix typo in swift option, minor code format enhancement

* fix uuid typo in swift codegen and template

* fix typo minium
2024-12-31 16:51:18 +08:00
Jonas Reichert
93158ea4dc
Fixes URLSessionImplementations template for swift generator (#20381) 2024-12-30 21:24:25 +00:00
William Cheng
25283d46a7
Fix typo in various generators, templates (#20389)
* fix typo in various generators, templates

* update samples
2024-12-30 18:52:18 +08:00
devhl-labs
8fa8530cd0
bump version to .net8 (#20384) 2024-12-30 13:48:24 +08:00
William Cheng
bd8cd8bf9f update python samples 2024-12-30 11:54:55 +08:00
Makoto Aoyama
bf9c9a59d2
Add access control to the properties of validation rules (#20380) 2024-12-27 10:36:15 +00:00
Ernesto Fernández
812d89cbe5
Fix a few issues with the C generator (part 7) (#20366)
* [C] Test nullable booleans in form data

* [C] Ban implicit int to pointer conversions

* [C] Declare valueForm for bool as char *

* Update samples
2024-12-27 00:27:38 +08:00
Lewis Hazell
ff0fe26890
Fixes body of FormParameters in multipart/form-data requests without files sent by generated C# (RestSharp) (#20351)
* fix: set RestRequest flag to force multipart/form-data when given as Content-Type

* fix: removed serialization of FormParameters for multipart/form-data

* updated csharp-restsharp samples
2024-12-22 23:28:37 +08:00
William Cheng
ab8d359dc3
add option to skip setting user agent in js client (#20367) 2024-12-22 23:11:54 +08:00
devhl-labs
5ba608ff8a
[csharp] add .net9 support (#20270)
* add .net9 support

* fixed path of new sample

* comment out manual test that does not exist

* comment out manual test that does not exist

* comment out manual test that does not exist
2024-12-22 22:06:33 +08:00
Brian Ferri
401c8d0feb
[FIX][PHP-NEXTGEN] Missing tagged union discriminator literal (#20343) (#20356)
* fix: https://github.com/OpenAPITools/openapi-generator/issues/20343

* chore: apply correct formatting
chore: build and package

---------

Co-authored-by: Christian Ascone <ascone.christian@gmail.com>

---------

Co-authored-by: Christian Ascone <ascone.christian@gmail.com>
2024-12-22 21:51:34 +08:00
Ernesto Fernández
77e9c1f03a
Fix a few issues with the C generator (part 6) (#20332)
* [C] Fail build on implicit function declarations

* [C] Complete changes from patch 34c3f8c7aa84

* Update samples

* [C] Fail build for global functions with no declaration

* [C] Use "static" for apiClient.c internal functions

* Update samples
2024-12-21 15:59:23 +08:00
William Cheng
8790f7c8b1
Update logback core to newer version v1.5.13 (#20363)
* update logback to newer version

* update java inflector samples

* update logback to newer version

* fix auto-generated tests
2024-12-21 15:56:27 +08:00
Julian Vennen
eceef28850
[PHP][php-nextgen] Improve method parameter typing (#20361)
* Fix #20354 - Nullable mixed type is not allowed

* Add parameter types for request and asyncWithHttpInfo functions
2024-12-21 15:53:51 +08:00
David Gamero
74044c3427
remove unused url-parse package to complete WHATWG migration (#20344) 2024-12-18 09:00:55 +01:00
Cameron Koegel
289425b8ee
[typescript-axios] Add User-Agent Header to Default Axios (#20067)
* [typescript-axios] Add User-Agent Header to Default Axios

* fix if `npmVersion` doesn't exist

* generate samples

* single line solution

* move user agent header to config

* generate samples

* splat for headers as well

* samples

* move headers above baseOptions

* samples

* commas are hard

* samples again
2024-12-17 17:36:04 +01:00
Jorge Fernandez
9fec13af85
[Kotlin][Tests]: Add test for kotlin-jvm-okhttp (#20338)
* feat(issue-20231): add echo_api client for kotlin okhttp

* build(issue-20231): sync files
2024-12-17 21:50:00 +08:00
loic-seguin
b01c8be47f
bugfix: generate correct setup.pi when no paths are specified (#20098) 2024-12-17 10:58:26 +08:00
Julian Vennen
e87c4ea6c0
[PHP][php-nextgen] Fix usage of enums in parameters (#20294) 2024-12-16 19:19:24 +08:00
Ross
47891245e9
[Rust] Fixed rust keyword params in reqwest-trait library (#20333)
* Fixed rust keywords in reqwest-trait lib

* Update tests and samples
2024-12-16 18:58:47 +08:00
William Cheng
ea2ba0c349
[java][native] fix empty response body (#20334)
* [Java][Client] (#13968)

* update

* update

* update slack url

---------

Co-authored-by: András Gábor Kis <andras-gabor.kis@telekom.com>
2024-12-15 22:32:46 +08:00
Simon
9b3484cc99
[php] Set $multipart to true if content-type is multipart/form-data (#5536) (#18991)
* [php] Set $multipart to true if content-type is multipart/form-data (#5536)

Related: https://github.com/OpenAPITools/openapi-generator/issues/5536

* [php] Use isMultipart variable

---------

Co-authored-by: Simon Hammes <simonhammes@users.noreply.github.com>
2024-12-15 17:29:12 +08:00
martin-mfg
d87a70dd93
update sample tests, fix Java tests (#20300)
* replace removed forkMode

* remove junit runner where it's not needed

* update samples without skipping test files, but skip files named "FILES"

* revert overwriting custom tests, add custom java tests to list

* add one sample to CircleCI, fix various Java tests
2024-12-15 17:09:58 +08:00
Kirill Romanov
4e5a828c12
feat: add option to support non-ascii headers in kotlin client (#20331) 2024-12-15 16:46:42 +08:00
Nicklas Wiegandt
07d19baf89
feat (#19407 JAVA SPRING WEBCLIENT): Add support for useSingleRequestParameter to Spring WebClient (#19827)
* chore (JAVA SPRING WEBCLIENT): Remove comments used for debugging

* feat (JAVA SPRING WEBCLIENT): Add support for useSingleRequestParameter to Spring WebClient

* feat (JAVA SPRING WEBCLIENT): Generate samples and docs

* fix (JAVA SPRING WEBCLIENT): Fix missing return error & Fix JDK17 action webclient useSingleRequestParameter test path

* fix (JAVA SPRING WEBCLIENT): Fix code indention

* fix (JAVA SPRING WEBCLIENT): Fix code indention again

* fix (JAVA SPRING WEBCLIENT): Update samples

* feat (JAVA SPRING WEBCLIENT): Regenerate after pull rebase
2024-12-15 15:28:38 +08:00
Ernesto Fernández
1a3d7d4ae6
Fix a few issues with the C generator (part 5) (#20313)
* [C] Default to requiring valid SSL

* Update samples

---------

Co-authored-by: Sam Bingner <sam@corellium.com>
2024-12-14 13:53:32 +08:00
William Cheng
2f03c70403
[rust] Add tests for path parameters (#20325)
* add tests for path parameter in rust client

* add tests and update samples
2024-12-14 13:50:11 +08:00
Doug Gish
8aa8e3892d
Depend on jackson-jakarta-rs-json-provider when useJakartaEe is true (#20322)
In the build.gradle template for the Java generator's resttemplate library, change dependency to com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider instead of com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider when useJarkartaEe is enabled. This makes it consistent with the pom template file.
2024-12-14 11:56:52 +08:00
Ernesto Fernández
b7c7ed087f
Fix a few issues with the C generator (part 4) (#20289)
* [C] Deal with binary api parameters

With this change, the bodyParameters array can also be binary, so pass
its length around instead of relying on strlen().

* [C] Fix a few remaining enum issues

* [C] Install headers and include any_type.h header

* [C] Don't require C++ to compile C code

* [C] Test binary bodies and path enums in schemas

* Update samples

---------

Co-authored-by: Sam Bingner <sam@corellium.com>
2024-12-13 02:01:04 +08:00
Ernesto Fernández
f4271faf3b
Fix a few issues with the C generator (part 3) (#20269)
* [C] Clear the response code from previous api calls

Before making an api call, reset apiClient->response_code to zero. That
will protect us from checking stale values if the curl request fails.

* [C] Check that string arguments are not null

Check early on that the arguments are not null, to prevent crashes on
strdup() calls.

* [C] Don't attempt to fill in a type with error info

Check if the api call returned an error before attempting to parse the
reply as the expected type.

* [C] Handle binary and integer return types

* [C] Update test schemas with binary and integer return types

* Update samples
2024-12-10 12:23:29 +08:00
Jorge Fernandez
a447b5988d
[Kotlin] fix #20231, OkHttp client can handle a field with a list of files (#20274)
* feat(issue-20231): Kotlin okhttp client handles correctly fields that are optional with multiple files.

* docs(issue-20231): add docstrings

* feat(issue-20231): Remove unnecessary test spec

* feat(issue-20231): Kotlin okhttp client handles correctly fields that are optional with multiple files.

* docs(issue-20231): add docstrings

* feat(issue-20231): Remove unnecessary test spec

* feat(issue-20231): Remove unnecessary if condition
2024-12-09 20:00:05 +08:00
Jakub Lipiński
e025a7ddfa
Bump Ktor to 3.0.2 for Kotlin client. (#20265) 2024-12-07 16:21:13 +08:00
Nate Todd
35df38de38
[Elixir] Use string headers (#19759)
* Use string headers in Elixir request builder

* Add samples

* Update add_param spec

* Updated samples with spec changes

* Convert header values and keys to strings in add_param/4
2024-12-07 14:58:36 +08:00
BryanAldrich
f62aa5bd95
Add auth token refresh to csharp (#20234)
* quick edit to allow tokens to refresh if they specify an expires_in and created fields. Also supports refresh_token if that is passed.

* update samples

* fix compile error for projects without default using statement.
make the created date nullable.

* fix nullable de-reference on Created.

* fix to remove nullable reference types (the ! to remove the warning) and add documentation comments to the public members.
2024-12-07 13:52:35 +08:00
Alexander Brandon Coles
3a37ba33a7
Fix typo "bellow" (#20268)
* Fix typo in constant name: s/BELLOW/BELOW/

* Fix typo ('bellow') in docs, comments and strings
2024-12-06 16:18:08 +00:00