-
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.
Calculate additional codelist values for schema using anyOf, like OCD…
…S record packages #125 open-contracting/lib-cove-ocds#106
- Loading branch information
1 parent
b2c6851
commit 335a586
Showing
4 changed files
with
89 additions
and
10 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
34 changes: 34 additions & 0 deletions
34
tests/lib/fixtures/common/schema_with_oneof_codelists.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,34 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"data": { | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"entityType": { | ||
"openCodelist": false, | ||
"title": "Type", | ||
"type": "string", | ||
"codelist": "currency.csv" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"entityType": { | ||
"enum": [ | ||
"otherValue" | ||
], | ||
"type": "string" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"type": "array", | ||
"version": "0.1" | ||
} |
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