Support untagged enums
This commit is contained in:
parent
c552e6d208
commit
4a9fdd3334
3 changed files with 59 additions and 76 deletions
|
@ -35,7 +35,9 @@ macro_rules! no_ref_schema {
|
|||
};
|
||||
}
|
||||
|
||||
// TODO any other serde types other than serde_json value?
|
||||
// TODO any other serde/json types other than serde_json value?
|
||||
// TODO serde yaml value/map under feature flag
|
||||
// TODO add some inline attributes
|
||||
// https://github.com/serde-rs/serde/blob/ce75418e40a593fc5c0902cbf4a45305a4178dd7/serde/src/ser/impls.rs
|
||||
// Cell<T>, RefCell<T>, Mutex<T>, RwLock<T>, Result<R,E>?, Duration, SystemTime,
|
||||
// IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV6, SocketAddrV6,
|
||||
|
|
|
@ -3,25 +3,13 @@
|
|||
"title": "schemars__schema__Schema",
|
||||
"anyOf": [
|
||||
{
|
||||
"properties": {
|
||||
"Bool": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"Ref": {
|
||||
"$ref": "#/definitions/schemars__schema__SchemaRef"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/schemars__schema__SchemaRef"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"Object": {
|
||||
"$ref": "#/definitions/schemars__schema__SchemaObject"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/schemars__schema__SchemaObject"
|
||||
}
|
||||
],
|
||||
"definitions": {
|
||||
|
@ -39,25 +27,13 @@
|
|||
"schemars__schema__Schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"properties": {
|
||||
"Bool": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"Ref": {
|
||||
"$ref": "#/definitions/schemars__schema__SchemaRef"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/schemars__schema__SchemaRef"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"Object": {
|
||||
"$ref": "#/definitions/schemars__schema__SchemaObject"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/schemars__schema__SchemaObject"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -224,20 +200,12 @@
|
|||
"schemars__schema__SingleOrVec_schemars__schema__InstanceType_": {
|
||||
"anyOf": [
|
||||
{
|
||||
"properties": {
|
||||
"Single": {
|
||||
"$ref": "#/definitions/schemars__schema__InstanceType"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/schemars__schema__InstanceType"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"Vec": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schemars__schema__InstanceType"
|
||||
}
|
||||
}
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schemars__schema__InstanceType"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -245,20 +213,12 @@
|
|||
"schemars__schema__SingleOrVec_schemars__schema__Schema_": {
|
||||
"anyOf": [
|
||||
{
|
||||
"properties": {
|
||||
"Single": {
|
||||
"$ref": "#/definitions/schemars__schema__Schema"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/schemars__schema__Schema"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"Vec": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schemars__schema__Schema"
|
||||
}
|
||||
}
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/schemars__schema__Schema"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue