19357 Commits

Author SHA1 Message Date
loicconan
cb85358aa5
[PHP-SYMFONY] Debug Date and DateTime Assert (#16874) 2023-10-23 22:26:27 +08:00
Austin Ziegler
cdbb73aa55
Prevent direnv errors when not using nix (#16875)
Right now, if a developer uses `direnv` but does not use `nix`, an error
is reported whenever changing into the OpenAPI generator directory:

```console
$ cd ~/oss/forks/openapi-generator
direnv: loading ~/oss/forks/openapi-generator/.envrc
direnv: using flake
environment:1270: nix: command not found
```

This uses the `has()` function to check for `nix` to *conditionally* run
the `use_flake` function.
2023-10-23 22:07:34 +08:00
Ivan Giuliani
ae590c4712
[Ruby] Add support for populating a gem metadata (#16872)
* [Ruby] Add support for gems metadata

This defaults to an empty hash, but can be overridden with any custom
object by the callers via the `gemMetadata` property.

* Regenerate samples

The gemspecs files will now include a metadata field
2023-10-23 22:05:19 +08:00
Alexander Spivak
f16744a2bb
Update ktor client version for custom plugin support (#16869)
* Update ktor-client version to 2.3.5

* Update ktor-client version to 2.2.3
2023-10-23 22:03:54 +08:00
Ian Cubbon
bf9fae641e
[Go-Server] Add support for DateTime Query Parameters (#16749)
* Add support for DateTime objects in the Path, Query Params, and as a List

* Fix indentation

* Add an exaple that has dateTimes
Move the date parsing into a common util in the routers.go file.

* Fix compilation issue and regen

* Use the `RequiredError` to handle this case

* Only split on a "," and not an extra 'space' after the ",".
2023-10-22 21:07:13 +08:00
dependabot[bot]
5f71bb9afa
Bump jurplel/install-qt-action from 3 to 4 (#16885)
Bumps [jurplel/install-qt-action](https://github.com/jurplel/install-qt-action) from 3 to 4.
- [Release notes](https://github.com/jurplel/install-qt-action/releases)
- [Commits](https://github.com/jurplel/install-qt-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: jurplel/install-qt-action
  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>
2023-10-22 21:05:45 +08:00
Thomas Trapanese
7347daec61
fix(nestjs) fix import in api module template (16670) (#16671)
* fix(nestjs) fix import in api module template (16670)

* fix(nestjs) fix import in api module template (16670)

---------

Co-authored-by: Thomas Trapanese <thomas.trapanese@maggioli.it>
2023-10-20 18:31:30 +02:00
Emanuele Saccomandi
77687a8ea5
[zapier] Zapier generator minor fix (#16845)
* fixed childMapping method

* updated samples

* fixed deps
2023-10-18 21:47:18 +08:00
Ben Madore
d6421411c9
chore: remove unused commons logging imports from java webclient (#16839)
Co-authored-by: Ben Madore <ben.madore@glassdoor.com>
2023-10-17 13:33:34 +08:00
Bhargav P
8feef52d6b
[Bug] [Java] Upgrade Guava version to 32.1.3 (#16833)
* #16832: Upgrade Guava version to 32.0.1

* #16832: Upgrade Guava version to 32.1.3
2023-10-17 13:31:59 +08:00
Ian Cubbon
e0738a6e42
[Go-Server] Support for an endpoint returning a file to the client - #15206 (#16748)
* Support for an endpoint returning a file to a client.

* Spaces to tabs conversion

* Add an example endpoint for download a file

* Regenerate after merging main
2023-10-17 11:42:27 +08:00
Ian Cubbon
1dd9590064
[Go-server] - Support for Enums in the Path and Query (#16781)
* Add support for Enums to be part of the Path and Query
Supports optional Query Enums and Lists of Enums as well
Add an example endpoint that covers the added scenarios
Added an import mapping for the GoServerCodegen for "fmt"
    when a model is an enum.
Expanded the Enum Model for the Go Server to have validation.
    Copied this logic from the Go Client Enum Model.

* Fix identation of examples

* Pre-allocate the capacity of the slice of Enums to be
the correct size.

* Formatting and updated examples

* Empty-Commit

* Switch to using a map to store the valid enum values

* Fixed pointer derefs missed from previous change in PR

* More fixing of pointer to not pointer

* Create a map for validation and a list of enums for messaging
2023-10-17 11:35:39 +08:00
Josh Raker
d1fa38e286
[BUG][GO] Add support for all +json and +xml suffixed media types (#16816)
* Add support for all +json and +xml suffixed media types to generated Go client

* Export JsonCheck and XmlCheck and add external tests

* Remove client_test.mustache
2023-10-17 00:47:09 +08:00
Prashant Pant
2f214ee6c6
Autoset constants (Required fields having single valid enum value) (#16761)
* Autoset constants (Required fields having single valid enum value) Python Implementation of #16547

* Fixing ``PythonClientCodegenTest.testHandleConstantParams`` for Windows platform.
2023-10-16 22:47:59 +08:00
DaxServer
8bb473316e
[PHP-Symfony] fix #15950: Add float to deserialize (#16835)
* [PHP-Symfony] fix #15950: Add float to deserialize

* Add test sample

* Add double

---------

Co-authored-by: DaxServer <daxserver@icloud.com>
2023-10-16 22:19:33 +08:00
martin-mfg
b6db4f73f1
[JAVA] fix: oneOf generates incorrect model for primitive types (#16834)
* generate samples

* try fix

* add new sample for fixed case

* also improve native library

Other libraries don't need fixes.

* add oneOf_twoPrimitives.yaml

* generate samples

* resolve comment
2023-10-16 22:18:52 +08:00
Robert Schweizer
438bf25a47
chore: Simplify async/non-async api method templates (#16820) 2023-10-15 10:44:43 +08:00
William Cheng
769990d654 Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2023-10-15 10:44:22 +08:00
William Cheng
694f5a05a1 fix TC table format 2023-10-15 10:44:15 +08:00
Josh Raker
c5d6884c63
[BUG][GO] Replace references to sw package with {{packageName}} in README template (#16812)
* Replace references to sw package with {{packageName}}

* Update samples
2023-10-15 10:37:27 +08:00
William Cheng
8db9af9873 fix broken link to conan.io 2023-10-15 10:35:49 +08:00
Kasper Rune Søgaard
1fc0cec75f
[CSHARP] Added support for nullable Enums in the ToJsonValue method (#16801)
* Fixed C# nullabled enums and attribute reusage for generichost

* Samples
2023-10-15 09:59:22 +08:00
Beppe Catanese
b4f9d8103f
[Postman Collection] Fix path parameter syntax (#16827)
* Format Postman request url

* Generate schema
2023-10-15 09:35:57 +08:00
Yuriy Belenko
3bc4f67333
[php-nextgen] Remove deprecated @category phpdoc (#16829)
* [php-nextgen] Remove deprecated @category phpdoc

@category tag is deprecated accordingly to:
* [PhpDocumentor](https://docs.phpdoc.org/guide/references/phpdoc/tags/category.html)

* Refresh samples
2023-10-15 09:35:02 +08:00
Gonzalo Gomez
571aefa3da
io/ioutil has been deprecated. (#16822)
Uses os.CreateTemp to create temp directory.
Uses io.Copy to avoid reading file into memory.
2023-10-14 10:04:06 +08:00
William Cheng
ba367e60e8
[go-server] Add tests, minor format change (#16805)
* add tests for #16787, minor format change

* revert

* fix typo

* use pet instead of fake

* update samples
2023-10-12 19:23:02 +08:00
William Cheng
75ce5968bf
update python technical committee (#16806) 2023-10-12 18:33:47 +08:00
ErikBooijMB
1dfdeaff59
Fix missing newline for file array in go-server/controller-api.mustache (#16787) 2023-10-12 16:20:01 +08:00
William Cheng
34265e52b1
add rule to skip xUnit1031 (#16804) 2023-10-12 15:56:27 +08:00
devhl-labs
2cfce7cd2d
version bump (#16657) 2023-10-11 16:16:06 +08:00
Valerio Santinelli
e3958cba75
Added support to skip creation of go.mod and go.sum in the Go client generator (#16766)
This adds support to avoid generating go.mod and go.sum for Go client.

By default it is set to true to keep compatibility with previous version
of the tool.

It can be set to false using --additional-properties=withGoMod=false
2023-10-11 16:00:19 +08:00
William Cheng
fe55938363
better NPE handling, log warn for const in 3.1 (#16786) 2023-10-11 15:58:29 +08:00
William Cheng
015f000f70
add mapping options to zapier client generator (#16785) 2023-10-11 15:18:45 +08:00
Robert Schweizer
384ff941ae
fix: Merge conflict from #16779 and #16777 (#16784) 2023-10-11 15:14:01 +08:00
Robert Schweizer
2b6b3b0883
[python] Do not pydantic-validate function args twice (#16776)
* refactor: Use newlines in _with_http_info call

This prevents too-long lines and matches the style that
black would enforce.

* fix: Do not pydantic-validate function args twice

Closes #15757
2023-10-11 13:57:52 +08:00
Emanuele Saccomandi
bbf9ccd0c0
fixed zapier objects array mapping (#16780) 2023-10-11 13:56:16 +08:00
Robert Schweizer
f180aa0eec
[python] Fix unnamed dicts with additional properties (#16779)
* test: Add two extra models for testing

* Fix unnamed dicts with additional properties

Closes #16630
2023-10-11 13:55:53 +08:00
Robert Schweizer
7af459396c
docs: Improve docstring in to_dict() method (#16777)
It was often confusing to me why this method is even there.

Also using more line breaks and matching how black would format this.
2023-10-11 13:51:37 +08:00
Ghufran Zahidi
1bbbb73690
fix ecdsa signing issue. (#16772) 2023-10-10 18:36:41 +08:00
Robert Schweizer
f03cbea971
feat: Add line breaks in Python API methods (#16770) 2023-10-10 18:32:52 +08:00
Robert Schweizer
9e07f85eb5
[python] Add tests and fix enum path parameters (#16769)
* test: Tests for enum params in path, query and header

* fix: Get enum ref values correctly in path parameters

Closes #16688

* fix java tests failure

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-10-10 17:10:30 +08:00
William Cheng
7bb75f4bb4 uncomment ruby test 2023-10-10 14:58:01 +08:00
Robert Danci
87f9d53c3a
[Java][client] Fix feign classcastexception when getting headers (#16745)
* Avoid ClassCastException when getting headers (the header values are Collection<String> and not List<String>)
Delete unused classes

* Remove feign10x

* Add unit test
Refactor to avoid creating the headers map when ApiResponse is not used
2023-10-10 14:53:32 +08:00
SURAJ VASHISTA B K
494ee489ad
fixed a flaky test org.openapitools.codegen.DefaultCodegenTest.testVarsAndRequiredVarsPresent (#16751) 2023-10-10 13:31:22 +08:00
somethingvague
594308f821
Fix log statement (#16768)
The current log statement prints "%s", updating to properly include the parameter
2023-10-10 11:34:58 +08:00
William Cheng
4a17c22905
fix object serializer, update tests in php nextgen (#16764) 2023-10-10 11:31:38 +08:00
Tiago
3e9dba01ee
Fix ruby httpx test (#16765)
* fix setup of body params (may be nil)

* fix httpx adapter issues

treating DNS resolution errors as ConnectionFailed; removing multipart header set by the openapi-generated code, as it does not contain boundary, and interferes with the generation from httpx, which appropriately deals with mime-types already
2023-10-10 11:31:08 +08:00
William Cheng
23c5db602f
Update ruby httpx petstore test (#16753)
* update ruby httpx petstore test

* fix pom

* comment out ruby httpx tests
2023-10-09 15:43:21 +08:00
martin-mfg
e3db882ed4
[JAVA][KOTLIN][SPRING] upgrade dependencies (#16759)
* upgrade spring-boot-starter-parent

* upgrade springdoc and swagger-ui

* upgrade v3 swagger-annotations

* generate samples

* upgrade jackson

* fix spring cloud, remove temp comment

Putting "8" instead of "1.8" should be ok, because Spring Boot 3 requires Java 17 anyway, so it should be able to understand that 8 is the same as 1.8.

* generate samples

* upgrade JUnit 5, remove commons-io dependency, remove outdated samples/client/petstore/java/feign/feign10x/ files, generate samples

commons-io dependency was introduced in https://github.com/OpenAPITools/openapi-generator/pull/8484, but I don't see why it would be needed now or back then.

* update gson, generate samples

* update logback

* update feign

* update scribejava

* generate samples

* update httpmime

* okhttp-gson: update commons-lang & okhttp & junit-platform, remove mockito; generate samples

It seems Mockito is not used at all there.

* okhttp-gson: remove unnecessary sample files, generate sample files

* upgrade google-api-client & jersey-common, restore ClientTest, generate samples

* misc. upgrades in jersey2 and jersey3

jersey 3.1.3 is available already, but IntelliJ reports security problems in 3.1.3 and 3.1.2, so I used 3.1.1 instead.

* align some gradle&sbt files with poms, generate samples

* whitespace fix
2023-10-09 14:55:32 +08:00
William Cheng
48f454cf72
fix type, update tests in php nextgen (#16758) 2023-10-09 14:40:34 +08:00