
No longer use it for internally-tagged enums. Instead, use a private helper that adds the tag property.
52 lines
No EOL
876 B
JSON
52 lines
No EOL
876 B
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "Internal",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"foo",
|
|
"typeProperty"
|
|
],
|
|
"properties": {
|
|
"foo": {
|
|
"type": "boolean"
|
|
},
|
|
"typeProperty": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Struct"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"typeProperty"
|
|
],
|
|
"properties": {
|
|
"typeProperty": {
|
|
"type": "string",
|
|
"enum": [
|
|
"NewType"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"typeProperty"
|
|
],
|
|
"properties": {
|
|
"typeProperty": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Unit"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |