Refactor out add_schema_as_property

This commit is contained in:
Graham Esau 2021-04-16 10:42:03 +01:00
parent 1a2dafc1a5
commit 60a9869448
6 changed files with 89 additions and 101 deletions

View file

@ -17,7 +17,16 @@
],
"definitions": {
"InnerStruct": {
"type": "object"
"type": "object",
"required": [
"x"
],
"properties": {
"x": {
"type": "integer",
"format": "int32"
}
}
}
}
}

View file

@ -56,7 +56,9 @@ build_enum!(
#[derive(Debug, JsonSchema)]
OuterEnum {
#[derive(Debug, JsonSchema)]
InnerStruct {}
InnerStruct {
x: i32
}
}
);