Skip to content

Commit 808c5bd

Browse files
authored
Merge branch 'master' into task/NPA-5136/standardise-endpoint-errors
2 parents 24a33c6 + 3976727 commit 808c5bd

File tree

7 files changed

+141
-142
lines changed

7 files changed

+141
-142
lines changed

.github/dependabot.yml

Lines changed: 54 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,58 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
open-pull-requests-limit: 1
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "09:00"
10+
commit-message:
11+
prefix: "github actions "
12+
include: scope
13+
groups:
14+
github-dependencies:
15+
patterns:
16+
- "*"
317

4-
- package-ecosystem: "github-actions"
5-
directory: "/"
6-
open-pull-requests-limit: 1
7-
schedule:
8-
interval: "weekly"
9-
day: "monday"
10-
time: "09:00"
11-
commit-message:
12-
prefix: "github actions "
13-
include: scope
14-
groups:
15-
github-dependencies:
16-
patterns:
17-
- "*"
18+
- package-ecosystem: "pip"
19+
directories:
20+
- "/"
21+
- "/sandbox"
22+
open-pull-requests-limit: 1
23+
versioning-strategy: auto
24+
ignore:
25+
- dependency-name: "*"
26+
update-types:
27+
["version-update:semver-minor", "version-update:semver-patch"]
28+
schedule:
29+
interval: "weekly"
30+
day: "monday"
31+
time: "09:00"
32+
commit-message:
33+
prefix: "pip "
34+
include: scope
35+
groups:
36+
python-dependencies:
37+
patterns:
38+
- "*"
1839

19-
- package-ecosystem: "pip"
20-
directories:
21-
- "/"
22-
- "/sandbox"
23-
open-pull-requests-limit: 1
24-
versioning-strategy: auto
25-
ignore:
26-
- dependency-name: "*"
27-
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
28-
schedule:
29-
interval: "weekly"
30-
day: "monday"
31-
time: "09:00"
32-
commit-message:
33-
prefix: "pip "
34-
include: scope
35-
groups:
36-
python-dependencies:
37-
patterns:
38-
- "*"
39-
40-
- package-ecosystem: "npm"
41-
directory: "/"
42-
open-pull-requests-limit: 1
43-
versioning-strategy: auto
44-
ignore:
45-
- dependency-name: "*"
46-
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
47-
schedule:
48-
interval: "weekly"
49-
day: "monday"
50-
time: "09:00"
51-
commit-message:
52-
prefix: "npm "
53-
include: scope
54-
groups:
55-
npm-dependencies:
56-
patterns:
57-
- "*"
40+
- package-ecosystem: "npm"
41+
directory: "/"
42+
open-pull-requests-limit: 1
43+
versioning-strategy: auto
44+
ignore:
45+
- dependency-name: "*"
46+
update-types:
47+
["version-update:semver-minor", "version-update:semver-patch"]
48+
schedule:
49+
interval: "weekly"
50+
day: "monday"
51+
time: "09:00"
52+
commit-message:
53+
prefix: "npm "
54+
include: scope
55+
groups:
56+
npm-dependencies:
57+
patterns:
58+
- "*"
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
name: Code QL Analysis
22
"on":
3-
push:
4-
branches: [master]
5-
pull_request:
6-
branches: [master]
7-
schedule:
8-
- cron: 30 1 * * 0
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
schedule:
8+
- cron: 30 1 * * 0
99
permissions:
10-
contents: read
10+
contents: read
1111
jobs:
12-
CodeQL-Build:
13-
name: CodeQL Analysis
14-
runs-on: ubuntu-latest
15-
permissions:
16-
security-events: write
17-
steps:
18-
- name: Checkout repository
19-
uses: actions/checkout@v4
20-
- name: Initialize CodeQL
21-
uses: github/codeql-action/init@v3
22-
with:
23-
languages: python
24-
queries: security-extended
25-
- name: Perform CodeQL Analysis
26-
uses: github/codeql-action/analyze@v3
12+
CodeQL-Build:
13+
name: CodeQL Analysis
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
- name: Initialize CodeQL
21+
uses: github/codeql-action/init@v3
22+
with:
23+
languages: python
24+
queries: security-extended
25+
- name: Perform CodeQL Analysis
26+
uses: github/codeql-action/analyze@v3

.github/workflows/continuous-integration.yml

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,42 @@ name: Create Release
22
on: push
33

44
jobs:
5-
create_release:
6-
name: build
7-
runs-on: ubuntu-latest
8-
if: github.ref == 'refs/heads/master'
9-
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v4
12-
with:
13-
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
14-
15-
- name: Install Python 3.8
16-
uses: actions/setup-python@v5
17-
with:
18-
python-version: 3.8
19-
20-
- name: Upgrade python pip
21-
run: python -m pip install --upgrade pip
22-
23-
- name: Install git
24-
run: pip install gitpython
25-
26-
- name: Install semver
27-
run: pip install semver
28-
29-
- name: Set SPEC_VERSION env var
30-
run: echo ::set-env name=SPEC_VERSION::$(python scripts/calculate_version.py)
31-
env:
32-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
33-
34-
- name: Create release (master only)
35-
id: create-release
5+
create_release:
6+
name: build
7+
runs-on: ubuntu-latest
368
if: github.ref == 'refs/heads/master'
37-
uses: actions/create-release@v1
38-
continue-on-error: true
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
with:
42-
tag_name: ${{ env.SPEC_VERSION }}
43-
release_name: ${{ env.SPEC_VERSION }}
44-
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
14+
15+
- name: Install Python 3.8
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: 3.8
19+
20+
- name: Upgrade python pip
21+
run: python -m pip install --upgrade pip
22+
23+
- name: Install git
24+
run: pip install gitpython
25+
26+
- name: Install semver
27+
run: pip install semver
28+
29+
- name: Set SPEC_VERSION env var
30+
run: echo ::set-env name=SPEC_VERSION::$(python scripts/calculate_version.py)
31+
env:
32+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
33+
34+
- name: Create release (master only)
35+
id: create-release
36+
if: github.ref == 'refs/heads/master'
37+
uses: actions/create-release@v1
38+
continue-on-error: true
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
tag_name: ${{ env.SPEC_VERSION }}
43+
release_name: ${{ env.SPEC_VERSION }}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Dependency Review
22
"on": [pull_request]
33
permissions:
4-
contents: read
4+
contents: read
55
jobs:
6-
dependency-review:
7-
name: Dependency Review
8-
runs-on: ubuntu-latest
9-
steps:
10-
- name: Checkout Repository
11-
uses: actions/checkout@v4
12-
- name: Dependency Review
13-
uses: actions/dependency-review-action@v4
14-
with:
15-
allow-ghsas: GHSA-w596-4wvx-j9j6 # Due to APIM Pytest dependency
6+
dependency-review:
7+
name: Dependency Review
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Repository
11+
uses: actions/checkout@v4
12+
- name: Dependency Review
13+
uses: actions/dependency-review-action@v4
14+
with:
15+
allow-ghsas: GHSA-w596-4wvx-j9j6 # Due to APIM Pytest dependency

.github/workflows/openapi-validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
name: "GET /Questionnaire",
4141
make_target: "schema-get-questionnaire",
4242
},
43-
{ name: "Errors", make_target: "schema-errors" }
43+
{ name: "Errors", make_target: "schema-errors" },
4444
]
4545
steps:
4646
- name: Checkout repository

.github/workflows/prettier-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup Node
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: 22
20+
node-version: 22
2121

2222
- name: Install dependencies
2323
shell: bash

specification/validated-relationships-service-api.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,16 @@ info:
119119
## Open source
120120
You might find the following [open source](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#open-source) resources useful:
121121
122-
| Resource | Description | Links |
123-
|---------------------------|----------------------------------------------------------------------|--------------------------------------------------------------------------------|
124-
| Validated Relationships FHIR API | Source code for the API proxy, sandbox and specification. | [GitHub repo](https://github.com/NHSDigital/validated-relationships-service-api) |
125-
| FHIR libraries and SDKs | Various open source libraries for integrating with FHIR APIs. | [FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) |
126-
| nhs-number | Python package containing utilities for NHS numbers including validity checks, normalisation and generation. | [GitHub repo](https://github.com/uk-fci/nhs-number) \| [Python Package index](https://pypi.org/project/nhs-number/) \| [Docs](https://nhs-number.uk-fci.tech/) |
122+
| Resource | Description | Links |
123+
| -------------------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
124+
| Validated Relationships FHIR API | Source code for the API proxy, sandbox and specification. | [GitHub repo](https://github.com/NHSDigital/validated-relationships-service-api) |
125+
| FHIR libraries and SDKs | Various open source libraries for integrating with FHIR APIs. | [FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) |
126+
| nhs-number | Python package containing utilities for NHS numbers including validity checks, normalisation and generation. | [GitHub repo](https://github.com/uk-fci/nhs-number) \| [Python Package index](https://pypi.org/project/nhs-number/) \| [Docs](https://nhs-number.uk-fci.tech/) |
127127
128128
We currently don't have any open source client libraries or sample code for this API and the source code for the PDS FHIR back end (the Core Spine source code) is not currently in the open. If you think this would be useful, [contact us](https://digital.nhs.uk/developer/help-and-support).
129129
130130
## Environments and testing
131+
131132
| Environment | Base URL |
132133
| ----------------- | ------------------------------------------------------------------------------------ |
133134
| Sandbox | `https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/` |
@@ -246,8 +247,7 @@ paths:
246247
247248
| HTTP status | Error code | Description |
248249
| ----------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
249-
| 400 | `BAD_REQUEST` | Bad request. |
250-
| 400 | `NOT_SUPPORTED` | The request is not currently supported. |
250+
| 400 | `BAD_REQUEST` | Bad request. For details, see the `diagnostics` |
251251
| 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. |
252252
| 403 | `FORBIDDEN` | Access denied to resource. |
253253
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
@@ -270,7 +270,7 @@ paths:
270270
| HTTP status | Error code | Description |
271271
| ----------- | -------------------------- | ------------------------------------------------------------ |
272272
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
273-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
273+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
274274
275275
content:
276276
application/fhir+json:
@@ -361,7 +361,7 @@ paths:
361361
| HTTP status | Error code | Description |
362362
| ----------- | -------------------------- | ------------------------------------------------------------ |
363363
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
364-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
364+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
365365
366366
content:
367367
application/fhir+json:
@@ -484,7 +484,7 @@ paths:
484484
| HTTP status | Error code | Description |
485485
| ----------- | -------------------------- | ------------------------------------------------------------ |
486486
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
487-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
487+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
488488
489489
content:
490490
application/fhir+json:
@@ -601,7 +601,6 @@ paths:
601601
| 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. |
602602
| 400 | `INVALID_VALUE` | Invalid header. For details, see the `diagnostics` field. |
603603
| 400 | `MISSING_IDENTIFIER_VALUE` | Missing performer:identifier or patient:identifier value. |
604-
| 400 | `NOT_SUPPORTED` | The request is not currently supported. |
605604
| 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. |
606605
| 403 | `FORBIDDEN` | Access denied to resource. |
607606
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
@@ -641,7 +640,7 @@ paths:
641640
| HTTP status | Error code | Description |
642641
| ----------- | -------------------------- | ------------------------------------------------------------ |
643642
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
644-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
643+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
645644
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
646645
647646
content:
@@ -766,7 +765,7 @@ paths:
766765
| HTTP status | Error code | Description |
767766
| ----------- | -------------------------- | ------------------------------------------------------------ |
768767
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
769-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
768+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
770769
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
771770
772771
content:
@@ -879,7 +878,7 @@ paths:
879878
| HTTP status | Error code | Description |
880879
| ----------- | -------------------------- | ------------------------------------------------------------ |
881880
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
882-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
881+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
883882
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
884883
885884
content:
@@ -1025,7 +1024,7 @@ paths:
10251024
| HTTP status | Error code | Description |
10261025
| ----------- | -------------------------- | ------------------------------------------------------------ |
10271026
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
1028-
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
1027+
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
10291028
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |
10301029
10311030
content:

0 commit comments

Comments
 (0)