mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
Rrefactored schema
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user