2017-03-28 10:41:25 +01:00
|
|
|
from app.models import TEMPLATE_TYPES
|
|
|
|
|
from app.v2.template_schema import template
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_all_template_request = {
|
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
|
"description": "request schema for parameters allowed when getting all templates",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
2017-03-28 11:08:11 +01:00
|
|
|
"type": {"enum": TEMPLATE_TYPES}
|
2017-03-28 10:41:25 +01:00
|
|
|
},
|
|
|
|
|
"additionalProperties": False,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_all_template_response = {
|
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
|
"description": "GET response schema when getting all templates",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"templates": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"$ref": "#/definitions/template"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2017-03-28 11:08:11 +01:00
|
|
|
"required": ["templates"],
|
2017-03-28 10:41:25 +01:00
|
|
|
"definitions": {
|
|
|
|
|
"template": template
|
|
|
|
|
}
|
|
|
|
|
}
|