13645 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Paul Parenko
9a35914f0c
PR for openapi-generator-maven-plugin inputSpec -- Allow jar: URLs (#18576)
* Added support for <inputSpec/> arguments of JAR URLs.
E.g., jar:jar-specific-uri!/spec.yml.

* Resolve and search COMPILE dependencies for inputSpec resource.

* Added test cases for openapi-generator-maven-plugin:generate input
specifications:

* URLs of the form jar:jar-specific-uri!/spec.yaml

* Resources on the compilation classpath

in addition to the existing FILE test case.

* Check for inputSpecFile existence

else it is a remote URL && url is not empty

* replaced deprecated usage

* use Unix separators when on win-os

* example with jar inputSpec

* Comment not required anymore

Was introduced with #7587 could be removed with #10544

* referenced same maven version

these artifacts are referenced by same ${project.version} in https://github.com/apache/maven/blob/master/pom.xml

* updating maven dependencies to 3.9.6

---------

Co-authored-by: Allen D. Ball <ball@hcf.dev>
2024-05-21 13:51:52 +08:00
William Cheng
741bf0c035
Prepare 7.7.0-SNAPSHOT (#18709)
* Revert "7.6.0 release"

This reverts commit d76f9d32d11a03be2b40ebff728ef0ff86332fcb.

* prepare 7.7.0 snapshot in master

* update samples
2024-05-20 17:27:17 +08:00
William Cheng
ab7d0cb74f
7.6.0 release (#18708) 2024-05-20 15:26:08 +08:00
Gonzalo Gomez
ef0d10df8d
Use time.RFC3339Nano instead of time.RFC3339, do not want to loose the millisecond resolution. (#18673) 2024-05-19 17:53:51 +08:00
Pavel Miller
33617ee867
Improve generation of selected models with dependent models (#18462)
* Issue-18444: recursively trace variables and support of new option

* Issue-18444: suppoting inheritance, but interfaces

* Issue-18444: build project instructions executed

* code review from wing328: tab-spaces removed

* code review by wing328: added a line of comment for the private method
2024-05-19 17:46:50 +08:00
Aniokrait
9b0ca06442
[html2] Change to correct variable (#18685) 2024-05-19 17:46:27 +08:00
Vasiliy Ditsyak
3d15864eac
[dart-dio] Incorrect hashCode and == overide for fields withList (#18198)
* [dart-dio] Incorrect hashCode and == overide for fields withList

* fix

* extend description

---------

Co-authored-by: Vasiliy Ditsyak <vasilich6107@users.noreply.github.com>
2024-05-19 17:35:25 +08:00
RiccardoPetteruti-Onfido
8924083d73
Ruby: Fixed CodeQL polynomial regexp (#18699) 2024-05-19 17:28:04 +08:00
Kalvin Pearce
e9f961e36e
[rust-axum] Split up api trait per tag (#18621)
* [rust-axum] Feat: split up api trait per tag

* [rust-axum] Fix: missing types in api files

* [rust-axum] Fix: add samples output

* [rust-axum] Feat: handle mutli tagged operations

* [rust-axum] Fix: spacing between generated operations

* [rust-axum] Fix: coding standards
2024-05-19 17:13:01 +08:00
Kaido Iwamoto
57dceae4ad
Improve typescript-fetch code generation for oneOf cases without discriminator (#18702) 2024-05-18 11:11:34 +02:00
Marcus Pasell
62238c6886
[typescript-fetch] Make instanceOf infer type and check for undefineds (#18694) 2024-05-17 17:22:32 +02:00
William Cheng
2fe397cb3e
synn beea validation template (jaxrs) (#18697) 2024-05-17 17:39:59 +08:00
Jeffrey Yasskin
7e94c873f7
Add typescript 5.x as an allowed version. (#18674)
* Add typescript 5.x as an allowed version.

* Adjust version ranges to keep tests passing.

* Update the typescript-rxjs sample.
2024-05-15 22:09:55 +02:00
Nikita Shmakov
70130edaab
Properties with custom types inheritance fix (#18052)
* custom types support in inheritance fix

* files changed after scripts run

* remove unused method

* move cloneSchema to ModelUtils

* imports

* changes after scripts run

* test cloning array of enums schema
2024-05-15 19:44:39 +08:00
Miroslav Šedivý
014cd2cb2b
typescript-axios: withSeparateModelsAndApi - use import types properly. (#18625) 2024-05-15 11:30:18 +02:00
Aviv Levitski
affb6bc1f7
[GO] Add assert constraints checks for complex types in the model template (#18654)
* [GO] Add assert constraints checks for complex types in the model template

* [GO] Update samples

* [GO] revert AssertRecurseInterface naming
2024-05-15 16:59:35 +08:00
William Cheng
a9b1f93d65
clean up samples, update test spec (cpp-restsdk) (#18675) 2024-05-15 15:09:17 +08:00
Marc Le Bihan
1fa2d474b4
[[BUG][C][cpp-restsdk] Missing Set.h when trying to generate from Twitter OpenAPI JSON #9969](https://github.com/OpenAPITools/openapi-generator/issues/9969) (#18631)
- Handling `std::set` in cpp-restdsk
    - Member variables using `std:set` added to `Pet` in cpp-restsdk 3.0 Petstore sample

[cpp-pistache-server] taking into account a remark on this issue about cpp-pistache-server and its set management

    - Switching `std::vector` to `std::set` for openapi set type in cpp-pistache-server
2024-05-15 14:51:59 +08:00
William Cheng
4e61738348
upgrade microprofile to junit5 (#18669)
* upgrade microprofile to junit5

* re-generate samples

* fix junit(DOT)version

* update tests for java microprofile server

* update samples

* update

* update

* update

* update

---------

Co-authored-by: Thorsten Hirsch <t.hirsch@web.de>
2024-05-14 18:21:19 +08:00
William Cheng
cc5c50b227
update cpp-restsdk to use 3.0 petstore spec (#18670) 2024-05-14 17:15:36 +08:00
William Cheng
09be19cef7
upgrade okhttp-gson and google-api-client to junit5 (#18668)
* upgrade okhttp-gson and google-api-client to junit5

* add changes in StringUtilTest

* use https instead of http to fix 301 (moved) error

* revert petstore test server url to http://petstore.swagger.io and regenerate samples

* synced gradle/sbt/pom, re-generated samples

* revert removal of port 80 from test url

* udpate google api client tests

* update sha

* update comment

---------

Co-authored-by: Thorsten Hirsch <t.hirsch@web.de>
2024-05-14 17:04:33 +08:00
Rohit Sanjay
ed33b86205
Use pascal case instead of double lambda (#18667)
Co-authored-by: Rohit Sanjay <rohitsanjay@Rohits-MacBook-Pro.local>
2024-05-14 14:41:57 +08:00
William Cheng
926a07fe4d
Add tests for @Valid (enum) (#18664)
* add tests for #18430

* add new filies
2024-05-14 12:57:41 +08:00
CREKD
d5559d5e65
Remove @Valid even for enum types defined in components (#18451)
* Update beanValidation.mustache

* step 3

* Revert "step 3"

This reverts commit 73ba918d36e55a440da6435392729c1997266863.

* update mustache

* #

* isContainer

* step3

* ^

* fix
2024-05-14 11:56:53 +08:00
William Cheng
51ef8683fb
[java] implement #18032 add builder pattern to java client and spring generator (#18650)
* add builder pattern to java client and spring generator

* regenerate samples

* update doc

---------

Co-authored-by: jpfinne <jeanpaul@finne.be>
2024-05-14 11:38:30 +08:00
Alex Jones
2f734515a1
fix: Null example values generated for enum properties (#18623)
* Fix null example values being generated for enum properties

* Update examples

* PRFB: use isEnumSchema
2024-05-14 11:31:22 +08:00