From 0c1d11605bb45c168fee557173c260003261b5fc Mon Sep 17 00:00:00 2001 From: Mack Halliday Date: Wed, 11 Dec 2024 13:07:11 -0500 Subject: [PATCH] #2082 - Update Swagger for Bulleted List in Emails (#2175) --- .talismanrc | 2 ++ documents/openapi/openapi.yaml | 30 ++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.talismanrc b/.talismanrc index 7cc6a35d36..025f84a201 100644 --- a/.talismanrc +++ b/.talismanrc @@ -47,6 +47,8 @@ fileignoreconfig: checksum: 2c4024d4e94ffa39ff73e6039d65f0b1d19557067ddf6d97ef14aea86cfb58ad - filename: ci/docker-compose-test.yml checksum: e3efec2749e8c19e60f5bfc68eafabe24eba647530a482ceccfc4e0e62cff424 +- filename: documents/openapi/openapi.yaml + checksum: f67b71f8506be867a206e8f4605c1bbc7a3b13c9d18ce6aa5317b4cbed4a50aa - filename: lambda_functions/pinpoint_callback/pinpoint_callback_lambda.py checksum: 7bd4900e14b1fa789bbb2568b8a8d7a400e3c8350ba32fb44cc0b5b66a2df037 - filename: lambda_functions/ses_callback/ses_callback_lambda.py diff --git a/documents/openapi/openapi.yaml b/documents/openapi/openapi.yaml index 82cb3a330a..316598f58e 100644 --- a/documents/openapi/openapi.yaml +++ b/documents/openapi/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: VA Notify API Documentation - version: 1.0.9 + version: 1.0.10 description: |

This documents the API schemas for consumption by internal VA developers.

Authorization header

@@ -1113,10 +1113,20 @@ paths: * `billing_code` - A string to indicate your billing code * `callback_url` - An https URL; note that this overrides any service level callback * `email_reply_to_id` - A UUID - * `personalisation` - If the template includes personalisation, the fields to populate (see examples) + * `personalisation` - A JSON object containing the fields needed to populate the notification template. See **Advanced Usage** section and **dynamic bullet list** example for details. * `reference` - A string to indicate any reference * `scheduled_for` - A datetime indicated when to send the notification (not available at this time) + ### Advanced usage + + The `personalisation` JSON object allows for dynamic customization of the notification template by passing variables: + + - **Keys**: Represent variable names defined in the notification template. + - **Values**: Specify the data to replace the variables. Values can be: + - **Strings**: Used for simple text replacement. + - **Lists**: Rendered as bulleted lists in the email notification. + ``` + security: - serviceAuth: [] tags: @@ -1154,6 +1164,22 @@ paths: email_reply_to_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 reference: string scheduled_for: string + dynamic bulleted list: + value: + template_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + email_address: test@notification.com + personalisation: + full_name: John Smith + claim_id: '123456' + tasks: + - "Task 1" + - "Task 2" + - "Task 3" + billing_code: string + callback_url: https://staging-api.va.gov/vanotify/internal/swagger + email_reply_to_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + reference: string + scheduled_for: string responses: '201': description: CREATED