Respect serialize_with attr when serializing default
This commit is contained in:
parent
7e23e2ad7a
commit
b748a90c3f
6 changed files with 74 additions and 27 deletions
|
@ -4,24 +4,21 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"my_bool": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"my_int": {
|
||||
"default": 0,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 0
|
||||
"format": "int32"
|
||||
},
|
||||
"my_struct2": {
|
||||
"default": "i:0 b:false",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MyStruct2"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"my_bool": false,
|
||||
"my_int": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
|
@ -29,13 +26,13 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"my_bool": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"my_int": {
|
||||
"default": 6,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 6
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
"type": "object",
|
||||
"required": [
|
||||
"command_line",
|
||||
"system_cpu_time",
|
||||
"user_cpu_time",
|
||||
"wall_time"
|
||||
],
|
||||
"properties": {
|
||||
|
@ -13,10 +11,26 @@
|
|||
"type": "string"
|
||||
},
|
||||
"system_cpu_time": {
|
||||
"$ref": "#/definitions/DurationDef"
|
||||
"default": {
|
||||
"nanos": 0,
|
||||
"secs": 0
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/DurationDef"
|
||||
}
|
||||
]
|
||||
},
|
||||
"user_cpu_time": {
|
||||
"$ref": "#/definitions/DurationDef"
|
||||
"default": {
|
||||
"nanos": 0,
|
||||
"secs": 0
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/DurationDef"
|
||||
}
|
||||
]
|
||||
},
|
||||
"wall_time": {
|
||||
"$ref": "#/definitions/DurationDef"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue