2070 Commits

Author SHA1 Message Date
William Cheng
a4b5b85067
Update jackson nullable version to newer version v0.2.6 (#14823)
* update jackson nullable to newer version

* update samples

* update samples

* update samples
2023-02-27 18:38:31 +08:00
Dennis Melzer
92b96635bd
Fix bean validation for Collection and add unit test (#14736)
* Fix bean validation for Collection + uni test

* Fix

* Adapt examples

* Fix comments

* Merge master

* Remove Bean validation for Maps

* Remove @Valid from jakarta

* Fix example

* Fix comments

* Fix springboot-3 example
2023-02-25 22:06:31 +08:00
Naoki Ikeguchi
9290c1a75e
[rust-server] Fix clippy warnings (#13907)
* fix(rust-server): clippy::blacklisted_name -> clippy::disallowed_names

* fix(rust-server): Remove unnecessary deref

* fix(rust-server): Allow clippy::single_match

* fix(rust-server): Use clone instead of to_owned on Cow

* fix(rust-server): Remove needless borrows

* chore(rust-server): Update sample outputs
2023-02-20 13:46:01 +08:00
William Cheng
c50a775e0c
prepare 6.5.0 release (#14749) 2023-02-19 20:36:23 +08:00
William Cheng
93df0ff444
Prepare 6.4.0 release (#14748)
* prepare 6.4.0 release

* update samples
2023-02-19 18:53:20 +08:00
Jorge Rodríguez Martín
cb20e742ea
[BUG][JAVA][SPRING] Fix serialization when there is a discriminator with mapping (#14733) (fix #14731)
* Fix serialization when there is a discriminator with mapping

* Update samples

* Update samples

* upgrade samples

* Revert "Update samples"

This reverts commit d6affde263d6c539e32a7f38dc984cf5948ab322.
2023-02-18 07:00:44 -08:00
GregDThomas
c5d67ee042
Fix https://github.com/OpenAPITools/openapi-generator/issues/11570 by ensuring tags at the class level match tags at the method level (#13434) 2023-02-18 06:23:10 -08:00
William Cheng
7968349991
go server - use tabs instead of spaces (#14740) 2023-02-18 00:37:53 +08:00
Rodrigo Cebrián González
612dc4dbcb
[BUG][Go] Remove "null" body value when body is empty #13927 (#13934)
* only write reponse body if not nil

* update go samples

* golang style convention
2023-02-18 00:29:12 +08:00
RInverid
9be92fabd1
fix incorrect method name (#14720) 2023-02-16 22:22:55 +08:00
Dave Syer
0e0cddacac
Make sure jaxrs-spec works with Jakarta (#14654) 2023-02-16 18:29:37 +08:00
William Cheng
71c2abf81c
[Java] fix default value for JsonNullable (#14703)
* fix java webclient default value

* update default value in java okhttp client

* fix java native client default value in JsonNullable

* improve java okhttp-gson default value template

* update java rest-related templates

* update feign samples

* update jersey3 templates

* update jersey2 templates

* update default value in jaxrs templates

* fix spring default value

* update jaxrs pojo, fix tests

* update samples

* suport set
2023-02-16 10:37:36 +08:00
William Cheng
85a7d69b5f
update starlette to newer version (#14700) 2023-02-15 14:59:43 +08:00
William Cheng
d7a2e4a293
Apache Camel: implicit headers (#14674)
* Apache Camel: fix implicit headers

* ./mvnw clean package
  ./bin/generate-samples.sh
  ./bin/utils/export_docs_generators.sh

* Q

* Created samples/openapi3/client/3_0_3_unit_test/python/test/.gitempty

* update samples

---------

Co-authored-by: Giacomo Carnevale <gcarnevale@imolainformatica.it>
2023-02-11 23:48:55 +08:00
Beppe Catanese
68b944e6e6
Preserve order of securitySchemes (#14536)
* Remove alphabetical sort

* Update integration testing expectations

* Regenerate files
2023-02-10 22:20:19 +08:00
Nico Korthout
26eb1dc805
[Kotlin-Spring] Support multiline descriptions (#14406)
* [Kotlin-Spring] Support multiline descriptions

This commit adds support for multiline descriptions for operations in
the Kotlin-Spring generator, for both regular API generation (i.e.
Controller), as well as interface-only API generation.

Multiline descriptions allow us to use rich text representations, e.g.
with Markdown. Note that Markdown-formatted descriptions are rendered
nicely in Swagger-UI. I imagine that most openapi consumers will be able
(or will want to) support Markdown (at some point).

The solution for Kotlin-Spring is rather simple, using Raw Strings to
contain the `unescapedNotes`.

See: https://kotlinlang.org/docs/strings.html#raw-strings

Note that specific unescaped strings could cause problems. For example,
the string containing three double quotes `"""` would result in compile
errors for the generated code. I think this is acceptable.

Note that an improvement is possible to use `.trimMargin()` in
combination with the pipe symbol `|`, to allow specific margin
prefixing.

Note that the description is used in escaped form in the JavaDoc. This
could be resolved by prefixing every line of the unescapedNotes with a
star `*`.

For now, I've chosen to implement this the simplest way I could think
off.

Signed-off-by: Nico Korthout <nico.korthout@camunda.com>

* [Kotlin-Spring] Update samples

Signed-off-by: Nico Korthout <nico.korthout@camunda.com>

---------

Signed-off-by: Nico Korthout <nico.korthout@camunda.com>
2023-02-07 17:25:12 +00:00
pravussum
4f1708c3fb
[Java/Microprofile] Add support for Jackson serialization & async interfaces using Mutiny in Java Microprofile library (#11554) 2023-02-03 19:39:01 +08:00
Fynn Tang
f6be077efb
fix(sec): upgrade websockets to 10.0 (#14593)
* update websockets 8.1 to 10.0

* fix(sec): upgrade websockets to 10.0
2023-02-03 09:37:28 +08:00
William Cheng
31a89e35cb
Prepare 6.4.0 (#14582)
* update to 6.4.0 snapshot

* update samples

* update doc
2023-02-01 22:44:40 +08:00
William Cheng
8f2676c5c2
Prepare v6.3.0 release (#14580)
* 6.3.0 release

* fix maven plugin test

* update samples

* update doc

* fix tests in windows
2023-02-01 20:52:29 +08:00
Paul Parenko
cffe2d0259
[Kotlin-Spring] support to Spring boot3 & jakarta extension (#14369)
* [Kotlin] add spring boot 3 & jakarta extension support

* [kotlin-spring] readme update & modified imports

* use latest Spring Boot starter parent

* use same options as in [Java] generator

* new config kotlin-spring-boot-3

---------

Co-authored-by: jayandran sampath <jayandran.sampath@opencastsoftware.com>
2023-01-31 22:16:06 +08:00
William Cheng
fd45b74128
[Java] better default value handling (#14130)
* add test for array default value

* update null return

* minor fixes

* move default value tests to echo api spec

* add new files

* remove unused files

* fix enum array default, add tests

* better array init

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

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>

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

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>

* revert the fix

* improve default value handling

* update native samples, add tests

* update samples

* fix tests

* use conditional test for timezone

* add tests to apache http client echo api

* add option to default container to null

* fix map default value

* minor refactoring

* update samples

* fix javadoc

* fix pom.xml

* add tests in java native echo client

* add java apache client echo tests

* fix test

* fix test

---------

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>
2023-01-30 20:19:00 +08:00
Tanmay Mohapatra
4bc16ea6bb
Added a Julia client and server (#14520)
* Added a Julia client and server

This PR adds two new generators for the [Julia language](https://julialang.org/)
- `julia-client` to generate a client from specifications
- `julia-server` to generate a server with stubs that can be used to host a server conforming to the specifications

The generated code uses the Julia [OpenAPI.jl](https://github.com/JuliaComputing/OpenAPI.jl) package that includes support functions for both client and server.

* fix javadoc generation

* add changes after ensure-up-to-date run
2023-01-30 16:40:33 +08:00
Sebastian Cevallos
8540c82d30
Add handling for parsing optional bool params & regenerate samples (#14550) 2023-01-30 16:35:19 +08:00
Johnny Marnell
c912bae3bc
[Spring] Fix bean name collisions (#14092) (fix #14094)
* Use correct Pascal case for java enum

* Uniquely name @Bean annotations

* Use existing mustache var instead, run generate files

* rebase, re-run generators

* try to undo botched rebase/merge

* Attempt to manually undo whatever is going on w/ build, oops

* Attempt to manually undo whatever is going on w/ build, oops
2023-01-17 11:24:15 +02:00
Marvin Rensing
4cd080762a
[Java][Spring] fix RequestPart/RequestParam handling on multipart request for arrays (#14450) (fix #14449) 2023-01-16 11:39:51 +02:00
Ian Cubbon
74073df27c
[GO][Client] Use a *os.File for the API Client when uploading and downloading (#14340)
* Change the return type of a file back to a pointer

* Change the api template to handle not double pointer-ing return types of os.File

* Fix unit tests

* Couple more unit test fixes
2023-01-16 16:51:04 +08:00
Paul Parenko
be87382fde
[Java][Spring] Fix #14398 springboot 3 schema required (#14402)
* fix depricated @Schema(required) since swagger 2.2.5

* use same swagger-annotations version which is used by swagger-core which is a dependency of springdoc

* generated java sampes
2023-01-14 06:59:33 -08:00
devhl-labs
8abc750c0e
[csharp-netcore] Added isNew property to CodegenProperty (#14412)
* added isNew property to CodegenModel

* build all samples
2023-01-13 14:43:33 +08:00
Oleh Kurpiak
076b88429e
[Java][Spring] fix param docs (#14426) 2023-01-12 19:53:01 +08:00
Oleh Kurpiak
5dbfea6ecc
[Java][Spring] fix default response code (#14399) 2023-01-11 20:34:58 +08:00
Oleh Kurpiak
ec9c7bdf2c
[Java][Spring] fix EnumConverterConfiguration (#14356) 2023-01-05 10:19:17 +08:00
Antoine Rey
917892db7d
#14141 Add externalDocs to @Operation to the JavaSpring generator (#14177)
* #14141 Add externalDocs to @Operation to the JavaSpring generator

* #14141 Add externalDocs to @Operation to the JavaSpring generator : fix mustache template with #hasExternalDocs

* #14141 Add externalDocs to @Operation to the JavaSpring generator: fix indentation

* #14141 Add externalDocs to @Operation to the JavaSpring generator: fix carriage return

* #14141 Add externalDocs to @Operation to the JavaSpring generator: regenerate the spring-boot-oas3.yaml sample

* #14141 Add externalDocs to @Operation to the JavaSpring generator: generate-samples.sh

* #14141 Add externalDocs to @Operation to the JavaSpring generator: remove hasExternalDocs

* Fix ExternalDocumentation import generation and order

* #14141 Add externalDocs to @Operation to the JavaSpring generator: generate-samples.sh
2023-01-04 10:15:23 +08:00
Julien Herr
921199bba7
[kotlin-spring] Move Jackson annotation from field to getter (#10825)
* Move Jackson annotation from field to getter

In some case, Jackson will duplicate entries when the annotation is on field
See https://github.com/FasterXML/jackson-databind/issues/1609

* Update samples
2023-01-02 15:32:57 +00:00
Oleh Kurpiak
dc99a450dd
[Java][Spring] fix @Operation content for array response (#14201) 2023-01-02 17:10:48 +08:00
Paul Parenko
456cca1a28
[Java] Fix #14276 Java Templates uses jakarta or javax package if useJakartaEe is enabled (#14343)
* Fix #14276 Java Templates uses jakarta or javax package if useJakartaEe
is true

* generated samples after useJakartaEe changes

* generated docs after useJakartaEe changes
2023-01-02 16:28:44 +08:00
renaud-twd
efdc94b113
Fix enum generation for php-symfony generator (#14105)
* fix(symfony): enum generation

* docs(php symfony): update samples and docs
2022-12-27 23:42:41 +08:00
cachescrubber
c45814a7ea
[Java][Spring] Upgrade Dependencies (2022-12) (#14283)
* Upgrade to the latest Spring Boot / Springdoc and Swagger Ui dependencies

* Generate samples
2022-12-19 17:41:38 +08:00
William Cheng
a57fb9e109
update certifi to newer version (#14228) 2022-12-09 10:48:49 +08:00
Tom Bärwinkel
f2321a61d3
Include response headers in the API type (#13565) 2022-12-06 23:48:29 +08:00
Oleh Kurpiak
2524e8fb0a
[Java][WebClient] global blocking operations config (#14076)
* [Java][WebClient] global blocking operations config

* update samples
2022-12-06 13:30:47 +08:00
Ian Cubbon
63629ad51c
[Go] File Download Fix Return Type (#14046)
* Changes manually cherry-picked (for the most part) from https://github.com/OpenAPITools/openapi-generator/pull/12685/files

* Examples updated post changes

* Missed a change in the mustache template

* Update examples after last fix

* Missed dereference for required files

* Update unit tests

* Missed another test case update

* `f := *f` isn't quite the same as `*f, err = ...`
2022-12-06 12:21:39 +08:00
caption
f32bf510c0
update urllib3 1.26.4 to 1.26.5 (#14183) 2022-12-06 12:02:56 +08:00
William Cheng
fabd0a8be2
update jackson databind to newer versions (#14136) 2022-11-29 10:55:03 +08:00
William Cheng
90a8b4effb
[PHP] better PHP symfony test (#14117)
* better php symfony test

* trigger build failure

* Revert "trigger build failure"

This reverts commit ed7a57ead2726705fe733a7027717b864810843f.

* update samples
2022-11-25 15:01:02 +08:00
Daniel Ziegler
9220e72674
[JavaSpring] fix missing description in @Operation annotation (#13995)
* fix: Java Spring missing description in operation annotation

* update samples

Co-authored-by: Daniel Ziegler <daniel.ziegler@senacor.com>
2022-11-25 10:56:28 +08:00
Elric Milon
1670e952ff
[Rust] Add support for reqwest-middleware when using reqwest (#13946)
Co-authored-by: Elric Milon <whirm@gmx.com>
2022-11-11 18:25:01 +08:00
Antoine Reilles
f81eb7e6f0
[jaxrs-cxf-cdi] use jackson for enum serialization (#13766) 2022-11-11 18:18:19 +08:00
William Cheng
ca5d9b5e69
Add isEnumRef, isEnumOrRef to CodegenProperty (#13880)
* add isEnumRef to codegen property

* better format

* update R template to use isEnumOrRef

* update powershell template to use isEnumOrRef

* update samples
2022-11-08 11:16:16 +08:00
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos (#13915)
* Fix typos

* Remove repeated words

* Minor grammar fixes
2022-11-07 21:30:24 +08:00