2285 Commits

Author SHA1 Message Date
Linh Tran Tuan
7e8b521069
[Rust] [Axum] Fix clippy warning (#17637) 2024-01-18 08:58:59 +08:00
Rugal Bernstein
287e8fc69c
Able to generate within parameter #17158 (#17623) 2024-01-16 21:48:46 +08:00
Alexis Couvreur
092463a513
feat: add java-wiremock generator (#17614)
* feat: add `java-wiremock` generator

* remove text block usage for samples

this will allow more version of jav to be compatible with this

* fix extra parenthesis

* Add java-wiremock workflow
2024-01-16 11:40:13 +08:00
Dennis Ameling
13edc5d494
kotlin-server: Add support for Javalin (#17596)
* kotlin-server: Add support for Javalin

* kotlin-server: Add Javalin generated sample code

* Add output from build scripts

* Address MR feedback

* Update CI to include new Javalin sample
2024-01-15 20:22:20 +08:00
Gonzalo Gomez
af71460c86
[Go-Server] Use ParseQuery For Parsing Query Parameters (#17585)
* Uses ParseQuery to check for malform paramater value pairs.
Runs ./mvnw clean package, ./bin/generate-samples.sh ./bin/configs/*.yaml, and ./bin/utils/export_docs_generators.sh.

* Adds missing import

* Only import url if hasQueryParams.

* Adds helper function to wrap url.ParseQuery.

* Fixes function return signature
2024-01-15 13:43:04 +08:00
William Cheng
33faa2960c update python flask samples 2024-01-15 09:18:32 +08:00
William Cheng
75ef9e0b02 update java samples 2024-01-12 12:51:33 +08:00
Linh Tran Tuan
6429711a58
[Rust] [Axum] Format ops-v3 sample (#17599) 2024-01-12 10:37:14 +08:00
Linh Tran Tuan
be19c35c45
[Rust] [Axum] Deduplicate code from rust-axum generator (#17588)
* [Rust] [Axum] Deduplicate code from rust-axum generator

* Fix build
2024-01-11 16:48:28 +08:00
wrj97
cfe7dcc0cf
feat: using Qt with 3rd Party Signals and Slots (#17067)
Replace signals,slots and emit with Q_SIGNALS,Q_SLOTS and Q_EMIT

Because these names will be used by a 3rd party library
2024-01-10 13:55:31 +08:00
William Cheng
9b7528d8c8 update samples, docs 2024-01-10 11:50:48 +08:00
mikkka
455add6d80
Implement scala http4s server generator (#17430)
* Implement scala http4s server generator

* Fix types and auth

* Add proper handling of various responses

* Fix configs

* Drop null values in json encoder

* Add sample files

---------

Co-authored-by: m.tkachev <m.tkachev@tinkoff.ru>
2024-01-10 11:40:31 +08:00
Kernevez
e69c5269d5
Add tags on operation for template kotlin-spring (#17410)
* Add tags on kotlin-spring

* Fix review
2024-01-10 11:20:14 +08:00
William Cheng
7ddcb9a8cb update samples 2024-01-10 11:19:38 +08:00
Rugal Bernstein
1e0e8fe0eb
Add ability to append ServerHttpRequest for kotlin-spring generator (#17158)
* Add ability to append ServerHttpRequest for kotlin-spring generator

* Add generated doc & sample
2024-01-10 11:11:23 +08:00
Alexis Couvreur
dd5c7e3b9a
fix: ExampleGenerator correctly generates allOf composed schemas (#17499)
* fix: ExampleGenerator correctly generates allOf composed schemas

Changes the previous behavior of generating `null` examples for allOf composed schemas.

Fixes #17497

* fix: ExampleGenerator correctly generates anyOf and oneOf composed schemas

Changes the previous behavior of generating `null` examples for anyOf and oneOf composed schemas.

To generate a oneOf/anyOf example, we generate the example using the first valid schema available. In case of a $ref, we use the first valid reference.

Fixes #17497
2024-01-10 11:04:11 +08:00
Erik Booij
90f3b24edc
fix(go-server): ensure original filename can be deduced from tmp file (#17416) 2024-01-10 02:00:44 +08:00
Linh Tran Tuan
425011a50c
[Rust] [Axum] Remove redundant code in rust-axum generator (#17570) 2024-01-10 01:41:14 +08:00
Thomas Kläger
69a4a65bc7
fix spring generator dto annotations (#17054) 2024-01-09 16:47:10 +08:00
Linh Tran Tuan
9827098057
[Rust] [Server] New generator bases on Axum (#17549)
* Rust Server - Axum based (#5)

* Fix typo

* Address comment

* Address comment
2024-01-09 11:38:54 +08:00
martin-mfg
64f2cad9e8
fix #17258 - use model class only if it is generated (#17490)
* fix  #16797 and #15796 spring child constructor missing parent params

* root cause and update the DefaultCodegen.java to add missing property when with multi inheritance

* rollback SpringCodegen.java

* update samples

* rollback with master cause #16992 fixed this issue too

* still using orignal design

* catchup master

* catchup master

* catchup master

* fix

* add tests

---------

Co-authored-by: dabdirb <dabdirb@gmail.com>
2024-01-05 10:30:28 +08:00
Aliaksei
48e9b9f408
[bugfix][jaxrs]: fix compile error for jaxrs samples (#17479) 2024-01-03 09:59:17 +08:00
fizzet
2d50655d8c
[JaxRS] fix pojo equals (#17431)
* [JaxRS] fix Pojo equals

Fix equals for pojos that have the same name as one of their properties

* regen samples
2023-12-26 10:13:36 +08:00
Raphaël Ouazana
d0f659ec4d
[#17465] Fix Kotlin templates to be compatible with Kotlin K2 compiler (#17466) 2023-12-26 10:09:28 +08:00
William Cheng
5eab3cef19
Prepare 7.3.0-SNAPSHOT (#17456)
* Revert "v7.2.0 release (#17455)"

This reverts commit fe638d009363c142c246ff089032f243e0b4ee01.

* set version to 7.3.0-SNAPSHOT

* update doc
2023-12-22 16:55:58 +08:00
Ween Jiann
bf4c98a82a
[go-server] Add ability to handle nullable query param (#17321)
* Update

* Regen
2023-12-21 19:13:05 +08:00
Beppe Catanese
a34eeaed77
[GO Gin Server] Webhooks support: add missing webhook handlers (#17411)
* Implement postProcessWebhooksWithModels

* Implement postProcessWebhooksWithModels

* Add missing webhook handlers

* Test webhook handler

* Generate samples
2023-12-21 16:10:09 +08:00
Ween Jiann
b7f31ddda4
Regenerate (#17389) 2023-12-13 22:17:15 +08:00
Aliaksei
809b3331a9
[4947][java]: adds support for validation of primitives in arrays (#17165)
* [4947][java]: adds support for validation of primitives in arrays

* [4947][java]: prevents generation '@Valid' for Object

* [4947][java]: test against different codegens and stick to primitive

* [4947][java]: code review

* [4947][java]: enhance getBeanValidation

* [4947][java]: adds email

* [4947][java]: removes unnecessary override

* [4947][java]: adds postProcessResponseWithProperty

* [4947][java]: adds missing import {{javaxPackage}}.validation.Valid

* [4947][java]: adds missing useBeanValidation

* [4947][java]: fix use rootJavaEEPackage for helidon
2023-12-11 20:55:38 +08:00
Beppe Catanese
9eb5882f94
OpenAPI 3.1.0 Add webhooks support (#17174)
* Add support for webhooks

* Test webhook generation with Go Gin server

* Generate samples

* Removing \t

* Remove tabs
2023-12-11 11:21:23 +08:00
TAKAHiRO TOMiNAGA
004c7e8c8d
[Style][Go] standardize the format of mustache (tiny change) (#17363)
* fix: change indent style to tab in the mustache to generate Go code

* docs: standardize the language names for code blocks

* docs: change indent style to tab in the code blocks

* update: regenerate samples

* `./bin/generate-samples.sh ./bin/configs/*.yaml`
2023-12-10 10:13:49 +08:00
William Cheng
dd36fa09f8
update logbak core to newer version (#17360) 2023-12-09 21:59:50 +08:00
Dennis Melzer
e37decff7b
Add Java Optional for POJOs in JavaSpring templates (#17202)
* Add optional parameter for request body

* Adapt Test

* Add test

* Format code

* Remove extra method

* Add optional for pojos

* Add optional for pojos

* Add bean validation for Optional

* Add default values + test

* Rename test
2023-12-08 21:46:13 +08:00
Viktor Szépe
39d5b4ebf9
Replace stray TAB characters with spaces (#17311)
* Replace stray TAB characters with spaces

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-12-05 18:01:25 +08:00
William Cheng
391df3b81c update samples 2023-12-05 15:36:33 +08:00
William Cheng
f033b11408
Update JAX-RS client samples (#17262)
* update jaxrs client samples

* move configs
2023-11-30 21:39:42 +08:00
William Cheng
4c4d0e485a
[java] Update logback to newer versions (#17259)
* update logback to newer versions

* update
2023-11-30 18:51:46 +08:00
William Cheng
46dd87525e
Add tests for max,min items in array (rust-server) (#17215)
* add tests for max,min items in array (rust server)

* fix both min, max items
2023-11-29 16:21:54 +08:00
Makoto Suzuki
baaf759440
[python-fastapi]Add an alias keyword parameter for Query parameter (#17111)
* add alias to endpoint_definition

* regenerate source code
2023-11-21 11:34:43 +08:00
Robert Schweizer
75ff110449
[python] Some cleanup of samples folder (#17127)
* Delete sample folders of discontinued clients

* Remove duplicate python-flask server sample

The python-flask sample actually lives in samples/server/petstore/python-flask.

* Move hand-written test to "tests" folder

Now, "test" only contains generated stubs and all hand-written tests are in "tests".

* Delete left-over files in Python samples

These are not created by the generators (anymore) and not hand-written
for testing.

* Regenerate test file to fix import error
2023-11-19 14:43:34 +08:00
Markus Lenger
1ce95ff41e
Map type date to correct rust type NaiveDate (#17095)
* Fix clippy errors (rustc 1.73.0)

* Add feature docker-in-docker

* Fix mapping of "date"

See issue #9769

The type
  type: string
  format: date
was mapped to DateTime<Utc> which violates the OpenAPI spec

see https://swagger.io/docs/specification/data-models/data-types/
2023-11-18 10:33:45 +08:00
Aurélien Joga
1f5b590d5a
Python-server workflow fixes + pytest (#17060)
* Fix referenced path for tests

* Explicit dependencies

Flask 2.3 has breaking changes

* Marks all async tests with pytest.mark.asyncio

Otherwise they are skipped by pytest and coverage is zero

* Fix path for pytest

On suggestion from https://github.com/OpenAPITools/openapi-generator/pull/17060#discussion_r1392666369
2023-11-18 10:10:10 +08:00
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