[BUG] Kotlin-spring generator generates invalid project
Created by: thawkins
Bug Report Checklist
Description
Generating kotlin-spring project produces service that does not compile
I'm trying to generate a SCIM2 srv with attached Openapi definition
generating with $mkdir outputtest $openapi-generator generate -i ./scim2svc.yml -g kotlin-spring -o outputtest $cd outputtest $gradle wrapper $./gradlew clean $./gradlebuild build
this fails with the errors
[tim.hawkins@localhost scim2svc]$ ./gradlew build
> Task :compileKotlin FAILED
e: /home/tim.hawkins/IdeaProjects/blackswan/services/airsoc/scim2svc/src/main/kotlin/org/openapitools/model/ErrorResponse.kt: (38, 147): Type mismatch: inferred type is String but List<String> was expected
e: /home/tim.hawkins/IdeaProjects/blackswan/services/airsoc/scim2svc/src/main/kotlin/org/openapitools/model/SearchRequest.kt: (38, 163): Type mismatch: inferred type is String but List<String> was expected
e: /home/tim.hawkins/IdeaProjects/blackswan/services/airsoc/scim2svc/src/main/kotlin/org/openapitools/model/ServiceProviderConfig.kt: (57, 179): Type mismatch: inferred type is String but List<String> was expected
e: /home/tim.hawkins/IdeaProjects/blackswan/services/airsoc/scim2svc/src/main/kotlin/org/openapitools/model/User.kt: (69, 145): Type mismatch: inferred type is String but List<String> was expected
e: /home/tim.hawkins/IdeaProjects/blackswan/services/airsoc/scim2svc/src/main/kotlin/org/openapitools/model/UserPatch.kt: (35, 151): Type mismatch: inferred type is String but List<String> was expected
e: /home/tim.hawkins/IdeaProjects/blackswan/services/airsoc/scim2svc/src/main/kotlin/org/openapitools/model/UserResponse.kt: (75, 145): Type mismatch: inferred type is String but List<String> was expected
e: /home/tim.hawkins/IdeaProjects/blackswan/services/airsoc/scim2svc/src/main/kotlin/org/openapitools/model/UserSearchResponse.kt: (42, 161): Type mismatch: inferred type is String but List<String> was expected
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileKotlin'.
> Compilation error. See log for more details
openapi-generator version
[tim.hawkins@localhost scim2svc]$ openapi-generator version
4.1.3
[tim.hawkins@localhost scim2svc]$
OpenAPI declaration file content or url
Command line used for generation
generating with $mkdir outputtest $openapi-generator generate -i ./scim2svc.yml -g kotlin-spring -o outputtest $cd outputtest $gradle wrapper $./gradlew clean $./gradlebuild build
Steps to reproduce
use generator to generate project into a clean output directory
Related issues/PRs
None found
Suggest a fix
Not known