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 = {
|
2022-04-08 17:05:59 +01:00
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
2018-10-30 16:26:25 +00:00
|
|
|
"description": "POST schema for getting template_folder",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": {"type": "string", "minLength": 1},
|
2023-08-29 14:54:30 -07:00
|
|
|
"parent_id": nullable_uuid,
|
2025-08-19 12:44:46 -07:00
|
|
|
"created_by_id": uuid,
|
2018-10-30 16:26:25 +00:00
|
|
|
},
|
2023-08-29 14:54:30 -07:00
|
|
|
"required": ["name", "parent_id"],
|
2018-10-30 16:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
2018-11-12 14:28:07 +00:00
|
|
|
post_update_template_folder_schema = {
|
2022-04-08 17:05:59 +01:00
|
|
|
"$schema": "http://json-schema.org/draft-07/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},
|
2023-08-29 14:54:30 -07:00
|
|
|
"users_with_permission": {"type": "array", "items": uuid},
|
2018-10-30 16:26:25 +00:00
|
|
|
},
|
2023-08-29 14:54:30 -07:00
|
|
|
"required": ["name"],
|
2018-10-30 16:26:25 +00:00
|
|
|
}
|
2018-11-08 16:44:57 +00:00
|
|
|
|
|
|
|
|
post_move_template_folder_schema = {
|
2022-04-08 17:05:59 +01:00
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
2018-11-08 16:44:57 +00:00
|
|
|
"description": "POST schema for renaming template_folder",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"templates": {"type": "array", "items": uuid},
|
|
|
|
|
"folders": {"type": "array", "items": uuid},
|
|
|
|
|
},
|
2023-08-29 14:54:30 -07:00
|
|
|
"required": ["templates", "folders"],
|
2018-11-08 16:44:57 +00:00
|
|
|
}
|