Closed joe-oli closed 2 years ago
Thanks for taking the time to report this @joe-oli . You're right. I stripped back your example to
[
{
"PartySiteNumber": null
},
{
"PartySiteNumber": "S444666"
}
]
And also removed a few keywords
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "array",
"default": [],
"examples": [
[
{
"PartySiteNumber": null
},
{
"PartySiteNumber": "S444666"
}
]
],
"items": {
"anyOf": [
{
"type": "object",
"default": {},
"examples": [
{
"PartySiteNumber": null
}
],
"required": [
"PartySiteNumber"
],
"properties": {
"PartySiteNumber": {
"type": "null",
"default": null,
"examples": [
null
]
}
}
}
]
}
}
This has been fixed in the new version.
When given an array with two objects examples, it considers only the first example to infer the type;
The inferred type is
when it should have been: "type" : ["null", "string"]