2243 Commits

Author SHA1 Message Date
William Cheng
53289263d9
Prepare v7.2.0 (#17050)
* update version to 7.2.0-SNAPSHOT

* update samples

* update doc
2023-11-13 18:53:20 +08:00
Ian Cubbon
c9f7af752f
Verify Path params that fall into the string bucket are supplied (#17032) 2023-11-13 11:02:33 +08:00
Ian Cubbon
2f655f1a9c
Time parameters in the path resulted in code that would not compile (#17021)
This is probably a pretty rare case as it just seems weird to have a time
path parameter, but it's good to fix.
2023-11-13 10:01:32 +08:00
Ian Cubbon
291ce353ce
[Go][Server] FormParams - Generic Array Type Handling (#17001)
* If a form param is an array and isn't caught in the previous checks, treat it as a slice of strings.

* Add an example of a FormParam that is an array
2023-11-08 14:09:12 +08:00
loicconan
d945499073
[PHP-SYMFONY] Support BackedEnum for enum ref (16846) (#16847)
* [PHP-SYMFONY] Support BackedEnum for enumm ref (16846)

* [PHP-SYMFONY] Support BackedEnum for enumm ref (16846)

* [PHP-SYMFONY] Support BackedEnum for enumm ref (16846)

* [PHP-SYMFONY] Support BackedEnum for enumm ref (16846)

* [PHP-SYMFONY] Support BackedEnum for enum ref (16846)

* [PHP-SYMFONY] Support BackedEnum for enum ref (16846)

* [PHP-SYMFONY] Support BackedEnum for enum ref (16846)
2023-11-07 22:40:35 +08:00
Dennis Melzer
f83cb60f27
Add optional parameter for request body (#16972)
* Add optional parameter for request body

* Adapt Test
2023-11-04 16:54:50 +08:00
Kapil Gupta
c4b18f206d
[Server][Spring] fix support interface and implementation classes for API controllers (#16945)
* [Server][Spring] support interface and implementation classes for API controllers

* Omitted new string calls

* Added Log messages

* remove else

* Removed redundant if

* Update missed ;
2023-11-04 16:52:17 +08:00
dabdirb
739390a682
java exclude password field from toString (#16942) 2023-10-31 17:50:30 +08:00
devhl-labs
5a5ee163dc
fixed lambda to not strip line breaks (#16930) 2023-10-29 11:08:04 +08:00
Ian Cubbon
677b6e64c1
If parsing a boolean fails, return a ParsingError instead of a straight 500 (#16910)
Add an example endpoint that covers Required, Default, and Not Required cases
2023-10-28 20:32:04 +08:00
Artem
05b796aadc
Fix type hint for array in comments. (#16926) 2023-10-28 20:30:16 +08:00
Nathaniel Cook
fbd02554f5
fix(rust-server): remove redundant clone (#16906)
The generated example code would clone the context. However as context
is a generic type and is not declared to implement Clone, a clone of a
reference is just a copy of the reference and therefore unnecessary.
This change removes the redundant call and therefore avoids the `cargo
clippy` warning.
2023-10-27 11:06:34 +08:00
loicconan
cb85358aa5
[PHP-SYMFONY] Debug Date and DateTime Assert (#16874) 2023-10-23 22:26:27 +08:00
Ian Cubbon
bf9fae641e
[Go-Server] Add support for DateTime Query Parameters (#16749)
* Add support for DateTime objects in the Path, Query Params, and as a List

* Fix indentation

* Add an exaple that has dateTimes
Move the date parsing into a common util in the routers.go file.

* Fix compilation issue and regen

* Use the `RequiredError` to handle this case

* Only split on a "," and not an extra 'space' after the ",".
2023-10-22 21:07:13 +08:00
Ian Cubbon
e0738a6e42
[Go-Server] Support for an endpoint returning a file to the client - #15206 (#16748)
* Support for an endpoint returning a file to a client.

* Spaces to tabs conversion

* Add an example endpoint for download a file

* Regenerate after merging main
2023-10-17 11:42:27 +08:00
Ian Cubbon
1dd9590064
[Go-server] - Support for Enums in the Path and Query (#16781)
* Add support for Enums to be part of the Path and Query
Supports optional Query Enums and Lists of Enums as well
Add an example endpoint that covers the added scenarios
Added an import mapping for the GoServerCodegen for "fmt"
    when a model is an enum.
Expanded the Enum Model for the Go Server to have validation.
    Copied this logic from the Go Client Enum Model.

* Fix identation of examples

* Pre-allocate the capacity of the slice of Enums to be
the correct size.

* Formatting and updated examples

* Empty-Commit

* Switch to using a map to store the valid enum values

* Fixed pointer derefs missed from previous change in PR

* More fixing of pointer to not pointer

* Create a map for validation and a list of enums for messaging
2023-10-17 11:35:39 +08:00
DaxServer
8bb473316e
[PHP-Symfony] fix #15950: Add float to deserialize (#16835)
* [PHP-Symfony] fix #15950: Add float to deserialize

* Add test sample

* Add double

---------

Co-authored-by: DaxServer <daxserver@icloud.com>
2023-10-16 22:19:33 +08:00
Gonzalo Gomez
571aefa3da
io/ioutil has been deprecated. (#16822)
Uses os.CreateTemp to create temp directory.
Uses io.Copy to avoid reading file into memory.
2023-10-14 10:04:06 +08:00
William Cheng
ba367e60e8
[go-server] Add tests, minor format change (#16805)
* add tests for #16787, minor format change

* revert

* fix typo

* use pet instead of fake

* update samples
2023-10-12 19:23:02 +08:00
SURAJ VASHISTA B K
494ee489ad
fixed a flaky test org.openapitools.codegen.DefaultCodegenTest.testVarsAndRequiredVarsPresent (#16751) 2023-10-10 13:31:22 +08:00
martin-mfg
e3db882ed4
[JAVA][KOTLIN][SPRING] upgrade dependencies (#16759)
* upgrade spring-boot-starter-parent

* upgrade springdoc and swagger-ui

* upgrade v3 swagger-annotations

* generate samples

* upgrade jackson

* fix spring cloud, remove temp comment

Putting "8" instead of "1.8" should be ok, because Spring Boot 3 requires Java 17 anyway, so it should be able to understand that 8 is the same as 1.8.

* generate samples

* upgrade JUnit 5, remove commons-io dependency, remove outdated samples/client/petstore/java/feign/feign10x/ files, generate samples

commons-io dependency was introduced in https://github.com/OpenAPITools/openapi-generator/pull/8484, but I don't see why it would be needed now or back then.

* update gson, generate samples

* update logback

* update feign

* update scribejava

* generate samples

* update httpmime

* okhttp-gson: update commons-lang & okhttp & junit-platform, remove mockito; generate samples

It seems Mockito is not used at all there.

* okhttp-gson: remove unnecessary sample files, generate sample files

* upgrade google-api-client & jersey-common, restore ClientTest, generate samples

* misc. upgrades in jersey2 and jersey3

jersey 3.1.3 is available already, but IntelliJ reports security problems in 3.1.3 and 3.1.2, so I used 3.1.1 instead.

* align some gradle&sbt files with poms, generate samples

* whitespace fix
2023-10-09 14:55:32 +08:00
dabdirb
4a0ab21ba4
[Spring] resolves #16054, resolves #15088 add vendor extension x-spring-provide-args (#16663)
* add vendor extenstion x-spring-provide-args

* add vendor extenstion x-spring-provide-args

* Revert "add vendor extenstion x-spring-provide-args"

This reverts commit 8a0cbc93eb5825651e4b97cbe83054adbaa1acce.

* catch up latest main and re-generate samples

* remove un-used import

* add vendor extenstion x-spring-provide-args (#16054,#15088)

* update  X_SPRING_PROVIDE_ARGS for better description

---------

Co-authored-by: xiangxi.chen <xiangxi.chen@cerence.com>
2023-10-05 11:11:55 +08:00
William Cheng
11771a8ccf update samples 2023-10-04 15:11:06 +08:00
Jorge Rodríguez Martín
ee5d9f6ad3
[Java][Spring] Fix RequestPart/RequestParam handling on multipart request in reactive stack (#16535)
* Fix requestpart in reactive

* Update samples
2023-10-01 23:23:24 +08:00
Artem
039c1698b0
[php-symfony] Support for default scalar value of properties in model (#16605)
* Add support for default scalar value of properties in php-symfony models. Default values now returns in getter-functions

* Revert nullable type-hinting. Move default values from getter to property initialize.
Made changes in __construct:
Now value of properties rewrites only if key exist in $data array.
2023-10-01 21:32:32 +08:00
Aarni Koskela
67b129fda9
python: Remove usage of six (#16675) 2023-09-28 19:26:42 +08:00
William Cheng
bb3096c99c
Jaxrs jersey3 server (#16676)
* Introduced Jersey3 to JavaJerseyServerCodgen and its test class

* Added date ParamConverterProvider to new jersey3 resource directory

* Copied and adjusted jaxrs-jersey2 directory to jaxrs-jersey3

* Added unit tests for Jersey2 (jakarta|javax) and jersey3 (jakarta only)

* Added Jersey3 to markdown documentation

* Added several mustache files for Jersey3

* Further adjustments in JavaJerseyServerCodegen for Jersey3

* Removed tabs from JavaJerseyServerCodegen

* Further improvements in pom and web template

* Changed to swagger-jaxrs2-servlet-initializer-v2 within the projects pom

* Changed servlet-initializer to jakarta version

* Removed tabs in JavaJerseyServerCodegenTest.java

* Removed tabs from JavaJerseyServerCodegen

* Out commented Swagger 1.x part in api.mustache (see ApiImplicitParams)

* Exchanged import of javax* by jakarta* in file verify.groovy

* Changed Parameter annotations to Schema annotations

* Added web.mustache for jersey3

According to the 'Swagger 2.X Integration and Configuration' doc at
https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration

* Adjusted README to point to ./openapi.json instead of ./swagger.json

* Added ./bin/configs/jaxrs-jersey-jersey3.yaml as requested

* Added new jersey3 example (see ./samples/server/petstore/jaxrs/jersey3

* Corrected formParams.mustache exchanged @FormParam by QueryParam

* Resolved ModelValidationException for Map query parameter

* Improved api.mustache (layout and deprecated class instantiation )

* Updated jersey3 example under ./samples/server/petstore/jaxrs/jersey3

* fix tests

* add jeresey3 to github workflow test

* add new workflow

* remove jersey3

---------

Co-authored-by: CDerksen <christian.derksen@uni-due.de>
2023-09-28 16:53:20 +08:00
martin-mfg
1cff462d90
remove jersey 1 (#16646) 2023-09-26 09:10:11 +08:00
martin-mfg
2ca99bdf8e
use model class for request body with additionalProperties (#16613)
* try out simple fix

* add test case

* generate samples
2023-09-23 13:07:53 +08:00
William Cheng
1bcf79236f update samples 2023-09-21 17:19:35 +08:00
krasv
8f8fd85fd6
contribution #6123: add spring support for SSE conform specs (#16543)
* add spring support for SSE conform specs

see https://github.com/OpenAPITools/openapi-generator/issues/6123 for the ongoing discussion

* extend generator option documentation

* applied review suggestions

* regenerated samples

* regenerated docu

* fix code style: removed tabs
2023-09-21 17:08:24 +08:00
William Cheng
5e8e2d7f6d
Prepare v7.1.0 in master (#16608)
* prepare v7.1.0 in master

* update
2023-09-18 17:37:36 +08:00
William Cheng
8c8be7482b
Update java undertow to newer version (#16606)
* update java undertow to newer version

* update compiler plugin to newer version

* test undertow in circleci

* use 3.0 spec
2023-09-18 11:26:33 +08:00
William Cheng
5f0d7053e4
Update go gin to newer version (#16593)
* update go gin to newer version

* update test
2023-09-15 15:50:25 +08:00
William Cheng
9170e1030f
fix enum in python flask (#16576) 2023-09-13 15:49:38 +08:00
William Cheng
9c4f6c46f7
Fix integer default value with double quote (kotlin jaxrs server generator) (#16563)
* fix integer default value with double qutoe (kotlin jaxrs)

* add enum tests

* fix typo

* update samples
2023-09-12 17:38:51 +08:00
William Cheng
70543126f2
fix jaxrs sample tests (#16566) 2023-09-12 16:51:05 +08:00
martin-mfg
d6695056fe
add test case for nullable parent property (#16552)
* add nullable case to spring test spec

* generate samples for changed spring input

* add nullable case to general test spec

* generate samples for changed general input

* generate samples again

* generates samples again

* re-build from new sources, generates samples again
2023-09-12 15:59:58 +08:00
William Cheng
18df6ed85f
[Spring] fix nullable map properties (#16524)
* fix map in spring generators

* fix nullable map in spring generators
2023-09-09 13:30:21 +08:00
William Cheng
128d9da8a1 update smaples 2023-09-09 11:50:36 +08:00
Andreas Johnsen
75c2e934da
add omitGradleWrapper option to kotlin-server code generator (#16528)
The added option removes the wrapper part of build.gradle, enabling the generated project to be used as a sub project. The same option from kotlin client was used as reference for this change.
2023-09-09 11:40:37 +08:00
Diego Urban
3817e40f47
[JavaSpring] Generate deprecated property, annotation and javadoc. (#16493)
* [JavaSpring] Generate deprecated annotation and doc properties

* [JavaSpring] Generate deprecated for @Schema

* [JavaSpring] Add sample folder to workflow

---------

Co-authored-by: Diego Urban <d.urban@carepay.com>
2023-09-06 15:55:15 +08:00
Robin Jonsson
acb798b58b
[JavaSpring] Call parent fluent setters from child (#16497)
* Call fluent parent setter from child pojo

This closes #16496

* Generate new samples
2023-09-06 11:43:35 +08:00
William Cheng
07a5920b2f
fix slash in python aiohttp files (#16463) 2023-08-31 15:59:18 +08:00
William Cheng
611a60411b
fix cast exception in uuid default value (julia) (#16438) 2023-08-29 20:42:49 +08:00
William Cheng
b1564d8002
Fix UUID default value cast exception (swift5) (#16436) 2023-08-29 12:32:01 +01:00
William Cheng
80121aa88f
Prepare v7.0.1 (#16409)
* prepare 7.0.1 in master

* update doc
2023-08-25 16:11:29 +08:00
Baptiste Le Morlec
26899ee59b
Adding model type hints for Python Flask (#16382)
Co-authored-by: Baptiste LE MORLEC <baptiste.lemorlec@stryker.com>
2023-08-24 20:49:28 +08:00
William Cheng
91fc151451
Add mapping features to Julia generators (#16370)
* add mapping features to julia generators

* additional changes required for mapped names (#16383)

---------

Co-authored-by: Tanmay Mohapatra <tanmaykm@gmail.com>
2023-08-24 10:09:54 +08:00
Lezenford
3e95001939
[Kotlin-Spring] fix arrays response api after generation (#16296)
* issues/16295 fix arrays response api after generation

* fix samples

* fix samples

---------

Co-authored-by: Lezenford <alex.v.plekhanov@gmail.com>
2023-08-23 10:52:15 +08:00