mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
Add Organisations endpoints
As part of this we also needed to add: - schemas for validation - serialize method for Organisation model
This commit is contained in:
21
app/organisation/organisation_schema.py
Normal file
21
app/organisation/organisation_schema.py
Normal file
@@ -0,0 +1,21 @@
|
||||
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": []
|
||||
}
|
||||
Reference in New Issue
Block a user