We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
constAsEnum
strictNullChecks
The following example still in one case generates const instead of enum:
const
enum
type A = B | C interface B { myProp?: false } interface C { myProp: true }
When generating the schema like this:
typescript-json-schema --constAsEnum --strictNullChecks test.ts A
The outcome is:
{ "$schema": "http://json-schema.org/draft-07/schema#", "anyOf": [ { "$ref": "#/definitions/B" }, { "$ref": "#/definitions/C" } ], "definitions": { "B": { "properties": { "myProp": { "const": false, "type": "boolean" } }, "type": "object" }, "C": { "properties": { "myProp": { "enum": [ true ], "type": "boolean" } }, "type": "object" } } }
The text was updated successfully, but these errors were encountered:
@domoritz do you still maintain this package? Any thoughts about this problem?
Sorry, something went wrong.
I don't use it anymore but merge PRs and make releases. I don't have time to triage or fix issues.
No branches or pull requests
The following example still in one case generates
const
instead ofenum
:When generating the schema like this:
The outcome is:
The text was updated successfully, but these errors were encountered: