Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"info": {
"_postman_id": "110252c4-5fa1-46ca-a08d-b5ce96e28fde",
"name": "Validate Relationship Service Sandbox 06/06/25",
"_postman_id": "4442b3f9-8d89-4aae-a5a9-8a5eda755ead",
"name": "Validate Relationship Service Sandbox 09/06/25",
"description": "This Postman collection includes example scenarios for each of the Validated Relationship Service (VRS) API endpoints, covering both valid and invalid request scenarios.\n\nThe collection is pointed towards the VRS sandbox environment, which will return a specific example response based on the request sent. All data shown in the requests or responses is test data.\n\nOur sandbox environment only covers the scenarios listed in the Postman collection and is open access. It does not allow you to test authorisation or any scenarios beyond the ones documented.\n\nFull specification is available at [https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service)",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "18067099",
"_collection_link": "https://www.postman.com/lunar-crescent-672573/workspace/validated-relationship-service-06-06-25/collection/18067099-110252c4-5fa1-46ca-a08d-b5ce96e28fde?action=share&source=collection_link&creator=18067099"
"_exporter_id": "34042403",
"_collection_link": "https://www.postman.com/jackplowman2/validated-relationship-service-sandbox-09-06-25/collection/yzbxyur/validate-relationship-service-sandbox-09-06-25?action=share&source=collection_link&creator=34042403"
},
"item": [
{
Expand Down Expand Up @@ -6096,7 +6096,7 @@
" {",
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
" \"version\": \"1\",",
" \"code\": \"INVALID_VALUE\",",
" \"code\": \"INVALID_PARAMETER\",",
" \"display\": \"Required parameter(s) are invalid.\"",
" }",
" ]",
Expand All @@ -6114,7 +6114,7 @@
"});",
"",
"pm.test(\"Should have correct error response\", () => {",
" pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_VALUE\");",
" pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_PARAMETER\");",
"});",
"",
"pm.test(\"Should have correct response body\", () => {",
Expand Down Expand Up @@ -8007,65 +8007,6 @@
},
"response": []
},
{
"name": "Missing consent ID",
"event": [
{
"listen": "test",
"script": {
"exec": [
"const expectedResponseBody = {",
" \"issue\": [",
" {",
" \"code\": \"invalid\",",
" \"diagnostics\": \"Invalid request with error - ID must be specified in the request path.\",",
" \"details\": {",
" \"coding\": [",
" {",
" \"code\": \"MISSING_ID_VALUE\",",
" \"display\": \"Required parameter(s) are missing.\",",
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
" \"version\": \"1\"",
" }",
" ]",
" },",
" \"severity\": \"error\"",
" }",
" ],",
" \"resourceType\": \"OperationOutcome\"",
"}",
"",
"const responseJson = pm.response.json();",
"",
"pm.test(\"Status code is 400\", function () {",
" pm.response.to.have.status(400);",
"});",
"",
"pm.test(\"Should have correct response body\", () => {",
" pm.expect(responseJson).to.eql(expectedResponseBody);",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{api_base_url}}/Consent/ ",
"host": [
"{{api_base_url}}"
],
"path": [
"Consent",
" "
]
}
},
"response": []
},
{
"name": "Invalid include parameter",
"event": [
Expand All @@ -8083,7 +8024,7 @@
" {",
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
" \"version\": \"1\",",
" \"code\": \"INVALID_VALUE\",",
" \"code\": \"INVALID_PARAMETER\",",
" \"display\": \"Required parameter(s) are invalid.\"",
" }",
" ]",
Expand Down Expand Up @@ -8148,7 +8089,7 @@
" {",
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
" \"version\": \"1\",",
" \"code\": \"INVALID_VALUE\",",
" \"code\": \"INVALID_PARAMETER\",",
" \"display\": \"Required parameter(s) are invalid.\"",
" }",
" ]",
Expand Down
1 change: 0 additions & 1 deletion sandbox/api/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@

# GET Consent by ID
GET_CONSENT_BY_ID__INVALID_ID_ERROR = f"{GET_CONSENT__DIRECTORY}ID/errors/invalid-id.yaml"
GET_CONSENT_BY_ID__MISSING_ID_ERROR = f"{GET_CONSENT__DIRECTORY}ID/errors/missing-id.yaml"

# POST Consent
POST_CONSENT__DIRECTORY = "./api/examples/POST_Consent/"
Expand Down
3 changes: 0 additions & 3 deletions sandbox/api/get_consent_by_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
GET_CONSENT__SINGLE_MOTHER_CHILD_RELATIONSHIP_INCLUDE_PATIENT,
GET_CONSENT__SINGLE_MOTHER_CHILD_RELATIONSHIP_INCLUDE_PERFORMER,
GET_CONSENT_BY_ID__INVALID_ID_ERROR,
GET_CONSENT_BY_ID__MISSING_ID_ERROR,
BAD_REQUEST_INCLUDE_PARAM_INVALID,
INVALIDATED_RESOURCE,
)
Expand Down Expand Up @@ -54,8 +53,6 @@ def get_consent_by_id_response(identifier: str) -> Union[dict, tuple]:
)
elif identifier == "a0922245-1072-40c3-8f4e-a7490c10d365":
return generate_response_from_example(INVALIDATED_RESOURCE, 404)
elif identifier == " " or identifier is None:
return generate_response_from_example(GET_CONSENT_BY_ID__MISSING_ID_ERROR, 400)
else:
return generate_response_from_example(GET_CONSENT_BY_ID__INVALID_ID_ERROR, 400)

Expand Down
2 changes: 1 addition & 1 deletion sandbox/api/tests/test_get_consent_by_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
(
" ", # Missing consent ID
"",
"./api/examples/GET_Consent/ID/errors/missing-id.yaml",
"./api/examples/GET_Consent/ID/errors/invalid-id.yaml",
400,
),
(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ InvalidIncludeParameterError:
coding:
- system: "https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode"
version: "1"
code: "INVALID_VALUE"
code: "INVALID_PARAMETER"
display: "Required parameter(s) are invalid."
severity: error
diagnostics: "Invalid request with error - _include parameter is invalid."
11 changes: 4 additions & 7 deletions specification/validated-relationships-service-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ info:
* only covers a limited set of scenarios
* is open access, so does not allow you to test authorisation

[<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://app.getpostman.com/run-collection/18067099-110252c4-5fa1-46ca-a08d-b5ce96e28fde?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D18067099-110252c4-5fa1-46ca-a08d-b5ce96e28fde%26entityType%3Dcollection%26workspaceId%3D8870ed4a-d599-42a7-ab17-cee80095ffab)
[<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://god.gw.postman.com/run-collection/34042403-4442b3f9-8d89-4aae-a5a9-8a5eda755ead?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D34042403-4442b3f9-8d89-4aae-a5a9-8a5eda755ead%26entityType%3Dcollection%26workspaceId%3D14593107-f7bc-4334-8749-648b96205c76)

### Integration testing

Expand Down Expand Up @@ -496,7 +496,7 @@ paths:
| A single proxy relationship between a mother and child | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` | HTTP Status 200 Bundle containing a single proxy relationship |
| A single proxy relationship between a mother and child including details | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` | HTTP Status 200 Bundle containing a single proxy relationship including performer and patient details |
| Invalid status parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `status` = `test` | HTTP Status 422 and INVALID_VALUE error response |
| Invalid include parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `_include` = `test` | HTTP Status 422 and INVALID_VALUE error response |
| Invalid include parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `_include` = `test` | HTTP Status 422 and INVALID_PARAMETER error response |
| Missing identifier | `patient:identifier`=`9000000009` | HTTP Status 400 and MISSING_IDENTIFIER_VALUE error response |
| Invalid identifier | `identifier`=`900000000` Note: This identifier is 9 characters long, too short to be NHS Number | HTTP Status 422 and INVALID_IDENTIFIER_VALUE error response |
| Invalid identifier system | `identifier`=`https://fhir.nhs.uk/Id/nhs-number/9730675929` | HTTP Status 422 and INVALID_IDENTIFIER_SYSTEM error response |
Expand Down Expand Up @@ -798,16 +798,15 @@ paths:

| HTTP status | Error code | Description |
| ----------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. |
| 400 | `INVALID_VALUE` | Invalid header. For details, see the `diagnostics` field. |
| 400 | `MISSING_ID_VALUE` | Missing id. |
| 400 | `BAD_REQUEST` | Missing header or parameter. For details, see the `diagnostics` field. |
| 400 | `NOT_SUPPORTED` | The request is not currently supported. |
| 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. |
| 403 | `FORBIDDEN` | Access denied to resource. |
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
| 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. |
| 408 | `TIMEOUT` | Request timed out. |
| 422 | `INVALID_ID_VALUE` | Invalid id. |
| 422 | `INVALID_PARAMETER` | Invalid parameter. For details, see the `diagnostics` field. |
| 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |

content:
Expand All @@ -819,8 +818,6 @@ paths:
$ref: "./examples/responses/errors/access-denied.yaml#/AccessDeniedError"
InvalidatedResourceError:
$ref: "./examples/responses/errors/invalidated-resource.yaml#/InvalidatedResourceError"
MissingIdError:
$ref: "./examples/responses/GET_Consent/ID/errors/missing-id.yaml#/ConsentMissingIDError"
InvalidIdError:
$ref: "./examples/responses/GET_Consent/ID/errors/invalid-id.yaml#/ConsentInvalidIDError"
InvalidIncludeParameterError:
Expand Down