You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The enum keyword itself doesn't support documentation.
The recommended method for "documenting" your enum-like values is to use the oneOf keyword:
"oneOf": [
{ "const": "some value", "title": "Some value", "description": "The documentation for some value" },
{ "const": "some other value", "title": "Some other value", "description": "The documentation for some other value" },
]
We do not want to change our implementation of the enum keyword itself as it would be a significant breaking change.
However, we could detect this pattern and emit different code.
For instance
We could conventionally use title as the name of the enum value if present
We could conventionally use description as the summary documentation for the enum value
We could detect "pure integer" enumerations and emit a dotnet enum instead of the static values.
The text was updated successfully, but these errors were encountered:
The enum keyword itself doesn't support documentation.
The recommended method for "documenting" your enum-like values is to use the
oneOf
keyword:We do not want to change our implementation of the
enum
keyword itself as it would be a significant breaking change.However, we could detect this pattern and emit different code.
For instance
title
as the name of the enum value if presentdescription
as the summary documentation for the enum valueenum
instead of the static values.The text was updated successfully, but these errors were encountered: