2018-11-08 16:44:57 +00:00
|
|
|
from app.schema_validation.definitions import nullable_uuid, uuid
|
2018-10-30 16:26:25 +00:00
|
|
|
|
|
|
|
|
post_create_template_folder_schema = {
|
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
|
"description": "POST schema for getting template_folder",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": {"type": "string", "minLength": 1},
|
|
|
|
|
"parent_id": nullable_uuid
|
|
|
|
|
},
|
|
|
|
|
"required": ["name", "parent_id"]
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-12 14:28:07 +00:00
|
|
|
post_update_template_folder_schema = {
|
2018-10-30 16:26:25 +00:00
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
2018-11-12 14:28:07 +00:00
|
|
|
"description": "POST schema for updating template_folder",
|
2018-10-30 16:26:25 +00:00
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": {"type": "string", "minLength": 1},
|
2019-03-15 17:22:45 +00:00
|
|
|
"users_with_permission": {"type": "array", "items": uuid}
|
2018-10-30 16:26:25 +00:00
|
|
|
},
|
|
|
|
|
"required": ["name"]
|
|
|
|
|
}
|
2018-11-08 16:44:57 +00:00
|
|
|
|
|
|
|
|
post_move_template_folder_schema = {
|
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
|
"description": "POST schema for renaming template_folder",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"templates": {"type": "array", "items": uuid},
|
|
|
|
|
"folders": {"type": "array", "items": uuid},
|
|
|
|
|
},
|
|
|
|
|
"required": ["templates", "folders"]
|
|
|
|
|
}
|