[KOTLIN] [SPRING] Fixes for: invoker-package / Jackson Module / Configuration / Misc
Created by: dr4ke616
There are a number of minor bugs that this issue will look to highlight within the Kotlin Code Generator. Ideally these all should be small enough to be fixed as part of a single PR.
Description
- Set the
basePackagefrominvokerPackageso can be picked up from the--invoker-packageargument. - Add the Kotlin Jackson module to support serialization/deserialization of Kotlin classes and data classes
- The base path configuration property key in the
RequestMappingannotation of each controller is generated fromopenapi.{{title}}.base-path. It might be better to clean this a little and just use something likeapi.base-path, as all child routes are injected as part of each methodsRequestMapping. - The application configuration doesn't work. It's generated as a
.yamlfile, but the format of the file is.properties. Update the template to useyamlstructure. E.g change to something like below:
spring:
application:
name: someApiTitle
jackson:
serialization:
WRITE_DATES_AS_TIMESTAMPS: false
server:
port: 8080
openapi-generator version
org.openapitools:openapi-generator:3.2.3