-
Notifications
You must be signed in to change notification settings - Fork 189
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
Classes with default values don't work #1390
Comments
Good catch. Can you send a fix? |
Sorry, I don't have the time. If you can fix it, I'd be greatly appreciative. Otherwise, I guess I will try to find a separate tool that works with classes. :( |
Had a look, the type appears to get lost in the InterfaceAndClassNodeParser file, due to the
check, inside of
doing this is an intermediary fix:
Is this overly verbose? yup. But don't have enough experience with the codebase to solve this one. update: #1407 should fix this |
Done with #1407 |
Hello, and thanks for the tool.
Unfortunately, classes seem to be broken. For example:
foo.ts
Feeding this file to
ts-json-schema-generator
will result in a schema that looks like this:foo-schema.json
As you can see,
field1
is completely missing and onlyfield2
is listed. It seems like the tool skips over any fields that are defined with a default value, which makes it mostly useless for people who want to generate a schema from a class. :(The text was updated successfully, but these errors were encountered: