mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-05 16:48:31 -04:00
@@ -1,4 +1,4 @@
|
||||
from app.models import NOTIFICATION_STATUS_TYPES, NOTIFICATION_TYPES
|
||||
from app.models import NOTIFICATION_STATUS_TYPES, TemplateType
|
||||
from app.schema_validation.definitions import personalisation, uuid
|
||||
|
||||
template = {
|
||||
@@ -81,7 +81,10 @@ get_notifications_request = {
|
||||
"properties": {
|
||||
"reference": {"type": "string"},
|
||||
"status": {"type": "array", "items": {"enum": NOTIFICATION_STATUS_TYPES}},
|
||||
"template_type": {"type": "array", "items": {"enum": NOTIFICATION_TYPES}},
|
||||
"template_type": {
|
||||
"type": "array",
|
||||
"items": {"enum": [e.value for e in TemplateType]},
|
||||
},
|
||||
"include_jobs": {"enum": ["true", "True"]},
|
||||
"older_than": uuid,
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from app.models import TEMPLATE_TYPES
|
||||
from app.models import TemplateType
|
||||
from app.schema_validation.definitions import personalisation, uuid
|
||||
|
||||
get_template_by_id_request = {
|
||||
@@ -17,7 +17,7 @@ get_template_by_id_response = {
|
||||
"title": "reponse v2/template",
|
||||
"properties": {
|
||||
"id": uuid,
|
||||
"type": {"enum": TEMPLATE_TYPES},
|
||||
"type": {"enum": [e.value for e in TemplateType]},
|
||||
"created_at": {
|
||||
"format": "date-time",
|
||||
"type": "string",
|
||||
@@ -62,7 +62,7 @@ post_template_preview_response = {
|
||||
"title": "reponse v2/template/{id}/preview",
|
||||
"properties": {
|
||||
"id": uuid,
|
||||
"type": {"enum": TEMPLATE_TYPES},
|
||||
"type": {"enum": [e.value for e in TemplateType]},
|
||||
"version": {"type": "integer"},
|
||||
"body": {"type": "string"},
|
||||
"subject": {"type": ["string", "null"]},
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from app.models import TEMPLATE_TYPES
|
||||
from app.models import TemplateType
|
||||
from app.v2.template.template_schemas import get_template_by_id_response as template
|
||||
|
||||
get_all_template_request = {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "request schema for parameters allowed when getting all templates",
|
||||
"type": "object",
|
||||
"properties": {"type": {"enum": TEMPLATE_TYPES}},
|
||||
"properties": {"type": {"enum": [e.value for e in TemplateType]}},
|
||||
"additionalProperties": False,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user