-
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 c6366fa
Showing
4 changed files
with
98 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
46 changes: 46 additions & 0 deletions
46
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,46 @@ | ||
{ | ||
"id": "bods-package.json", | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"properties": { | ||
"data": { | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"entityType": { | ||
"enum": [ | ||
"registeredEntity", | ||
"legalEntity", | ||
"arrangement", | ||
"anonymousEntity", | ||
"unknownEntity" | ||
], | ||
"openCodelist": false, | ||
"title": "Type", | ||
"type": "string", | ||
"codelist": "currency.csv" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"entityType": { | ||
"enum": [ | ||
"registeredEntity", | ||
"legalEntity", | ||
"arrangement", | ||
"anonymousEntity", | ||
"unknownEntity" | ||
], | ||
"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