20863 Commits

Author SHA1 Message Date
William Cheng
a7240eeefe
v7.11.0 release (#20508) v7.11.0 2025-01-20 21:35:30 +08:00
Iurii Ignatko
fa3e38a4b7
[JAVA] Address [rawtypes] and [this-escape] warnings in generated API clients (#20466)
* Address [rawtypes] and [this-escape] warnings in generated API clients

* Commit updated sample files
2025-01-18 15:00:16 +08:00
William Cheng
98ccf95e43
[ASPNETCORE] Add support for central package version management (#20401)
* Added useCentralPackageVersionManagement option for aspnetcore

* Removed debug code from template

* Added option to opt out of centralized version management

* Added sample for centralized version management

* Removed changes for .net9

* Updated template file for model project

* Code formatting

* Corrected sample config for aspnetcore

* Regenerated Samples

* update samples, docs

* Fixed models project mustache file

* Regenerated samples and docs

* Regenerated smaples and doc

* Changed options to enum WIP

* fix option

* [ASPNETCORE] Add support for central package version management #20192 (#20403)

* Fixed default value for usePackageVersions

* Regenerated docs

* update workflow

* add props file

---------

Co-authored-by: Urganot <ballingsimon@googlemail.com>
2025-01-18 14:52:41 +08:00
William Cheng
9e66c4f516
Add more net9 samples (#20491)
* add restsharp net9 samples

* add httpclient net9 samples

* add unity net9 samples

* update workflow

* comment out unity test
2025-01-17 14:14:11 +08:00
William Cheng
ce56a83ae4
Update openapi spec 3.1 support message (#20492)
* update spec 3.1 support message

* update faq
2025-01-17 13:15:35 +08:00
William Cheng
4c73faf737
[go-server] Add tests for primitive types in request/response (#20474)
* add test for primitive request/response

* add new files
2025-01-15 16:56:16 +08:00
Dragos Vingarzan
dcf472a034
ISSUE: #17373 [BUG] [Go-server] invalid composite literal type string (#20467)
* modules/openapi-generator/src/main/resources/go-server: alternative initialization of variable, to avoid extra checks and custom code

* propagated changes to samples
2025-01-15 16:36:33 +08:00
William Cheng
5785743695
Update bug_report.md with up-to-date URL for online validator (#20470) 2025-01-15 01:31:03 +08:00
William Cheng
760d5e8168
[normalizer] Better handling of schema with just description (any type) (#20461)
* better handling of schema with just description

* update
2025-01-14 22:04:23 +08:00
Juuso Alasuutari
4259e92776
[C][Client] Make custom CMAKE_C_FLAGS work (#20432)
* [C][Client] Generate CMakeLists.txt for all C sample clients

The sample client defined in bin/configs/c.yaml has CMakeLists.txt in
its .openapi-generator-ignore. It's is the only C client that doesn't
(re-)generate CMakeLists.txt, the remaining two seem fine regardless.

* [C][Client] Allow user-defined CMAKE_C_FLAGS

* [C][Client] Remove useless message() calls from CMakeLists.txt

find_package() prints success/failure messages, no need to do it twice.
2025-01-14 15:01:36 +08:00
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
devhl-labs
479cd522e0
[csharp] Removed .net6 and .net7 (#20449)
* removed .net6 and .net7

* build docs

* build docs
2025-01-13 15:22:30 +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
William Cheng
a6cfef53fe
clean up kotlin spring samples (#20445)
* clean up samples

* use 3.0 petstore test spec

* update samples

* better code format
2025-01-11 17:00:54 +08:00
Ruslan Khasanshin
358e8af2bf
[kotlin-spring] Adds useFlowForArrayReturnType option for reactive mode (#16130) (#20409)
* [kotlin-spring] Adds useFlowForArrayReturnType option for reactive mode (#16130)

* [kotlin-spring] Replaces manual doc change with generated one (#16130)

* [kotlin-spring] Fixes errors (#16130)

* [kotlin-spring] Adds samples (#16130)
2025-01-11 15:53:04 +08:00
William Cheng
522b134cd9
rename variable in html2 (#20443) 2025-01-11 15:52:46 +08:00
John Vandenberg
eb47b9d836
Fix typos (#20442) 2025-01-11 15:44:42 +08:00
Victoria Casasampere Fernandez
29f7c2ea0b
[Rust-Axum] Update tests to not use templates (#20427)
* Update tests to not use templates

* Wrong filename
2025-01-10 12:13:29 +08:00
martin-mfg
d30220b8df
[Spring] Resolve default value issue with Lombok Builder (#19855)
* merge PR 18690

* update samples
2025-01-09 15:40:50 +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
Mark Doliner
536519c0ec
Update python options in the generators README.md (#20417)
- Remove the dead link to a python-legacy client generator.
- Add a link to the python-pydantic-v1 client geneator.
- Add a link to the python-fastapi server generator.
2025-01-09 11:55:21 +08:00
Yousef Haggy
7a23ac7615
[Python] Bug Fix - model_generic templates to have valid imports for polymorphism (#20273)
* fix model_generic python templates to have valid imports for polymorphism

* update samples

* update samples

---------

Co-authored-by: yugi <yugi-big@proton.me>
2025-01-09 11:40:47 +08:00
Victoria Casasampere Fernandez
3d65786117
[Rust-Axum][Breaking Change] Improve the oneOf model generator (#20336)
* Improve the implementation of oneOf

* Fixed 2.0 schemas; possible freeze present

* Fix generate-samples.sh freezing

* Fix validation of primitive types

* Move oneOf handling to its own method

* Fix formatting and add comments

* Remove allOf based discriminator handling

* Implement a test for v3 oneOf

* Implement oneOf tests for rust axum

* Fix circle CI

* Fix pom path, ensure cargo is present

* Implement untagged test

* Add final and fix double underscore typo
2025-01-08 17:38:23 +08:00
Jimmy Praet
eb96380928
[Java] Remove bean validation annotations on builder (#19580)
* Revert #18724

Make JAX-RS spec BuilderImpl class final again

* Remove bean validation annotations from builder

* Also update other java generators

* Introduce removeAnnotations lambda

* Undo import changes to JavaHelidonClientCodegen

* Add javadoc comment, examples and test for AbstractJavaCodegen.removeAnnotations()
2025-01-07 21:36:19 +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
AntoineDuComptoirDesPharmacies
4b5dfc430e
#20390 : (#20391)
Manage colon converting to underscore on sanitize
2025-01-06 19:43:05 +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
dependabot[bot]
46260ee6f9
Bump s4u/setup-maven-action from 1.17.0 to 1.18.0 (#20392)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.17.0...v1.18.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>
2025-01-01 23:25:10 +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
William Cheng
c5ac7d485f
Various enhancements, bug fixes to default codegen and maven plugin (#20388)
* fix typos in docs

* minor fix in default codegen

* fix more typos
2024-12-30 16:42:26 +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
OM HASE
de41fd27d1
Fix(Python): Add custom exceptions for HTTP status codes 409 (Conflict) and 422 (Unprocessable Entity) #20244 (#20251)
* Update exceptions.mustache

* Fix(Python): Add custom exceptions for HTTP status codes 409 (Conflict) and 422 (Unprocessable Entity) #20244
2024-12-30 11:53:12 +08:00
dependabot[bot]
45aeae3d43
Bump actions/setup-dotnet from 4.1.0 to 4.2.0 (#20379)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  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-27 18:37:36 +08:00
Makoto Aoyama
bf9c9a59d2
Add access control to the properties of validation rules (#20380) 2024-12-27 10:36:15 +00:00
William Cheng
6d2f2c9ced update gradle.properites to use 7.11.0 snapshot for testing 2024-12-27 00:56:38 +08: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
DavidRV00
357a708ebb
Fix package name in FastAPI README (#20371) 2024-12-27 00:27:06 +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