Return template name in public API

The use for the public template API is for building caseworking systems
or similar, where you might need a list of templates to pick from (ie
instead of using the Notify web interface to pick from and send a
message).

Right now our API isn’t returning the template name as part of the
response. The name is a useful, human-friendly way of identifying a
template.

This commit changes the response to include the name.

Some clients will need updating before this can be useful.
This commit is contained in:
Chris Hill-Scott
2017-08-15 14:34:02 +01:00
parent 7879bc0e7e
commit 04e41e3147
5 changed files with 57 additions and 25 deletions

View File

@@ -35,9 +35,10 @@ get_template_by_id_response = {
"created_by": {"type": "string"},
"version": {"type": "integer"},
"body": {"type": "string"},
"subject": {"type": ["string", "null"]}
"subject": {"type": ["string", "null"]},
"name": {"type": "string"},
},
"required": ["id", "type", "created_at", "updated_at", "version", "created_by", "body"]
"required": ["id", "type", "created_at", "updated_at", "version", "created_by", "body", "name"],
}
post_template_preview_request = {