20229 Commits

Author SHA1 Message Date
Amin Yahyaabadi
6a3d406690
[cpp-restsdk] add support for oneOf via std::variant (#18474)
* [cpp-restsdk] add support for oneOf via std::variant

* [cpp-restsdk] detect the latest supported C++ standard in CMake

* [cpp-restsdk] add test with oneOf support for cpprest

* [cpp-restsdk] avoid warnings because of implicit this capture

* [cpp-restsdk] avoid deprecated CMake version warnings

* [cpp-restsdk] build the test into the build directory - parallel build

* [cpprest-sdk] use absolute source path for cmake + debug build

* fix: remove inheritance due to template not overriding

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-06-01 17:48:02 +08:00
William Cheng
ca94559fb6
Add tests for Cpprestsdk client in CircleCI (#18817)
* add cpprest sdk test in circleci

* install
2024-06-01 17:31:20 +08:00
Marc Le Bihan
84ce2bfd14
[BUG][C++][cpp-pistache-server] An api receiving a std::optional parameter generates a org::openapitools::server::model::std::optional<...> that doesn't compile #18792 (#18793)
Solving this issue has for goal to reduce the amount of work required to resolve the [[C++] Error making the cpprestsdk generated files](https://github.com/OpenAPITools/openapi-generator/issues/6726)
   and to put the `cpp-pistache-server` generator a the "same compilation problems" level than the `cpp-restsdk` generator in font of the #6726.
2024-06-01 17:04:46 +08:00
Lars van Leeuwen
8783ad8a18
[Python] List enum members in docs (#18804)
* List enum values in docs

* Remove newline

* Remove another newline

* Generate samples
2024-06-01 17:00:11 +08:00
Philzen
e2258fb790
[kotlin-spring] Fix gradle build failure when generated with interfaceOnly=true (#18809)
* Fix kotlin-spring not building when `interfaceOnly=true`

Fixes #18803

* Regenerate fixed kotlin-spring samples

* Include sample kotlin-springboot-request-cookie in CI build check

* Apply suggestions from code review

Co-authored-by: Stefan Koppier <stefan.koppier@outlook.com>

---------

Co-authored-by: Stefan Koppier <stefan.koppier@outlook.com>
2024-06-01 16:55:25 +08:00
Philzen
66126a8ae4
Remove unused test dependencies org.reflections & maven-rewrite (#18798)
* Specify exact relative path to parent pom.xml

* Remove org.reflections from the test stack

* Remove unused parameter

* Remove unused method

* Fix raw use of parameterized variable warning

* Use Files.readString instead of converting raw bytes

* Add test coverage for TestUtils.validatePomXmlFiles(List)

* Reimplement TestUtils.validatePomXmlFiles(List) with Jackson XML mapper

* Remove maven-rewrite dependency
2024-06-01 16:42:26 +08:00
Philzen
6a6f39d6f4
Change/reintroduce junit5 (#18790)
* Revert "Revert back to junit4 (#18786)"

This reverts commit 2471ba2d2e96261941d21eb10648f3d70e969423.

* Make junit engine execute TestNG test cases

* Fix failing test and use tempDir's for test code generation

* Make test fail with helpful info in case generator throws exception

* Suppress error output from TestUtils

* Remove transitive junit4 dependency

* Sync guava-testlib version with guava version

* Add hint regarding alternative for guava-testlib's FakeTicker
2024-06-01 16:40:40 +08:00
devhl-labs
368110a631
[csharp][generichost] Added 4.8 samples (#18791)
* added 4.8 samples

* easer to understand diff

* build samples again

* build samples again
2024-06-01 16:17:58 +08:00
William Cheng
353320cb04
[kotlin] better oneOf, anyOf support (#18382)
* add validteJsonElement

* add oneOf support

* various fixes, add tests

* minor fixes

* minor fixes

* update data class

* remove comments

* array support, add test

* update api client constructor

* add anyOf support

* add new files

* fix merge

* update

* update

* update

* update
2024-05-31 12:22:27 +08:00
William Cheng
1c7e5c4726
add kong as sponsor (#18795) 2024-05-31 00:42:01 +08:00
devhl-labs
b19fc67a53
added framework support (#18776) 2024-05-29 20:58:52 +08:00
William Cheng
2471ba2d2e
Revert back to junit4 (#18786)
* revert junit5 upgrade

* revert upgrade to junit5

* fix kotlin-wiremock template folder

* fix/comment tests

* update
2024-05-29 18:58:44 +08:00
HentaiHeavenVR
edaace9323
Fix TS7053 errors in generated instanceOf* methods (#18770)
* Fix bug referenced in #18746 , introduced in #18418

* Generate examples
2024-05-28 14:18:39 +02:00
Oliver Stevns Larsen
48919ba3d2
Add model name mapping to swift5 client generator (#18780) 2024-05-28 16:48:53 +08:00
devhl-labs
56f301632e
removed warnings (#18775) 2024-05-28 16:41:30 +08:00
dependabot[bot]
1c94576da7
Bump jorelali/setup-elm from 5 to 6 (#18777)
Bumps [jorelali/setup-elm](https://github.com/jorelali/setup-elm) from 5 to 6.
- [Release notes](https://github.com/jorelali/setup-elm/releases)
- [Commits](https://github.com/jorelali/setup-elm/compare/v5...v6)

---
updated-dependencies:
- dependency-name: jorelali/setup-elm
  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-05-28 16:39:01 +08:00
Brais Gabín
c1d0e7c24a
Support nonPublicApi on jvm-retrofit2 (#18769) 2024-05-27 12:22:26 +01:00
Marcel Huber
74a9509e0c
[Java][native] Fix: DateTime in deepObjects is no longer serialized correctly [fix #18742] (#18743)
* fix serialization of OffsetDateTime

* update samples

* wrap import
2024-05-27 16:32:32 +08:00
Philzen
9c999b6559
[General] Remove defunct global property withXml from generator, docs, maven & gradle plugin (#18568)
* Mention that Golang generator also supports XML annotations

Looking at src/main/resources/go/model_simple.mustache and
src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
the GoLang seems to cater for withXml=true

* Fix maven plugin config description for `withXml`

* Add basic test for global withXml setting

* Use global withXml setting if not configured in ConfigOptions

Resolves #3839 and #5764

* Don't generate metadata or other files when only Models are tested

* Reformat table for readability

* Remove global property `withXml` from generator and docs

* Move WITH_XML constant out of system constants block

Currently there is only a single reference to this value in the whole
codebase (GoClientOptionsProvider). Maybe we should re-think how this
file is organised (i.e. provide a clearer split / mapping / understanding
what are system properties vs. global properties vs. configOptions and
where to put them).

* Remove global option `withXml` from Maven plugin (Breaking change)

This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes.

* Remove global property `withXml` from Gradle plugin (Breaking change)

This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes, so they can add it
to the `configOptions` map if required, or simply delete it

* Update samples to reflect removed `withXml` property

* Move `withXml` option into ConfigOptions for Java Microprofile sample

* Remove unused local vars and parameters

* Avoid repetition using fluent assertions

* Remove extraneous debug output
2024-05-27 14:35:32 +08:00
William Cheng
258b7af727 update samples 2024-05-26 21:42:10 +08:00
Aaron Pritzlaff
e6964482b8
Service api fix (#18767)
* moved service api into shared source

* moved service api into shared source

* This Scala cask change makes the service traits available to 
Both JVM and JS platforms.

It does this by moving the api interfaces into the cross-platform
Shared sources
2024-05-26 21:37:35 +08:00
devhl-labs
ee3ff39225
fixed sorting (#18706) 2024-05-26 18:07:31 +08:00
dependabot[bot]
af090fd526
Bump s4u/setup-maven-action from 1.12.0 to 1.13.0 (#18703)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: s4u/setup-maven-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-26 17:54:31 +08:00
Jimmy Praet
6a9b10075e
Make JAX-RS BuilderImpl class non-final to fix WELD-001503 issue (#18724)
Fixes #17875
2024-05-26 16:43:32 +08:00
cvkem
5e8b589bea
Fix rust server auth (#18692)
* Added authentication via Bearer-token api_key and basic for server and client

* Improved errorhandling

* Added check on oAuth audience to example

* Updates of the petstore files for Rust-server

* Moved module import to prevent issue in callbacks

* updated samples

* Fix for unused-qualifications issue

* updated sampmles
2024-05-26 16:04:14 +08:00
Ievgen Rozdymakha
0daf9ffa5b
Fix javaJaxRS template: remove deprecated in JDK9 method usage (#18728)
* Fix javaJaxRS template: remove deprecated in JDK9 method usage

* Fix javaJaxRS api template: regenerate samples
2024-05-26 15:58:41 +08:00
Marcel Huber
728abafdfa
[Java][native] Fix: empty deepObject can produce invalid query [fix #18736] (#18737)
* fix empty query parameter string

* update samples
2024-05-26 15:54:58 +08:00
Jonathan Siegel
77365c34fa
[crystal-lang] Resolve type check compile error in ApiError (#18759)
* Even with .nil? typecheck, compiler still fails due to .empty? call on nillable type. This appears a poor implementation issue by crystal-lang, but this explicit try avoids the issue for now.

* Made call more succinct.
2024-05-26 11:44:07 +08:00
William Cheng
e6fcbcbde0
update crystal petstore tets (#18766) 2024-05-26 11:29:24 +08:00
Jonathan Siegel
e6f372992e
[crystal-lang] Update dependencies to remedy build failure (#18755)
* Updated crystal dependencies to remedy build failure with a mutually conflicting library version.

* Samples updated from running PR-suggested build.
2024-05-26 11:15:13 +08:00
Philzen
22f18fad91
Fix tests for parsing of additional type annotations & refactor test code (#18751)
* Fix tests for parsing of additional type annotations

These were comparing the same things with each other and this could
not fail. Now using (as probably intended by the author) the before
unused ArrayList for assertion of the expectation.

* Remove Exception from signature that is never thrown

* Simplify assertions using AssertJ

* Replace stub implementation with abstract Mockito mock

* Cache flat parsed openapi results for faster test execution

Simply caching any calls to TestUtils.parseFlattenSpec that occur
at least twice.

* Fix some "Raw use of parameterized class 'Schema'" warnings
2024-05-26 10:53:23 +08:00
Philzen
746961d07a
Fix long running test (#18754)
Depending on test exec environment, this test could linger around
for ~8 minutes, b/c pinging test.com will not resolve and run into
seveal timeouts.
2024-05-25 14:28:59 +08:00
Esteban Gehring
7bc2a66065
tiny simplification of typescript-nestjs api.service.mustache (#18749) 2024-05-23 16:52:08 +02:00
Arivanandan
7d3258f155
[typescript-nestjs] Fix template for useSingleRequestParameter (#18744)
* fix: template

* chore: samples
2024-05-23 15:52:31 +02:00
Simon Hanna
f49efe02fd
[typescript/nestjs] remove unused imports and allow async configuration (#18745) 2024-05-23 14:12:26 +02:00
aaronforest-wf
235b57e499
convert all text/* content types to strings in the apache http java client (#18731) 2024-05-23 16:36:34 +08:00
William Cheng
00c1ceffcd
[Java][webclient] update junit to 5.x (#18741)
* webclient: update junit to 5.x

* update samples

* update samples

* update samples

* update samples

* update samples

* clean up

* update samples

* update pom plugin version

* update tests
2024-05-23 16:27:06 +08:00
William Cheng
63d1564637 update C# samples 2024-05-23 14:41:44 +08:00
Omer
a230588aca
Fix build issue when using dotnet 8.0.300 (#18712)
https://github.com/dotnet/sdk/issues/40445
2024-05-23 14:37:26 +08:00
Aaron Pritzlaff
3a232611d2
Added support for freeform types (#18722) 2024-05-23 14:36:50 +08:00
William Cheng
638af0fe37
add it@m to sponsor list (#18733) 2024-05-22 15:24:06 +08:00
William Cheng
8860537e2b update samples 2024-05-22 15:13:38 +08:00
Horace Li
d0a8726580
[java][resttemplate] Fix missing javax validation imports with list validation (#18332)
* Fix java list validation

* Fix java list validation

* Fix java list validation

* Fix java list validation
2024-05-22 15:07:42 +08:00
Philzen
1d96c770f9
Update PR template with latest minor version reference (#18729) 2024-05-22 11:34:58 +08:00
William Cheng
ea7609f35b
update requests in python-fastapi to newer version (#18726) 2024-05-22 00:37:02 +08:00
Renato Mameli
bfa26ea6be
Add missing underscores for PascalCase enum values #4837 (#18594)
Co-authored-by: Renato Mameli <renato.mameli@teamviewer.com>
2024-05-21 15:29:34 +08:00
William Cheng
9398c6444a update samples 2024-05-21 14:58:21 +08:00
Evgenii
73598b9dbb
[REQ] [ASPNETCORE] Add value types for the ASPNETCORE generator (#18646)
* Add value types for the ASPNETCORE generator

* generate samples
2024-05-21 14:45:54 +08:00
devhl-labs
ede6458d19
[csharp][generichost] Remove discriminator property (#18445)
* fixed nullability

* minor refactor to address a comment

* removed discriminator property

* update more manual tests

* update more manual tests

* added tests and bug fixes

* fixed allof

* reworked manual tests to compare json instead of classes, reworked discriminator logic

* removed unneeded code
2024-05-21 14:32:12 +08:00
Stefan Koppier
27120357aa
[kotlin-wiremock] New generator for generating WireMock stubs using Kotlin (#18705)
* [kotlin] Target correct library in jvm-spring-webclient sample

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

* [kotlin-wiremock] added generator and sample

* [kotlin-wiremock] First version with petstore

* [kotlin-wiremock] Small typo

* [kotlin-wiremock] Added echo-api test

* [kotlin-wiremock] Split stub and stub builder

* [kotlin-wiremock] Added default values and jackson annotations to models

* [kotlin-wiremock] Small default value fix

* [kotlin-wiremock] Use Gradle wrapper version in samples-kotlin-server GitHub workflow

* [kotlin-wiremock] Added default artifact name

* [kotlin-wiremock] Added kotlin docs

* [kotlin-wiremock] Fixed capitalization in kotlin docs

* [kotlin-wiremock] Added kotlin-wiremock echo_api sample to GitHub workflow

* [kotlin-wiremock] Added new generator to README.md

* [kotlin-wiremock] Generated docs

* [kotlin-wiremock] Generated docs (missed commit)

* [kotlin-wiremock] Explicit Gradle wrapper version in kotlin server generators

* Revert "[kotlin-wiremock] Explicit Gradle wrapper version in kotlin server generators"

This reverts commit 71e1c47def93fdcb9c7e4efe999fc34e21d7518c.

* [kotlin-wiremock] Revert Gradle in workflow samples-kotlin-server and moved kotlin-wiremock samples to separate workflow

* [kotlin-wiremock] Use Java 11 instead of Java 8

* [kotlin-wiremock] ensure-up-to-date
2024-05-21 13:53:44 +08:00