493 Commits

Author SHA1 Message Date
Mattias Sehlstedt
10fc9d07c7
Single request parameter equals and hashcode (#20833)
* Align indentation

* Add equals and hashcode to singleRequestParameter static class

* Add missing sample updates that were affected by new imports

* add restclient sample

* update FILES, chmod=+x

* Update samples with jakarta annotations

* Updates samples

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2025-04-27 16:46:01 +08:00
martin-mfg
9f3a73f81a
[spring]addition: api response examples + spring generator generates response examples (#17610, #16051) (#20933)
* addition: api response examples; spring's api.mustache generates response examples

* update samples

* added 2 sample configs; adsjuted to only generate examples for application/json

* added test

* remove accidentally added files

* small cleanup

* add new samples to workflow

---------

Co-authored-by: GlobeDaBoarder <glebivashyn@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-04-27 00:10:09 +08:00
RickyRister
4c08ff865d
[Java][Vertx] Add option to generate methods that return Futures (#21083)
* [Java][Vertx] Add option to generate methods that return Futures

* run scripts

* update sample config and github workflow

* generate samples

* rerun script

* add vertx-no-nullable to samples workflow
2025-04-18 21:53:08 +08:00
devhl-labs
ffefebdd88
[csharp] Process webhook operations (#21082)
* process webhook operations

* process webhook operations

* build samples
2025-04-16 16:30:53 +08:00
Tanmay Mohapatra
b1de687c7f
[julia] better serverside validation code (#21072)
* [julia] better serverside validation code

Updating the code generated for julia server to add more checks in the validation stage of incoming requests. Particularly adds checks for request body and required parameters. Updates the generated models with some helper methods that are used in validation filter.

* bump OpenAPI.jl version to use for CI
2025-04-11 02:00:29 +08:00
Knuf
9c5722b9f6
Added HttpClient5 flavour to Java OpenFeign client generator. (#21007)
* Added HttpClient5 flavour to Java OpenFeign client generator.

* Converted templates intendation to spaces.

* Added the new sample folder to GH wf so that the CI can test the change.

* Added the missing auto-generated docs/samples files.

* Converted indentation to spaces also in the modified Java class.
2025-04-09 17:40:16 +08:00
William Cheng
86a8e52d08
Add tests for scala sttp client (jsonLibrary: circe) (#21061)
* add tests for scala sttp circe

* use jdk 11

* test with jdk 17

* fix

* test in circleci

* remove finch
2025-04-09 17:19:06 +08:00
Andrew Wilson
d81b5a37d1
#20883 - Add new Misk Kotlin OpenAPI Generator (#20885)
* first pass

* Fix extra new line

* adding generator file

* Run new.sh script

* Fix template directory and ignore failing tests

* fixing up content type

* adding controller impl

* cleanup interface

* typo

* removing bodytype

* adding protos

* fixing 2

* Fix headerParamsSimple

* removing protos etc.

* fixing imports

* removing commented code

* fixing imports

* fixing return

* fixing file

* adding comment

* remove adminapi

* move to jakarta

* reverting break

* fixing httpMethods

* pushing mediaTypes

* Adds gradle mustache templates

* Setup simple build.gradle.kts

* Adds basic model.mustache for model generation

* fixing summary

* fixing summary 2

* Removes unnecesssary line

* fixing return type

* fixing override

* fixing httpcall

* Delete proto folder creation

* fixing return type

* fixing void return type

* fixing space

* removing reactive

* removing imports

* Fixing spacing

* Fixing tabbing

* fixing headers

* add comment

* Adds unit tests

* cleanup

* Correct getHelp() description

* cleanup 2

* removiing pathParams files

* fixup

* fixup 3

* removing more files

* Adds GitHub Workflow generation

* removing form params as not required

* Adds tests for OptionsProvider

* Renamed file to match

* remove whitespace

* remove whitespace

* adding documentation

* adding documentation

* removing swagger annotations

* adding tests

* Adds Guice Module

* Grab OpenAPI title to generate module name

* Revert "Grab OpenAPI title to generate module name"

This reverts commit 9c9b935f5dbee6e0974ebf66b4f611f107df70c2.

* Update sample

* Removes moduleFileName additional property

* adding tests

* adding tests 2

* adding tests 3

* adding tests 4

* added media types

* re-adding tests

* fixing camelcase

* fixing mediatypes

* default mediatype

* adding validation

* adding validation

* removing swagger

* adding gradle dependency

* adding gradle dependency

* fixing types

* fixing return types

* fixing tests

* final fixes

* tweaks

* fixing file etc.

* Update samples/ folder

* fixing jakarta

* fixing jakarta 2

* fixing impl

* Fix unit tests

* fixing jakarta

* fixing jakarta 2

* final final final changes

* Fix initialization of BigDecimal for default values

* update samples, docs

* fixing RequestHeader

* fixing RequestHeader 2

* fixing RequestHeader 2

* add validateSpec=false

* fix pom version

---------

Co-authored-by: Guido Arnau <guido@squareup.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-03-25 22:43:30 +08:00
Youri Westerman
73b6b7084f
Drop python 3.8 support python 3.13 in python generator (#20909)
* Drop support for python 3.8 and add support for 3.13 in python generator templates

* Update docs

* Test samples without python 3.8 and with 3.13

* Generate samples
2025-03-23 18:10:32 +08:00
takashno
6e3b1996ed
[java][spring] add useSpringBuiltInValidation option to disable @Validated at class level (fix #20899) (#20901)
* [java][spring] add useSpringBuiltInValidation option to disable @Validated at class level (fix #20899)

* Add sample and github workflow maintenance.
2025-03-20 17:41:02 +08:00
lucy66hw
1996d7e8fc
[protobuf-schema] Add flag to handle complex type (#20915)
* Wrap Complex Type

* update

* Add java doc and update test

* change default wrapComplexType to true

* add protobuf-schema-config-complex to CI

* add service proto to address CI failure
2025-03-20 13:22:40 +08:00
dependabot[bot]
69e4336f67
Bump actions/setup-dotnet from 4.3.0 to 4.3.1 (#20916)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.3.0...v4.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-18 13:15:49 +08:00
dependabot[bot]
a3fb8f59f8
Bump dorny/test-reporter from 1 to 2 (#20862)
Bumps [dorny/test-reporter](https://github.com/dorny/test-reporter) from 1 to 2.
- [Release notes](https://github.com/dorny/test-reporter/releases)
- [Changelog](https://github.com/dorny/test-reporter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dorny/test-reporter/compare/v1...v2)

---
updated-dependencies:
- dependency-name: dorny/test-reporter
  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>
2025-03-13 18:47:34 +08:00
William Cheng
0e34d39833
add tests, option for useVirtualHooks (csharp) (#20837) 2025-03-11 00:02:30 +08:00
Julien Debon
123119c076
Add the dependencies in the generated Opam file (#20805) 2025-03-05 19:38:41 +08:00
William Cheng
890c758fd8
Add github workflow for OCaml samples (#20802)
* add github workflow for ocaml sample

* trigger build

* test with 5

* install dune

* install yojson

* install others

* install

* add name

* trigger build failure

* Revert "trigger build failure"

This reverts commit be35b26a83a1c961315d53b474658fbd5ff5fa62.

* test with 5

* pin versions
2025-03-05 18:07:44 +08:00
lucy66hw
c96d3088c5
[protobuf-schema] Use snake_case for protobuf fields, UPPER_SNAKE_CASE for enums. (#20696)
* protobuf enum prefix use upper underscore

Add json name parameters and change parameter field name to snake case

* rerun generate-samples.sh

* Add CI test

* rebase master

---------

Co-authored-by: xil <xil@uber.com>
2025-03-04 17:18:07 +08:00
Gijs Blanken
65df3c22b9
Rewrite the PHP Laravel generator (#20526)
* remove legacy laravel generator

* initial setup of my vision for the laravel generator

* update the php laravel samples

* update php laravel docs

* moved api validation into controller and handle edge cases presented by sample generation

* updated samples

* added php-laravel to github workflow php8 and removed php7 workflow as it only contained old laravel

* preemptive work to support union types as soon as php serde supports them

* updated samples

* update templates in accordance to samples output

* fix pipelines and update samples

* correct serde version

* fixed phpunit execution and updated samples

* added named routes

* remove

* readd samples

---------

Co-authored-by: gijs.blanken@futureof.finance <gijs.blanken@finly.nl>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-02-17 21:50:13 +08:00
dependabot[bot]
8b52b0afe3
Bump actions/setup-dotnet from 4.2.0 to 4.3.0 (#20563)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.2.0...v4.3.0)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  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>
2025-01-31 15:36:58 +08:00
William Cheng
98ccf95e43
[ASPNETCORE] Add support for central package version management (#20401)
* Added useCentralPackageVersionManagement option for aspnetcore

* Removed debug code from template

* Added option to opt out of centralized version management

* Added sample for centralized version management

* Removed changes for .net9

* Updated template file for model project

* Code formatting

* Corrected sample config for aspnetcore

* Regenerated Samples

* update samples, docs

* Fixed models project mustache file

* Regenerated samples and docs

* Regenerated smaples and doc

* Changed options to enum WIP

* fix option

* [ASPNETCORE] Add support for central package version management #20192 (#20403)

* Fixed default value for usePackageVersions

* Regenerated docs

* update workflow

* add props file

---------

Co-authored-by: Urganot <ballingsimon@googlemail.com>
2025-01-18 14:52:41 +08:00
William Cheng
9e66c4f516
Add more net9 samples (#20491)
* add restsharp net9 samples

* add httpclient net9 samples

* add unity net9 samples

* update workflow

* comment out unity test
2025-01-17 14:14:11 +08:00
William Cheng
5785743695
Update bug_report.md with up-to-date URL for online validator (#20470) 2025-01-15 01:31:03 +08:00
William Cheng
121c82f8fe
fix sbt setup in workflow (#20447) 2025-01-11 19:16:01 +08:00
William Cheng
a6cfef53fe
clean up kotlin spring samples (#20445)
* clean up samples

* use 3.0 petstore test spec

* update samples

* better code format
2025-01-11 17:00:54 +08:00
Ruslan Khasanshin
358e8af2bf
[kotlin-spring] Adds useFlowForArrayReturnType option for reactive mode (#16130) (#20409)
* [kotlin-spring] Adds useFlowForArrayReturnType option for reactive mode (#16130)

* [kotlin-spring] Replaces manual doc change with generated one (#16130)

* [kotlin-spring] Fixes errors (#16130)

* [kotlin-spring] Adds samples (#16130)
2025-01-11 15:53:04 +08:00
William Cheng
9fcbdb95d9
[C#] avoid duplicated header in csharp client (restsharp) (#20421)
* avoid duplicated header in csharp client

* set env

* install openssl

* switch to windows
2025-01-09 15:36:49 +08:00
dependabot[bot]
46260ee6f9
Bump s4u/setup-maven-action from 1.17.0 to 1.18.0 (#20392)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.17.0...v1.18.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>
2025-01-01 23:25:10 +08:00
devhl-labs
8fa8530cd0
bump version to .net8 (#20384) 2024-12-30 13:48:24 +08:00
dependabot[bot]
45aeae3d43
Bump actions/setup-dotnet from 4.1.0 to 4.2.0 (#20379)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  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-12-27 18:37:36 +08:00
devhl-labs
5ba608ff8a
[csharp] add .net9 support (#20270)
* add .net9 support

* fixed path of new sample

* comment out manual test that does not exist

* comment out manual test that does not exist

* comment out manual test that does not exist
2024-12-22 22:06:33 +08:00
Jorge Fernandez
9fec13af85
[Kotlin][Tests]: Add test for kotlin-jvm-okhttp (#20338)
* feat(issue-20231): add echo_api client for kotlin okhttp

* build(issue-20231): sync files
2024-12-17 21:50:00 +08:00
Nicklas Wiegandt
07d19baf89
feat (#19407 JAVA SPRING WEBCLIENT): Add support for useSingleRequestParameter to Spring WebClient (#19827)
* chore (JAVA SPRING WEBCLIENT): Remove comments used for debugging

* feat (JAVA SPRING WEBCLIENT): Add support for useSingleRequestParameter to Spring WebClient

* feat (JAVA SPRING WEBCLIENT): Generate samples and docs

* fix (JAVA SPRING WEBCLIENT): Fix missing return error & Fix JDK17 action webclient useSingleRequestParameter test path

* fix (JAVA SPRING WEBCLIENT): Fix code indention

* fix (JAVA SPRING WEBCLIENT): Fix code indention again

* fix (JAVA SPRING WEBCLIENT): Update samples

* feat (JAVA SPRING WEBCLIENT): Regenerate after pull rebase
2024-12-15 15:28:38 +08:00
William Cheng
24ddb33d0b add ktor2 library option to kotlin server generator 2024-12-13 01:15:03 +08:00
dependabot[bot]
0a7e784c8c
Bump s4u/setup-maven-action from 1.16.0 to 1.17.0 (#20283)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.16.0...v1.17.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-12-10 12:22:55 +08:00
Ernesto Fernández
52b5b8fb76
Fix a few issues with the C generator (part 2) (#20227)
* [C] Don't convert post body strings to JSON

If the body provided for the api request is a just a string itself,
don't try to convert it to JSON, simply submit the string.

* [C] Implement BearerToken authentication

* [C] Handle nullable fields correctly

* [C] Fix implementation of FromString for enums

* [C] Update the test schemas to cover the changes

* Update samples

* Fix the updated samples

* [C] Add the new samples folder to the CI workflow
2024-12-06 01:32:34 +08:00
Qluxzz
705261978d
[Elm] Fix not compiling all elm files in test suite (#20191)
* Fix not trying to compile all elm files

* Validate that changes to pipeline works
2024-11-27 15:44:21 +08:00
dmnlk
c33d3aaae9
add PHP8.4 CI (#20168) 2024-11-24 18:27:49 +08:00
dmnlk
c831983866
PHP8.4 comptible, php-symfony resources (#20162)
* matrix php build

* NullableTypeForNullDefaultValue

* update sample
2024-11-24 16:00:35 +08:00
Alexander Fetisov
b44ba666aa
adding support for @ResponseStatus annotation into spring-http-interface java spring generator (#20071)
* adding support for useResponseEntity into spring-http-interface java spring generator

* adding samples for @StatusResponse into spring-http-interface java spring generator

* additional changes to sample
additional changes to samples jdk17

* adding sample files

* extra adjustments

* fixing generator version

* fixing status code in samples

* some rollback

* some rollback 2
2024-11-16 15:52:11 +08:00
DielN
216ba30172
[JAVA] Add missing dependencies in templates (#20075)
* Add commons-lang3 dependency for useReflectionEqualsHashCode

* Fix feign-no-nullable config/sample

* Add commons-lang3 dependency to jersey2

* Add & update mutiny dependency for microprofile

* Regenerate samples
2024-11-14 14:08:26 +08:00
William Cheng
6bc8e0bffc
Fix duplicated operationId with new rule in normalizer (#19872)
* fix duplicated opeationId with new rule in normalizer

* update workflow

* update samples

* update samples

* update java samples
2024-11-11 18:12:46 +08:00
Joscha Feth
824f864512
docs: stop regeneration on error (#19898) 2024-11-10 17:38:04 +08:00
Dennis Ameling
13b11d7706
kotlin-server: Fix required + nullable combination for properties (#20054)
* kotlin-server: Fix required + nullable combination

* Update FILES

* Updated generated code
2024-11-09 22:35:11 +08:00
Dennis Ameling
a7a86398d0
[kotlin-server] Bump Kotlin/Gradle versions and improve CI triggers/config (#20061)
* [kotlin-server] Bump Kotlin versions to latest

* Run tests on more samples

* Fix typo in workflow definitions

* Update samples

* Bump Gradle to 7.6.4

* Some further tweaks

* Bump Gradle versions

* Fix Gradle version syntax
2024-11-09 13:39:20 +08:00
dependabot[bot]
00db84d22b
Bump actions/setup-dotnet from 4.0.1 to 4.1.0 (#20055)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.0.1...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  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-11-08 13:13:06 +08:00
Julien Tschäppät
7deecdc569
[csharp] Add a server generator for FastEndpoints (#19690)
* Add of a first working generator for FastEndpoints framework

Generator that support the basics of a FastEndpoints project
https://fast-endpoints.com/

* Add respose code documentation support

* Add an option to enable use of problem details

* Clean enum and model

* Add an option to generate record for requests/models

* Update sample

* Add support of nullable types

* Add option to enable authentication

* Add option to generate validators

* Clean readme.md file

* Add option to enable response caching

* update readme template

* Add missing files references

* Update generated sample

* Add link to documentation

* Add generator documentation

* correctly support packageName

supportingFiles additions moved to processOpts()

* improve useAuthentication option handling

Avoid to copy an empty file

* processOpts, move call to parent at the end

* Update generated sample

* Refactor and fix super.processOpts(); call order

* Handle the case of multi-line description

* Rename field to match naming conventions

* Add useApiVersioning option

* Update generated sample

* Add generator documentation

* Fix record when model contains optional properties

* Add configuration files for each option

* Add sample project for each configuration

* Add GitHub Action workflow for sample projects

* Add FastEndpoints BindFrom attribute on path, query and form params

* Update sample generated projects

* Fix validator template

* fix alphabetical order

* Use fully qualified name for FastEndpoints

* Add options to set GUID to be used in sln file

* update sample projects

* Update generators.md

* Fix path in github workflow

* Put readme, gitignore and solution file at the root of generated project

* update sample projects

* Remove the projectGuid option

This Guid need to be constant, it is related to project type

* update sample projects
2024-11-07 20:28:29 +08:00
dependabot[bot]
e1bccbfe47
Bump s4u/setup-maven-action from 1.15.0 to 1.16.0 (#20025)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.15.0...v1.16.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-11-06 16:03:23 +08:00
Pavel Sveda
acb16410c4
[Kotlin] Introduce support for Kotlin Explicit API Mode for Kotlin-Client generator (resolve #16506) (#19999)
* [Kotlin] Properly document nonPublicApi CLI option

* [Kotlin] Respect parameter name of parent KSerializer to avoid miss-behavior

* [Kotlin] Introduce support for Kotlin Explicit API Mode for Kotlin-Client generator (resolves #16506)
2024-10-30 21:57:47 +00:00
dependabot[bot]
30ff0d7ca9
Bump actions/setup-dotnet from 4.0.1 to 4.1.0 (#19971)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.0.1...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  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-10-25 15:16:32 +08:00
William Cheng
511316a966
Test build.gradle for java native petstore samples, sync pom.xml & build.gradle (#19951)
* test build.gradle for java native petstore samples

* trigger build

* sync pom.xml and build.gradle (java native)
2024-10-23 16:38:30 +08:00