Skip to content

Commit

Permalink
schema-strict: remove null type from required fields
Browse files Browse the repository at this point in the history
  • Loading branch information
duncandewhurst committed Feb 11, 2022
1 parent a62b826 commit bec5f85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ocdskit/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ def add_validation_properties(schema, unique_items=True, coordinates=False):
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"

add_validation_properties(value, unique_items=unique_items, coordinates=coordinates)

0 comments on commit bec5f85

Please sign in to comment.