NJsonSchema
NJsonSchema copied to clipboard
Custom extension x-enumMetaData to expose title and description for an enum value.
Display or Description attributes from System.ComponentModel(.DataAnnotations) on enum values currently do not result in readable output on the JSON schema.
This change adds the x-enumMetaData array with objects that have title
and description
properties.
The two properties behave exactly like they do for normal types that are converted to schema, so this should feel very familiar to developers.
My use case for this is auto generating a basic editor UI using json schema. Currently there is no good way to create a title and description for individual enum members.