-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schema-strict: add more validation keywords #184
Conversation
elif key in ['quantity', 'durationInDays', 'numberOfTenderers']: | ||
value['minimum'] = 0 | ||
elif key in ['Organization', 'OrganizationReference']: | ||
value['required'] = ['id', 'name'] | ||
value['properties']['name']['type'] = "string" | ||
value['properties']['id']['type'] = "string" | ||
elif key in ['Amendment', 'RelatedProcess']: | ||
value['required'] = ['id'] | ||
value['properties']['id']['type'] = "string" | ||
elif key == 'id': | ||
if 'type' in value: | ||
if 'integer' in value['type']: | ||
value['type'].remove('integer') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OCDS Kit (despite the name) has tools that are reusable by other JSON Schema standards (like BODS). We should put this logic in the standard repository. Since this leaves only email as key-based logic, we can move it as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good - I've done that in open-contracting/standard#1480 so I'll close this PR.
Related to open-contracting/standard#1046
TO-DO: