1229 Commits

Author SHA1 Message Date
Enrique Fernández
0462bed734
fix: wrong typespec generation for all-of with single ref (#21139) 2025-04-25 16:06:06 +08:00
Łukasz Suski
d02c0f493e
[Kotlin] [Retrofit2] [Coroutines] [Client] Option to remove Response<> wrapper in operation return types (#20613)
* Add useResponseAsReturnType option to kotlin, jvm-retrofit2 and coroutines api template (#15491)

* Add useResponseAsReturnType flag to kotlin-jvm-retrofit2-coroutines.yaml sample

* Generate sample
2025-04-25 08:45:47 +01:00
30p87
ee7927a525
[Java][Spring] remove 'size', 'page' and 'sort' query params if using 'x-spring-paginated' (#8315) (#21016)
* [Java][Spring] remove 'size', 'page' and 'sort' query params if using 'x-spring-paginated' (#8315)

* Properly implement samples, fixing build issues

---------

Co-authored-by: Tobias Fischer <t.fischer@goldflam.de>
2025-04-23 15:47:17 +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
Andrew Wilson
5e446b4147
[feat] [protobuf] Improve protobuf generator by adding custom options for api and model files (#21075)
* add custom options

* fixing docs

* typo
2025-04-17 13:11:34 +08:00
Andrew Wilson
1136872cd5
[feat] [protobuf] Improve protobuf generator with switch useSimplifiedEnumNames (#21052)
* improving with simple enum names

* adding test case

* fixing docs

* fixing param name

* fix docs
2025-04-16 16:32:36 +08:00
jpfinne
4fc46cb0d4
Make the OpenAPINormalizer extensible (#20995)
* Make the OpenAPINormalizer configurable
Add comment to force rebuild

* Add documentation of NORMALIZER_CLASS

* Use default normalizeSchema() method and add a new skipNormalization method

* super.normalizedSchema() can proceed
2025-04-11 19:19:56 +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
Basil Mironenko
4048942485
[BUG] [scala-sttp] [circe] Generate circe encoder and decoder for inline enumeration (#21028)
* Generate circe encoder and decoder for inline enumeration

* Add missing circe-generic dependency, and the corresponding circeVersion property.

---------

Co-authored-by: Basil Mironenko <basilm@mosaicpower.com>
2025-04-09 16:02:34 +08:00
lucy66hw
3b0bb0a73d
[Protobuf Schema] Add Support for Multiple Response (#20989)
* Protobuf Schema Support Multiple Response

* change the supportMultiple response to true

* address build failure

* address build failure
2025-03-31 15:31:07 +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
lucy66hw
c8cfa16a48
Add options to aggregate protos to one file (#20962) 2025-03-25 22:35:48 +08:00
Calvin Bascom
cd2fbd6ff4
Add support for normalizing bearerAuth (#20860)
The openapi 2.0 spec did not support bearer authentication but it was
added in openapi 3.0. In order to support client generation that
includes support for bearerAuth, this change adds a new feature to the
OpenapiNormalizer so that it can be configured to look for a specific
securityDefinition name and convert it to bearerAuth.
2025-03-24 19:39:40 +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
Pavel
868074212a
[Java] Extend JavaSpring apiClient.mustache with option to override contextId for FeignClient (#20943) 2025-03-22 11:36:30 +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
William Cheng
0e34d39833
add tests, option for useVirtualHooks (csharp) (#20837) 2025-03-11 00:02:30 +08:00
David
ba2e50519d
improve documentation for RESOLVE_INLINE_ENUMS (#20812)
related to #20790
2025-03-06 18:28:45 +08:00
Tyler Mairose
36b72052e6
Add tag and method filters during generation (#20801)
* Add Filter by tag and method under OpenAPINormalizer

* Update message for invalid filters

* Update customization documentation with new filters

* Add comment for new code block
2025-03-06 01:49:47 +08:00
sabra
f2bbb9e0a2
[java] generateClientAsBean for restclient and webclient (#20754)
* [java] generateClientAsBean for restclient and webclient

Added possibility to generate restclient and webclient as a @Component in the same fashion as resttemplate.

Fix #17885
Fix #19229

* - Samples
2025-03-05 17:50:24 +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
William Cheng
a79aad8420
Prepare 7.13.0 (#20758)
* Revert "v7.12.0 release"

This reverts commit 073723cb4d41187f839fbb46565d109293fa22d7.

* set version to v7.13.0-SNAPSHOT

* update samples

* update doc
2025-02-28 13:48:36 +08:00
William Cheng
6e9a0559a8
[csharp] Set generichost as default (#20748)
* set generichost as default

* revert a java change

* comment out a java test

---------

Co-authored-by: devhl <shawnkanyer@gmail.com>
2025-02-27 18:06:27 +08:00
William Cheng
1c3eade94d
[java][spring] Add option optionalAcceptNullable to accept null values (#20746)
* add option to rollback accept null values

* update doc

* update tests
2025-02-27 17:21:51 +08:00
Mattias Sehlstedt
60bae732d3
SingleRequestParameter setter parameter construction (#20679)
* Add so that the singleRequestParameter can be constructed one parameter at a time

* Replace the lombok EqualsAndHashcode with a mustache implementation

* Remove equals and hashcode from oneRequestParameter model

* Remove the final keyword from variables in the oneRequestParameter class
2025-02-26 17:27:30 +08:00
abrevet-dev
8040e9aae9
Add openapi-normalizer rule to set tags to vendor extension (#20713) 2025-02-26 16:18:17 +08:00
Alex
cd7cdb1e24
Add option to generate a fully sealed model in the JavaSpring generator (#20503)
* Generated sealed interfaces for oneOf

* Add generated data

* Add also  modifier

* Allow sealed for everything

* Fully seal model

* Disable html escaping

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>

* Update docs

* Check all oneOf scenarios

* Fix failed scenario

* Fix comments

* Remove unused import

* Adapt pom.xml also

* Add comment and remove unused function

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2025-02-19 15:15:09 +08:00
Victoria Casasampere Fernandez
d5866feb2d
[Rust-Axum] Implement support for Basic and Bearer auth in Claims (#20584)
* Implement a custom error handler for unhandled or generic endpoint errors

* Pass in method, host and cookies to error handler

* Update axum to 0.8

* Make API methods take references instead of ownership

* Rebase error handler

* Rebase with updated error handler

* Update deps

* Fix capture group syntax

* Rebase rust-axum-error-handling

* Update docs

* Multipart is also part of the axum update

* Update samples

* Update docs
2025-02-19 14:48:28 +08:00
William Cheng
61ae569149 update doc 2025-02-19 14:37:12 +08:00
lucy66hw
4883de51c1
enum zero index is UNSPECIFIED suffix (#20473)
Co-authored-by: xil <xil@uber.com>
2025-02-19 14:30:53 +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
Carlos Chacin
a6280d9b58
[java][client] fix: Add static modifier to inner class in Java when useSingleRequestParameter=true (#20590)
* fix: Add static modifier to inner class

* Apply suggestions from code review

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>

* fix: Remove unintended whitespace

* fix: Add default=false for useSingleRequestParameter

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2025-02-17 20:02:01 +08:00
Jimmy Praet
9a9c1087be
Add config option to disable generation of @JsonCreator constructor (#20570) 2025-02-05 16:00:03 +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
ce56a83ae4
Update openapi spec 3.1 support message (#20492)
* update spec 3.1 support message

* update faq
2025-01-17 13:15:35 +08:00
devhl-labs
479cd522e0
[csharp] Removed .net6 and .net7 (#20449)
* removed .net6 and .net7

* build docs

* build docs
2025-01-13 15:22:30 +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
John Vandenberg
eb47b9d836
Fix typos (#20442) 2025-01-11 15:44:42 +08:00
Mark Doliner
536519c0ec
Update python options in the generators README.md (#20417)
- Remove the dead link to a python-legacy client generator.
- Add a link to the python-pydantic-v1 client geneator.
- Add a link to the python-fastapi server generator.
2025-01-09 11:55:21 +08:00
William Cheng
8f4cfa3955
[swift] fix typos, minor code format enhancement (#20387)
* fix typo in swift option, minor code format enhancement

* fix uuid typo in swift codegen and template

* fix typo minium
2024-12-31 16:51:18 +08:00
William Cheng
c5ac7d485f
Various enhancements, bug fixes to default codegen and maven plugin (#20388)
* fix typos in docs

* minor fix in default codegen

* fix more typos
2024-12-30 16:42:26 +08:00
William Cheng
ab8d359dc3
add option to skip setting user agent in js client (#20367) 2024-12-22 23:11:54 +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
haruna
7f0efe74a7
Add PyPI installation to docs (#20350) 2024-12-19 14:12:36 +08:00
William Cheng
ea2ba0c349
[java][native] fix empty response body (#20334)
* [Java][Client] (#13968)

* update

* update

* update slack url

---------

Co-authored-by: András Gábor Kis <andras-gabor.kis@telekom.com>
2024-12-15 22:32:46 +08:00
Kirill Romanov
4e5a828c12
feat: add option to support non-ascii headers in kotlin client (#20331) 2024-12-15 16:46:42 +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
Daniel Åkerlund
b218e238f4
Improve handling of pekko versions in scala-akka-http-server generator (#20277)
* Fix issue 20275 Improve handling of pekko versions

* Generated docs

* Use version 1.1.0 as default version of pekko-http.

* Updated sample
2024-12-11 12:31:22 +08:00