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
I believe this only requires minor changes in https://github.com/vega/ts-json-schema-generator/blob/master/src/TypeFormatter/EnumTypeFormatter.ts.
export interface MyObject { bar: "ok" | "fail" | "abort" | string; }
produces
> [email protected] run /Users/domoritz/Developer/UW/ts-json-schema-generator > ts-node ts-json-schema-generator.ts "--path" "test.ts" "--type" "MyObject" { "$ref": "#/definitions/MyObject", "$schema": "http://json-schema.org/draft-04/schema#", "definitions": { "MyObject": { "additionalProperties": false, "properties": { "bar": { "anyOf": [ { "enum": [ "ok" ], "type": "string" }, { "enum": [ "fail" ], "type": "string" }, { "enum": [ "abort" ], "type": "string" }, { "type": "string" } ] } }, "required": [ "bar" ], "type": "object" } } }
The enums could be consolidated.
The text was updated successfully, but these errors were encountered:
8cdc707
Remove obvious arrow-parameter types. (#20)
cec8516
No branches or pull requests
I believe this only requires minor changes in https://github.com/vega/ts-json-schema-generator/blob/master/src/TypeFormatter/EnumTypeFormatter.ts.
produces
The enums could be consolidated.
The text was updated successfully, but these errors were encountered: