Skip to content

Update OpenAPI spec with endpoint specific errors to be consistent with REST doc#316

Merged
Ian-Nice-16 merged 20 commits intomainfrom
openapi_postage_callback_error_updates
Mar 4, 2026
Merged

Update OpenAPI spec with endpoint specific errors to be consistent with REST doc#316
Ian-Nice-16 merged 20 commits intomainfrom
openapi_postage_callback_error_updates

Conversation

@Ian-Nice-16
Copy link
Copy Markdown
Contributor

This PR is best reviewed commit by commit.

This PR updates the OpenAPI spec to be more closely aligned with the REST API document. Changes include:

  • Updating example endpoint parameter and response values to be the same (or similar to) those used in the REST API doc.
  • Updating the error response examples to include endpoint specific errors identified by @rparke
  • Added the returned letter callback data structure
  • Updating the x-logo property used by redocly to use the GOV.UK logo with the updated crown.

To view the OpenAPI spec in HTML format use the redocly docker image and the following command (from the openapi directory): docker run --rm -v $PWD:/spec redocly/cli lint publicapi_spec.json

…tions/sms endpoint to match those in the REST API doc
…erent required fields for each notification type. Also added updated example data to be consistent with the REST docs
…parameter to reflect example in the rest docs
…ndpoint to be consistent with the REST docs. Also removed the examples for the status query parameter which were not formatted correctly by redocly. Redirect reader to the REST docs instead.
Copy link
Copy Markdown
Contributor

@klssmith klssmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good (and much more consistent with the REST docs 🎉) when viewed in Redocly, just 2 very minor typos I spotted

Comment thread openapi/schema.json Outdated
Comment thread openapi/POST_notification_email.json Outdated
@klssmith
Copy link
Copy Markdown
Contributor

Once @spatel033 's PR to add a new validation error for letters is merged, we'll also want that error here but that could be added in a separate PR if it's easier

Ian-Nice-16 and others added 2 commits March 4, 2026 11:53
Fixing incorrectly named property

Co-authored-by: Katie Smith <klssmith@users.noreply.github.com>
Fixing typo

Co-authored-by: Katie Smith <klssmith@users.noreply.github.com>
@Ian-Nice-16 Ian-Nice-16 merged commit 62e4dfd into main Mar 4, 2026
2 checks passed
@Ian-Nice-16 Ian-Nice-16 deleted the openapi_postage_callback_error_updates branch March 4, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants