You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[kotlin-spring][server] Feat: Return from controllers without ResponseEntity wrapper. (#22377)
* remove "async" and "responseWrapper" from template as these are not supported by kotlin-spring generator
* try to force pipelines rerun
* force pipelines rerun
* fix mustache to keep generated code identical
* Revert "fix mustache to keep generated code identical"
This reverts commit c573b43.
* Reapply "fix mustache to keep generated code identical"
This reverts commit 2c3b065.
* Add support for 'useResponseEntity' in kotlin-spring. Consolidate with the separate flag 'declarativeInterfaceWrapResponses' as these can now be controlled both by one flag. Default to true.
* fix status annotation and add compile-test samples
* satisfy samples-up-to-date check
* add unit tests covering both reactive and non-reactive
* fix template to avoid unnecessary empty line
* fix template to avoid unnecessary empty line
* put method params (if present) on separate lines to improve readability
* put method params (if present) on separate lines to improve readability; fix double spaces, spaces before comma, incorrect spaces
* fix test
* store PATHs as accesible strings in companion objects.
* fix missing import
* fix incorrect import
* fix fallback to nested placeholders.
Copy file name to clipboardExpand all lines: docs/generators/kotlin-spring.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
28
28
|beanQualifiers|Whether to add fully-qualifier class names as bean qualifiers in @Component and @RestController annotations. May be used to prevent bean names clash if multiple generated libraries (contexts) added to single project.||false|
29
29
|configPackage|configuration package for generated code||org.openapitools.configuration|
30
30
|declarativeInterfaceReactiveMode|What type of reactive style to use in Spring Http declarative interface|<dl><dt>**coroutines**</dt><dd>Use kotlin-idiomatic 'suspend' functions</dd><dt>**reactor**</dt><dd>Use reactor return wrappers 'Mono' and 'Flux'</dd></dl>|coroutines|
31
-
|declarativeInterfaceWrapResponses|Whether (when false) to return actual type (e.g. List<Fruit>) and handle non 2xx responses via exceptions or (when true) return entire ResponseEntity (e.g. ResponseEntity<List<Fruit>>)||false|
32
31
|delegatePattern|Whether to generate the server files using the delegate pattern||false|
33
32
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**source**</dt><dd>Publish the original input OpenAPI specification.</dd><dt>**springfox**</dt><dd>Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x. Deprecated (for removal); use springdoc instead.</dd><dt>**springdoc**</dt><dd>Generate an OpenAPI 3 specification using SpringDoc.</dd></dl>|springdoc|
34
33
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'||original|
@@ -56,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
56
55
|useBeanValidation|Use BeanValidation API annotations to validate data types||true|
57
56
|useFeignClientUrl|Whether to generate Feign client with url parameter.||true|
58
57
|useFlowForArrayReturnType|Whether to use Flow for array/collection return types when reactive is enabled. If false, will use List instead.||true|
58
+
|useResponseEntity|Whether (when false) to return actual type (e.g. List<Fruit>) and handle non-happy path responses via exceptions flow or (when true) return entire ResponseEntity (e.g. ResponseEntity<List<Fruit>>). If disabled, method are annotated using a @ResponseStatus annotation, which has the status of the first response declared in the Api definition||true|
59
59
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.||false|
60
60
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies||true|
61
61
|useTags|Whether to use tags for creating interface and controller class names||false|
0 commit comments