20863 Commits

Author SHA1 Message Date
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
jbrugge
4ea7f6088e
[Java] Avoid ambiguous references for date and time classes (#18416) (#20230) 2024-12-21 16:50:01 +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
Julian Vennen
806b99e43a
[PHP][php-nextgen] List all possible return types (fix #17113) (#20335)
* [PHP][php-nextgen] List all possible return types (fix #17113)

* Switch to LinkedHashSet
2024-12-21 15:50:40 +08:00
DavidGrath
6180fea305
Add gradle wrapper v8.1.1 to kotlin-spring (#20341)
* Added code and tests for generating the gradle wrapper for kotlin-spring

* Added generated samples

* Changed Gradle wrapper version to 8.1.1

* Added generated samples

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-12-20 19:56:52 +08:00
William Cheng
b143313cf7
Update readme with pip installation procedure (#20353)
* add pip install to readme

* add a few links to blogs
2024-12-19 17:03:18 +08:00
haruna
7f0efe74a7
Add PyPI installation to docs (#20350) 2024-12-19 14:12:36 +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
Dan Čermák
cdfab4eee3
[python,aiohttp] Don't create persistent aiohttp.ClientSession in __init__ (#20292)
aiohttp's `ClientSession` & `TCPConnector` used to obtain an event loop in
__init__ (via `asyncio.get_event_loop`). However, as of https://github.com/aio-libs/aiohttp/pull/8512 both
classes now obtain the running event loop and won't potentially create one. This
makes it impossible to create `ClientSession` and `TCPConnector` objects outside
of coroutines, as `get_running_loop` must be called from a coroutine.

Thus we defer the creation of a `ClientSession` into the actual request and
cache it for later usage. Thereby we pay only a very small price on the first
request, but subsequent requests will not be any more expensive.
2024-12-15 17:11:35 +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
William Cheng
cc40f40ead
remove kotlin-server-deprecated resource folder (#20328) 2024-12-14 17:02:49 +08:00
William Cheng
b16144094d
[kotlin-server][ktor2] fix isKtor, update samples (#20327)
* fix isKtor, update samples

* fi dockerfile

* fix dataclass

* add new files

* fix template

* regenerate samples
2024-12-14 16:11:57 +08:00
Aleksei Tirman
f766f445da
[Kotlin Server] Update Ktor to the next major version 3 (#20245)
* [Kotlin Server] Update Ktor to version 3

* [Kotlin Server] Clean up

* [Kotlin Server] Fix problems

* [Kotlin Server] Fix Ktor and modelMutable samples

* [Kotlin Server] Fix the string value for serialization key

* [Kotlin Server] Remove setting Kotlin serialization flag to true

* [Kotlin Server] Remove setting Kotlin serialization flag to true

* [Kotlin Server] Remove the option to enable Kotlin serialization

* [Kotlin Server] Use query parameters
2024-12-14 15:06:27 +08:00
William Cheng
3e6f8753e9
update crypto dep to newer versions in go server (#20326) 2024-12-14 15:04:11 +08:00
Tim Quinn
d55a41e985
Fix bug in common path prefix calculation (#20310)
Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
2024-12-14 14:12:26 +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
Ross
3a09ebbb7b
Added path param normalization for Rust clients (#20309) 2024-12-14 13:37:15 +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
William Cheng
24ddb33d0b add ktor2 library option to kotlin server generator 2024-12-13 01:15:03 +08:00
Daniel Åkerlund
b218e238f4
Improve handling of pekko versions in scala-akka-http-server generator (#20277)
* Fix issue 20275 Improve handling of pekko versions

* Generated docs

* Use version 1.1.0 as default version of pekko-http.

* Updated sample
2024-12-11 12:31:22 +08:00
dependabot[bot]
e7b5f348e7
Bump nanoid from 3.3.4 to 3.3.8 in /website (#20284)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.4 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.4...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-10 16:27:41 +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
dependabot[bot]
0a7e784c8c
Bump s4u/setup-maven-action from 1.16.0 to 1.17.0 (#20283)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: s4u/setup-maven-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-10 12:22:55 +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
Ingars Ribners
dc175c5335
Added PostgreSQL schema generator (BETA) (#20255)
* Initial version of PostgreSQL schema generator 'postgresql-schema' (based on 'mysql-schema' generator code)

* PostgreSQL schema generator. Initial version.

* Tested. Fixed errors. Documentation updated.

* Samples for 'postgresql-schema' updated.

* Removed current date/time from mustache templates for postgresql-schema generator.
Re-created samples.

* Re-created docs file for postgresql-schema generator.

* Removed unecessary LocalTime computing code and imports for postgresql-schema generator.

* Errors fixed for postgresql-schema generator. Samples recreated.

* Docs updated.
2024-12-07 22:52:59 +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
ASterdyniak
d29196a1f0
[typescript-fetch] [BUG] Fix duplication of ModelNamePrefix in import statements (#20109) 2024-12-06 11:02:18 +01:00
Hiromi Hishida
474307675b
[php] Follow PHP8.4 update: declared nullable parameters explicitly (#20243)
* explictly declared nullable to parameters with "null" default value

* generated php sample

* fixed unnecessary "?"

* re-generated sample
2024-12-06 14:33:55 +08:00
drewble
ba5ecbccde
Improved Elixir Atom Generation (#20229)
* Update ElixirClientCodegen.java

* Refine the regular expression for atoms

The original regex incorrectly matched `@atom` (unquoted atoms
cannot begin with @). However, through testing with `iex`, it also turns out that the atom
`:@` is legal.

The following atoms will now be quoted that would have been
incorrectly not quoted:

- `:@type`

* Add model to petstore client to test new atom creation regex pattern
2024-12-06 14:26:39 +08:00
Ernesto Fernández
52b5b8fb76
Fix a few issues with the C generator (part 2) (#20227)
* [C] Don't convert post body strings to JSON

If the body provided for the api request is a just a string itself,
don't try to convert it to JSON, simply submit the string.

* [C] Implement BearerToken authentication

* [C] Handle nullable fields correctly

* [C] Fix implementation of FromString for enums

* [C] Update the test schemas to cover the changes

* Update samples

* Fix the updated samples

* [C] Add the new samples folder to the CI workflow
2024-12-06 01:32:34 +08:00
Daniel Owens
387fd9986c
[typescript-fetch] fix API signature return type for empty 20x responses (#20249)
* typescript-fetch: fix promise return type for optional responses

* Remove unnecessary change
2024-12-05 13:44:08 +01:00
Jan Holy
f603f04bc4
[Kotlin] fix 20228 - spring-kotlin insert override modifier to interface if it is needed (#20246) 2024-12-05 10:01:02 +00:00