Refactor out add_schema_as_property
This commit is contained in:
parent
1a2dafc1a5
commit
60a9869448
6 changed files with 89 additions and 101 deletions
|
@ -17,7 +17,16 @@
|
|||
],
|
||||
"definitions": {
|
||||
"InnerStruct": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"required": [
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"x": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -56,7 +56,9 @@ build_enum!(
|
|||
#[derive(Debug, JsonSchema)]
|
||||
OuterEnum {
|
||||
#[derive(Debug, JsonSchema)]
|
||||
InnerStruct {}
|
||||
InnerStruct {
|
||||
x: i32
|
||||
}
|
||||
}
|
||||
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue