diff --git a/proxies/sandbox/apiproxy/proxies/default.xml b/proxies/sandbox/apiproxy/proxies/default.xml
index af33a84..164b514 100644
--- a/proxies/sandbox/apiproxy/proxies/default.xml
+++ b/proxies/sandbox/apiproxy/proxies/default.xml
@@ -60,8 +60,8 @@
(request.verb = "OPTIONS") and (request.header.origin != null) and (request.header.Access-Control-Request-Method != null)
-
- sandbox
+
+ RelatedPerson
diff --git a/proxies/sandbox/apiproxy/proxy.xml b/proxies/sandbox/apiproxy/proxy.xml
index 82af959..fec52c3 100644
--- a/proxies/sandbox/apiproxy/proxy.xml
+++ b/proxies/sandbox/apiproxy/proxy.xml
@@ -1,4 +1,4 @@
-
+
Proxy to a target service.
diff --git a/proxies/sandbox/apiproxy/targets/sandbox.xml b/proxies/sandbox/apiproxy/targets/sandbox.xml
index 672f12a..12e84cd 100644
--- a/proxies/sandbox/apiproxy/targets/sandbox.xml
+++ b/proxies/sandbox/apiproxy/targets/sandbox.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/sandbox/.dockerignore b/sandbox/.dockerignore
index 93f1361..5f09afd 100644
--- a/sandbox/.dockerignore
+++ b/sandbox/.dockerignore
@@ -1,2 +1 @@
-node_modules
-npm-debug.log
+api/tests
diff --git a/sandbox/Dockerfile b/sandbox/Dockerfile
index c6f426f..497a81a 100644
--- a/sandbox/Dockerfile
+++ b/sandbox/Dockerfile
@@ -10,4 +10,4 @@ RUN poetry install --without dev
EXPOSE 9000
-CMD ["poetry", "run", "gunicorn", "app:app", "--bind=localhost:9000"]
+CMD ["poetry", "run", "gunicorn", "api.app:app", "--bind=0.0.0.0:9000"]
diff --git a/sandbox/api/app.py b/sandbox/api/app.py
index 61acdf8..60adab5 100644
--- a/sandbox/api/app.py
+++ b/sandbox/api/app.py
@@ -21,8 +21,8 @@ def health() -> dict:
}
-@app.route("/RelatedPerson", methods=["GET"])
-def related_persons() -> Union[dict, tuple]:
+@app.route("/FHIR/R4/RelatedPerson", methods=["GET"])
+def get_related_persons() -> Union[dict, tuple]:
"""Sandbox API for GET /RelatedPerson
Returns:
diff --git a/sandbox/api/tests/test_app.py b/sandbox/api/tests/test_app.py
index 9e6c051..a89abdc 100644
--- a/sandbox/api/tests/test_app.py
+++ b/sandbox/api/tests/test_app.py
@@ -3,6 +3,7 @@
import pytest
FILE_PATH = "sandbox.api.app"
+RELATED_PERSON_API_ENDPOINT = "/FHIR/R4/RelatedPerson"
@pytest.mark.parametrize("endpoint", ["/_status", "/_ping", "/health"])
@@ -26,7 +27,7 @@ def test_related_person__identifier_only(
# Arrange
mock_get_response.return_value = expected_body = {"data": "mocked"}
# Act
- response = client.get("/RelatedPerson?identifier=1234567890")
+ response = client.get(f"{RELATED_PERSON_API_ENDPOINT}?identifier=1234567890")
# Assert
mock_get_response.assert_called_once_with(
"./api/responses/GET_RelatedPerson/identifier.json"
@@ -43,7 +44,9 @@ def test_related_person__identifier_and_patient(
# Arrange
mock_get_response.return_value = expected_body = {"data": "mocked"}
# Act
- response = client.get("/RelatedPerson?identifier=1234567890&patient=0987654321")
+ response = client.get(
+ f"{RELATED_PERSON_API_ENDPOINT}?identifier=1234567890&patient=0987654321"
+ )
# Assert
mock_get_response.assert_called_once_with(
"./api/responses/GET_RelatedPerson/identifier_and_patient.json"
diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml
index 72f8184..c325b9e 100644
--- a/specification/validated-relationships-service-api.yaml
+++ b/specification/validated-relationships-service-api.yaml
@@ -111,7 +111,7 @@ info:
## Environments and testing
| Environment | Base URL |
| ----------------- | ---------------------------------------------------------------------- |
- | Sandbox | `https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/` |
+ | Sandbox | `https://internal-dev-sandbox.api.service.nhs.uk/validated-relationships-service-api/FHIR/R4/` |
| Integration test | `https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/` |
| Production | `https://api.service.nhs.uk/validated-relationships/FHIR/R4/` |
@@ -139,7 +139,7 @@ info:
url: 'https://digital.nhs.uk/developer/help-and-support'
email: api.management@nhs.net
servers:
- - url: 'https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4'
+ - url: 'https://internal-dev-sandbox.api.service.nhs.uk/validated-relationships-service-api/FHIR/R4'
description: Sandbox environment.
- url: 'https://int.api.service.nhs.uk/validated-relationships/FHIR/R4'
description: Integration test environment.
@@ -507,6 +507,7 @@ components:
required: false
schema:
type: string
+ example: 1234567890
examples:
withoutSystem:
value: "9000000009"
@@ -523,6 +524,7 @@ components:
required: false
schema:
type: string
+ example: 0987654321
examples:
withoutSystem:
value: "9000000009"