20678 Commits

Author SHA1 Message Date
Louis Sullivan
e370b8130a
Updated pyyaml and httptools in requirements template (#19666)
Co-authored-by: Louis Sullivan <Louis.Sullivan1@ibm.com>
2024-09-24 23:35:15 +08:00
Wiktor Kwapisiewicz
5732e2758f
rust: Implement Display instead of ToString for enums (#19611)
Rust docs for `ToString` explicitly recommend implementing `Display`:

> This trait is automatically implemented for any type which implements the Display trait. As such, ToString shouldn’t be implemented directly: Display should be implemented instead, and you get the ToString implementation for free.

See: https://doc.rust-lang.org/std/string/trait.ToString.html
See: https://github.com/Nitrokey/nethsm-sdk-rs/pull/33

Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
2024-09-24 21:07:12 +08:00
Sergei Lebedev
7d8eacc197
[cpp-qt-client] New makeOperationsVirtual option (#19613)
* Implementation of new `makeOperationsVirtual` option

* Make new parameter `true` by default

* Fix default value set and regenerate samples
2024-09-24 01:05:07 +08:00
Julian Vennen
78f2f7010f
[PHP] Add missing qualifier for enum parameters (#19567) 2024-09-23 16:17:52 +08:00
William Cheng
98783f8161
use debug instead of warn,error to show less log (#19646) 2024-09-23 13:28:53 +08:00
William Cheng
565af33e24
Make it easier to specify triggers for Zapier (#19645)
* chore: add triggers

* update samples

---------

Co-authored-by: Stephen (Alex) Wallen <wallenstephen@outlook.com>
2024-09-23 12:03:44 +08:00
William Cheng
b42027da5d update aspnetcore samples 2024-09-23 02:00:54 +08:00
Richard Whitehouse
fb36272358
[Rust Server] Handle arrays in forms (#19625)
* [Rust Server] Handle arrays in forms correctly

* [Rust Server] Add tests

* Update samples
2024-09-23 00:20:48 +08:00
Richard Whitehouse
8821cf095e
[Core/Rust Server] Check references in additionalProperties correctly when checking freeForm status (#19605)
* Check references in additionalProperties correctly

Handle references in additionalProperties correctly when determining free-form status

* Update samples
2024-09-23 00:19:27 +08:00
Beppe Catanese
e1a1d7ab5a
Uncomment File::deleteOnExit (#19624) 2024-09-23 00:18:06 +08:00
Liri S
b4edca5ad4
Use multiline comments for examples in csharp generator (#19079)
* multi

* gen
2024-09-22 23:27:47 +08:00
David Riddervold Marconis
eebecc8646
[aspnetcore] Fix issue #19592 regarding swagger xml comments (#19593) 2024-09-19 13:10:14 +08:00
William Cheng
3240c5baf0
update org.springdoc:springdoc-openapi-webmvc-api, ui to 2.6.0 (#19620)
* update springdoc-openapi-starter to 2.6.0

* pre-populate info if its not defined

* update kotlins spring dependencies to newer version
2024-09-19 12:37:56 +08:00
un1024
410113fd6d
[kotlin-spring] fix springdoc dependencies (#19579)
* fix springdoc dependencies for kotlin-spring

* fix suffix core to api.
2024-09-19 11:19:42 +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
Joscha Feth
0f561b05cb
chore: pull request template mentions an old current version (#19609)
Replaces `7.6.0` with `7.x.0`
2024-09-19 09:33:02 +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
William Cheng
b3e72feaa9 update java samples 2024-09-18 16:14:47 +08:00
Samuel Lijin
07787973e8
fix: make generated java readme use correct package (#19563) 2024-09-18 16:03:33 +08:00
Richard Whitehouse
d03c90cb97
[Rust Server] Handle additional properties being nullable (#19594)
With:
```
    sampleObject:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/SampleData'
      minProperties: 1
      description: Map of Charging data policy decisions.
```

and
```
    SampleData:
      type: object
...
      nullable: true
```

We currently generate: HashMap<String, SampleData>, which doesn't allow
null charging data entries. This MR changes this to be
`HashMap<String, swagger::Nullable<SampleData>>`, which thus will allow null data entries.

We do this by moving null-handling to the Java code - primarily `getTypeDeclaration()`.

Note, to some extent this is wrong. In this MR (and previously) we are treating
`nullable: true` as an extrinsic property (like required), whereas it should be an
intrinsic property (and thus `HashMap<String, SampleData>` is correct, but `SampleData`
absorbs the nullability.

This would be possible with this code:

```
enum ChargingData = {
   Null,
   Present {
       ...
   }
}
```

Which would remove the usage of https://docs.rs/swagger/2.0.2/swagger/nullable_format/enum.Nullable.html.

I haven't resolved this - and have instead done a more targeted fix.

This, along with some other crude code, creates a scenario where we need to
unpick whether something is null. I've left that, though flagged a TODO to tidy it up at some point.
2024-09-18 15:25:06 +08:00
Richard Whitehouse
f07f8bc997
[Rust Server] Add derive of Hash to enums (#19603)
* [Rust Server] Add derive of Hash to enums

* Update samples
2024-09-18 15:23:27 +08:00
Richard Whitehouse
cf5d17bbfe
[Rust Server] Convert Rust comment to Mustache (#19595)
* [Rust Server] Convert Rust comment to Mustache

The comment about auth types supported by the generator shouldn't be
included in the generated code as it's confusing when the API doesn't
support the same auth types.

As such, we convert it from a Rust comment to a Mustache comment

* Update samples
2024-09-18 15:22:51 +08:00
Joscha Feth
0b084cd75d
[typescript] fixture: broken Array<Array> (#19548)
* [typescript] fixture: broken `Array<Array>`

* Delete samples/client/others/typescript/builds/array-of-lists/models/L.ts

* fix: remove incorrect mapping

* chore: update generated code samples
2024-09-17 15:04:04 +02:00
Rasmus Zweidorff Iversen
fd85359548
[Java] [apache-httpclient] Fix issue with toString causing wrong value with collections (#19576)
* Fix issue with toString causing wrong value with collections

With collections, calling toString will result in the value becoming [a,b] instead of just a,b.

Using the existing apiClient::parameterToString method ensures it gets parsed correctly if it is a collection

* Updated samples

---------

Co-authored-by: Rasmus Zweidorff Iversen <rzi@jysk.com>
2024-09-17 17:57:35 +08:00
dependabot[bot]
30b1a74979
Bump actions/setup-go from 3 to 5 (#19597)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 10:42:21 +08:00
rankoz
ff1fe256d8
Fix dictionary/map deserialization (#19496) 2024-09-16 23:18:04 +08:00
Csaba Kozák
1b30c1995f
[kotlin-client][multiplatform] add support for kotlinx.datetime.LocalTime (#19590) 2024-09-16 16:10:32 +01:00
Julian Vennen
3832cb4eb7
[PHP] Update enum tests (#19591) 2024-09-16 19:48:58 +08:00
Eric
425aa7db44
[Kotlin] Add a new additional property to configure Jackson's failOnUnknownProperties (#19506)
* [Kotlin] Add a new additional property to configure Jackson's `failOnUnknownProperties`

Default to false

* [Kotlin] Unconditionally import `com.fasterxml.jackson.databind.DeserializationFeature`

* [Kotlin] Refactor and add test
2024-09-16 17:59:17 +08:00
Julian Vennen
0c5142a6f6
[php-symfony] Fix #19562 (#19568) 2024-09-16 17:41:49 +08:00
Julian Vennen
a5384d42b4
[PHP] Remove NUMBER_ prefix from enum vars if a name is provided, show enum descriptions (#19555)
* Remove NUMBER_ prefix from enum vars if a name is provided, show enum descriptions

* Update php model tests
2024-09-16 17:23:11 +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
cf9de0bf94
Correct package name in test (#19581) 2024-09-16 16:52:19 +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
Beppe Catanese
2f179fe41d
[Go] Verify content of Go server generated files (samples) (#19504)
* Add Python tests to verify generates Go files

* Run Python tests during CI

* Remove Python tests

* Add Go tests

* Update workflow to run Go tests
2024-09-16 16:48:30 +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
Joscha Feth
5c6b8f3b16
docs: add hint about how to attach VSCode to the suspended Java process (#19551) 2024-09-12 16:59:57 +08:00
Nelson Vides
d02aae7469
Erlang Server – cowboy return types improvements (#19561)
* Declare the correct types for cowboy rest requests

* Adding myself to the erlang team
2024-09-12 16:59:06 +08:00
Hidetoshi
ca378b424a
[typescript-axios] fix: enum datatype jsdoc (#19570) (#19571)
* fix: enum dataType JSDoc

* chore: generate samples
2024-09-12 12:59:40 +08:00
Lili Shi
0e763b096e
[swift5] Fix Xcode 16 compilation crash with Extensions.swift generation (#19564)
* Update Extensions template for Swift5 generation

* update samples
2024-09-11 08:59:23 +01:00
Julian Vennen
1658264261
Regenerate php-nextgen-sample (#19556)
* Regenerate php-nextgen-sample

* Add missing changes
2024-09-10 14:32:30 +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
Evgeny Shichenko
0026e15030
fix kotlin spring boot configuration conflict (#19515) 2024-09-09 11:03:18 +08:00
William Cheng
8511a533d6
add erlang-server-deprecated for fallback after refactoring (#19547) 2024-09-07 17:18:06 +08:00
Nelson Vides
596d446f54
Erlang server overhaul (#19465)
* Upgrade erlang-server code generation and fix is_authorized crashes

* Introduce structured logging

* Improve general formatting

* Update generated files

* Enable erlang server on CI

* Add echo-server testing to CI

* Require OTP27 explicitly in the generated rebar.config file

* Rework handler and API

With this work, json validation becomes optional, fully implemented in
the `_api` module as it was before, but without being forcibly called by
the `_handler`. It is instead left as optional for the user to take
advantage of the exposed callbacks. Jesse also chooses draft-06 as a
default, but these can be chosen manually by the user too, as long as
jesse implements them.

`_handler` also becomes lighter, it now handles all mime types
transparently by forwarding to a user-given module that must implement
`accept_callback/4` and `provide_callback/4` as described in the
`_logic_handler` callbacks. These will simply be the return values of
cowboy_rest's `content_types_accepted` and `content_types_provided`
respectively, and should simply comply with their defined APIs. They
only get two parameters extending the behaviour, so that the user-given
callback can pattern-match on them: the path prefix of the logic
handler, and the operationID of the call.

* Fix return types for provide_callbacks

* Upgrade jesse to incur no dependencies

The less dependencies the built code requires the better.

* Fix dialyzer errors in the generated code

* Apply stronger dialyzer checks
2024-09-07 16:45:42 +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