diff --git a/api.planx.uk/modules/webhooks/docs.yaml b/api.planx.uk/modules/webhooks/docs.yaml index 5d8a2d0d2f..b200378244 100644 --- a/api.planx.uk/modules/webhooks/docs.yaml +++ b/api.planx.uk/modules/webhooks/docs.yaml @@ -151,22 +151,42 @@ components: event_id: type: string description: Internal Hasura ID of the generated event - OperationResult: - type: object - properties: - operationName: - type: string - status: - type: string - enum: - - success - - failure - count: - type: integer - required: false - errorMessage: - type: string - required: false + OperationResultSuccess: + content: + application/json: + schema: + type: array + items: + type: object + properties: + operationName: + type: string + status: + type: string + enum: + - success + count: + type: integer + OperationResultFailure: + content: + application/json: + schema: + type: array + items: + type: object + properties: + operationName: + type: string + status: + type: string + enum: + - success + - failure + count: + type: integer + errorMessage: + type: string + required: false paths: /webhooks/hasura/sendSlackNotification: post: @@ -234,43 +254,43 @@ paths: $ref: "#/components/responses/ScheduledEvent" "500": $ref: "#/components/responses/ErrorMessage" - /webhooks/hasura/create-reminder-event: - post: - tags: ["webhooks"] - summary: Create session reminder event - description: Setup events which will trigger session reminder emails to be generated - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateSessionEvent" - responses: - "200": - $ref: "#/components/responses/ScheduledEvent" - "500": - $ref: "#/components/responses/ErrorMessage" - /webhooks/hasura/create-expiry-event: - post: - tags: ["webhooks"] - summary: Create session expiry event - description: Setup events which will trigger session expiry email to be generated - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateSessionEvent" - responses: - "200": - $ref: "#/components/responses/ScheduledEvent" - "500": - $ref: "#/components/responses/ErrorMessage" - /webhooks/hasura/sanitise-application-data: - post: - tags: ["webhooks"] - summary: Sanitise application data - description: Called by Hasura cron job "sanitise_application_data" on a nightly basis - responses: - "200": - $ref: "#/components/responses/OperationResult" - "500": - $ref: "#/components/responses/OperationResult" + /webhooks/hasura/create-reminder-event: + post: + tags: ["webhooks"] + summary: Create session reminder event + description: Setup events which will trigger session reminder emails to be generated + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateSessionEvent" + responses: + "200": + $ref: "#/components/responses/ScheduledEvent" + "500": + $ref: "#/components/responses/ErrorMessage" + /webhooks/hasura/create-expiry-event: + post: + tags: ["webhooks"] + summary: Create session expiry event + description: Setup events which will trigger session expiry email to be generated + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateSessionEvent" + responses: + "200": + $ref: "#/components/responses/ScheduledEvent" + "500": + $ref: "#/components/responses/ErrorMessage" + /webhooks/hasura/sanitise-application-data: + post: + tags: ["webhooks"] + summary: Sanitise application data + description: Called by Hasura cron job "sanitise_application_data" on a nightly basis + responses: + "200": + $ref: "#/components/responses/OperationResultSuccess" + "500": + $ref: "#/components/responses/OperationResultFailure"