Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #4368
Closed
Open
Issue created Nov 05, 2019 by Administrator@rootContributor

[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

scim2svc.zip

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

Assignee
Assign to
Time tracking