Open rainoko opened 4 years ago
Looks like this is fixed in the meantime: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/kotlin-spring/apiController.mustache#L16
On the other hand the lateinit
modifier of the field is flagged as unnecessary by the IDE and the Optional.ofNullable
in the init{}
block is not ideomatic Kotlin. Maybe worth a different issue.
https://github.com/OpenAPITools/openapi-generator/blob/21e285cea9a876a2ae30f5b22153e160dbcaca9f/modules/openapi-generator/src/main/resources/kotlin-spring/apiController.mustache#L14
Constructor declares autowired as required=false but parameter itself is not nullable, as I understand it should be nullable otherwise exception is rised when there is no implementation yet for delegate.