typescript-json-schema
typescript-json-schema copied to clipboard
Bug in enum type processing
Hi,
Given that I have Entity.ts:
export enum Entity {
firstValue,
secondValue
}
Then I execute:
typescript-json-schema Entity.ts *
Expected Result:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Entity": {
"enum": [
"firstValue",
"secondValue"
],
"type": "string"
}
}
}
Actual Result:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Entity": {
"enum": [
0,
1
],
"type": "number"
}
}
}