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
  • #1647
Closed
Open
Issue created Dec 10, 2018 by Administrator@rootContributor

[BUG][KOTLIN] Wrong import for fields with "format: date"

Created by: toXel

Description

Models that have a field with type: string and format: date are generated with a wrong import when using threetenbp as the date library.

openapi-generator version

3.3.4

OpenAPI declaration file content or url

Every OpenAPI spec with at least one field like this will trigger the bug:

created:
    type: string
    format: date
Command line used for generation

Gradle plugin was used with the following config:

openApiGenerate {
    generatorName = "kotlin"
    inputSpec = "$rootDir/openApiClient/OpenAPI.yml".toString()
    outputDir = "$rootDir/openApiClient".toString()
    configOptions = [
            dateLibrary   : "threetenbp",
            collectionType: "list"
    ]
}
Steps to reproduce
  1. Use OpenAPI spec with at least one model with a format: date field
  2. Generate the client
  3. There will be Unresolved reference: org compiler errors in the model files
Assignee
Assign to
Time tracking