This commit is contained in:
Graham Esau 2019-10-23 22:34:40 +01:00
parent ec42b51bf5
commit 1d8d996983
3 changed files with 36 additions and 36 deletions

View file

@ -40,28 +40,6 @@ fn main() {
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"definitions": {
"MyEnum": {
"anyOf": [
{
"enum": [
"Unit"
]
},
{
"type": "object",
"required": [
"StringNewType"
],
"properties": {
"StringNewType": {
"type": "string"
}
}
}
]
}
},
"type": "object",
"required": [
"my_bool",
@ -86,6 +64,28 @@ fn main() {
}
]
}
},
"definitions": {
"MyEnum": {
"anyOf": [
{
"enum": [
"Unit"
]
},
{
"type": "object",
"required": [
"StringNewType"
],
"properties": {
"StringNewType": {
"type": "string"
}
}
}
]
}
}
}
```
@ -130,18 +130,6 @@ fn main() {
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"definitions": {
"MyEnum": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
}
},
"type": "object",
"required": [
"myBool",
@ -165,6 +153,18 @@ fn main() {
"type": "integer",
"format": "int32"
}
},
"definitions": {
"MyEnum": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
}
}
}
```