Skip to content

NPA-5088: Update Consent id to be UUID in Spec and Sandbox Examples#214

Merged
ellie-bound1-NHSD merged 3 commits into
masterfrom
dev/NPA-5088/Update-Consent-id-to-be-UUID
Jun 4, 2025
Merged

NPA-5088: Update Consent id to be UUID in Spec and Sandbox Examples#214
ellie-bound1-NHSD merged 3 commits into
masterfrom
dev/NPA-5088/Update-Consent-id-to-be-UUID

Conversation

@ellie-bound1-NHSD

Copy link
Copy Markdown
Contributor

Pull Request

Ticket Link

https://nhsd-jira.digital.nhs.uk/browse/NPA-5088

Description/Change Summary

  • Updated spec example for post consent location header to include a uuid rather than nhs number
  • Added format uuid to id parameter for Patch Consent endpoint
  • Updated examples for sandbox patch consent so id is a uuid rather than random string
  • Updated sandbox tests

How to test?

  • Sandbox unit tests passing
  • Ran dev API tests pointing at this branch and all passed

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • I have ensured the changelog has been updated by the submitter, if necessary.

Post-merge

After merging and deploying changes to the sandbox, Postman collection or spec examples please run the Run Postman collection workflow.

This will run the tests within the collection to check that the sandbox is working as expected once deployed.

@ellie-bound1-NHSD ellie-bound1-NHSD self-assigned this Jun 4, 2025
@github-actions

github-actions Bot commented Jun 4, 2025

Copy link
Copy Markdown

This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket:

NPA-5088

@JackPlowman JackPlowman added documentation Improvements or additions to documentation enhancement New feature or request python Pull requests that update Python code labels Jun 4, 2025

@JackPlowman JackPlowman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Couple of comments but nothing major

| Resource not found | Patch for non-existent Consent, request with an id not listed here | HTTP Status 404 and RESOURCE_NOT_FOUND error response |
| Invalid state transition | Patch attempting invalid status change, request with id '7b7f47b8-96e5-43eb-b733-283bf1449f2c' | HTTP Status 422 and INVALID_STATE_TRANSITION error response |
parameters:
# Change id parameter to Component ConsentID when NPA-5088 is complete

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this comment be followed to reduce duplication

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also the examples could move to ConsentID component

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Used the ConsentID Comp but didnt add the examples as felt redundant and not relevant to the get consent by id endpoint which uses the ConsentId component to

Comment thread sandbox/api/patch_consent.py Outdated
# Assume all requests are valid

if identifier == "c6f48e4d":
if identifier == "c512b0db-6702-43ee-8c21-bbded2552da9":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could the variable identifier be changed to id in line with the path parameter name

@github-actions

github-actions Bot commented Jun 4, 2025

Copy link
Copy Markdown

This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket:

NPA-5088

@JackPlowman JackPlowman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@ellie-bound1-NHSD ellie-bound1-NHSD merged commit 001742a into master Jun 4, 2025
17 checks passed
@ellie-bound1-NHSD ellie-bound1-NHSD deleted the dev/NPA-5088/Update-Consent-id-to-be-UUID branch June 4, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants