1722 Commits

Author SHA1 Message Date
William Cheng
dbf720c093
Prepare 7.14.0 release (#21159)
* Revert "v7.13.0 release (#21157)"

This reverts commit 4b805ff6b7ac5bd2557555810357569fe2677311.

* prepare v7.14.0 release

* update samples
2025-04-27 22:04:03 +08:00
martin-mfg
9f3a73f81a
[spring]addition: api response examples + spring generator generates response examples (#17610, #16051) (#20933)
* addition: api response examples; spring's api.mustache generates response examples

* update samples

* added 2 sample configs; adsjuted to only generate examples for application/json

* added test

* remove accidentally added files

* small cleanup

* add new samples to workflow

---------

Co-authored-by: GlobeDaBoarder <glebivashyn@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-04-27 00:10:09 +08:00
Ross Sullivan
35ba0414fb
[rust] Fix for allOf multi model with only metadata fields (#20892)
* Fix for allof multi model with only metadata fields

* Update samples

* fixed compiler errors in java 17 and lower

* refactored isMetadataOnlySchema to ModelUtils.java
2025-04-26 23:44:56 +08:00
ふぁ
5a9f973e91
[dart-dio] Fix the version of the sample dependencies (#20797)
* [dart-dio] Fix the version of the sample dependencies

* update

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-04-25 17:06:29 +08:00
Michael Düsterhus
27a705efd5
[fix][java]Add missing generated annotation to Authentication.mustache (#21125)
* Add generated annotation to Authentication.mustache

* Update Authentication.mustache jersey2

* Update Authentication.mustache jersey3

* Update Authentication.mustache okhttp

* Update Authentication.mustache restclient

* Update Authentication.mustache resttemplate

* Update Authentication.mustache vertx

* Update Authentication.mustache webclient

* doc: regenerate samples
2025-04-25 16:35:51 +08:00
jheyens
e767496357
Jersey2: Move setting of authentication parameters before generating target URL to consider API keys in URL parameters (#20688)
* Move setting of authentication parameters before generating target URL to consider API keys in URL parameters

* Regenerate Jersey2/3 examples
2025-04-23 16:04:26 +08:00
30p87
ee7927a525
[Java][Spring] remove 'size', 'page' and 'sort' query params if using 'x-spring-paginated' (#8315) (#21016)
* [Java][Spring] remove 'size', 'page' and 'sort' query params if using 'x-spring-paginated' (#8315)

* Properly implement samples, fixing build issues

---------

Co-authored-by: Tobias Fischer <t.fischer@goldflam.de>
2025-04-23 15:47:17 +08:00
PidgeyBE
72de5bc952
[Python] Fix the post processing of string enums (#20976)
* fix/ x-enum-varnames in python

* make x-enum-varnames examples more clear

* make x enum varname usage more explicit

* fix tests

* trigger tests

* trigger tests once again...

* fix more tests
2025-04-23 15:45:44 +08:00
jheyens
a66dd20783
Jersey2: Do not reinitialize ClientConfig with default values when building HTTP Client (#20687)
* Do not reinitialize ClientConfig with default values when building HTTP Client

* Regenerate Jersey2/3 examples
2025-04-23 15:24:22 +08:00
takashno
dcb8b1a2dc
modify enum template. field should be final. add testcase & sample updates. (#21019) 2025-04-13 18:49:15 +08:00
Bodo Graumann
8e329feb6a
[typescript] Use static middleware when calltime options exist but specify no middleware (#20985)
* Keep static middleware when options contain no middleware field

* Regenerate samples

* Fix indentation and quotes

* Extract middleware merge logic into function

* Regenerate samples

* Simplify extracted functions

* Regenerate samples

* Fix: Pass static config when no options are given for inversify

* Fix: Allow overriding http api with options

* Regenerate samples

* Use default parameter for default middlware merge strategy

* Throw exception for failed match within switch block
2025-04-01 20:11:07 +02:00
Bodo Graumann
7881152dc8
[typescript] Avoid code duplication (#20978)
* Update test dependencies to make them run

* Use spaces instead of tabs

* Remove duplicate test

* Remove unused variable

* Add failing test for missing options

* Move config merge logic into shared function

* Regenerate samples

* Move option wrap logic into shared function

* Regenerate samples

* Inline wrapOptions call

* Regenerate samples

* Clean up code formatting

* Regenerate samples

* Separate mergeConfiguration definitions

* Regenerate samples

* Rename parameters

* Regenerate samples

* Add missing semicolon

* Revert inlining wrapOptions call

* Revert format changes in untouched lines
2025-04-01 13:13:54 +02:00
Tomschi
4f3726ecfd
#11737 Add package to bean name in converter.mustache for EnumConverterConfiguration.java (#17738)
* Add package to bean name in converter.mustache for EnumConverterConfiguration.java.

* Fix samples for EnumConverterConfiguration.java.
2025-04-01 14:48:14 +08:00
Nicolas Vervelle
8ca3543436
Issue 20804: Add java nullability annotations (#20806)
* issue-20804: Add nullability annotations to Java generated clients

Motivation:
Be able to use generated clients in code checked by tools like NullAway.

* issue-20804: Add nullability annotations to Java generated clients

Motivation:
Be able to use generated clients in code checked by tools like NullAway.

* issue-20804: Add nullability annotations to Java generated clients

Motivation:
Be able to use generated clients in code checked by tools like NullAway.
2025-03-25 23:01:17 +08:00
Simon Podlipsky
62b176e95d
feat(php): drop support for EOLed PHP versions and unify min required version (#17826) 2025-03-24 13:59:01 +08:00
kenji yoshida
7d977b63dc
Update scala version (#20953) 2025-03-24 13:55:46 +08:00
Youri Westerman
73b6b7084f
Drop python 3.8 support python 3.13 in python generator (#20909)
* Drop support for python 3.8 and add support for 3.13 in python generator templates

* Update docs

* Test samples without python 3.8 and with 3.13

* Generate samples
2025-03-23 18:10:32 +08:00
Pavel
868074212a
[Java] Extend JavaSpring apiClient.mustache with option to override contextId for FeignClient (#20943) 2025-03-22 11:36:30 +08:00
Enric Pou
a2ee3a7cfc
[dart-dio][timemachine] Bugfix: Ensure closing bracket when adding serializers (#20908)
* Ensure closing bracket when adding serializers

* Added samples
2025-03-20 01:30:51 +08:00
Robinsstudio
02307dbf0c
fix: #20826 Update urllib3 requirement for Python generator (#20845)
* fix: #20826 Update urllib3 requirement for Python generator

* Fix test to use localhost instead of petstore.swagger.io
2025-03-17 18:26:57 +08:00
Jarangutan
b1f572e116
[go-server] move errMsg helpers to helpers file (#20876) 2025-03-15 21:27:56 +08:00
Jarangutan
4ad76cc86c
[go-server] Moved helper code from router and updated logger for chi (#20823)
* [go-server] Moved helper code from router and updated logger

* [go-server] fixed imports for mux and chi

* [go-server] fix go-api-server sample test
2025-03-09 15:47:11 +08:00
William Cheng
3ad5303f99 update samples 2025-03-03 19:29:07 +08:00
martin-mfg
2b8d496c80
[#19921] Add RFC 3339 compatible Jackson module for java.time types, regenerate samples (#20700)
Co-authored-by: Christian Beikov <christian.beikov@gmail.com>
2025-03-03 17:42:18 +08:00
Ron Reynolds
5cef0803b8
Java client enhanced Configuration with ApiClient Supplier (#20738)
* enhanced Configuration.mustache (thread-safe, lazy-eval, plugable factory

* removed comment in Configuration.mustache

* fresh samples
2025-03-03 13:52:10 +08:00
William Cheng
a79aad8420
Prepare 7.13.0 (#20758)
* Revert "v7.12.0 release"

This reverts commit 073723cb4d41187f839fbb46565d109293fa22d7.

* set version to v7.13.0-SNAPSHOT

* update samples

* update doc
2025-02-28 13:48:36 +08:00
David Gamero
fc00a663e1
[typescript] middleware import file extension in api types (#20745)
* middleware import extension fix

* fix file extension

* remove laravel lib
2025-02-27 09:22:38 +01:00
David Gamero
b3f11963c3
[typescript] add call-time middleware support (#20430)
* add call-time middleware

* update dependencies to run on current tsc

* exclude middleware from inversify

* update samples

* update service

* space

* inversify exclude

* braces

* import in objectparamapi

* add integration test for middleware

* switch to configuration options merge

* enable options on non inversify builds

* remove unused middlware export

* remove merge strategy from inversify

* gen samples

* remove old middlware imports

* tab to space

* separate promise and observable options

* gen samples

* use allmiddleware var across inversify

* generate encode samples again

* add middleware call-order tests for default typescript build

* type refactor

* add semicolons, default replace, let to const

---------

Co-authored-by: david <david@dmba.local>
2025-02-26 11:33:21 +01:00
micolous
30787a16fb
[Python] Add ca_cert_data parameter (#20697)
* Add `ca_cert_data` parameter to Python client.

This lets a client validate a server's CA certificate chain using a
variable/constant containing PEM (`str`) or DER (`bytes`) data, rather than
needing to reference a file on disk.

* python: Fix `ca_cert_data` on Python 3.8
2025-02-26 16:04:32 +08:00
Sander Jochems
5757def39b
Implement GetActualInstanceValue method (#20663) 2025-02-26 15:54:41 +08:00
Sylvain Joubert
0ff8c46595
[Python] Fix mustache tag syntax in github worklow (#20701) 2025-02-21 17:43:17 +08:00
Jonathan Martens
890c37fd77
fix: display of markdown in notes section (#20534)
* fix: display of markdown in notes section

* update samples

* skip blank lines

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-02-19 17:15:29 +08:00
Ron Reynolds
eb668b6a76
reuse Configuration.defaultApiClientin no-arg Api ctors and make ref volatile (fixes issue #20633) (#20635)
* made Configuration.defaultApiClient volatile so that if it's changed the new value is immediately visible to all other threads

* made no-arg api ctor use Configuration.getDefaultApiClient() instead of creating new ApiClient every time

* replaced all use of URLEncoder.encode with ApiClient.urlEncode; just code cleanup; no functional changes

* disabled AbstractJavaCodegenTest.testGeneratedExampleValues as it fails, possibly due to timezone (Locale.ROOT) of local system

* replaced thread-unsafe SimpleDateFormat with DateTimeFormatter and re-enabled unit-test

* removed unused import

* ran the generate-sample scripts and generated a HUGE number of changes!

* added missing import of Configuration to api.mustache (and, thus, all native samples)

* added missing import for ApiClient to anyof and oneof model mustaches
2025-02-19 14:47:55 +08:00
Yuji Hanamura
c349270c7a
[Ruby] Fix ruby client generator to generate setter methods with not null validation (#20672)
* fix: Fix ruby client generator to generate setter methods with not null validation

Not null validation was missing for required and non-nullable properties when
no other validation was present.

* fix: Fix an issue where the initialize method did not accept attributes defined in its parent class
2025-02-19 14:46:44 +08:00
William Cheng
8fb81ea554 update python samples 2025-02-18 16:51:17 +08:00
Joost Sijm
5687edcf02
[python] Encode list query parameters for python pydantic v1 client (#20614)
* Fix url escape quote in python pydantic v1 client

* Fix sample
2025-02-18 16:46:14 +08:00
Maxime Vincent
515c8827b2
Ruby fix typhoeus api client multiple call with file return type (#20615)
* [Ruby] fix Typhoeus api client multiple call with file return type

* update samples
2025-02-17 19:58:53 +08:00
William Cheng
dd67423c8c
update samples (#20647) 2025-02-12 17:57:18 +08:00
zaenk
3eddc9af85
[JavaSpring, kotlin-spring] attach sources when maven and interfaceOnly=true is used (#20640)
* [JavaSpring] attach sources when using maven and interfaceOnly=true

Closes #15659

* [kotlin-spring] attach sources when using maven and interfaceOnly=true

Closes #15659
2025-02-12 17:41:14 +08:00
Michael Faille
aeb7caf9b1
Fix: Resolve Dart 3.5+ and json_serializable 6.9.0+ compatibility issues in generated dart-dio clients (#20460)
This commit fixes compatibility problems between the generated dart-dio code, json_serializable 6.9.0+, and Dart SDK 3.5 or later.

Changes:

- Updated `pubspec.mustache`:
    - Set the minimum SDK constraint for the generated package to `>=3.5.0 <4.0.0`, reflecting the language version used in the generated code.
    - Bump `json_annotation` dependency to `^4.9.0`.
    - Bump `json_serializable` dependency to `^6.9.0`.

These changes ensure that the generated code:

- Is compatible with `json_serializable` 6.9.0+ and Dart SDK 3.5+.
- Avoids Dart 3.5+ specific syntax that causes errors on older SDKs.
- Maintains existing functionality and type safety.

Resolves: #16117, #14863
2025-02-10 19:39:16 +08:00
Andriy Slobodyanyk
cdfa7fee77
Using Optional.ofNullable() at the fluent setters to prevent NPE (#20406)
* * Uses Optional.ofNullable() at the fluent setters to prevent NPE
* Fixes issue #17538

* updates samples
2025-02-10 18:23:01 +08:00
Charles Treatman
8cbba7334d
[Go] skip validator import if oneOf discriminator lookup is enabled (#20497)
* move validator import into GoClientCodegen

* add new example for oneof discriminator lookup

* regenerate samples

* add validator.v2 to go.mod if it is imported

* regenerate samples
2025-01-22 19:36:56 +08:00
William Cheng
1fa07bf46c
Prepare 7.12.0 (#20512)
* Revert "v7.11.0 release (#20508)"

This reverts commit a7240eeefeedeefe7fc80ef22747dfc67e126324.

* prepare 7.12.0 snapshot version

* update samples

* update readme
2025-01-21 00:10:09 +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
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
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
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
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
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
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