Files
notifications-api/app/organisation/organisation_schema.py
Katie Smith 269923ba28 Add Organisations endpoints
As part of this we also needed to add:
- schemas for validation
- serialize method for Organisation model
2018-02-08 15:22:21 +00:00

22 lines
607 B
Python

post_create_organisation_schema = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "POST organisation schema",
"type": "object",
"properties": {
"name": {"type": "string"},
"active": {"type": ["boolean", "null"]}
},
"required": ["name"]
}
post_update_organisation_schema = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "POST organisation schema",
"type": "object",
"properties": {
"name": {"type": ["string", "null"]},
"active": {"type": ["boolean", "null"]}
},
"required": []
}