Skip to content

Commit

Permalink
fix: Tidy up swagger docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Oct 3, 2023
1 parent 80da1b4 commit f7f3701
Showing 1 changed file with 76 additions and 56 deletions.
132 changes: 76 additions & 56 deletions api.planx.uk/modules/webhooks/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"

0 comments on commit f7f3701

Please sign in to comment.