13816 Commits

Author SHA1 Message Date
devhl
da9ef216a0 version bump 2024-09-06 19:08:32 -04:00
David Omid
2bc0e5f745
[typescript-fetch] Fixed issue where unique arrays (sets) of primitive values aren't initialized properly (#19521)
* Fix for https://github.com/OpenAPITools/openapi-generator/issues/19520

* Removed redundant Array<any> cast

* Fixed modelGeneric.mustache

* Updated samples
2024-09-05 15:43:34 +02:00
Tero Hagström
2f54a2fb11
Fix for #15736 [TYPESCRIPT-FETCH] Subclassing components using discri… (#19524)
* Fix for #15736 [TYPESCRIPT-FETCH] Subclassing components using discriminators fails to convert subclasses to JSON.
Added similar discriminator handling to ToJSON as was already in place for FromJSON.
The actual files changed are typescript-fetch/modelGeneric.mustache and typescript-fetch/apis.mustache.
Also, adjusted FromJSON a bit in an attempt to support multiple hierarchical levels of discriminators.
And fixed an issue with calling FromJSON from the map() function, which caused the index parameter getting inadvertently passed as the ignoreDiscriminator parameter.
Additionally, fixed failing "mvn integration-test -f samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml"
Moreover, added forceConsistentCasingInFileNames:false into tsconfig.json to make tests compile on OsX.

* Rolled back the changes related to the map() function calls in favor of using ToJSONTyped instead, as that is in line with how FromJSON is already implemented.
2024-09-05 15:29:44 +02:00
Nicklas Wiegandt
e4112c5aca
feat (JAVA SPRING RESTCLIENT) 19406: Add single request parameter for Spring RestClient (#19430)
* feat (JAVA SPRING RESTCLIENT) 19406: Add single request parameter for Spring RestClient

Closes #19406

* chore (JAVA SPRING RESTCLIENT) 19406: Add new sample to jdk 17 tests

* fix (JAVA SPRING RESTCLIENT) 19406: Fix sample build
2024-09-04 16:17:13 +08:00
Rugal Bernstein
f54b0e25a4
Remove appendRequestToHandler (#19500) 2024-09-04 16:03:31 +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
Dan Goslen
8678ee8a1f
[Typescript:Axios] Fix withInterfaces and usSingleRequestObjectParam (#19467)
* Support withSingleRequestParameter along with withInterfaces

* Add sample and config for combination

* Re-generate samples
2024-09-03 17:22:11 +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
William Cheng
c733bb69a2
[typescript-angular] fix: when model property name is sanitized, use instead original property name within quotes in mustache template (#19508)
* fix: typescript-angular -> when model property name is sanitized, use instead original property name within quotes in mustache template

* fix: updated samples

* chore: added comment for hasSanitizedName

* add original tag, add dummy model for test

* update samples

---------

Co-authored-by: Davide Diaconu <davidediak@gmail.com>
2024-09-02 17:15:58 +08:00
jpfinne
b228133a20
[java] Fix issue #17472 when using schemaMapping for models in collections, not compilable code with @Valid is generated (#19093)
* Fix issue 17472

* Avoid cast exception
2024-09-02 17:03:08 +08:00
William Cheng
1776c000ed
update C# restsharp to 112.0.0 (#19507) 2024-09-02 16:52:54 +08:00
Sobhan Sharifi
0643f526af
Fix ObjectSerializer::isEmptyValue to not consider "0" as "" (#19472) 2024-09-02 16:03:36 +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
Brenton Bostick
abd19dd253
fix typo woking -> working (#19498) 2024-09-02 15:34:42 +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
Anderson de Borba
85763cdb08
[java] Use @JsonFormat instead of @JsonSerialize for bigDecimalAsString property (#19322)
* [java] Use @JsonFormat instead of @JsonSerialize so that JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN is respected and generates a String using BigDecimal#toPlainString instead of BigDecimal#toString

* Only add Jackson @JsonFormat if properties serializeBigDecimalAsString and jackson are enabled

* Do not verify if jackson is available when mapping imports as the property is not evaluated yet

* Removed unused JsonSerialize and ToStringSerializer
2024-08-28 16:22:13 +08:00
William Cheng
9579122945
Better handling of parameters in inline model resolver (#19460)
* add tests for parameter ref of oneOf

* update samples

* better handlding of parameters in inline model resolver
2024-08-28 15:31:04 +08:00
JP Moresmau
d6780e7d43
Remove extra bracket to fix compilation (#19464) 2024-08-28 15:30:15 +08:00
Matthias Schwarz
4330b2f46d
[typescript-fetch] Add option to generate validation attributes of model properties (#19448) 2024-08-27 14:13:59 +02:00
condorcorde
fe381e2199
Support multiple files (#19449) 2024-08-26 15:39:15 +08:00
aakash-dev-maersk
f13a11b53c
Add support for global token based auth for k6 script generation (#19348)
* Add global token based auth support (basic, bearer) for k6

* config files and generated code files after the changes

* Handle empty or null auth at path level

* files changed after update with master and run build
2024-08-25 23:40:38 +08:00
Richard Whitehouse
2b40a2c058
[Rust Server] Add auto-generated CLI Client (#19392)
* [Rust Server] Add auto-generated CLI tool

* [Rust Server] Test multiple path parameters

* [Rust Server] Test boolean parameters and apostrophes

* [Rust Server] Test operation with two boolean parameters with same first letter

* [Rust Server] Test apostrophes in operation summary

* Update samples

* [Rust Server] Fix build errors with OpenSSL

* Update samples

* Update samples
2024-08-24 23:57:03 +08: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
Victor Mosin
7a7c8c19ab
[Kotlin][okhttp] replace okhttpclient with callfactory (#19422) 2024-08-22 21:19:32 +01:00
William Cheng
0f294a5129
use gitHost in python pyproject template (#19421) 2024-08-22 16:09:53 +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
mohamuni
deb007b976
fix regex breakage in unmarshaljson function (#19410) 2024-08-22 15:12:54 +08:00
julianladisch
87704b28c0
Upgrade commons-io dependency to latest 2.16.1 (#19414) 2024-08-22 14:59:20 +08:00
Bruno Coelho
b3f74c7c4f
[typescript][angular] move app description from license info to readme (#19397)
* [typescript][angular] move app description from header license info to readme

* [typescript][angular] move app description from header license info to readme
2024-08-21 13:51:39 +02:00
Richard Whitehouse
eda4547f15
[Rust Server] Fix up model generation (#19363)
* [Rust Server] Fix up model generation

- Correctly generate anyOf/oneOf models
- Fix up ToString / FromStr support
- Disable PartialOrd generation for anyOf/oneOf models
- Generate models for inline enums
- Support enums in headers, and vectors of models in headers

* [Rust Server] Add test for anyOf with additional properties

* Update samples

* [Rust Server] Tidy up logging
2024-08-21 15:14:52 +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
c2472b03b6 update doc to v7.8.0 2024-08-19 16:19:49 +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
William Cheng
6bdc452f92
v7.8.0 release (#19385) 2024-08-19 14:01:58 +08:00
William Cheng
fc8b7d92c8
Fix Reactive Spring build.gradle.kts (#19382)
Co-authored-by: Erik VanderWerf <eski787@gmail.com>
2024-08-18 18:34:16 +08:00
Richard Whitehouse
df2b4210c9
[Rust Server] Sort operations so that the ones with fewest params come first (#19368)
* [Rust Server] Sort operations so that the ones with fewest params come first

This resolves things correctly per
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#pathsObject
- "When matching URLs, concrete (non-templated) paths would be matched
before their templated counterparts."

* Update samples

* [Rust Server] Fix tabs vs spaces

---------

Co-authored-by: Rob Day <Robert.Day@metaswitch.com>
2024-08-18 18:01:19 +08:00
Kensuke Taguchi
fd62e3897b
[kotlin-client] Add @JsonEnumDefaultValue annotation to enum class (#19380) 2024-08-18 08:27:43 +01:00
Richard Whitehouse
0a5c99739a
[Rust Server] Allow configuration of multipart/form attachment size limit (#19371)
* [Rust Server] Allow configuration of multipart/form attachment size limit

multipart 0.14+ imposes a 8MB size limit on multipart/form bodies.

This allows that limit to be configured. The default is left as is.

This also improves error messages produced when handling multipart/form bodies.

* Update samples
2024-08-17 16:02:20 +08:00
William Cheng
bb831dad9a
Make the rust hyper client Send so it can be used in rust threads more easily (#19375)
* Add externCrateName property to rust hyper client

This is follows the lead of the rust hyper server generator and provides
an externCrateName. This is because the crate name used for importing
can be different from the package name, because dashes `-` get converted
to underscores `_`.

This allows us to write example code in rustdoc that compiles
successfully.

* Get the rustdoc examples to actually compile

* Make rust hyper client thread safe

* Fix compile time issue with reqwest client test

* Add a test for thread safety

* Generate rust hyper samples

* Use https for petstore api to fix client tests

http://petstore.swagger.io/v2 is 301 redirecting to
https://petstore.swagger.io/v2 and this is breaking posts to the API.
When the client recieves a redirect it does not resend the POST data,
instead it switches to GET. This is in line with how browsers behave
when encountering a 301 redirect on a POST request.

* Make rust hyper client structs `Sync` too

This trait is also helpful in making the api work well with threads.

* Use a getCrateName function instead of adding more state

* update samples

---------

Co-authored-by: Krishna Rajendran <krishna@emptybox.org>
2024-08-17 16:01:11 +08:00
Richard Whitehouse
172fafe674
[Rust Server] Fix server-writing docs for rust-server (#19367)
* Fix server-writing docs for rust-server

Fix broken link in generated README for rust-server.

* Update samples

---------

Co-authored-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>
2024-08-17 15:33:58 +08:00
Richard Whitehouse
fbe6c11903
[Rust] Ensure all features build as part of CI / Upgrade to Frunk 0.4 (#19364)
* [Rust] [CI] Build all features as part of CI

* [Rust Server] Update to frunk 0.4

* Update samples
2024-08-17 14:17:36 +08:00
Richard Whitehouse
caeb83c845
[Rust Server] Fix homepage URL in Cargo.toml (#19365)
This fixes a missing quote in Cargo.toml, which causes validation errors
2024-08-17 14:16:25 +08:00
William Cheng
a6a75e3501
Better handling of backtick in pattern (#19358)
* use x-go-datatag in go client model template

* add logic to handle backtick
2024-08-16 18:04:47 +08:00
Tim Quinn
cd02426648
Suppress Pattern annotation on property of type byte array (#19346)
* Suppress Pattern annotation on property of type byte array

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>

* Straggler files from generated samples

* Add new format test to workflows

---------

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
2024-08-15 17:09:44 +08:00
Richard Whitehouse
024bbb7784
[Rust Server] Improve RFC 13341 compliance for multipart/related (#19355)
* [Rust Server] Improve RFC 13341 compliance for multipart/related

* Update samples
2024-08-15 17:04:59 +08:00