-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Descend into nullable objects and arrays
For example, OCDS `parties/details` is nullable, and additional codes for `parties/details/scale` were unreported. #131
- Loading branch information
1 parent
e7b4fa4
commit 5309f7b
Showing
4 changed files
with
103 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
tests/lib/fixtures/common/schema_nullable_object_and_array.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"properties": { | ||
"array": { | ||
"type": ["array", "null"], | ||
"items": { | ||
"$ref": "#/definitions/Object" | ||
} | ||
}, | ||
"object": { | ||
"$ref": "#/definitions/Object" | ||
} | ||
}, | ||
"definitions": { | ||
"Object": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"id": { | ||
"type": "string" | ||
}, | ||
"scale": { | ||
"type": ["array", "null"], | ||
"items": { | ||
"type": "string", | ||
"enum": [ | ||
"small", | ||
"large" | ||
] | ||
}, | ||
"codelist": "partyScale.csv", | ||
"openCodelist": false, | ||
"deprecated": { | ||
"deprecatedVersion": "1.1", | ||
"description": "" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters