474 Commits

Author SHA1 Message Date
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
Joscha Feth
dc3718cd5c
fix(typescript): typecheck generated samples + fixes (#19903)
* fix(typescript): typecheck generated samples + fixes

* wip(today's fortune): The sum of the Universe is zero.

* Update .github/workflows/samples-typescript-typecheck.yaml

* Update modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache

* chore: regenerate samples
2024-10-18 09:57:43 +02:00
Leonid Stashevsky
7f899dff97
[Kotlin Server] Update Ktor to latest version; move config to kts (#19727)
* [Kotlin Server] Update Ktor to latest version; move config to kts

* Bump gradle version for kotlin server samples

* Replace deprecated gradle API

* Bump gradle to 7.6.4
2024-10-11 11:44:53 +08:00
martin-mfg
b730e36937
[JAVA] fix several anyOf/oneOf problems (#19817)
* erasure duplicates

* sanitize beanValidation

* oneOf maps

* anyOf

* update samples
2024-10-10 14:50:18 +08:00
dependabot[bot]
7cf84e2daf
Bump s4u/setup-maven-action from 1.14.0 to 1.15.0 (#19807)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.14.0...v1.15.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-10-08 09:34:58 +08:00
devhl-labs
28ae69dafd
[windows] Fixed missing output (#19715)
* fixed missing output

* bug fix

* add new sample

* build samples again

* delete sample

* move the sample and add to github workflow

* remove model not needed for this test

* handle specs with no models
2024-10-07 10:58:05 +08:00
Jenny G. L.
9791e6f537
[Scala][Client]Add Http4s scala3 client codegen (#19658)
* fix attemp

* use java.time.Instant

* fix client gen

* Tweeks

* header and form

* use scala 3 enum

* more tweeks

* add additional properties; add auth

* add form media type

* add modelsOnly

* add unit tests

* add petstore samples

* add doc

* add new samle to .github/workflows/samples-scala.yaml

* update build.sbt template

* simply the baseclient

* add None to optional field

* tweek auth model and format

---------

Co-authored-by: Jenny Leahy <jennyleahy@JENNYLEAHY.localdomain>
2024-10-05 17:00:19 +08:00
Bruno Coelho
911455d206
[swift] small improvements (#19675)
* [swift] small improments

* [swift] small improments

* [swift] small improments

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass

* [swift] make CI pass
2024-09-27 13:11:08 +08:00
Simon Abbott
a6581e8e4c
[typescript][typescript-node] Serialize/deserialize maps and nullable types correctly (#19362)
* Remove deprecated suppressImplicitAnyIndexErrors property from templates

* Add encoding / decoding tests for the typescript generator

* Add encoding / decoding tests for the typescript-node generator

* [Typescript][Typescript Node] fix deserializing complex types

This fixes deserializing of models that are composed with null,
undefined, or are inside of a map.

* Use more sensible `startsWith` implementation

* Remove use of magic number offsets

* Fix endsWith bounds checking

* Regenerate samples
2024-09-25 20:21:11 +02:00
Joscha Feth
0f561b05cb
chore: pull request template mentions an old current version (#19609)
Replaces `7.6.0` with `7.x.0`
2024-09-19 09:33:02 +08:00
Jonathan Ballet
40967a3d38
python: test with more modern versions (#19452)
Python 3.12 has been released in October 2023, it should be tested in
the CI.

Python 3.7 is not maintained anymore, removing it from the minimum
required version in `pyproject.toml` files.
2024-09-18 16:53:51 +08:00
dependabot[bot]
30b1a74979
Bump actions/setup-go from 3 to 5 (#19597)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  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-09-17 10:42:21 +08:00
Beppe Catanese
2f179fe41d
[Go] Verify content of Go server generated files (samples) (#19504)
* Add Python tests to verify generates Go files

* Run Python tests during CI

* Remove Python tests

* Add Go tests

* Update workflow to run Go tests
2024-09-16 16:48:30 +08:00
Nelson Vides
596d446f54
Erlang server overhaul (#19465)
* Upgrade erlang-server code generation and fix is_authorized crashes

* Introduce structured logging

* Improve general formatting

* Update generated files

* Enable erlang server on CI

* Add echo-server testing to CI

* Require OTP27 explicitly in the generated rebar.config file

* Rework handler and API

With this work, json validation becomes optional, fully implemented in
the `_api` module as it was before, but without being forcibly called by
the `_handler`. It is instead left as optional for the user to take
advantage of the exposed callbacks. Jesse also chooses draft-06 as a
default, but these can be chosen manually by the user too, as long as
jesse implements them.

`_handler` also becomes lighter, it now handles all mime types
transparently by forwarding to a user-given module that must implement
`accept_callback/4` and `provide_callback/4` as described in the
`_logic_handler` callbacks. These will simply be the return values of
cowboy_rest's `content_types_accepted` and `content_types_provided`
respectively, and should simply comply with their defined APIs. They
only get two parameters extending the behaviour, so that the user-given
callback can pattern-match on them: the path prefix of the logic
handler, and the operationID of the call.

* Fix return types for provide_callbacks

* Upgrade jesse to incur no dependencies

The less dependencies the built code requires the better.

* Fix dialyzer errors in the generated code

* Apply stronger dialyzer checks
2024-09-07 16:45:42 +08:00
Nicklas Wiegandt
e4112c5aca
feat (JAVA SPRING RESTCLIENT) 19406: Add single request parameter for Spring RestClient (#19430)
* feat (JAVA SPRING RESTCLIENT) 19406: Add single request parameter for Spring RestClient

Closes #19406

* chore (JAVA SPRING RESTCLIENT) 19406: Add new sample to jdk 17 tests

* fix (JAVA SPRING RESTCLIENT) 19406: Fix sample build
2024-09-04 16:17:13 +08:00
Rugal Bernstein
f54b0e25a4
Remove appendRequestToHandler (#19500) 2024-09-04 16:03:31 +08:00
Richard Whitehouse
fbe6c11903
[Rust] Ensure all features build as part of CI / Upgrade to Frunk 0.4 (#19364)
* [Rust] [CI] Build all features as part of CI

* [Rust Server] Update to frunk 0.4

* Update samples
2024-08-17 14:17:36 +08:00
Tim Quinn
cd02426648
Suppress Pattern annotation on property of type byte array (#19346)
* Suppress Pattern annotation on property of type byte array

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

* Straggler files from generated samples

* Add new format test to workflows

---------

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
2024-08-15 17:09:44 +08:00
Richard Whitehouse
ad7acc30eb
[Rust/Rust Server] Fix example/test code (#19318)
* [Rust Server] Fix code so examples compile

Zero length arrays don't correctly type infer, so if we have no scopes, we need to not create a empty array

We need an authentication middleware - without it the code doesn't compile.

* Update samples

* [Rust Server] Remove trailing whitespace

* Update samples

* [Rust Server] [CI] Build all targets

* [Rust] Fix reqwest test
2024-08-09 15:54:58 +08:00
Stefan Koppier
aea536027c
[bugfix][kotlin-wiremock] fix problems with range responses (#19309)
* [kotlin] Target correct library in jvm-spring-webclient sample

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

* [kotlin-wiremock] fixed issue 7193

* [kotlin-wiremock] fixed wrong implementation of fromResponse

* [kotlin-wiremock] forbidden API

* [kotlin-wiremock] fixed wrong workflow trigger
2024-08-07 18:04:05 +08:00