Skip to content

Commit 2290a0a

Browse files
NPA-5088: Update postman json
1 parent 001742a commit 2290a0a

File tree

1 file changed

+95
-29
lines changed

1 file changed

+95
-29
lines changed

postman/Validate Relationship Service Sandbox.postman_collection.json

Lines changed: 95 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"info": {
3-
"_postman_id": "e3d42c87-bf68-4cae-b08d-e1fd0dba1f80",
4-
"name": "Validate Relationship Service Sandbox 29/05/25",
3+
"_postman_id": "de538326-5564-4efd-9ed2-d1c64142fcfe",
4+
"name": "Validate Relationship Service Sandbox 04/06/25",
55
"description": "Example usage of the Validate Relationship Service (VRS) sandbox.\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)",
66
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
7-
"_exporter_id": "34042403"
7+
"_exporter_id": "44536620"
88
},
99
"item": [
1010
{
@@ -6053,7 +6053,7 @@
60536053
"});",
60546054
"",
60556055
"pm.test(\"Location header is returned\", () => {",
6056-
" pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/9000000009\")",
6056+
" pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")",
60576057
"})"
60586058
],
60596059
"type": "text/javascript",
@@ -6112,7 +6112,7 @@
61126112
"});",
61136113
"",
61146114
"pm.test(\"Location header is returned\", () => {",
6115-
" pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/9000000017\")",
6115+
" pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")",
61166116
"})"
61176117
],
61186118
"type": "text/javascript",
@@ -6328,13 +6328,13 @@
63286328
}
63296329
},
63306330
"url": {
6331-
"raw": "{{api_base_url}}/Consent/c6f48e4d",
6331+
"raw": "{{api_base_url}}/Consent/c512b0db-6702-43ee-8c21-bbded2552da9",
63326332
"host": [
63336333
"{{api_base_url}}"
63346334
],
63356335
"path": [
63366336
"Consent",
6337-
"c6f48e4d"
6337+
"c512b0db-6702-43ee-8c21-bbded2552da9"
63386338
]
63396339
},
63406340
"description": "Valid patch changing status to 'active'"
@@ -6385,13 +6385,13 @@
63856385
}
63866386
},
63876387
"url": {
6388-
"raw": "{{api_base_url}}/Consent/0c56a594",
6388+
"raw": "{{api_base_url}}/Consent/6b71ac92-baa3-4b76-b0f5-a601257e2722",
63896389
"host": [
63906390
"{{api_base_url}}"
63916391
],
63926392
"path": [
63936393
"Consent",
6394-
"0c56a594"
6394+
"6b71ac92-baa3-4b76-b0f5-a601257e2722"
63956395
]
63966396
},
63976397
"description": "Valid patch modifying the role end date"
@@ -6442,13 +6442,13 @@
64426442
}
64436443
},
64446444
"url": {
6445-
"raw": "{{api_base_url}}/Consent/b02ea26c",
6445+
"raw": "{{api_base_url}}/Consent/43003db8-ffcd-4bd6-ab2f-b49b9656f9e5",
64466446
"host": [
64476447
"{{api_base_url}}"
64486448
],
64496449
"path": [
64506450
"Consent",
6451-
"b02ea26c"
6451+
"43003db8-ffcd-4bd6-ab2f-b49b9656f9e5"
64526452
]
64536453
},
64546454
"description": "Valid patch modifying the role end date"
@@ -6466,12 +6466,12 @@
64666466
" \"issue\": [",
64676467
" {",
64686468
" \"code\": \"invalid\",",
6469-
" \"diagnostics\": \"Patch attempting invalid status change.\",",
6469+
" \"diagnostics\": \"Invalid status code.\",",
64706470
" \"details\": {",
64716471
" \"coding\": [",
64726472
" {",
6473-
" \"code\": \"INVALID_STATE_TRANSITION\",",
6474-
" \"display\": \"Status change is invalid.\",",
6473+
" \"code\": \"INVALID_STATUS_CODE\",",
6474+
" \"display\": \"Status code is invalid.\",",
64756475
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
64766476
" \"version\": \"1\"",
64776477
" }",
@@ -6510,13 +6510,13 @@
65106510
}
65116511
},
65126512
"url": {
6513-
"raw": "{{api_base_url}}/Consent/6fb4361b",
6513+
"raw": "{{api_base_url}}/Consent/78c35330-fa2f-4934-a5dd-fff847f38de5",
65146514
"host": [
65156515
"{{api_base_url}}"
65166516
],
65176517
"path": [
65186518
"Consent",
6519-
"6fb4361b"
6519+
"78c35330-fa2f-4934-a5dd-fff847f38de5"
65206520
]
65216521
},
65226522
"description": "Patch with invalid status value"
@@ -6578,13 +6578,13 @@
65786578
}
65796579
},
65806580
"url": {
6581-
"raw": "{{api_base_url}}/Consent/94df7c8f",
6581+
"raw": "{{api_base_url}}/Consent/01abb0c5-b1ac-499d-9655-9cd0b8d3588f",
65826582
"host": [
65836583
"{{api_base_url}}"
65846584
],
65856585
"path": [
65866586
"Consent",
6587-
"94df7c8f"
6587+
"01abb0c5-b1ac-499d-9655-9cd0b8d3588f"
65886588
]
65896589
},
65906590
"description": "Patch targeting non-existent element"
@@ -6714,13 +6714,13 @@
67146714
}
67156715
},
67166716
"url": {
6717-
"raw": "{{api_base_url}}/Consent/3a2679eb",
6717+
"raw": "{{api_base_url}}/Consent/849ea584-2318-471b-a24c-cee1b5ad0137",
67186718
"host": [
67196719
"{{api_base_url}}"
67206720
],
67216721
"path": [
67226722
"Consent",
6723-
"3a2679eb"
6723+
"849ea584-2318-471b-a24c-cee1b5ad0137"
67246724
]
67256725
},
67266726
"description": "Malformed JSON patch document"
@@ -6738,12 +6738,12 @@
67386738
" \"issue\": [",
67396739
" {",
67406740
" \"code\": \"invalid\",",
6741-
" \"diagnostics\": \"Malformed JSON patch document.\",",
6741+
" \"diagnostics\": \"Patch attempting invalid status change.\",",
67426742
" \"details\": {",
67436743
" \"coding\": [",
67446744
" {",
6745-
" \"code\": \"INVALID_PATCH_FORMAT\",",
6746-
" \"display\": \"Request format is invalid.\",",
6745+
" \"code\": \"INVALID_STATE_TRANSITION\",",
6746+
" \"display\": \"Status change is invalid.\",",
67476747
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
67486748
" \"version\": \"1\"",
67496749
" }",
@@ -6755,8 +6755,8 @@
67556755
" \"resourceType\": \"OperationOutcome\"",
67566756
"}",
67576757
"",
6758-
"pm.test(\"Status code is 400\", function () {",
6759-
" pm.response.to.have.status(400);",
6758+
"pm.test(\"Status code is 201\", function () {",
6759+
" pm.response.to.have.status(422);",
67606760
"});",
67616761
"",
67626762
"pm.test(\"Should have correct response body\", () => {",
@@ -6774,24 +6774,90 @@
67746774
"header": [],
67756775
"body": {
67766776
"mode": "raw",
6777-
"raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n }\n]",
6777+
"raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n }\n]",
67786778
"options": {
67796779
"raw": {
67806780
"language": "json"
67816781
}
67826782
}
67836783
},
67846784
"url": {
6785-
"raw": "{{api_base_url}}/Consent/3a2679eb",
6785+
"raw": "{{api_base_url}}/Consent/7b7f47b8-96e5-43eb-b733-283bf1449f2c",
67866786
"host": [
67876787
"{{api_base_url}}"
67886788
],
67896789
"path": [
67906790
"Consent",
6791-
"3a2679eb"
6791+
"7b7f47b8-96e5-43eb-b733-283bf1449f2c"
67926792
]
6793+
}
6794+
},
6795+
"response": []
6796+
},
6797+
{
6798+
"name": "Invalid Status Reason",
6799+
"event": [
6800+
{
6801+
"listen": "test",
6802+
"script": {
6803+
"exec": [
6804+
"const expectedResponseBody = {",
6805+
" \"issue\": [",
6806+
" {",
6807+
" \"code\": \"invalid\",",
6808+
" \"diagnostics\": \"Invalid status reason.\",",
6809+
" \"details\": {",
6810+
" \"coding\": [",
6811+
" {",
6812+
" \"code\": \"INVALID_STATUS_REASON\",",
6813+
" \"display\": \"Status reason is invalid.\",",
6814+
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
6815+
" \"version\": \"1\"",
6816+
" }",
6817+
" ]",
6818+
" },",
6819+
" \"severity\": \"error\"",
6820+
" }",
6821+
" ],",
6822+
" \"resourceType\": \"OperationOutcome\"",
6823+
"}",
6824+
"",
6825+
"pm.test(\"Status code is 201\", function () {",
6826+
" pm.response.to.have.status(422);",
6827+
"});",
6828+
"",
6829+
"pm.test(\"Should have correct response body\", () => {",
6830+
" var responseJson = pm.response.json();",
6831+
" pm.expect(responseJson).to.eql(expectedResponseBody);",
6832+
"});"
6833+
],
6834+
"type": "text/javascript",
6835+
"packages": {}
6836+
}
6837+
}
6838+
],
6839+
"request": {
6840+
"method": "PATCH",
6841+
"header": [],
6842+
"body": {
6843+
"mode": "raw",
6844+
"raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n }\n]",
6845+
"options": {
6846+
"raw": {
6847+
"language": "json"
6848+
}
6849+
}
67936850
},
6794-
"description": "Malformed JSON patch document"
6851+
"url": {
6852+
"raw": "{{api_base_url}}/Consent/51fb4df5-815a-45cd-8427-04d6558336b7",
6853+
"host": [
6854+
"{{api_base_url}}"
6855+
],
6856+
"path": [
6857+
"Consent",
6858+
"51fb4df5-815a-45cd-8427-04d6558336b7"
6859+
]
6860+
}
67956861
},
67966862
"response": []
67976863
}

0 commit comments

Comments
 (0)