Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 0.62.0 or 0.63.0 destroys enum definitions #592

Open
schreckstefan opened this issue Feb 28, 2024 · 0 comments
Open

Upgrade to 0.62.0 or 0.63.0 destroys enum definitions #592

schreckstefan opened this issue Feb 28, 2024 · 0 comments

Comments

@schreckstefan
Copy link

Hi!
We are using typscript-json-schema for a while and it fits to our needs.
But when we tried an upgrade to version 0.62.0 it showed that many enum definitions had been deleted from the resulting schema.
We thus postponed the upgrade, I tried now again with version 0.63.0.
Here, most enums are back again, but there is still a gap.
One example:
image

The left side shows the old result, from version 0.57.0
The right side shows the result from 0.63.0.

Obviously there is a remaining problem in case of arrays of enum values.
In the given case, the original definition is:

 selectedValues?: DateRangeType[];
 ...
 export const enum DateRangeType {
    DATERANGE = 'DATERANGE',
    DATE = 'DATE',
    FROM = 'FROM',
    TO = 'TO',
    DAYS = 'DAYS',
    LASTDAYS = 'LASTDAYS',
    LASTWEEKS = 'LASTWEEKS',
    WEEK = 'WEEK',
    LASTMONTHS = 'LASTMONTHS',
    MONTH = 'MONTH',
 ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant