89 Commits

Author SHA1 Message Date
William Cheng
dbf720c093
Prepare 7.14.0 release (#21159)
* Revert "v7.13.0 release (#21157)"

This reverts commit 4b805ff6b7ac5bd2557555810357569fe2677311.

* prepare v7.14.0 release

* update samples
2025-04-27 22:04:03 +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
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
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
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
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
DavidGrath
6180fea305
Add gradle wrapper v8.1.1 to kotlin-spring (#20341)
* Added code and tests for generating the gradle wrapper for kotlin-spring

* Added generated samples

* Changed Gradle wrapper version to 8.1.1

* Added generated samples

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-12-20 19:56:52 +08:00
martin-mfg
d87a70dd93
update sample tests, fix Java tests (#20300)
* replace removed forkMode

* remove junit runner where it's not needed

* update samples without skipping test files, but skip files named "FILES"

* revert overwriting custom tests, add custom java tests to list

* add one sample to CircleCI, fix various Java tests
2024-12-15 17:09:58 +08:00
Fionn O'Connor
e131d52ad0
[kotlin-spring] Handle arrays of files correctly using MultipartFile (#20108)
* [kotlin-spring] Fix no List being used for an array of files using multipart/form-data

* [kotlin-spring] Use Spring's MultipartFile class for incoming Files instead of Spring's Resource class.

* [kotlin-spring] Add test to ensure that return type for files is `org.springframework.core.io.Resource`

* [kotlin-spring] Ensure Array is used for lists of files in generated Api class

* Update samples

* [kotlin-spring] Move conditional usage of MultipartFile to optionalDataType.mustache. Update samples

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-12-04 15:24:47 +08:00
William Cheng
654f62ce3c
Prepare 7.11.0 (#20130)
* Revert "prepare 7.10.0 release (#20128)"

This reverts commit 12dfe8fe74a1515d1e69e00df9abe4128aa44160.

* update to 7.11.0-SNAPSHOT, update samples

* update docs
2024-11-18 20:15:29 +08:00
Dennis Ameling
a7a86398d0
[kotlin-server] Bump Kotlin/Gradle versions and improve CI triggers/config (#20061)
* [kotlin-server] Bump Kotlin versions to latest

* Run tests on more samples

* Fix typo in workflow definitions

* Update samples

* Bump Gradle to 7.6.4

* Some further tweaks

* Bump Gradle versions

* Fix Gradle version syntax
2024-11-09 13:39:20 +08:00
Leonid Stashevsky
7f899dff97
[Kotlin Server] Update Ktor to latest version; move config to kts (#19727)
* [Kotlin Server] Update Ktor to latest version; move config to kts

* Bump gradle version for kotlin server samples

* Replace deprecated gradle API

* Bump gradle to 7.6.4
2024-10-11 11:44:53 +08:00
William Cheng
e2c458b9ea
Prepare 7.10.0 (#19809)
* Revert "prepare 7.9.0 release (#19808)"

This reverts commit 4145000dfebe7a9edea4555c8515383da7602458.

* prepare 7.10.0 snapshot

* update doc

* update samples
2024-10-08 11:21:54 +08:00
Evgeny Shichenko
0026e15030
fix kotlin spring boot configuration conflict (#19515) 2024-09-09 11:03:18 +08:00
William Cheng
91da2fd240
Prepare 7.9.0 snapshot (#19386)
* Revert "v7.8.0 release (#19385)"

This reverts commit 6bdc452f92d49dcac7ac21dfe8751c8cc4267b98.

* update samples for v7.9.0-snapshot
2024-08-19 16:14:51 +08:00
Dieter Eickstaedt
484b87f22a
fix: Template contains unconditional ": Serializable" which creates wrong derive clause on data classes which have a parent as well as are serializable. (#19283) 2024-08-01 14:18:46 +01:00
Peter Storch
37afe57f0f
[Kotlin][Spring] fix #19244 integer enum (#19248)
* [Kotlin][Spring] fix #19244 integer enum

* fix embedded array enum
2024-07-26 16:02:34 +01:00
Peter Storch
c93ec54a16
[Kotlin][Spring] fix build.gradle.kts and pom.xml for SpringBoot 2.x (#19246) 2024-07-26 14:06:26 +01:00
William Cheng
20cfce0b4a
Prepare v7.8.0 (#19048)
* Revert "v7.7.0 release"

This reverts commit f3dd32385e02065ad298801ca11b8871bcb3a92a.

* prepare v7.8.0

* update readme

* update doc

* update samples
2024-07-02 16:45:53 +08:00
Lucas
861e8f0656
[kotlin] implement serializable data classes (#8317) (#18386) 2024-06-24 08:13:32 +01:00
William Cheng
741bf0c035
Prepare 7.7.0-SNAPSHOT (#18709)
* Revert "7.6.0 release"

This reverts commit d76f9d32d11a03be2b40ebff728ef0ff86332fcb.

* prepare 7.7.0 snapshot in master

* update samples
2024-05-20 17:27:17 +08:00
William Cheng
807250a430
Prepare 7.6.0 (#18412)
* Revert "v7.5.0 release"

This reverts commit 1eafe2aebf33b13bee0ead66d62a6436e7db059d.

* update master to v7.6.0 snapshot

* update readme

* update samples
2024-04-17 19:05:37 +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
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
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
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
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
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
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
80121aa88f
Prepare v7.0.1 (#16409)
* prepare 7.0.1 in master

* update doc
2023-08-25 16:11:29 +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
William Cheng
a9cfa1f391
[kotlin-spring] minor bug fixes (#16270)
* kotlin-spring: minor bug fixes

* comment out tests
2023-08-08 10:05:34 +08:00
William Cheng
852eb956db
[kotlin][spring] Remove EOL from template (#16045)
* remove EOL from template

* better code format
2023-07-10 11:44:29 +08:00
Ben Kolera
f34e42b249
[BUGFIX][kotlin-spring] Fix generatedAnnotation to use the javaxPackage variable instead of jakarta to fix spring boot 2 codegen (#15944)
* Update generatedAnnotation.mustache

Without this, it generates a jakarta annotation in the controllers of a spring boot 2 project.

* Updated examples
2023-07-10 11:13:22 +08:00
William Cheng
935146d187 Merge remote-tracking branch 'origin/master' into 7.0.x 2023-04-12 17:51:47 +08:00
William Cheng
5d1e18306a
Prepare 6.6.0-SNAPSHOT (#15100)
* set 6.6.0 snapshot version

* update samples

* update readme
2023-04-01 18:48:01 +08:00
William Cheng
7417432a54
Prepare 6.5.0 release (#15099)
* 6.5.0 release

* update samples
2023-04-01 15:03:35 +08:00
Volker Suschke
c81ff5801d
[Kotlin-Spring] Remove wildcard imports from mustache templates [#14652] (#14899)
* [Kotlin-Spring] Remove wildcard imports from mustache templates [#14652]

* [Kotlin-Spring] Update sample files [#14652]
2023-03-07 16:23:46 +00:00
William Cheng
1beec7ef87 Merge remote-tracking branch 'origin' into 7.0.x 2023-03-03 21:52:50 +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
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
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
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
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
William Cheng
558ae9373d Merge remote-tracking branch 'origin/master' into 7.0.x 2022-11-01 21:01:06 +08:00