More refactoring of proc macro...

This commit is contained in:
Graham Esau 2020-05-11 21:53:36 +01:00
parent 631120ead8
commit b1ded882b7
5 changed files with 421 additions and 419 deletions

View file

@ -94,5 +94,5 @@ pub enum Adjacent {
#[test]
fn enum_adjacent_tagged() -> TestResult {
test_default_generated_schema::<Adjacent>("enum_adjacent_tagged-untagged")
test_default_generated_schema::<Adjacent>("enum-adjacent-tagged")
}

View file

@ -45,7 +45,7 @@
],
"properties": {
"c": {
"type": "null"
"$ref": "#/definitions/UnitStruct"
},
"t": {
"type": "string",
@ -63,20 +63,7 @@
],
"properties": {
"c": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
}
"$ref": "#/definitions/Struct"
},
"t": {
"type": "string",
@ -179,5 +166,26 @@
}
}
}
]
],
"definitions": {
"Struct": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
}
},
"UnitStruct": {
"type": "null"
}
}
}