2024-01-10 12:45:03 -05:00
|
|
|
from app.enums import TemplateType
|
2023-08-25 08:10:33 -07:00
|
|
|
from app.v2.template.template_schemas import get_template_by_id_response as template
|
2017-03-28 10:41:25 +01:00
|
|
|
|
|
|
|
|
get_all_template_request = {
|
2022-04-08 17:05:59 +01:00
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
2017-03-28 10:41:25 +01:00
|
|
|
"description": "request schema for parameters allowed when getting all templates",
|
|
|
|
|
"type": "object",
|
2024-01-10 09:48:32 -05:00
|
|
|
"properties": {"type": {"enum": [e.value for e in TemplateType]}},
|
2017-03-28 10:41:25 +01:00
|
|
|
"additionalProperties": False,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_all_template_response = {
|
2022-04-08 17:05:59 +01:00
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
2017-03-28 10:41:25 +01:00
|
|
|
"description": "GET response schema when getting all templates",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"templates": {
|
|
|
|
|
"type": "array",
|
2023-08-23 10:35:43 -07:00
|
|
|
"items": {"type": "object", "$ref": "#/definitions/template"},
|
2017-03-28 10:41:25 +01:00
|
|
|
}
|
|
|
|
|
},
|
2017-03-28 11:08:11 +01:00
|
|
|
"required": ["templates"],
|
2023-08-23 10:35:43 -07:00
|
|
|
"definitions": {"template": template},
|
2017-03-28 10:41:25 +01:00
|
|
|
}
|