2578 Commits

Author SHA1 Message Date
CG
a7159f6bcb
[BUG][kotlin-spring] Fix defaultValue for RequestHeader is not generated (#20504) (#21003)
* [BUG][kotlin-spring] Fix defaultValue for RequestHeader is not generated (#20504)

* revert apiDelegate changes

* fix: fix unresolved reference for enum type
2025-04-23 17:25:47 +08: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
Antoine Reilles
338f7f2a09
cxf file upload should only present Attachment (#21124)
The InputStream is not necessary, as it can be obtained from the
Attachment object via getInputStream().
2025-04-23 14:53:42 +08:00
takashno
dcb8b1a2dc
modify enum template. field should be final. add testcase & sample updates. (#21019) 2025-04-13 18:49:15 +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
William Cheng
6da343a8ad update samples 2025-04-09 17:53:11 +08:00
Jorge Rodríguez Martín
89f0f7556f
[Java][Spring] Ensure EnumConverterConfiguration.java is generated when interfaceOnly=true in Spring Generator (#21000)
* Ensure EnumConverterConfiguration.java is generated when interfaceOnly=true in Spring Generator

* Add samples
2025-04-09 17:10:39 +08:00
Gijs Blanken
5f41acfe79
add #report when handling exceptions in the api (#21023) 2025-04-07 00:46:33 +08:00
Andrew Wilson
9bac31859c
Improving Misk Kotlin Server Generator (#20973)
* first pass

* fixing types

* fixing action

* updating samples

* updating files

* adding guido

* fixing misk

* removing old files

* cleaning generated files

* cleaning generated files

* adding back in license
2025-04-04 15:37:49 +08:00
William Cheng
587fcff85c update java samples 2025-04-01 15:05:12 +08:00
Tomschi
4f3726ecfd
#11737 Add package to bean name in converter.mustache for EnumConverterConfiguration.java (#17738)
* Add package to bean name in converter.mustache for EnumConverterConfiguration.java.

* Fix samples for EnumConverterConfiguration.java.
2025-04-01 14:48:14 +08:00
Trent Clever-Nadeau
56dd63525c
[Rust-Axum] Allow use of array query params (#20861)
* [Rust-Axum] Allow use of array query params

* Add sample per PR request
2025-04-01 14:29:21 +08:00
Greg Knox
36287acfd6
[JAVA][BUG] formParams.mustache should contain @FormParam, not @QueryParam (#20991) (#20993)
* formParams.mustache should contain @FormParam, not @QueryParam (#20991)

* updated samples; form parameters are declared using @FormParam, not @QueryParam (#20991)
2025-03-30 22:37:06 +08:00
koenlavooij
5e5832d982
Javalin fixes and validation (#20981)
* Fix for problems when a nullable parameter has a default value

When a default value is present the parameter is moved to non-nullable. This works because we could replace the null with a default value. This will actually set the default value.

* Adds (optional) validation to the beans.

Option to set: `useBeanValidation` to `true`. This will insert validation rules from the `jakarta.validation` package much like it does with the spring generator.

Aso sneaked in `JsonProperty` annotations in order to more formally adhere to the name in the spec as opposed to configuring ObjectMappers in order to translate names to match the spec.

* Update samples

* Fix for required headerParams
2025-03-30 00:58:48 +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
Simon Podlipsky
62b176e95d
feat(php): drop support for EOLed PHP versions and unify min required version (#17826) 2025-03-24 13:59:01 +08:00
kenji yoshida
7d977b63dc
Update scala version (#20953) 2025-03-24 13:55:46 +08:00
Dimitar Tomov
08ec37cc10
[kotlin-spring] Generate @Valid annotation on all RequestParts/Params for Multipart requests when useBeanValidation=true (#20864)
* [kotlin-spring] Generate @Valid annotation on all RequestParts/Params for Multipart requests when useBeanValidation=true

* [kotlin-spring] Fix failing test

The test was failing because of the newly added @Valid and an assert which is not correct anymore.
2025-03-23 18:31:18 +08:00
kenji yoshida
866558f9e7
Update sbt version (#20948) 2025-03-23 13:13:30 +08:00
kenji yoshida
24d2083684
update scala-akka-http-server generator (#20924) 2025-03-22 16:53:03 +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
Jarangutan
b1f572e116
[go-server] move errMsg helpers to helpers file (#20876) 2025-03-15 21:27:56 +08:00
Pietro Bongiovanni
5c51ee49a2
[Rust Server] Bump up env_logger to 0.11 (#20865)
* Bump up env_logger to 0.11

* regenerate examples

* regenerate examples
2025-03-13 18:45:50 +08:00
Jarangutan
4ad76cc86c
[go-server] Moved helper code from router and updated logger for chi (#20823)
* [go-server] Moved helper code from router and updated logger

* [go-server] fixed imports for mux and chi

* [go-server] fix go-api-server sample test
2025-03-09 15:47:11 +08:00
William Cheng
3ad5303f99 update samples 2025-03-03 19:29:07 +08:00
martin-mfg
2b8d496c80
[#19921] Add RFC 3339 compatible Jackson module for java.time types, regenerate samples (#20700)
Co-authored-by: Christian Beikov <christian.beikov@gmail.com>
2025-03-03 17:42:18 +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
Elric Milon
481c69063d
[Rust] Fix enum variant name generation (#20689)
* Regression test for enum Name generation in oneOf

where variants would end up having the same name.

* Fix enum variant name generation

Datatypes like `Vec<foo::bar::Baz>` would end up as `Baz` instead of `VecOfBaz`
2025-02-26 16:57:43 +08:00
Sergey Yelin
32573f7464
[erlang] erlang-server generator fixes (#20717)
* Improve perfomance for map updates

* Fix key authorization crash

* Update samples
2025-02-26 16:19:11 +08:00
William Cheng
a06a2b4c7b update samples 2025-02-23 20:55:18 +08:00
Ruslan Khasanshin
79145dc633
[kotlin-spring] Adds 'suspend' modifier for reactive List endpoint with useFlowForArrayReturnType = false (#16130) (#20710) 2025-02-23 17:35:08 +08:00
William Cheng
b80461373a update nodejs express server samples 2025-02-23 17:32:16 +08:00
William Cheng
cea3c5ba09 update nodejs express server samples 2025-02-22 23:15:00 +08:00
Dragos Vingarzan
c2884b7b1a
[BUG][Go-server] attempt to fix the controller-api mustache template for a nullable bodyParam (#20478)
* go-server: attempt  to fix the controller-api mustache template for a nullable bodyParam

* added to petstore an example to trigger the issue which this PR fixes
2025-02-19 17:09:32 +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
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
William Cheng
dd67423c8c
update samples (#20647) 2025-02-12 17:57:18 +08:00
zaenk
3eddc9af85
[JavaSpring, kotlin-spring] attach sources when maven and interfaceOnly=true is used (#20640)
* [JavaSpring] attach sources when using maven and interfaceOnly=true

Closes #15659

* [kotlin-spring] attach sources when using maven and interfaceOnly=true

Closes #15659
2025-02-12 17:41:14 +08:00
Elric Milon
21bf477da3
[Rust] Bump axum and axum-extra (#20548)
* Bump axum and axum-extra to latest version.

 - This bump requires fixing path parameters due to matchit transitive dependency
changes (See https://github.com/tokio-rs/axum/pull/2645).

 - The `Host` extractor has been moved from `axum` to `axum-extra`.
 - Axum now ships multipart extractor support, switch to that.

* Update rust-axum samples
2025-02-10 22:01:15 +08:00
Andriy Slobodyanyk
cdfa7fee77
Using Optional.ofNullable() at the fluent setters to prevent NPE (#20406)
* * Uses Optional.ofNullable() at the fluent setters to prevent NPE
* Fixes issue #17538

* updates samples
2025-02-10 18:23:01 +08:00
Victoria Casasampere Fernandez
adbbe68d4d
[Rust-Axum][Breaking Change] Implement a customizable error handler (#20463)
* 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

* Multipart is also part of the axum update

* Prevent replacing path names with the same name as a dynamic path parameter

* Use status code name instead of number

* Rollback axum update

* Forgot paths
2025-02-09 21:54:01 +08:00
Tanmay Mohapatra
561a707afc
[julia] fix enum default vals, add api validations (#20520)
- Fix enum default value generation. Default values were falling back to the default code generator and were being generated improperly for Julia.
- Add more validations to client and server API call handlers. These validations were already being generated for models, but were missed out for API calls.
2025-01-24 15:17:25 +08:00
Julian Vennen
a68ad56ea9
[php-*] Explicitly declare nullable parameters (#20524)
* [php-nextgen] Explicitly declare nullable parameters explicitly

* Fix some deprecation warnings in other php generators

* [php-nextgen] Fix PHP 8.4 deprecation warnings with nullable/optional array parameters
2025-01-23 18:06:15 +08:00
William Cheng
1fa07bf46c
Prepare 7.12.0 (#20512)
* Revert "v7.11.0 release (#20508)"

This reverts commit a7240eeefeedeefe7fc80ef22747dfc67e126324.

* prepare 7.12.0 snapshot version

* update samples

* update readme
2025-01-21 00:10:09 +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
4c73faf737
[go-server] Add tests for primitive types in request/response (#20474)
* add test for primitive request/response

* add new files
2025-01-15 16:56:16 +08:00
Dragos Vingarzan
dcf472a034
ISSUE: #17373 [BUG] [Go-server] invalid composite literal type string (#20467)
* modules/openapi-generator/src/main/resources/go-server: alternative initialization of variable, to avoid extra checks and custom code

* propagated changes to samples
2025-01-15 16:36:33 +08:00
Junfeng Qiao
1bc5eae034
Fix Julia template for binary string (#20355)
* Fix Julia template for binary format

* Update julia samples

* fix missing check for the isBinary flag

Fix missing check for the isBinary flag in some places of the templates for julialang. The code would now be generated as Vector{UInt8} uniformly for binary strings. Binary strings that are also marked as files get generated as `String` data type on the client. That is because the Julia client expects a file name to be passed there.

* Fix Julia template for file

* Update julia samples

---------

Co-authored-by: tan <tanmaykm@gmail.com>
2025-01-11 20:31:53 +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