2337 Commits

Author SHA1 Message Date
William Cheng
81f576c9da
update dnspython to a newer version (#18376) 2024-04-13 10:52:43 +08:00
Daniel Metzner
8155d03c38
Allow Symfony 7 / Remove EOL PHP / Bearer Fix (#18357)
Bump requirements
  - add Symfony 7 support
  - remove support php < 8.2 (EOL)
  - remove symfony < 6.4 support

Bug Fix
  - add missing $security{{name}} variable when using Bearer Auth

Misc
 - getContentType method is deprecated; use getContentTypeFormat
 - use match instead of switch for simple assignments
 - remove default depth param from json_encode call
 - make data provider static (phpunit)
2024-04-13 10:46:47 +08:00
William Cheng
4cde53c3d7
update idna to newer version (fastapi) (#18372) 2024-04-13 09:37:08 +08:00
Aaron Pritzlaff
24c1968002
cask fix for response encoding (#18375) 2024-04-13 09:34:08 +08:00
Linh Tran Tuan
65e74a354d
[Rust] [Axum] Revert PR #18061 (#18354) 2024-04-11 21:58:21 +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
494d74ab82
remove duplicated (#18320) 2024-04-07 22:25:03 +08:00
Viswajith Venugopal
650e119f22
Update go-server template to include the conventional generated code line (#18304)
* Update go-server template to include the conventional generated code line

Follow the convention from https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source.

The generated go client code already follows this: f357be480e/modules/openapi-generator/src/main/resources/go/partial_header.mustache (L18)

* gen files

* Move to top
2024-04-07 21:23:24 +08:00
martin-mfg
b11005b00d
[JAXRS-SPEC] no @Valid annotation on simple fields (#18302)
* fix and test

* whitespace change, generate samples
2024-04-06 11:19:03 +08:00
William Cheng
e17777044e
Use systemPropertyVariables in pom.xml (#18213)
* use system property variables in pom.xml

* update
2024-03-23 21:45:29 +08:00
Maroš Varchola
f258ce2cf5
#18031 Fix: added middleware adding for authorization methods [php-slim4] (#18103)
* fix: added middleware adding for authorization methods, added unauthorized handler to authorization abstract, fixes #18031

* feat: updated generated sample for php-slim4

* fix: small fix for running error handlers and environment setting fix

* feat: removed unused dependency in abstract authenticator, php-slim4
2024-03-23 21:41:16 +08:00
Flemming Nørnberg Larsen
a4508f6817
#18058 Fix the Java generator to generate valid @RequestMappings where the produce field takes list of string parameters instead of a single comma-separated string (#18092)
* #18058 Fix AbstractJavaCodegen.getAccepts() so it returns a String array instead of a comma-separated string, and fixed api.mustache so the @RequestMapping annotation generated produces for x-accepts as a parameter list instead of a (single) string.

* #18058 Updated test case to accept a string array instead of a comma-separated list.

* #18058 Reverted changes on imported compared to the main branch.

* #18058 getAccepts() is now hybrid, and can return both a single String or a String[].

* #18058 Rolled back the hybrid getAccepts(), so it only returns a String array.

* #18058 Updated mustache files to cope with vendorExtensions.x-accepts being a string array instead of a comma-separated string.

* #18058 Generated new sample files with by running `./bin/generate-samples.sh ./bin/configs/*.yaml`

* #18058 Optimization of getAccepts()

* #18058 Regenerated scripts that got broken after resolving conflicts on GitHub

* #18058 Fixed introduced issue with api.mustache causing a redundant accept with @HttpExchange with the PetApi.java, StoreApi.java, and UserApi.java.
2024-03-21 17:53:18 +08:00
Sondre Eikanger Kvalø
c7e9bd2f29
[Kotlin][Server] Skip new post processing routine for kotlin server jaxrs (#18180)
* Skip post processing when generating JAXRS spec with Kotlin
This feature was previously added to work with the javalin5 library

* Add sample that proves what we expect after fixing this

* Update sample

* Added new samples to samples workflow

* Revert from jdk17 pipeline
2024-03-21 15:55:28 +08:00
William Cheng
ddb5ab4078
Add name in various cases in property, parameter names (#18139)
* create nameInPascalCase

* add back name in camel case

* update abstract cpp codegen

* update erlang templates, update samples

* update tests

* add param names in various cases

* clean up

* fix
2024-03-19 09:27:02 +08:00
devhl-labs
96fad5eb2c
[csharp] Fix getModelFromParameter (#18137)
* fix getModelFromParameter

* minor fix
2024-03-18 12:54:49 +08:00
William Cheng
41dbe51575
update protobuf to newer version (go gin) (#18123) 2024-03-16 14:59:47 +08:00
Dennis Melzer
96bf7ac915
Fix default empty collections when collection is optional (#18080)
* Fix optional empty collection as default

* Fix test

* Fix test
2024-03-14 20:28:27 +08:00
Timo von Holtz
5975e6c5b0
Haskell: JSON Query parameters (#18047)
* Allow json encoded query paramters

* Also fix haskell-http-client

* Regenerate haskell samples
2024-03-12 15:35:18 +08:00
William Cheng
4ff7e0ec3f
Prepare 7.5.0 snapshot (#18068)
* Revert "7.4.0 release"

This reverts commit eda049348425171df772a7b9087cc97db718cfda.

* prepare 7.5.0 snapshot version

* update samples

* update doc
2024-03-11 11:10:52 +08:00
William Cheng
950028419a update samples 2024-03-10 00:03:11 +08:00
dabdirb
93aec4d89d
Fix #17831 @lombok.NonNull on all required fields when any lombok annotation is included (#17861)
* fix #17831 @lombok.NonNull on all required fields when any lombok annotation is included

* fix #17831 @lombok.NonNull on all required fields when any lombok annotation is included
2024-03-09 17:44:10 +08:00
hahny93
033993c63d
[Kotlin Spring] fix template request part and description (#17821)
* [kotlin-spring] Parameter Name and Description are now used properly in multipart form endpoints

* [kotlin-spring] Parameter Name and Description are now used properly in multipart form endpoints (generated docs and samples)

* [kotlin-spring] Parameter Name and Description are now used properly in multipart form endpoints (generated docs and samples)

---------

Co-authored-by: Kevin Hahn <kevin.hahn@partner.ionity.eu>
2024-03-09 17:43:27 +08:00
Ross Bender
cf2435f335
Add support for controlling output of OpenAPI Generator version in generated files (#17952)
* add initial openapi config and java generated files

* add java implementation for adding generator version

* regenerate sample client files

* remove tabs

* only show generated version if build info exists

* set build info for batch generation

* update generator doc for new global flag

* use existing property for generator version

* update templates to include generator version

* update templates for better generator version syntax

* revert undesired changes

* regenerate samples for openapi client

* update templates to correct formatting/newlines

* correct description text and add to usage doc

* add generator cli option for all codegen types

* use more concise version info; update existing codegens to support new prop

* correct wrong prop reference

* add initial test coverage for new prop

* update last (scala) templates with new prop

* update samples after upstream merge

* use consistent version output

* use better sample project id/name

* revert using option for generator version in templates
2024-03-09 15:52:08 +08:00
William Cheng
8dae7026b9 update samples 2024-03-09 14:41:22 +08:00
Oscar Reyes
7d9f9d7e81
[kotlin-spring] Fix cookie parameter code generation in API (#17959)
* + Cookie parameter generation fixed

* Added cookie parameter mustache template for generating cookie related code
* Adapted kotlin-spring api templates to include cookie parameters
* Added tests for evaluating cookie parameter code generation
* Added configuration sample for the new cookie use case

* - Unused fake cases removed

* Removed fake cases from openapi spec that were not related to cookie usage
* Cleaned sample files
2024-03-09 14:34:12 +08:00
Ira Chan
62d0e3abdb
[kotlin-spring] fix BigDecimal default value failed to compile (#17956) 2024-03-08 12:56:16 +00:00
Aliaksei
92314232f8
[bugfix][18008]: fix getBeanValidation for scalar as ref (#18014) 2024-03-04 13:04:57 +08:00
Vladimir Svoboda
5d43c88540
[Java] [Spring] Fix reactive return type for list (#16884)
* Improve Add Async - Spring Cloud test

By testing the generated code.
This will be used to detect regressions.

* Spring: Fix reactive return type for list

Fix for #16883.

When *reactive* is enabled and response entities is *disabled*,
use `Flux<Item>` to stream the output instead of `Mono<Flux<Item>>`
With Spring Reactive, the expected return type for an array of item is
`Flux<Item>`.
Without this patch, the generated code is `Mono<Flux<Item>>`.

This is fixed by introducing specific handling for return types when
reactive is enabled.
In particular, "responseWrapper" is not used anymore in such situations.

* Fix methodBody

* Fix invalid test

* Fix SSE

* Fix methodBody when isArray and useResponseEntity

* methodBody: Flux.empty() instead of s -> {}
2024-03-02 21:19:34 +08:00
Linh Tran Tuan
cdf8973999
[Rust] [Axum] Fix clippy warning: to_string_trait_impl (#17995)
* [Rust] [Axum] Fix clippy warning

* Using Display trait
2024-03-01 11:32:23 +08:00
William Cheng
df8851d627
update orjson to newer version (#17982) 2024-02-28 11:45:26 +08:00
Chris Miller
4ba187a1a4
Provide rust-server swagger/multipart_form (#17950)
* grant rust server swagger form multipart

* run exporters
2024-02-25 17:18:15 +08:00
Jean-François Côté
a6771adf53
Add nullable to model fields (#17934) 2024-02-23 15:55:19 +08:00
ふぁ
c99a5cfeb6
[python] update model_config from dict to ConfigDict (#17900)
* [python] rewrite dict as ConfigDict

* [python] update sample

* [python] undo unwanted changes

* [python] update sample
2024-02-20 17:53:13 +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
82bb813aeb
update fastapi dependencies to newer versions (#17871) 2024-02-15 15:27:17 +08:00
William Cheng
887b860007
Update python-fastapi generator to support Pydantic v2 (#17369)
* update python fastapi to support pydantic v2

* add new files

* update samples

* update samples

* update starlette

* update typing extensions

* update email validator
2024-02-15 14:15:51 +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
3f344ac6b4 update python fastapi readme 2024-02-13 16:54:27 +08:00
Simon Podlipsky
f3ac4498df
refactor(php): use self::markTestIncomplete instead of instance calls (#17824)
It's reported by phpstan as `Dynamic call to static method PHPUnit\Framework\Assert::markTestIncomplete().`.

The method is static, therefore it should not be called from instance context.
2024-02-12 15:48:44 +08:00
Simon Podlipsky
1e9bccca16
feat: generate EOL in VERSION file (#17829)
The EOL is missing so let's add it in order to comply with POSIX standard:

Line
> A sequence of zero or more non- <newline> characters plus a terminating <newline> character.
2024-02-12 15:40:55 +08:00
William Cheng
783e68c7ac
7.4.0 snapshot (#17818)
* Revert "7.3.0-release (#17817)"

This reverts commit d617b46c86b9075c5e0d63fe3798e2982f5259ac.

* update samples, docs, readme
2024-02-08 16:07:22 +08:00
William Cheng
0d1b14a75f replace 4-space with tabs in go templates 2024-02-08 12:58:19 +08:00
Mehmet Fatih Ercik
fdb001c8a3
add a new function router to pass gin context (#17785) 2024-02-08 12:53:00 +08:00
William Cheng
7cdbb2a7b4 update samples 2024-02-08 11:38:49 +08:00
William Cheng
5af2c7fbfb
[jax-rs][jersey3] Fix missing SecurityRequirement (#17797)
* [jax-rs][jersey3] Add SecurityRequirement

* Update Samples

* update samples

---------

Co-authored-by: nbreuil <88213872+nbreuil@users.noreply.github.com>
2024-02-06 16:47:19 +08:00
Sander Hoentjen
7267e809c3
[python-fastapi] Ensure path param is ... instead of None (#17532)
Fixes #16029
Code from https://github.com/OpenAPITools/openapi-generator/issues/16029#issuecomment-1776271921
2024-01-31 11:03:14 +08:00
William Cheng
ef59589287 update samples 2024-01-31 10:38:59 +08:00
martin-mfg
9afea50cab
use map/array model class only if it is generated (#17612)
* fix

* tests

* generate samples

* refactor
2024-01-29 21:35:21 +08:00
dmbakker
9952776e9c
[java] fix Use jackson-jakarta-rs-json-provider when useJakartaEe is true (#17600)
* fix #17590 - use jackson-jakarta-rs-json-provider instead of jackson-jaxrs-json-provider in pom when useJakartaEe is true

* fix #17590 - fix indentation

* fix #17590 - updated samples

* fix #17590 - fixed groupid

---------

Co-authored-by: in376bak <dennis.bakker@duo.nl>
2024-01-28 00:38:18 +08:00
dabdirb
66a6af5ca4
add lombok model support on spring (#17622)
* add lombok model support on spring

* use regex to adapt annotation with parenthesis

* add ut case

* add samples

* add samples

* fix github workflow

* fix github workflow
2024-01-27 10:45:44 +08:00