1236 Commits

Author SHA1 Message Date
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
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
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
Tim Quinn
0e05cf26d9
Add support for Helidon 4 MP client and server generation (#18627)
* Add support for Helidon 4 MP client and server generation

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

* Rerun samples generation trying to fix spring jobs

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

* Update copyright

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

* Correct the copyright notice

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

---------

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
2024-05-12 16:49:28 +08:00
kiwi-oss
dec8a430df
[Microprofile] Add option to use tags a client keys and server generator (#16673)
* [Java/Microprofile] Add support for Jackson serialization & async interfaces using Mutiny in Java Microprofile library

* Regenerate samples & docs

* Add server generator

* Update client to set configKey by classname

* Remove debug remains and comments

* Adapt method override to upstream changes

* Regenerate samples

* Revert "Regenerate samples"

This reverts commit b5bcbdea90c71a2819a3ea6339c3878f249f97b4.

* Move additional 2xx response to dedicated OpenAPI document

Some other generators than those for Micronaut don't seem to be able to
handle this case, so we don't add it to the general pet store document.

* Make filename consistent with other files in the folder

* Regenerate Microprofile client and server samples

* Generate samples

* Update documentation

* Generate samples

* Remove left-over `*.orig` files from Git merges

* Regenerate samples

* Regenerated samples

* changed generator name to "java-microprofile"

* added the new folder to .github/workflows/samples-java-server-jdk8.yaml so that CI will test it moving forward

* Renamed JavaMicroprofileServerCodegen.java

* regenerated samples

* only enable configKeyFromClassName if configKey is not set

* Updated documentation

* Change samples to use junit 4

* Fix junit 4 test classes

* run ensure up-to-date script

* fix kotlin test errors

---------

Co-authored-by: pravussum <pravussum@users.noreply.github.com>
Co-authored-by: frank <frank.buechel@kiwigrid.com>
Co-authored-by: Oscar <oscar.obrien@kiwigrid.com>
Co-authored-by: oscarobr <133783370+oscarobr@users.noreply.github.com>
2024-05-07 16:24:23 +08:00
Marc Le Bihan
fde8c772fb
[BUG] [C++][Pistache] cpp-pistache-server generating API include unde… (#18553)
* [BUG] [C++][Pistache] cpp-pistache-server generating API include undefined "Object.h" (#2769)

Should handle Object.h, AnyType.h correctly. Set.h also tested.

   - #include Object.h removed and replaced by a typeMapping.put(object, nlohmann::json) like suggested in other issues
   - object had an invalid syntax: ':' instead of '::' in types with namespace
   - extra include of #include nlohmann/json.h removed when there's already #include <nlohmann/json.hpp>
   - nlohmann::json is excluded from model namespace

Tested with custom petstore played, with suggested openapi specs coming from issues #2769, #10266, #14234

   ```bash
   rm -rf samples/server/petstore/cpp-pistache-everything/ && ./bin/generate-samples.sh ./bin/configs/cpp-pistache-server-cpp-pistache-everything.yaml  && cd samples/server/petstore/cpp-pistache-everything/ && mkdir build && cd build && cmake .. && cmake --build . --parallel
   ```

* - Adding to samples/server/petstore cpp-pistache-everything

* - .md and FILES missing
2024-05-04 21:59:49 +08:00
En0s0und
0e809d4800
[typescript-fetch] Support fileNaming option (#18283) (#18284)
* [typescript-fetch] Support fileNaming option (#18283)

* [typescript-fetch] Support fileNaming option - add tests (#18283)

* [typescript-fetch] introduce constants
2024-05-03 15:07:54 +02:00
Nicklas Wiegandt
ef2fa03e96
[Java][Client] Add support for the new Spring RestClient (#18522)
* feat (JAVA SPRING RESTTEMPLATE) 17571: initial commit for Spring RestClient

* feat (JAVA SPRING RESTTEMPLATE) 17571: Copied and changed the webclient mustache files

The RestClient API is oriented on the WebClient API so many parts of the templates can be the same

* fix (JAVA SPRING RESTTEMPLATE) 17571: Renaming error & add README template

The README must be changed because the minimal Java Version for this client is 17

* fix (JAVA SPRING RESTTEMPLATE) 17571: Imports, compile errors and cookie setting

* feat (JAVA SPRING RESTTEMPLATE) 17571: Add generated samples

* test (JAVA SPRING RESTTEMPLATE) 17571: Add tests

* feat (JAVA SPRING RESTTEMPLATE) 17571: Update doc

* Add the restcilent to samples-java-client-jdk17.yam

The minimum Java version of the used Spring Version is 17

* fix (JAVA SPRING RESTTEMPLATE) 17571: Workflow paths to petstore samples

* fix (JAVA SPRING RESTTEMPLATE) 17571: Regenerated samples

* feat (JAVA SPRING RESTTEMPLATE) 17571: Generated echo-api sample for RestClient

* fix (JAVA SPRING RESTTEMPLATE) 17571: Missing import

* fix (JAVA SPRING RESTTEMPLATE) 17571: Missing body class exception when null body is set

* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api Auth test

* fix (JAVA SPRING RESTTEMPLATE) 17571: Gradlew file permissions

* feat (JAVA SPRING RESTTEMPLATE) 17571: Reggenerate samples after rebase

* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api Body gif test

* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api octet stream body test

* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api multipart form data test

* fix (JAVA SPRING RESTTEMPLATE) 17571: Form as body when body is null

Also regenerated the restclient samples
2024-05-02 00:15:20 +08:00
William Cheng
9f57684dad
[PHP] Update php.md - marked Multiserver as true (#18545)
* Update php.md - marked Multiserver as true

Mulitiserver support was fully implemented 2 years ago, on PR #12982

* update php feature

* update

---------

Co-authored-by: Thomas Hansen <thomasphansen@users.noreply.github.com>
2024-05-01 19:29:48 +08:00
William Cheng
2a1b4f90df
Add new option allArgConstructor for java client, spring generators (#18538)
* allArgConstructor for java

* Remove leftover from builder pattern branch

* Rename generateConstructorWithAllArgs and use x- in vendorExtensions

* Test issue #18340

* Add evidences for allVars issue (#18340)

* remove eol

* update doc

---------

Co-authored-by: jpfinne <jeanpaul@finne.be>
2024-05-01 18:10:35 +08:00
Arivanandan
a4cf255dce
Add useSingleRequestParameter to typescript-nestjs generator (#18476)
* feat: change template to use useSingleRequestParameter

* chore: add useSingleRequestParameter option

* chore: generate-samples, docs and fix spacing in template

* chore: remove random white space
2024-04-30 15:07:57 +08:00
Tadas Krivickas
06ed7c8205
[dart] [dart-dio] Support Dart3 (#18001)
* Support both dart 2.x and 3.x

* Append dart3 keywords

* Update docs
2024-04-28 22:09:10 +08:00
William Cheng
a00549cd65
Add an option to skip unmarshall json in Go client generator (#18448)
* feat(go): Add a vendor extension to option out of generating the UnmarshalJSON method

* add generate unmarshal json option in go client generator

* update doc

---------

Co-authored-by: Radoslav Kotsev <radoslav.kotsev@cellpointmobile.com>
2024-04-25 12:52:48 +08:00
William Cheng
3bd6d67cc0
(java client) minor code enhancements (#18493)
* (java client) minor code enhancements

* update doc
2024-04-25 12:51:18 +08:00
Aaron Pritzlaff
efb7e5624d
Cask version fix (#18486)
* using artefact version in build

* using artefact version in build

* cask knows how to honour artifact versions
2024-04-24 23:50:14 +08:00
William Cheng
59ba346306 update samples 2024-04-24 15:34:02 +08:00
Amin Yahyaabadi
7036b99e91
[cpp-restsdk] add support for AnyType (#18463)
* [cpp-restsdk] add support for AnyType

* [cpp-restsdk] fix the AnyType header generation path
2024-04-24 13:44:21 +08:00
Daniel Schreiber
2217a7b0f2
feat: simple/experimental generator for flight-php server framework (#18406)
* feat: simple/experimental generator for flight-php server framework

* fix: update php-flight samples and add php-flight to integration tests

* feat: adding path to method doc
2024-04-21 23:56:59 +08:00
lizzyTheLizard
213564a5aa
#18388: Add Mutiny support to JaxRS (#18389)
* #18388: Add Mutiny support to JaxRS

* Updated samples

* Updated doccs

* Updated example to 3_0

* Updated sample
2024-04-17 11:20:39 +08:00
William Cheng
2bfc5a3958
[Scala] added new scala-cask generator for the cask framework (#18344)
* Ran `./new.sh -n scala-cask -s` to generate a new Scala Cask impl

* removed scala-cask-petstore

* Added Scala-cask param parser for BigDecimals

* added scala cask to samples

* splitting out validation and json

* Added GitHub workflow support

* regenerated cask samples

* cask build fix for local builds

* regenerated samples

* trying to reproduce failed cask build. checking in compiles sources, which have been reformatted

* reverted whaitespace change

* cask fix - adding gitignored files

* scala cask toLowreCase fix

* scala cask toUpperCase fix

* cask regenerated samples

* improved exception handling for scala cask

* File separator fix for windows

* Noob fix for cask

* regenerated api package

* Removed environment variable settings, debug code

* Updated samples

* moved scala-cask output

* Regenerated samples

* scala cask fix

* Updated scala cask settings for more typical package structure
Removed cask client samples

* cask - reran generate samples

* Removed duplicate ScalaCaskServer entry

* minor enhancements

* update samples

* update templates

---------

Co-authored-by: aaron.pritzlaff <aaron@kindservices.co.uk>
2024-04-10 18:49:59 +08:00
William Cheng
ef36ea410e
Fix method naming for openapi normalzier, openapi ignore list option (#18348)
* fix openapi normalizer naming issue in config

* update openapi generator ignore list setting

* update

* fix

* update sample config

* update doc
2024-04-10 17:09:48 +08:00
William Cheng
b2a7f435c8
"==" enum value generates "_" in Java which is invalid since Java 9 (#18338)
* #17276 "==" enum value generates "_" in Java which is invalid since Java 9

* update doc

---------

Co-authored-by: Julien BÉTI <jbeti@cosium.com>
2024-04-09 12:21:54 +08:00
William Cheng
2a39b29684
[python] Add field as a reserved word (#18279)
* add field as a reserved word

* remove tabs

* update
2024-04-03 16:43:51 +08:00
William Cheng
2d7f0496ec
add rule to set primitive types to nullable (#18258) 2024-04-01 11:54:21 +08:00
William Cheng
894848e550
update links to blog posts (#18174)
* update links to blog posts

* update doc
2024-03-21 15:36:52 +08:00
William Cheng
c5ab78575a
Add rule to set container (array, set, map) to true (#18128)
* add rule to set containter to null

* update doc
2024-03-17 16:37:46 +08:00
Daniel Karlsson
fbe81f0735
Add new uncamelize lambda (#18109)
Co-authored-by: Daniel Karlsson <daniel.karlsson@cinnober.com>
2024-03-16 15:23:10 +08:00
William Cheng
7f1e79f7d2
[C] Optimize memory usage when printing JSON (#18072)
* cJSON generate unformatted json to save memory during large objects handling

* update sample

* add option to use cjson print unforamtted in client

* remove unused test template files

* add new samples

* update workflow

* update doc

* fix model filename

* fix inclulde

---------

Co-authored-by: Hemant Zope <42613258+zhemant@users.noreply.github.com>
Co-authored-by: Hemant Zope <hemantzope2008@gmail.com>
2024-03-11 16:18:08 +08:00
William Cheng
494fc7d182
[kotlin] Enum should match spec (#18062)
* [kotlin] Enum should match spec

Adjust the enum generation to match what is in the spec, rather than
camel-casing it.
Add tests for capitalization scenarios, including for kotlin keywords

* [kotlin] export docs generators for enum change

* [kotlin] export docs generators for enum change

* fix conflicts

---------

Co-authored-by: Tyler B. Thrailkill <tylerbthrailkill@gmail.com>
Co-authored-by: Jari Nystedt <jari.nystedt@tietoevry.com>
2024-03-09 17:42:33 +08:00
julien Lengrand-Lambert
f1fcceb375
Major Jetbrains HTTP Client upgrade. Move to BETA (#15779)
* Add notes to requests for better readability

* Adds extra configs for jetbrains http client for testing

* Adding new sample data

* Changes

* Setting up test infrastructure

* Adds body to requests.

* Fixing some bugs in map traversal

It'd be much better to use a proper library for this though

* Adding secret file to gitignore

* Adds github spec, for complex example.

Add null check to avoid errors in example extraction

* Add support for custom variables in request body

* Add support for all basic Auth headers

* Not sure whaet happened with my api mustache file

* Add support for custom headers

* Fixes empty lines issue

* Adds support for Accept header

* Adding many tests, deleting experiment files

* Updates generator doc

* Completes README file with extra information

* Runs generate-samples and export docs

* Running sample generation

* Adding missing files to samples

* Removing forgotten stdout statements

* Ignore one test making the docker image generation fail
2024-03-09 16:56:26 +08:00
Charles Treatman
34a386c5a3
[Go] Update generator docs to reflect supported features (#18044)
* [Go] Update generator docs to reflect supported features

* update feature support in code
2024-03-07 10:36:08 +08:00
William Zhang
ae9084bfd6
fix: typo in docs (#18028) 2024-03-05 15:34:02 +08:00
William Cheng
8df0d98a44 fix broken link to spec 2024-02-29 10:42:59 +08:00
William Cheng
2d3670b96c update openapi normalizer doc 2024-02-29 10:34:21 +08:00
Artem Medvedev
4b04e17751
feat(rust): support ability to disable boxed models in client (#17931)
* feat(client): support ability to disable boxed models

Add new additional property `avoidBoxedModels` which can be configured to avoid `Box<..>` of models.

It's very nice to have such config, because it doesn't make a lot of sense for really simple models.

* test: rollback config of existed test
2024-02-28 11:22:18 +08:00
William Cheng
15af1ce1de update doc 2024-02-23 16:27:26 +08:00
Mehmet Fatih Ercik
48565ae5be
Generate API files as interfaces for go-gin server (#17784)
* add feature to generate only interface files

* generate sample

* add workflow file foe go gin service

* add workflow file foe go gin service

* add workflow file foe go gin service

* update samples
2024-02-20 15:37:44 +08:00
William Cheng
7d539bcb78
Remove deprecated library (jvm-okhttp3) in kotlin client generator (#17884)
* remove deprecated library in kotlin client generator

* update workflow
2024-02-18 17:16:23 +08:00
William Cheng
4810dd52c3
[python-fastapi] auto generate impl folder (#17852)
* auto generate impl folder

* fix working dir

* install pytest

* add new file

* update, fix

* test with py 3.9

* fix tests

* update doc
2024-02-15 13:08:04 +08:00
William Cheng
b0c9456add
add FILTER to openapi normalizer (#17859) 2024-02-15 13:05:31 +08:00
Nathan Shaaban
c30d3696b0
[rust] basic oneOf support (#13970)
* [rust] basic oneOf support

Suport oneOf as a rust struct enum.

Details:

Enum without a discriminator is untagged being
"untagged" simply means serde won't attempt to
store the name of the enum inside the serialized
object. See
https://serde.rs/enum-representations.html#untagged
for more

Also check to make sure the mapping values
are not an empty object (aka null).

Co-authored-by: Nikita Puzankov <git@bshn.rs>

* refactor: fix clippy lints

No longer needed as of reqwest 0.10, it now takes the response as owned instead of mut ref.

Is not empty is more clear

* fix: discriminator and oneof case

Will show as a struct enum when there are additional fields, otherwise will be a tuple enum.

not sure the purpose of x-mapped-models, perhaps legacy code? mappedModels appears to do the same thing.

Also add default implementation for quality of life

* chore: update samples

---------

Co-authored-by: Nikita Puzankov <git@bshn.rs>
2024-02-13 19:21:51 +08:00
martin-mfg
aad345f0bd
expand documentation for option "artifactVersion" (#17845)
* update documentation strings

* re-generate docs
2024-02-13 16:18:05 +08:00
William Cheng
0bcd88b204 update docs 2024-02-08 13:38:48 +08:00
Arthur Mogliev
70addf8fc9
[PHP] update dependencies for php-dt generated code (#17796)
* php-dt update:
- bump minimal required PHP version to 7.4 (8.1 for modern mode)
- bump minimal required DataTransfer version to 0.6
- support for date / date-time string lists and maps
- support for request and response bodies with date / date-time string schema
- minimal file string support

* docs update
2024-02-06 16:48:18 +08:00
William Cheng
7c7634dda9
add operation id option (#17750) 2024-02-01 17:21:49 +08:00
William Cheng
59f672d9aa
Add rule to remove x-internal in openapi normalizer (#17734)
* add rule to remove x-internal in normalizer

* update

* update doc

* better code format

* update samples
2024-01-30 21:11:25 +08:00
Laith Hussein
a7439e456e
feat(typescript-angular): add support for v17 of angular (#17685)
- Add support for `transferCache` property in request options

Refs: [#17301]

Co-authored-by: Laith Hussein <laith.hussein@beno.com>
2024-01-26 09:21:48 +01:00
Alexis Couvreur
092463a513
feat: add java-wiremock generator (#17614)
* feat: add `java-wiremock` generator

* remove text block usage for samples

this will allow more version of jav to be compatible with this

* fix extra parenthesis

* Add java-wiremock workflow
2024-01-16 11:40:13 +08:00
Dennis Ameling
13edc5d494
kotlin-server: Add support for Javalin (#17596)
* kotlin-server: Add support for Javalin

* kotlin-server: Add Javalin generated sample code

* Add output from build scripts

* Address MR feedback

* Update CI to include new Javalin sample
2024-01-15 20:22:20 +08:00
William Cheng
9b7528d8c8 update samples, docs 2024-01-10 11:50:48 +08:00