From 3087b2d630ca7f0f09a8eb36bb1556bc0edabe34 Mon Sep 17 00:00:00 2001
From: LeoKHoward <38526889+LeoKHoward@users.noreply.github.com>
Date: Mon, 14 Jul 2025 10:22:10 +0100
Subject: [PATCH 1/2] NPA-5222: Fix Endpoint API Spec Defaults
---
...te Relationship Service Sandbox.postman_collection.json | 6 +++---
sandbox/api/patch_consent.py | 2 +-
sandbox/api/tests/test_patch_consent.py | 2 +-
.../requests/POST_QuestionnaireResponse/mother-child.yaml | 6 +++---
specification/validated-relationships-service-api.yaml | 7 +++++--
5 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/postman/Validate Relationship Service Sandbox.postman_collection.json b/postman/Validate Relationship Service Sandbox.postman_collection.json
index 8a6a3d52..c7d0c22c 100644
--- a/postman/Validate Relationship Service Sandbox.postman_collection.json
+++ b/postman/Validate Relationship Service Sandbox.postman_collection.json
@@ -9720,13 +9720,13 @@
}
},
"url": {
- "raw": "{{api_base_url}}/Consent/c512b0db-6702-43ee-8c21-bbded2552da9",
+ "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a",
"host": [
"{{api_base_url}}"
],
"path": [
"Consent",
- "c512b0db-6702-43ee-8c21-bbded2552da9"
+ "74eed847-ca25-4e76-8cf2-f2c2d7842a7a"
]
},
"description": "Valid patch changing status to 'active'"
@@ -10288,4 +10288,4 @@
"type": "string"
}
]
-}
\ No newline at end of file
+}
diff --git a/sandbox/api/patch_consent.py b/sandbox/api/patch_consent.py
index 15e6e73b..822c3d06 100644
--- a/sandbox/api/patch_consent.py
+++ b/sandbox/api/patch_consent.py
@@ -31,7 +31,7 @@ def patch_consent_response(id: str) -> Union[dict, tuple]:
# Validate body - validation is beyond the scope of the sandbox.
# Assume all requests are valid
- if id == "c512b0db-6702-43ee-8c21-bbded2552da9":
+ if id == "74eed847-ca25-4e76-8cf2-f2c2d7842a7a":
# Successful status update
return generate_response_from_example(PATCH_CONSENT__SUCCESS, 200)
diff --git a/sandbox/api/tests/test_patch_consent.py b/sandbox/api/tests/test_patch_consent.py
index 2c08e482..c8c086e0 100644
--- a/sandbox/api/tests/test_patch_consent.py
+++ b/sandbox/api/tests/test_patch_consent.py
@@ -20,7 +20,7 @@
@pytest.mark.parametrize(
("nhs_num", "response_file_name", "status_code"),
[
- ("c512b0db-6702-43ee-8c21-bbded2552da9", PATCH_CONSENT__SUCCESS, 200),
+ ("74eed847-ca25-4e76-8cf2-f2c2d7842a7a", PATCH_CONSENT__SUCCESS, 200),
("6b71ac92-baa3-4b76-b0f5-a601257e2722", PATCH_CONSENT__SUCCESS, 200),
("43003db8-ffcd-4bd6-ab2f-b49b9656f9e5", PATCH_CONSENT__SUCCESS, 200),
("849ea584-2318-471b-a24c-cee1b5ad0137", PATCH_CONSENT__INVALID_PATCH_FORMAT, 400),
diff --git a/specification/examples/requests/POST_QuestionnaireResponse/mother-child.yaml b/specification/examples/requests/POST_QuestionnaireResponse/mother-child.yaml
index ac95c671..9224227d 100644
--- a/specification/examples/requests/POST_QuestionnaireResponse/mother-child.yaml
+++ b/specification/examples/requests/POST_QuestionnaireResponse/mother-child.yaml
@@ -1,7 +1,7 @@
QuestionnaireResponseMotherChildRequest:
summary: Mother > Child access request
description: |
- Example proxy access request from a mother (Martha) with NHS number `9000000001` requesting access to act on behalf of their child (Timmy) with NHS number `9000000002`.
+ Example proxy access request from a mother (Martha) with NHS number `9000000017` requesting access to act on behalf of their child (Timmy) with NHS number `9000000002`.
Significant details to point out:
@@ -18,7 +18,7 @@ QuestionnaireResponseMotherChildRequest:
type: "RelatedPerson"
identifier:
system: "https://fhir.nhs.uk/Id/nhs-number"
- value: "9000000001"
+ value: "9000000017"
subject:
type: "Patient"
identifier:
@@ -32,7 +32,7 @@ QuestionnaireResponseMotherChildRequest:
- linkId: "relatedPerson_identifier"
text: "NHS number"
answer:
- - valueString: "9000000001"
+ - valueString: "9000000017"
- linkId: "relatedPerson_basisForAccess"
text: "Basis for Access"
answer:
diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml
index d2f8d0a6..7795ede4 100644
--- a/specification/validated-relationships-service-api.yaml
+++ b/specification/validated-relationships-service-api.yaml
@@ -938,7 +938,7 @@ paths:
| Scenario | Request | Response |
| ------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
- | Successful status update | Valid patch changing status to 'active', request with id 'c512b0db-6702-43ee-8c21-bbded2552da9' | HTTP Status 200 and OperationOutcome |
+ | Successful status update | Valid patch changing status to 'active', request with id '74eed847-ca25-4e76-8cf2-f2c2d7842a7a' | HTTP Status 200 and OperationOutcome |
| Successful access level update | Valid patch modifying the role end date, request with id '6b71ac92-baa3-4b76-b0f5-a601257e2722' | HTTP Status 200 and OperationOutcome |
| Multiple valid changes | Valid patch with multiple operations, request with id '43003db8-ffcd-4bd6-ab2f-b49b9656f9e5' | HTTP Status 200 and OperationOutcome |
| Invalid patch format | Malformed JSON patch document, request with id '849ea584-2318-471b-a24c-cee1b5ad0137' | HTTP Status 400 and INVALID_PATCH_FORMAT error response |
@@ -2627,6 +2627,9 @@ components:
enum:
- "Consent:performer"
- "Consent:patient"
+ default:
+ - "Consent:performer"
+ - "Consent:patient"
examples:
IncludePerformer:
summary: Include the performer (proxy) in the bundle
@@ -2733,4 +2736,4 @@ components:
type: string
format: uuid
pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
- example: 11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA
+ example: 74eed847-ca25-4e76-8cf2-f2c2d7842a7a
From 183dfd9975b0b5eb527189bc7543bc75e47e52c3 Mon Sep 17 00:00:00 2001
From: LeoKHoward <38526889+LeoKHoward@users.noreply.github.com>
Date: Mon, 14 Jul 2025 10:29:13 +0100
Subject: [PATCH 2/2] NPA-5222: Fix Endpoint API Spec Defaults
---
specification/validated-relationships-service-api.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml
index 7795ede4..8b3bd0f4 100644
--- a/specification/validated-relationships-service-api.yaml
+++ b/specification/validated-relationships-service-api.yaml
@@ -141,7 +141,7 @@ info:
* only covers a limited set of scenarios
* is open access, so does not allow you to test authorisation
- [
](https://app.getpostman.com/run-collection/18067099-a5cc5740-0392-439d-931c-00fbb2d058f1?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D18067099-a5cc5740-0392-439d-931c-00fbb2d058f1%26entityType%3Dcollection%26workspaceId%3D66795b20-35be-480e-bcb5-07e30c1c64b5))
+ [
](https://god.gw.postman.com/run-collection/46399153-7043e3fb-54f4-41ea-88f7-43e00a6c00dd?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D46399153-7043e3fb-54f4-41ea-88f7-43e00a6c00dd%26entityType%3Dcollection%26workspaceId%3D98276349-4ae9-4592-84a2-01459d13edc7))
### Integration testing