28 Commits

Author SHA1 Message Date
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
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
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
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
Thibault Duperron
1b65ef38f5
Update dependecies for CVE (#13834)
* Update dependecies for CVE

fix #13772

* Fix schemas
2022-10-31 10:55:11 +08:00
William Cheng
ad3b5f7045
[Inline model resolver] various improvements (#12293)
* better handling of requestbody in the inline resolver

* remove commented code

* better request body naming

* fix unique naming

* minor code format change

* removed additional underscore from names, fix test

* more fixes, update tests

* fix all tests

* undo changes to default codegen

* update samples

* update python tests

* add new files

* update samples
2022-05-10 17:13:57 +08:00
Johan Sjöblom
356732d1bd
[kotlin-spring] Adding DocumentationProvider and SwaggerUI (#12184)
* Adding DocumentationProvider and SwaggerUI to Kotlin Spring

* Fixing annotation errors

* Fixes to homeController

* Minor stylistic fixes

* Removing parameter from docs

* Structuring pom, making gradle file similar to pom

* Updating samples
2022-04-27 01:03:32 +08:00
William Cheng
c7367c2d34
[kotlin] add missing import, better code format for kotlin generators (#11619)
* add missing import, better code format for kotlin generators

* update kotlin workflow

* more kotlin tests

* better code format

* separate kotlin client, server teets

* comment out tests
2022-02-16 15:09:51 +08:00
Sergey Vladimirov
d0d0a0505e
Support email validation in kotlin-spring (#11617) 2022-02-16 13:34:11 +08:00
Bruno Coelho
eb224db540
[kotlin][client] remove old Date usage (#11082)
* [kotlin][client] remove old Date usage

* [kotlin][client] remove old Date usage
2021-12-14 16:03:12 +08:00
Kevin Chen
637fa430d5
[kotlin-spring] add comment to api method (#10857)
* fix: add api comment

* update sample

* update sample
2021-11-21 01:25:45 +08:00
martinsaison
a33a0fd5c7
[kotlin-spring] change the suffix from ".kt" to "Controller.kt" when generating a controller class (#10671)
* fix: [kotlin-spring] wrong filenames for generated controller classes (#10670)

* fix: [kotlin-spring] wrong filenames for generated controller classes (#10670)

Updated unit test with correct filenames

* fix: [kotlin-spring] wrong filenames for generated controller classes (#10670)

Including files generated by generate-samples.sh and export_docs_generators.sh

Co-authored-by: Martin Saison <khodev@users.noreply.github.com>
2021-10-29 10:06:37 +08:00
Oleh Kurpiak
b1cc7445a0
[Java][Spring] fix Spring RequestMapping (#9900) 2021-07-27 14:27:47 +08:00
William Cheng
764a3b044c
replace tab with spaces, minor code format change (#8774) 2021-02-22 19:46:11 +08:00
Christophe Bornet
06ad7a51ef
[Kotlin-Spring] Fix properties default value (#8373)
* [Kotlin-Spring] Fix properties default value

* Fix kotlin enum default

* Update go sample
2021-01-24 22:43:58 +08:00
Christophe Bornet
e73ae8c048
[Kotlin-Spring] Fix required model property deserialization (#8337)
* Fix required model property deserialization

* Update samples
2021-01-07 16:18:21 +08:00
dpolyakov987
0cbf064d2b
fix kotlin-spring generator does not add @Valid annotation to nested classes (#8037) 2020-12-14 16:09:06 +08:00
Oleh Kurpiak
8bd2dd4c9d
[Java] [Spring] Spring new mapping annotations (#7189)
* Spring new mapping annotations

* update other spring mvc templates
2020-08-24 17:03:21 +08:00
dumitru-petrusca
057c4294de
Issue 5497: Support the use of tags in the delegated Spring Kotlin generator. (#5499)
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-06-07 19:24:20 -04:00
Michael Kreis
7baa72eefa
add use-site target field for JsonProperty annotation in kotlin data classes (#6186) 2020-06-07 19:23:15 -04:00
William Cheng
b36b65964f update kotlin samples 2020-02-03 16:32:31 +08:00
Bruno Coelho
265ad2297b [kotlin] add options sortParamsByRequiredFlag and sortModelPropertiesByRequiredFlag (#4707)
* [kotlin] add option to sortParamsByRequiredFlag

* [kotlin] add option to sortParamsByRequiredFlag

* [kotlin][client] sort parameters in the models

* [kotlin] update docs

* [kotlin][client] simplify sortParamsByRequiredFlag implementation

* [kotlin] experiment with sortnmodel properties by name

* [kotlin] introduce sortModelPropertiesByRequiredFlag

* [kotlin] update docs

* [kotlin] update kotlin

* [kotlin] fix tests

* [kotlin] update docs

* Revert "[kotlin] update docs"

This reverts commit 88ad825de5b4c090fe04398bdfde2e9d3252742f.

* [kotlin] update docs and petstores

* [kotlin] update docs

* [kotlin] update pet projects
2019-12-20 17:42:48 +08:00
Massimo Siani
964260101b [kotlin-spring] add support for the delegate pattern (#3925)
* #2526 support the delegate pattern for kotlin-spring

* fix the diamond

* update the doc

* fix ci

* use Resource? instead of MultipartFile when dealing with files

* bump after rebase on master
2019-11-19 15:22:29 +08:00
Roman Müller
73966a0152 [KOTLIN Spring] add interfaceOnly option (#3050)
* move template definition to processOpts()

* add interfaceOnly option for kotlin-spring

* add template for interface only option
2019-06-27 12:23:50 -04:00
Thibault Duperron
a882e4b3a5 Add Flow import to kotlin spring reactive (#3107)
* Add Flow import to kotlin spring reactive

* Add runBlockingTest to api tests

* Add kotlin-springboot-petstore-server-reactive.sh to ensure-up-to-date

* add reactive check for  runBlockingTest

* Samples
2019-06-24 14:26:30 +08:00
sylvainmoindron
7916f2f880 [kotlin-spring] add reactive behavior via Kotlin coroutines (#2934)
* kotlin spring : add reactivity via kotlin's coroutines

* add kotlin spring boot reactive samples

* bug : fix spring version and import for coroutines

* remove exception handler for reactive (webflux doesn't support it)

* add spring milestone repository to maven pom

* add reactive type for list in Api and ApiImpl methodes for mathching body responsive parameter

* fix baseType for ArraySchema

* regenerate samples

* updating documentation
2019-06-02 15:50:45 -04:00