Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update swagger to include all delivery statuses for notifications #2035

Open
12 tasks
cris-oddball opened this issue Oct 4, 2024 · 1 comment
Open
12 tasks

Comments

@cris-oddball
Copy link

cris-oddball commented Oct 4, 2024

User Story - Business Need

Our swagger documentations has a single enum, "created", in the schema for the GET v2/notifications response.

Screenshot 2024-10-04 at 1.06.41 PM.jpg

There are other delivery statuses than "created", we should complete the enum with all available status strings.

Swagger also provides a Description section for the route, which should be populated with a list or table or paragraph explaining which states are final and which states are transient and will be retried.

Note that the callback routes also contain statuses, which should also be updated.

This ticket is based off a client request received for more information.

  • Ticket is understood, and QA has been contacted (if the ticket has a QA label).

User Story(ies)

As a client of VANotify
I want to understand all the possibilities of a notification's delivery status
So that I can categorize the states into final/absolute states, and states that are intermediary/transient

Additional Info and Resources

  • Update notification statuses enum for the status property in GET /v2/notifications/{notification_id} response
    Image

  • Update notification statuses enum for the notification_statuses property in

    • GET /service/{service_id}/callback response schema
    • GET /service/{service_id}/callback/{callback_id} response schema
    • POST /service/{service_id}/callback request schema and response schema
    • POST /service/{service_id}/callback/{callback_id} request schema and response schema
      Image

See this ADR and follow the code to make sure this is the definitive list:

  • created
  • sending
  • sent
  • delivered
  • permanent-failure
  • temporary-failure
  • cancelled

OpenAPI spec
Swagger Editor
Our application's swagger document

Acceptance Criteria

  • Be sure to increment the version number of the swagger doc
  • The enum for status in the sms response schema for the GET v2/notifications/{notification_id} includes all possible status strings
  • The enum for status in the email response schema for the GET v2/notifications/{notification_id} includes all possible status strings
  • The enum for status in the response schema for GET /service/{service_id}/callback includes all possible status strings
  • The enum for status in the response schema for GET /service/{service_id}/callback/{callback_id} includes all possible status strings
  • The enum for status in the request and responses schemas for POST /service/{service_id}/callback includes all possible status strings
  • The enum for status in the request and responses schemas for POST /service/{service_id}/callback/{callback_id} includes all possible status strings
  • The description for the path includes a section describing which of these statuses are final and which are retried and who retries them (client? VANotify?) - or that the status reason will provide that information (see linked ADR)
  • Portal is notified so that they can pull in these changes to the documentation displayed in the Portal.
  • This work is added to the sprint review slide deck (key win bullet point and demo slide)

QA Considerations

  • Double-check the work

Potential Dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants