add counter check with no default or null
This commit is contained in:
parent
561571179f
commit
5e2f46bc4c
@ -28,6 +28,25 @@ static const json person_schema = R"(
|
|||||||
"default": "Abbey Road"
|
"default": "Abbey Road"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"work address": {
|
||||||
|
"type": "object",
|
||||||
|
"default": null,
|
||||||
|
"properties": {
|
||||||
|
"street": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "Abbey Road"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"other address": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"street": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "Abbey Road"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@ -98,7 +117,8 @@ int main(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// add address which is optional that should generate a diff containing a default street
|
// add address which is optional that should generate a diff containing a empty object
|
||||||
|
// but not work address which is null or other address which has no default
|
||||||
json person_missing_address = R"({
|
json person_missing_address = R"({
|
||||||
"name": "Hans",
|
"name": "Hans",
|
||||||
"age": 69
|
"age": 69
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user