Rrefactored schema

This commit is contained in:
Ken Tsang
2017-03-28 11:08:11 +01:00
parent 89e244ccd2
commit cb7cd233d1
2 changed files with 3 additions and 61 deletions

View File

@@ -1,5 +1,4 @@
from app.models import TEMPLATE_TYPES
from app.schema_validation.definitions import uuid
from app.v2.template_schema import template
@@ -8,8 +7,7 @@ get_all_template_request = {
"description": "request schema for parameters allowed when getting all templates",
"type": "object",
"properties": {
"type": {"enum": TEMPLATE_TYPES},
"older_than": uuid
"type": {"enum": TEMPLATE_TYPES}
},
"additionalProperties": False,
}
@@ -19,21 +17,6 @@ get_all_template_response = {
"description": "GET response schema when getting all templates",
"type": "object",
"properties": {
"links": {
"type": "object",
"properties": {
"current": {
"type": "string",
"format": "uri"
},
"next": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": False,
"required": ["current"],
},
"templates": {
"type": "array",
"items": {
@@ -42,7 +25,7 @@ get_all_template_response = {
}
}
},
"required": ["links", "templates"],
"required": ["templates"],
"definitions": {
"template": template
}