Skip to content

[BUG] TypeScript generator for Date property type #2190

@roman-supy-io

Description

@roman-supy-io

Describe the bug.

The Typescript generator does not respect the

{ "type": "string", "format": "date-time" }

The output is expected to be

deliveryDate: Date;

Instead it is generated as:

deliveryDate: string;

The issue looks similar to [https://github.com//issues/1607](This Issue) but is Typescript-related

Expected behavior

The Date type should generated and not a string

Screenshots

Image

Image

How to Reproduce

  1. Use a schema with a property defined as { "type": "string", "format": "date-time" }
  2. run npx modelina generate typescript ...
  3. inspect the generated output's class/interface

🥦 Browser

None

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions