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
  • #4623
Closed
Open
Issue created Nov 27, 2019 by Administrator@rootContributor

[BUG][TYPESCRIPT] date-timing-parsing is truncating the time

Created by: gonozalviii

Description

When declaring a field with type: string, format: data-time I expect to get date and time information. Current behavior is that only date information is available. This is a change in behavior to versions prior 4.2.1 and breaks interoperability with other languages like java-spring (Date cannot be parsed into OffsetDateTime).

openapi-generator version

Bug was introduced with 4.2.1, commit cd11cc26

Related issues/PRs

Bug was introduced by: https://github.com/OpenAPITools/openapi-generator/pull/4337

Suggest a fix

api.service.mustache:185 ({{paramName}} as any).toISOString().substr(0, 10)

substr function is truncation the time and should be removed

Assignee
Assign to
Time tracking