1677 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
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
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
David Gamero
74044c3427
remove unused url-parse package to complete WHATWG migration (#20344) 2024-12-18 09:00:55 +01:00
loic-seguin
b01c8be47f
bugfix: generate correct setup.pi when no paths are specified (#20098) 2024-12-17 10:58:26 +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
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
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
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
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
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
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
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
Christian Beikov
4185782ddc
[#20125] Remove unnecessary model package import to avoid ambiguous class references (#20124)
* Remove unnecessary model package import to avoid ambiguous class references

* Regenerate JSON files
2024-11-18 17:43:14 +08:00
jasonjyu
51a0bd00b7
Replaced deprecated 'summary' attribute with recommended 'caption' element (#19961) 2024-11-18 17:34:55 +08:00
Tim
66908020e0
[python-pydantic-v1] Fix bug in serialization for SecretStr by applying changes from #18023 (#20102)
* Apply changes of #18023

* Regenerate samples

---------

Co-authored-by: tweber2 <tim.weber@vector.com>
2024-11-16 21:48:11 +08:00
William Cheng
02847e9323
Update minimum supported version of python in docs to 3.8+ (#20118)
* Update minimum supported version of python in docs

* update samples, docs

---------

Co-authored-by: Hugo Posnic <hugo.posnic@protonmail.com>
2024-11-16 18:01:50 +08:00
DielN
216ba30172
[JAVA] Add missing dependencies in templates (#20075)
* Add commons-lang3 dependency for useReflectionEqualsHashCode

* Fix feign-no-nullable config/sample

* Add commons-lang3 dependency to jersey2

* Add & update mutiny dependency for microprofile

* Regenerate samples
2024-11-14 14:08:26 +08:00
0xNF
bfcfc6ff25
[Dart2] Added better double handling to 'mapValueOfType<T>', which previously would fail when deserding doubles (#17808) 2024-11-11 18:33:08 +08:00
Dennis Ameling
7bce639441
[typescript] use supportsES6 in sample testing (#20062) 2024-11-08 14:11:54 +01:00
Sylwester Zieliński
3a3688280f
Bump libraries for Kotlin-client. (#20053) 2024-11-08 08:05:28 +00:00
Jonathan Ballet
57cfff1950
python: stronger typing for the "configuration" module (#20014)
* python: strong typing for the configuration module

* 3.8 compatibility

* fix bearer format

* Specific auth settings
2024-11-06 16:36:47 +08:00
Chirag Jain
67af02ccc8
python-pydantic-v1: Keep trailing commas for enum validation tuples (#19985)
* python-pydantic-v1: Keep trailing commas for tuples when enum has just single member

* Update samples

* Add test for single member enums

* Refactor test name
2024-11-02 15:26:19 +08:00
ksn-partisia
b627e1cc67
[Bug] [Java] Fix raw type compilation warning in ApiClient for jersey2 and jersey3 (#19966)
* Add type annotation to raw type Iterable in jersey templates

* Regenerate samples
2024-10-30 14:24:32 +08:00
Joscha Feth
dc3718cd5c
fix(typescript): typecheck generated samples + fixes (#19903)
* fix(typescript): typecheck generated samples + fixes

* wip(today's fortune): The sum of the Universe is zero.

* Update .github/workflows/samples-typescript-typecheck.yaml

* Update modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache

* chore: regenerate samples
2024-10-18 09:57:43 +02:00
Joscha Feth
23bd50fea0
fix(typescript): missing override directives / satisfy noImplicitOverride (#19896)
* fix(typescript): missing `override` directives

* chore: regenerate samples
2024-10-17 15:43:21 +02:00
Nicolas Vervelle
65b1859161
Add nullability annotations to Java generated clients (#19617)
* issue-1960: Add nullability annotations to Java generated clients

Motivations:
Have generated clients properly annotated for nullability to be able to check code using them with tools like NullAway

Modifications:
* Add nullable_var_annotations template to handle nullability annotation on vars
* Add pojo templates to use the nullability template
* Adapt tests

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

Modifications:
* Run export_docs_generator.sh script to update samples
2024-10-16 16:14:29 +08:00
Marvin Sommer
a84946bdb3
[Java Spring] Fix copyOf inheritance using empty object instead of passed value (#19426)
* Fix copyOf inheritance using empty object instead of passed value

* Generate new samples
2024-10-10 16:52:38 +08:00
vcutrona
45fa4384e7
[python] Check if the given input is a container (Array or Map) when validating enum values (#19316)
* checks if input is Array or Map in validate_enum

* update samples
2024-10-10 14:57:04 +08:00
martin-mfg
b730e36937
[JAVA] fix several anyOf/oneOf problems (#19817)
* erasure duplicates

* sanitize beanValidation

* oneOf maps

* anyOf

* update samples
2024-10-10 14:50:18 +08:00
martin-mfg
d60200de38
improve java enums (#19815) 2024-10-09 10:46:17 +08:00
William Cheng
e2c458b9ea
Prepare 7.10.0 (#19809)
* Revert "prepare 7.9.0 release (#19808)"

This reverts commit 4145000dfebe7a9edea4555c8515383da7602458.

* prepare 7.10.0 snapshot

* update doc

* update samples
2024-10-08 11:21:54 +08:00
Kunitsyn Oleg
4ff8c3aaef
[Python][Client] Allow all content-types with text/ prefix (#19802)
* ODM-12108: allow all content-types with text/ prefix

* ODM-12108: Update deserialization tests

---------

Co-authored-by: Oleg Kunitsyn <you@example.com>
2024-10-08 09:34:36 +08:00
Joscha Feth
cfe6520283
fix(avro-schema): fix NPE for null enum values (#19771) 2024-10-04 12:56:11 +08:00
Pascal Bachor
817da39124
[Python] Restore required dev dependency + Adjust generated Github workflow (#19773)
* Restore required python client dev dependency pytest-cov

* Harmonize python client workflow definitions

---------

Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2024-10-04 00:39:45 +08:00
Pascal Bachor
619e4d9653
Harmonize python client dependency versions (#19694)
Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2024-10-03 14:09:39 +08:00
Maxime Vincent
c6eb9e0e09
fix_ruby_documentation_apikey_name (#19742) 2024-10-01 22:10:54 +08:00
Maxime Vincent
2544fa2928
[Ruby-client] Use secuirtyScheme Key for api_key (#19740)
* replace name by keyParamName in apiKey configuration

* update configuration generated in sample
2024-10-01 19:45:27 +08:00
Joscha Feth
849b3e8e17
fix(typescript): export types (#19725)
* Fix export type for typescript interfaces in all platforms (#6805)

* Generated samples and docs

* chore: update samples

---------

Co-authored-by: Kevin Broja <kevin.broja@gus-group.com>
2024-09-30 17:29:21 +02:00
Joscha Feth
0b32c5025e
chore: update github workflow checkput plugin references (#19676) 2024-09-29 21:23:02 +08:00
Joscha Feth
4223be77f8
feat(typescript): write minimum, maxmimum and default to JSDoc (#19707)
* feat(typescript): write `minimum`, `maxmimum` and `default` to JSDoc

* feat(typescript): express optional params in JSDoc
2024-09-29 12:42:55 +02:00
Joscha Feth
36367e79e7
style(typescript): use Headers type (#19697) 2024-09-27 08:41:03 +02:00
Joscha Feth
5e2af7203a
feat(typescript): generate .gitattributes file (#19698)
* feat(typescript): generate `.gitattributes` file

* sample generation

* highlight the gitattributes mustache template

* highlight the gitattributes mustache template

* Revert "highlight the gitattributes mustache template"

This reverts commit 95119979833c2835f004db27805506b76785385a.

* highlight the gitattributes mustache template

* Revert "highlight the gitattributes mustache template"

This reverts commit 0f67ec2e4fec30fad209fae20ace97ea7f9d4eea.

* Revert "highlight the gitattributes mustache template"

This reverts commit 1f68b42368c959bc63dff76db791e4149280283a.
2024-09-27 08:39:59 +02:00
Joscha Feth
1b247e75a9
feat(typescript): improve docs generation (#19699) 2024-09-27 08:36:04 +02:00
Joscha Feth
645626d2f5
style(typescript): add missing semi (#19689) 2024-09-26 16:06:56 +02:00