20383 Commits

Author SHA1 Message Date
William Cheng
6bdc452f92
v7.8.0 release (#19385) v7.8.0 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
Aleksander Baranowski
ba1d7255d0
fix mixed indent + move do to same line as start of loop (#19373) 2024-08-17 14:15:00 +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
Richard Whitehouse
be09f8a868
[Rust Server] Use swagger/multipart_related support (#19354)
* [Rust Server] Use swagger/multipart_related support

* Update samples
2024-08-15 17:03:59 +08:00
llendi
38ebf0bb4e
[Java][OkHttp-Gson] fix: free form query parameters for okhttp-gson (#19226) 2024-08-15 17:02:59 +08:00
martin-mfg
05c10934ce
docs: update versions, fix links, remove broken camel.xml, update download counts (#19356)
* manually update version in documentation, remove camel.xml

... because it has the wrong generator version, it has the wrong generator name (should be "java-camel"), the generated code doesn't compile - and then I didn't check further

* improve automatic version updating

* fix one more Readme link

* update docker stats again
2024-08-15 17:02:34 +08:00
Richard Whitehouse
daf52229e3
[Rust Server] Refactor Mustache templates for request/response body handling (#19347)
* [Rust Server] Refactor Mustache templates for request/response body handling

* Update samples
2024-08-14 15:25:08 +08:00
William Cheng
8f7354a2a2
revert gradle extension version (#19351) 2024-08-14 15:22:10 +08:00
Fei Wang
2bf2d9bb56
Include licenseInfo for all the generated java code files (#19273)
* Include license info for all the generated java code files

* Re-base generate
2024-08-14 15:13:42 +08:00
Richard Whitehouse
b8001323f6
[Core] Consolidate Operation ID generation (#19339)
* [Core] Consolidate Operation ID generation

* Update samples
2024-08-14 15:12:26 +08:00
martin-mfg
58dd0305ce
[JAVA] use query parameter apikey if present (#19334)
* Fix #16362

* Update samples

* Undo formatting changes

* Revert whitespace changes in samples

* make it work

---------

Co-authored-by: Jason Boileau <jason@boileau.dk>
Co-authored-by: Jason Boileau <spraot@users.noreply.github.com>
2024-08-14 15:02:37 +08:00
Sylvain Joubert
d55525fbc4
[C++][Pistache] Fix 'unused-parameter' warning on Helpers.h file (#19315) 2024-08-14 14:34:11 +08:00
Sylvain Joubert
8af3ff2828
[C++][Pistache] Add error handlers overload taking the response object (#19314)
This allows overriders to have full access to the response object and
more finely control the error handling behavior.
For example, this enables the specification of a proper Content-Type in
case of custom format responses (application/json, ...)
2024-08-14 14:31:55 +08:00
condorcorde
e70a9564e0
[PowerShell] Fix missing Content-Type header on a 204 response (#19340)
* Allow for binary response content

* AllowNull for $ContentTypes

* Update PSApiClient.ps1
2024-08-13 15:20:46 +08:00
William Cheng
d340e15f1a update dart samples 2024-08-13 15:19:29 +08:00
Brenton Bostick
03d8c30183
fix invalid syntax in gitignore (#19341)
gitignore only supports line comments, not in-line comments
2024-08-13 15:11:30 +08:00
GeorgeFkd
2107e9ef8f
Added support for openapi-normalizer in the online version. (#19336)
* Added support for openapi-normalizer in the online version with a minimal test.

* removed comments and formatted code
2024-08-12 17:49:34 +08:00
Gergely Imreh
fdd2dc9651
python-asyncio: update retry factors for actual exponential retries (#19337)
* python-asyncio: update retry factors for actual exponential retries

As per the `aiohttp-retry` library's code[^1], the timeout is

```python
timeout = self._start_timeout * (self._factor ** attempt)
```

This means the previous setting with "start_timeout=0.0" would have
always just retried right away (0 timeout) regardless of the "factor" value,
and also, "factor=0.0" would never have increased the timeout, rather it
would have resulted in a 0 timeout regardless of the value of "start_timeout".

This double-zeroing effectively rendered exponential backoff to nothing (rather than
"retries" number of retries in quick succession.

The update is a quick fix to set the same default as in `aiohttp-retry`. In
the future this should likely be configurable (through extra Configuration settings perhaps?),
as not all APIs are created equal, but this works as a quick fix for making retries more effective.

[^1]: ba2169891f/aiohttp_retry/retry_options.py (L38-L65)

* updated example
2024-08-12 17:35:00 +08:00
Franck Arnulfo
d1b9f9284a
Fix issue https://github.com/OpenAPITools/openapi-generator/issues/19326 (#19328)
Try to fix issue https://github.com/OpenAPITools/openapi-generator/issues/19326
2024-08-12 15:26:11 +08:00
devhl-labs
5166765724
changed default sorting of samples (#19335) 2024-08-12 15:04:50 +08:00
devhl-labs
ad8a7d2a3c
[csharp] Change sorting default (#18942)
* change sorting default

* implement sorting options for all libraries

* rebuild tests

* build samples
2024-08-12 00:33:18 +08:00
condorcorde
6da3dc5c10
Allow for binary response content (#19331) 2024-08-11 22:48:03 +08:00
Tim Quinn
07baddfe12
Minor change to Helidon version handling allowing snapshot versions (#19320)
* Minor change to Helidon version handling

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

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

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>

* Review comments: fix typo in comment

---------

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2024-08-09 15:59:57 +08:00
Richard Whitehouse
ad7acc30eb
[Rust/Rust Server] Fix example/test code (#19318)
* [Rust Server] Fix code so examples compile

Zero length arrays don't correctly type infer, so if we have no scopes, we need to not create a empty array

We need an authentication middleware - without it the code doesn't compile.

* Update samples

* [Rust Server] Remove trailing whitespace

* Update samples

* [Rust Server] [CI] Build all targets

* [Rust] Fix reqwest test
2024-08-09 15:54:58 +08:00
William Cheng
4b493358a8 update php samples 2024-08-07 18:09:11 +08:00
Stefan Koppier
aea536027c
[bugfix][kotlin-wiremock] fix problems with range responses (#19309)
* [kotlin] Target correct library in jvm-spring-webclient sample

* [kotlin] Fixed warning in jvm-spring-restclient

* [kotlin-wiremock] fixed issue 7193

* [kotlin-wiremock] fixed wrong implementation of fromResponse

* [kotlin-wiremock] forbidden API

* [kotlin-wiremock] fixed wrong workflow trigger
2024-08-07 18:04:05 +08:00
Pavel Miller
908eddea0b
Issue-19220: processing schema name is added to the list with names checked at recursing processing, so it prevent to endless recursive execution (#19221) 2024-08-07 17:48:14 +08:00
Şerban Ghiţă
539aab05a7
[BUG] PHP Client - ObjectSerializer::buildQuery flattens array params resulting invalid URL params (param=a&param=b vs param[]=a&param[]=b) #19233 (#19236)
* [BUG] PHP Client - ObjectSerializer::buildQuery flattens array params resulting invalid URL params (param=a&param=b vs param[]=a&param[]=b) #19233

* Added tests (replaced old provider data). This looks like a breaking change

* Fix space

---------

Co-authored-by: Serban Ghita <serban.ghita@virta.global>
2024-08-07 17:15:59 +08:00
Lajos Szoke
edc60db531
Add ConfigCat to the Companies/Projects using OpenAPI Generator section (#19304)
* Add ConfigCat to the Companies/Projects using OpenAPI Generator section

* Adding ConfigCat to the users.yml and adding a logo
2024-08-07 17:07:24 +08:00
Bruno Coelho
b803af5ddf
[typescript][angular] move api version from license info to readme (#19310)
* [typescript][angular] move api version from header license info to readme

* [typescript][angular] move api version from header license info to readme
2024-08-07 10:12:57 +02:00
congyuluo
f8a5051d9c
Refactored Identifiers (#19270) 2024-08-05 18:20:54 +08:00
William Cheng
eff3e6df53
[cpp-qt] Add option for download progress, add test (#19297)
* add option for download progress, add test

* add cmake file

* remove test

* update
2024-08-05 16:06:36 +08:00
Jazzco
ffd03b7e51
[cpp-qt-client] Qt progress info (#18950)
* Update HttpRequest.cpp.mustache

Use stable 4-parameter connect

* add generated files

* Revert "add generated files"

This reverts commit 1d4e78aa0d42208b576354276c274000c29863f9.

* catch download progress in HttpRequest and pass it to api

* Update HttpRequest.cpp.mustache - clean mixed in changes

Removed additional changes from other PullRequest

* Update HttpRequest.cpp.mustache - replaced tabs by spaces

* Update api-header.mustache - replaced tabs by spaces

* Update HttpRequest.h.mustache - replaced tab by spaces

* ran step 3 from Linux

* changed downloadProgress to -nickname-DownloadProgress and added it to all regions where execution finish is connected

* ran step 3

* replaced tab by spaces

* ran step 3

* activate tracing to detect link issue

* removed redundant connects and encapsulated changes in {{addDownloadProgress}}

* added generated files from step 3

* remove cli-option for httprequest - this should be always there

* added files from step 3

* improved name

* Update samples-cpp-qt-client.yaml - fix parameter order

* Update samples-cpp-qt-client.yaml
2024-08-05 14:40:14 +08:00
William Cheng
25936b4198
Add route4me to the sponsor list (#19294)
* update samples

* add route4me to the sponsor list
2024-08-05 13:07:56 +08:00
Tim Quinn
8f1d59fb0a
Support Helidon SE 4 generation (clients and servers) (#19150)
* Save work-in-progress

* Incoming param handling generating well exc. for file upload

* Revise generated test for v3 vs v4 differences

* Leave details of multi-part handling to the user for now

* change default version to use the highest version known

* SE client changes for Helidon 4

* A few fixes; add new v4 SE samples

* Fix v3/v4 routing prep

* Improve version handling if web site is inaccessible; add test

* Reworking parameter conversion and required and validation handling

* Add generation of a return value record per response for each operation

* Improvements to the result record generation

* More changes

* Remove change in whitespace in v3 output

* More progress on parameter handling

* WIP - refactor parameter-returning methods to inner class along with return records

* Reorg of op helpers

* Use no-op for handling map in path, query, header, cookie - need to revise later

* Binary form param handling

* Clean-up and consistency check bt useAbstractClass and not

* Improve result builders

* Add new samples files

* Fix a few issues

* Update samples after rebase; add build steps for v3 and v4 uac github actions

* Remove v3 se useAbstractClass test - creates some bad code

* Generated doc updates

* Fix missing newline

* Improve Javadoc for generated Result; add convenience Result.send method

* Add bean val. for body param if needed

* Restructure generated records for declared responses; add Generated annotation selectively

* Fix typo

* In sample generation, force a stable generatorVersion value to avoid confusing builds and up-to-date samples checking

* Fix up white space in older generation

* Generate PartsUtils only with useAbstractClass = true

* Adopt some review comments; more to come

* Review comments; notably, switch to using the first path segment to group operations rather than the tags items

* Improve status handling a bit

* Add new generated sample files

* Add missing new samples files

* Quite a few updates, esp. to generated samples

* New config file for sample

* Updates samples

* Add updates to .openapi-generator/FILES contents
2024-08-04 22:06:30 +08:00
Filipe Silva
af94bde2ce
#19176 fix Task.Result directly blocks thread (#19231)
- async should never be blocked on the ApiClient
 To fix we invert the logic and use Task as base and keep consistency, we expect and wait result only on synchronous calls.
2024-08-04 18:33:33 +08:00
Daniel Seiler
2c2d6905cb
fix: remove "hack" to skip schema-mapped models (#19191)
That method relied on the faulty assumption that toModelFilename does not consider mappings, which is not the case for multiple generators.
2024-08-04 18:16:50 +08:00
keenangraham
aa7c62abb7
[BUG] [Python] Fix autoset constants Python code for default query string value (#19138)
* _query_params is list, not dict

* Add test
2024-08-04 18:13:53 +08:00
devhl-labs
aaeed0f5bd
use global keyword (#19257) 2024-08-04 17:55:57 +08:00
devhl-labs
2bc4a16af3
[csharp] Convert numbers to long when min/max is too big (#19290)
* convert numbers to long when min/max is too big

* handle exclusives
2024-08-04 17:50:54 +08:00