1650 Commits

Author SHA1 Message Date
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
Simon Abbott
a6581e8e4c
[typescript][typescript-node] Serialize/deserialize maps and nullable types correctly (#19362)
* Remove deprecated suppressImplicitAnyIndexErrors property from templates

* Add encoding / decoding tests for the typescript generator

* Add encoding / decoding tests for the typescript-node generator

* [Typescript][Typescript Node] fix deserializing complex types

This fixes deserializing of models that are composed with null,
undefined, or are inside of a map.

* Use more sensible `startsWith` implementation

* Remove use of magic number offsets

* Fix endsWith bounds checking

* Regenerate samples
2024-09-25 20:21:11 +02:00
Joscha Feth
17e0b7ca71
[typescript] fix: nullable enums should not serialize a null value to a string (#19540)
* fix: `nullable` enums should not serialize a `null` value to a string

* better solution?

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java

Co-authored-by: Joscha Feth <joscha@feth.com>

* chore: Update circle_parallel.sh

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-09-24 23:46:32 +08:00
Joscha Feth
171804eef7
feat(avro-schema): logical type support (#19607)
* feat(avro-schema): logical type support

* style: newline at eof
2024-09-19 09:34:51 +08:00
Mike Phillips
34aeb16c5e
Improve urllib3 semver flexibility (#19458) 2024-09-18 16:54:43 +08:00
Jonathan Ballet
40967a3d38
python: test with more modern versions (#19452)
Python 3.12 has been released in October 2023, it should be tested in
the CI.

Python 3.7 is not maintained anymore, removing it from the minimum
required version in `pyproject.toml` files.
2024-09-18 16:53:51 +08:00
rankoz
ff1fe256d8
Fix dictionary/map deserialization (#19496) 2024-09-16 23:18:04 +08:00
Eric Rolli
bbafeaed40
[Java Jersey] Update ApiClient.mustache Jersey doesn't allow entities in method DELETE (#19530)
* Update ApiClient.mustache

* Update ApiClient.mustache

Jersey doesn't allow request entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* Update ApiClient.java

Jersey doesn't allow entities in method DELETE

* jersey ApiClient.mustache invoke DELETE without entity if empty

* jersey ApiClient.mustache invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty

* jersey ApiClient invoke DELETE without entity if empty
2024-09-16 17:03:50 +08:00
Beppe Catanese
243f501aef
[GO] Go Server: preserve order of the routes as defined in the OpenAPI file (#19550)
* Add skipSortingOperations configuration option

* Skip sorting operations for go-server

* Add test verifyOrder

* Regenerate samples
2024-09-16 16:52:01 +08:00
Vasiliy Ditsyak
7dcaececf8
[BUGFIX][dart-dio] add unknownEnumValue to JsonKey (#19416)
* [BUGFIX][dart-dio] add unknownEnumValue to JsonKey

* review fix

---------

Co-authored-by: Vasiliy Ditsyak <vasilich6107@users.noreply.github.com>
2024-09-15 16:35:24 +08:00
Vasiliy Ditsyak
abf94168e6
[BUGFIX][dart-dio] Align enum and enum_inline generation result (#19510)
* [BUGFIX][dart-dio] Align `enum` and `enum_inline` generation result

* review fixes

* Revert "review fixes"

This reverts commit 9d0b263f5cffdc5c2856bb2ec45f6f0a263f4ee4.

---------

Co-authored-by: Vasiliy Ditsyak <vasilich6107@users.noreply.github.com>
2024-09-15 13:22:09 +08:00
Chirag Jain
740b971074
python-pydantic-v1: Return the primitive type in to_dict for anyOf models (#19488)
* python: Return the primitive type in to_dict for anyOf models

* Regenerate samples

* Update test
2024-09-13 18:50:55 +08:00
Joscha Feth
cd349dc5ea
[avro-schema] fix enum logic (sanitize) (#19549) 2024-09-12 17:00:19 +08:00
Rory Schadler
8171648eb4
fix(python,asyncio): multipart form data serialization (#19302)
* fix: object serialization for multipart requests

This PR is essentially
<https://github.com/OpenAPITools/openapi-generator/pull/18140> but for
the asyncio client.

* fix: int serialization for multipart requests

urllib3 handles serializing ints in post params (ref 1), while asyncio
explicitly does not (ref 2).

ref 1: <9316764e90/src/urllib3/filepost.py (L75-L76)>
ref 2: <https://github.com/aio-libs/aiohttp/issues/920>

* test: new fake multipart endpoint with files and body

* test: regression test for stringified body params

* fix: mypy tweak

* fix: FILES regeneration

* feat: object, int serialization for multipart reqs

Extends previous commits (and #18140) to cover the python-pydantic-v1
client as well.

* fix: use async with in test

* test: regression test for pydantic-v1-aiohttp

* test: add regression test to pydantic-v1

Also brings the second test in line with the first, patching
`urllib3.PoolManager.urlopen`
2024-09-09 17:43:25 +08:00
Kresten P. Vester
a98f45b4ac
[Java][Spring]Update dependencies to remove vulnerability in org.springframework:spring-webmvc (#19533)
* Update dependencies to remove vulnerability in org.springframework:spring-webmvc

* Updated samples
2024-09-07 16:26:42 +08:00
Horace Li
42d98e2526
[Java Libraries] Jakarta Validation API support useJakartaEe flag (#19469)
* Jakarta Validation API support useJakartaEe flag

* Jakarta Validation API support useJakartaEe flag
2024-09-04 15:57:55 +08:00
Joscha Feth
f40f72cea8
[typescript] fix: explode: true should yield appended query params (#19519)
* [typescript] fix: `explode: true` should yield appended `query` params

* fix: object keys should be `set`
2024-09-04 08:16:21 +02:00
Matteo Molinari
fb1c2f3483
[Bugfix][Java] Fixed jersey clients for multiple file upload (#19476)
* Fixed jersey3 client for multiple file upload

* Updated sample

* Fixed typo

* Fix

* Fix for jersey2
2024-09-02 17:25:54 +08:00
Chris McEvoy
5b96e85fd5
bugfix: use the correct key when generating auth example in readme (#19492) 2024-09-02 15:38:57 +08:00
Joscha Feth
7510e6bbf8
[Typescript] Generate oneOf schemas as type unions (#19494)
* Add oneOf model for Typescript generator

* Update import procces: For oneOfs only import $refs within the oneOf

* Remove new line after description

* Update samples

* Typescript: Update model.mustache

* Typescript: Remove emun from oneOf models

* Update samples

* Typescript oneOf: add discriminator and update deserialize procces

* Typescript: update tests

* Typescript oneOf: move type mapping to models

* Typescript: Update samples

* Typescript: Update type of mappig

* Typescript: Update type of mappig

* Typescript oneOf: update deserializing logic

* Typescript: Update samples

* Revert "[typescript] fix: `enum` can not receive stringified class name (#19481)"

This reverts commit 4238f17322bdb0e968f94b621669b737395a3dc9.

* [typescript] chore: update fixtures

---------

Co-authored-by: ksvirkou-hubspot <ksvirkou@hubspot.com>
2024-08-30 16:20:18 +02:00
Joscha Feth
1518237c25
[typescript] fix: deno: type exports for isolatedModules (#19484) 2024-08-29 13:56:02 +02:00
Joscha Feth
4238f17322
[typescript] fix: enum can not receive stringified class name (#19481)
* fix: `enum` can not receive stringified class name

* chore: update generated code samples
2024-08-29 13:54:57 +02:00
Eric
dfc381c22f
[Java] Add a new additional property to configure Jackson's failOnUnknownProperties (#19271)
* [Java] Add a new additional property to configure Jackson's `failOnUnknownProperties`

* Move `FAIL_ON_UNKNOWN_PROPERTIES` property to JavaClientCodegen

* Template `FAIL_ON_UNKNOWN_PROPERTIES` for other libraries beside retrofit2

* Default `failOnUnknownProperties` to false for all Java Client libraries

* Fix integration tests

Add the `failOnUnknownProperties: true` additional properties to generate the
expected mapper
2024-08-29 13:25:25 +08:00
Joscha Feth
082382cc1e
[typescript] use const for middleware symbol (#19478)
* style: use const for `middleware`

* chore: update generated code samples
2024-08-28 17:52:26 +02:00
ふぁ
69cce249f6
[python] fix content_type deserialize (#19317)
* [Python] fix: #19285

* [python] update sample

* [python] add test

* [python] remove test
2024-08-24 23:40:15 +08:00
Martin Boos
ae069e6840
[Python] Update python-pydantic-v1 generator to respect the --git-host argument (#19404)
* Update pyproject.mustache

chore(pyproject): replace static `github.com` with variable `{{{gitHost}}}`

* chore: follow contribution guidelines
2024-08-22 15:52:36 +08:00
Rory Schadler
cc98333d87
feat(python): handle multiple file parameters (#19329)
* test: fix broken python test

* fix: handle multiple file parameters

Previously an array of files was not handled correctly, despite the type
annotation implying it was.

* feat: handle filename,filedata tuples in file param

This allows for users to pass filenames with their data in file params,
which is useful for multipart formdata requests. Without this, the list
of files added in the previous commit would have the same filename for
all files (the parameter name).
2024-08-21 15:09:10 +08:00
William Cheng
91da2fd240
Prepare 7.9.0 snapshot (#19386)
* Revert "v7.8.0 release (#19385)"

This reverts commit 6bdc452f92d49dcac7ac21dfe8751c8cc4267b98.

* update samples for v7.9.0-snapshot
2024-08-19 16:14:51 +08:00