20756 Commits

Author SHA1 Message Date
Bryan Aldrich
12e29e4eeb fix to remove nullable reference types (the ! to remove the warning) and add documentation comments to the public members. 2024-12-06 12:26:00 -05:00
Bryan Aldrich
ee15594da7 fix nullable de-reference on Created. 2024-12-04 13:37:18 -05:00
Bryan Aldrich
b582764d99 fix compile error for projects without default using statement.
make the created date nullable.
2024-12-04 10:21:43 -05:00
Bryan Aldrich
c37a5e771f update samples 2024-12-03 22:00:42 -05:00
Bryan Aldrich
3915e020cf quick edit to allow tokens to refresh if they specify an expires_in and created fields. Also supports refresh_token if that is passed. 2024-12-03 22:00:21 -05:00
Thibaud Sowa
423ba6739a
feat(typescript-angular): add support for Angular V19 (#20205)
* feat(typescript-angular): add support for Angular V19

fix #20204

* feat(typescript-angular): add options to override angular deps + refactor deps definition

add tsVersion, rxjsVersion, ngPackagrVersion and zonejsVersion options to override default config if new version of Angular is available but not yet implemented in openapi-generator
refactor Angular dependencies definition in separate readable yaml config file

fix #20204

* feat(typescript-angular): add better angular 19 exemple for ci testing

fix #20204

* feat(typescript-angular): unify tsVersion param

fix #20204

---------

Co-authored-by: Thibaud SOWA <thibaud.sowa@equasens.com>
2024-12-03 17:58:17 +01:00
Gregory Merlet
cf78f1028d
Fix dangerous destructuration in typescript-nestjs services (#20157)
* refactor: remove requestParameters destructuration

* feat: add reserved param names sample

* feat: quote params

* feat: improve with reservedWords

* feat: use vendorExtensions instead of extending CodegenParameter
2024-12-03 11:38:43 +01:00
Kirill Romanov
26609e9ad3
fix: register gson CustomTypeAdapterFactory in kotlin-client if generateOneOfAnyOfWrappers enabled (#20217) 2024-12-03 12:10:41 +08:00
William Cheng
25d780ee6d
update python multipart dep to 0.0.18 (#20225) 2024-12-03 12:08:29 +08:00
DielN
b9f6fe6b1f
[Java] [Microprofile] Add Json-B polymorphism type info annotations (#20164)
* [Microprofile] Add Json-B polymorphism annotations

* [Microprofile] Set openApiNullable in configs to false

* [Microprofile] Bump JSON Bind version to 3.0

* [Microprofile] Only apply JSON-B polymorphism for MP 3.0

* Update samples

* [Microprofile] Update documentation/configs for openApiNullable

* Update docs
2024-12-03 12:02:54 +08:00
Colin Ihrig
06f0b68eee
fix(typescript): remove incorrect file extensions (#20194)
* fix(typescript): remove incorrect file extensions

url, http, and https are Node.js core modules, and form-data
should be loaded using a bare specifier. This commit removes
the file extensions from these imports.

* update samples
2024-12-02 15:51:49 +01:00
Joris Dobbelsteen
1eaa75bd36
Fix python code when receiving JSON data without a property that is a dict to ref/enum causing AttributeError (#20022) 2024-12-02 16:25:23 +08:00
daniel
88be078c68
Trim the input of operationId filter in OpenAPINormalizer (#20186) (#20189) 2024-11-30 23:15:10 +08:00
Ingars Ribners
3f6c3de029
Updated README.mustache template for the Erlang server generator (#20138)
* Updated README.mustache file for the Erlang server generator. Fixed one error and updated the usage instructions

Changes made to the Erlang server generator's user instructions ("README.mustache" file):

1. Corrected the argument in section 4.1 of the user instructions.
   In openapi_server:start/2, the second argument for the generated Erlang code must now be in a different format than proposed in the instructions (see lines 13-16 of the "server.mustache" file).
   Initially, the server failed to start, and after some debugging, I discovered that the argument format did not match the server's expectations, causing the port number not to be passed to cowboy:start_clear/3. This has now been fixed.

2. Reviewed and updated the text of the user instructions to remove any ambiguities.

3. Tested the user instructions for accuracy and completeness.

* erlang-server sample recompiled

* README fix

* Fixed README.mustache template markdown for erlang-server. Re-generated erlang-server sample.

* Update README.mustache

* Sample 'erlang-server' re-generated

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-30 17:31:56 +08:00
William Cheng
878148e66d
update kotlin option description to clarify the support (#20211) 2024-11-30 13:32:15 +08:00
jops-wtakase
2aa49227b0
Bugfix: #1666: Change requestBody argument name to 'body' (#20207)
Since Connexion defaults to using 'body' as the argument name for the requestBody, the controller's argument name is adjusted accordingly.
2024-11-30 10:20:06 +08:00
Cedric Ziel
706c0a177e
fix: close quotes in cargo manifest (#20209) 2024-11-30 10:12:15 +08:00
William Cheng
711e53a90c
[Java] Add option to fallback to legacy enum naming (#20172)
* add option to fallback legacy enum naming (java)

* fix tests
2024-11-29 17:12:12 +08:00
Thomas Ville
34bd02109e
[rust][reqwest] support binary type for download (#20031)
* [rust][reqwest] support binary type for upload and download

* [rust][reqwest] support binary download in supportMultipleResponses contexts

* [rust][reqwest] support binary responses that don't have any return type
2024-11-29 17:07:30 +08:00
Timon Borter
326f100f0e
fix(#20201): static access to normalizeMediaType in typescript object serializer (#20202)
accessing `normalizeMediaType` should be done static in `ObjectSerializer`, as described
in https://github.com/OpenAPITools/openapi-generator/issues/20201.

fix applies only to the `typescript` generator.
2024-11-28 11:01:37 +01:00
William Cheng
25cfac0523
Update r petstore client test script (#20196)
* update R build and test script in petstore samples

* update
2024-11-28 17:20:37 +08:00
Matt Pollock
e3e06af5f4
[R] fix to-list and to-json functionality (#20132)
* [r client] fix to-list and to-json functionality

* fix type of json string

* wip

* refactor pr

* regenerate samples

* update to-dataframe example to use non-superceded tidyverse functions

* fix typo
2024-11-28 16:31:21 +08:00
Ernesto Fernández
037cb12f34
Tests for recent C fixes (#20200)
* [C] Add test schemas for the recent changes

The recent commit 47665aaa97cb ("Fix a few issues with the C generator
(part 1 version 2) (#14434)") didn't include any test schemas. Add them
now, as requested:

  https://github.com/OpenAPITools/openapi-generator/pull/14434#issuecomment-2497497110

* Update samples

* Fix sample update with missing files

* More fixes for sample updates
2024-11-28 16:27:42 +08:00
Nelson Vides
f8ca36b97e
Erlang server – minor fix to return type and generated doc (#20197)
* erlang-server: add jesse to app.up release

* erlang-server: remove dialyzer errors that might not be related to the program

* erlang-server: minor fixes to return types and generated docs
2024-11-27 22:09:21 +08:00
Ernesto Fernández
47665aaa97
Fix a few issues with the C generator (part 1 version 2) (#14434)
* C: add a template for an empty any_type.h header

Some generated C apis fail to build because the source files get
'#include "any_type.h"' lines, but no such header gets generated. As a
simple fix, add a new template for an empty file with that name. This is
enough to fix the problem for us, because all the generic type stuff is
handled by object_t.

* C: fix enums

I'm guessing that enums have not been used much with the C generator
before, because they always seem to produce code that doesn't build, or
that tries to free them after use. This patch fixes all the problems
we've encountered so far, except for those that need checking the return
type. I'll come back to that later.

* C: fix confusion of 'classname'/'classFilename'

* C: fix issues with returned enums

Currently, the C templates never check if a function returns an enum
inside mustache, so when that happens the generated code has broken
return types and doesn't build. I originally tried to fix this by
extending CodegenOperation to implement a 'returnTypeIsEnum' check, but
William Cheng suggested[1] that I use the existing 'returnProperty'
instead:

  https://github.com/OpenAPITools/openapi-generator/pull/14379#discussion_r1064636735

So do that.

* C: update the samples

As required for a pull request, run the generate-samples.sh script and
commit the changes.

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-27 18:16:10 +08:00
Per Hallgren
8a94fc667e
[BUG][GO] use value receiver for JSON marshal (#19962)
* chore(go): add failing test for JSON marshalling

Adds a small schema (FruitJuice) which contains a required gmFruit,
which inherits using AnyOf. This fails to correctly marshal as JSON.

* fix(go): use non-pointer receiver for JSON marshal

In the case of a required anyOf property, JSON marshalling would has
been incorrect.

Required properties are not nullable, and thus always use value
receivers. For the single case of anyOf models, a pointer receiver was
used for MarshalJSON. All other instances of json marshalling use value
receivers.

This change is simply to use a value receiver instead of a pointer
receiver in the template for `MarshalJSON` on anyOf models.

---------

Co-authored-by: Per Hallgren <perhallgren@users.noreply.github.com>
2024-11-27 18:09:11 +08:00
Qluxzz
705261978d
[Elm] Fix not compiling all elm files in test suite (#20191)
* Fix not trying to compile all elm files

* Validate that changes to pipeline works
2024-11-27 15:44:21 +08:00
jops-wtakase
7b35613cfc
[python] Encode list query params (#20148)
* Bugfix: #17688: Encode list query params

* Test: #17688: Update validation error message tests for Pydantic 2.10+

Pydantic 2.10+ introduced changes to validation error messages,
requiring updates to the affected test cases.
2024-11-26 23:53:12 +08:00
Victoria Casasampere Fernandez
7072009ab5
[Rust-Axum] Support quotes in string literals (#20176)
* Allow quotes in string literals

* Update samples
2024-11-26 21:36:11 +08:00
Linh Tran Tuan
19e21416ed
[Rust-Axum] BugFix: handling non-lowercase Header in Request/Response (#20178) 2024-11-26 18:39:29 +08:00
Qluxzz
ed211050f1
[Elm] Fix not sanitizing param name (#20171)
* Add failing example

* Sanitize param name

* Regenerate fixed sample

* Override toParamName instead
2024-11-26 17:30:04 +08:00
Lennard Sprong
55f02e995b
[swift6] Change Response to struct (#20185) 2024-11-26 08:30:50 +00:00
Lennard Sprong
af89ed8043
[swift5] Add Identifiable conformance to supported models (#20179) 2024-11-25 17:43:51 +00:00
Victoria Casasampere Fernandez
a7cacce30e
[Rust-Axum] Dynamically set the types of integer literals (#20133)
* Dynamically set the types of integer literals

* Change the literal limits from i32 to adaptive limits

* Remove length literal types
2024-11-26 00:24:06 +08:00
Lennard Sprong
4c5a57fe7b
[swift6] Add Identifiable conformance to supported models (#20166) 2024-11-24 22:35:17 +00:00
Bragolgirith
8ce332a540
[Java] Fix compilation for Map of InnerEnum (#19401) 2024-11-25 00:40:44 +08:00
altro3
cdafa5a0cc
Deprecate micronaut openapi generator (#20107)
* Deprecate micronaut openapi generator

* update get help message

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-24 23:26:37 +08:00
Kevin
5ae8c03e6f
Ensures a JsonCreator annotated constructor is present if there are required fields, and ensure the getters and setters are properly annotated with required=true / required=false for jaxrs-spec generator. (#19578) 2024-11-24 22:15:55 +08:00
Matt Pollock
6399a7a97e
[R] improve binary/text response handling (#20131)
* [R client] better support for binary/compressed responses

* cleanup

* revert change after PR review

* update samples

* fix R tests

* move private api methods to api-client, revert breaking method name change
2024-11-24 22:12:39 +08:00
dmnlk
c33d3aaae9
add PHP8.4 CI (#20168) 2024-11-24 18:27:49 +08:00
dmnlk
c831983866
PHP8.4 comptible, php-symfony resources (#20162)
* matrix php build

* NullableTypeForNullDefaultValue

* update sample
2024-11-24 16:00:35 +08:00
William Cheng
093a51ee21
Resolve inline schemas in webhooks (#20165)
* resolve inline schemas in webhooks

* update samples
2024-11-24 15:59:05 +08:00
Qluxzz
1ba18a09a1
[Elm] Add missing operation summary (#20147)
* Add missing operation summary

* Regenerate samples

* Print notes and or summary if any exists

* Regenerate clients
2024-11-22 21:29:08 +08:00
Ross
23aa2e2cb2
Added default headers to ServerError<T> for Kotlin OkHTTP generator (#20161) 2024-11-22 13:10:22 +00:00
Lennard Sprong
2b891f6da9
[swift6] Add checked Sendable conformance to Validation structs (#20150) 2024-11-21 11:23:54 +00:00
Lennard Sprong
c06db15750
[swift6] Add conditional Hashable conformance to NullEncodable (#20149) 2024-11-21 11:22:05 +00:00
Benjamin Einaudi
18b01ca455
fixes(java/restclient) Force usage of custom converter (#20112)
* fixes(java/restclient) Force usage of custom converter

Insert custom converter at the beginning of the 'RestClientBuilder' converter list so as not to use default 'MappingJackson2HttpMessageConverter' 

Close #20111

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-19 16:15:51 +08:00
William Cheng
654f62ce3c
Prepare 7.11.0 (#20130)
* Revert "prepare 7.10.0 release (#20128)"

This reverts commit 12dfe8fe74a1515d1e69e00df9abe4128aa44160.

* update to 7.11.0-SNAPSHOT, update samples

* update docs
2024-11-18 20:15:29 +08:00
William Cheng
12dfe8fe74
prepare 7.10.0 release (#20128) v7.10.0 2024-11-18 18:59:21 +08:00
William Cheng
6b9f6bd2b1 update java samples 2024-11-18 18:47:40 +08:00