Open
Description
Annotations are not generated for enum types.
$ npx typescript-json-schema --version
0.40.0
Example types
export enum Fruit {
/**
* An Apple
*/
Apple = "apple",
/**
* An Orange
*/
Orange = "orange"
}
export interface Menu {
/**
* Type of Fruit
*/
fruit: Fruit;
}
Processed with:
npx typescript-json-schema ./tsconfig.json Menu
Generates:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Fruit": {
"enum": [
"apple",
"orange"
],
"type": "string"
}
},
"properties": {
"fruit": {
"$ref": "#/definitions/Fruit",
"description": "Type of Fruit"
}
},
"type": "object"
}