-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I can do the following in TypeScript:
enum HttpStatusCode
{
OK = 200,
Unauthorized = 401
...
}It would be nice if typson treated these enumeration as actual enumerations. I was thinking it could look for @type signature above the enum, e.g.,
/**
* @type integer
*/
enum HttpStatusCode
{
OK = 200,
Unauthorized = 401
...
}and produce (per http://spacetelescope.github.io/understanding-json-schema/reference/generic.html):
{
type: 'integer'
enum: [200, 401]
}Otherwise default to string enum
Metadata
Metadata
Assignees
Labels
No labels