Skip to content

Commit d986db0

Browse files
authored
Merge pull request #483 from NHSDigital/release/2025-01-29
Release/2025 01 29
2 parents b98c53b + 9a4698e commit d986db0

File tree

14 files changed

+572
-467
lines changed

14 files changed

+572
-467
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2025-01-29
4+
- [PI-714] Update Swagger for readibility
5+
- [PI-759] Integration test timeout
6+
37
## 2025-01-24
48
- [PI-744] Create a Product Team (ProductID)
59
- Dependabot: pydantic

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.01.24
1+
2025.01.29

changelog/2025-01-29.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- [PI-714] Update Swagger for readibility
2+
- [PI-759] Integration test timeout

infrastructure/swagger/05_paths.yaml

Lines changed: 100 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,29 @@ x-definitions:
1111
passthroughBehavior: when_no_match
1212
contentHandling: CONVERT_TO_TEXT
1313

14+
tags:
15+
- name: Core Product ID Endpoints
16+
description: Create, Read and Delete Product IDs
17+
- name: Core EPR Creation Endpoints
18+
description: Core EPR API creation endpoints
19+
- name: Core EPR Read Endpoints
20+
description: Core EPR API read endpoints
21+
- name: Core EPR Deletion Endpoints
22+
description: Core EPR API deletion endpoints
23+
- name: EPR
24+
description: EPR API endpoints
25+
- name: SDS
26+
description: Search Results provided for the SDS FHIR API
27+
1428
paths:
1529
/_status:
1630
get:
17-
summary: Retrieve the current Status (GET)
31+
summary: Retrieve the current Status of the API (GET)
32+
description: >
33+
Get the current status of the API
1834
operationId: status
35+
tags:
36+
- Status
1937
responses:
2038
"200":
2139
$ref: "#/components/responses/StatusOK"
@@ -36,6 +54,10 @@ paths:
3654
post:
3755
operationId: createproductteam
3856
summary: Create a Product Team resource (POST)
57+
description: >
58+
Create a Product Team. This is needed in order to create a Product.
59+
tags:
60+
- Core Product ID Endpoints
3961
requestBody:
4062
$ref: "#/components/requestBodies/ProductTeamCreateRequestBody"
4163
responses:
@@ -60,6 +82,10 @@ paths:
6082
get:
6183
operationId: readproductteam
6284
summary: Read a Product Team resource (GET)
85+
description: |
86+
- Retrieve a Product Team using a product team ID.
87+
tags:
88+
- Core Product ID Endpoints
6389
parameters:
6490
- $ref: "#/components/parameters/ProductTeamId"
6591
- $ref: "#/components/parameters/HeaderVersion"
@@ -81,6 +107,8 @@ paths:
81107
post:
82108
operationId: createproductteamepr
83109
summary: Create a Product Team (Epr) resource (POST)
110+
tags:
111+
- Core EPR Creation Endpoints
84112
requestBody:
85113
$ref: "#/components/requestBodies/ProductTeamCreateRequestBody"
86114
responses:
@@ -105,6 +133,8 @@ paths:
105133
get:
106134
operationId: readproductteamepr
107135
summary: Read a Product Team (Epr) resource (GET)
136+
tags:
137+
- Core EPR Read Endpoints
108138
parameters:
109139
- $ref: "#/components/parameters/ProductTeamId"
110140
- $ref: "#/components/parameters/HeaderVersion"
@@ -126,6 +156,8 @@ paths:
126156
post:
127157
operationId: createproductendpoint
128158
summary: Create a Product resource (POST)
159+
tags:
160+
- Core EPR Creation Endpoints
129161
description: |
130162
This endpoint creates a new Product resource for the specified Product Team.
131163
**Requirements:**
@@ -153,6 +185,10 @@ paths:
153185
get:
154186
operationId: searchCpmProduct
155187
summary: Retrieve all Products associated with a Product Team (GET)
188+
description: |
189+
- Retrieve all products for a Product Team using a product team ID.
190+
tags:
191+
- Core EPR Read Endpoints
156192
parameters:
157193
- $ref: "#/components/parameters/ProductTeamId"
158194
- $ref: "#/components/parameters/HeaderVersion"
@@ -174,6 +210,10 @@ paths:
174210
get:
175211
operationId: readproductendpoint
176212
summary: Read a Product resource (GET)
213+
description: |
214+
- Retrieve a product using a product team ID and product ID.
215+
tags:
216+
- Core EPR Read Endpoints
177217
parameters:
178218
- $ref: "#/components/parameters/ProductTeamId"
179219
- $ref: "#/components/parameters/ProductId"
@@ -194,6 +234,10 @@ paths:
194234
delete:
195235
operationId: deleteproductendpoint
196236
summary: Delete a Product resource (DELETE)
237+
description: |
238+
- Delete a product using a product team ID and product ID.
239+
tags:
240+
- Core EPR Deletion Endpoints
197241
parameters:
198242
- $ref: "#/components/parameters/ProductTeamId"
199243
- $ref: "#/components/parameters/ProductId"
@@ -216,6 +260,8 @@ paths:
216260
post:
217261
operationId: createproductforeprendpoint
218262
summary: Create an EPR Product resource (POST)
263+
tags:
264+
- EPR
219265
description: |
220266
This endpoint creates a new EPR Product resource for the specified Product Team.
221267
**Requirements:**
@@ -245,6 +291,10 @@ paths:
245291
: get:
246292
operationId: searchDeviceReferenceData
247293
summary: Retrieve all Data Reference Data resources associated with a Product (GET)
294+
description: |
295+
- Retrieve all Device Reference Data objects using a product team ID and product ID.
296+
tags:
297+
- Core EPR Read Endpoints
248298
parameters:
249299
- $ref: "#/components/parameters/ProductTeamId"
250300
- $ref: "#/components/parameters/ProductId"
@@ -266,7 +316,10 @@ paths:
266316
post:
267317
operationId: createDeviceReferenceData
268318
summary: Create a Device Reference Data resource (POST)
269-
description: This endpoint has not yet been configured. Do not use.
319+
tags:
320+
- Core EPR Creation Endpoints
321+
description: |
322+
**This endpoint has not yet been configured. Do not use.**
270323
parameters:
271324
- $ref: "#/components/parameters/ProductTeamId"
272325
- $ref: "#/components/parameters/ProductId"
@@ -294,12 +347,16 @@ paths:
294347
: post:
295348
operationId: createDeviceReferenceDataMessageSet
296349
summary: Create a Device Reference Data Message Set resource (POST)
350+
tags:
351+
- Core EPR Creation Endpoints
297352
description: |
298353
This endpoint creates a Device Reference Data Message Set resource for the specified Product.
299354
**Requirements:**
300355
- A valid Product Team must exist
301356
- A valid EPR Product must already exist under the Product Team
302357
- There can be no existing MHS MessageSet DRD for the EPR Product already
358+
- Questionnaire response required: **spine_mhs_message_sets**
359+
- Refer to the questionnaire endpoint for details on this questionnaire response. **/questionnaire/spine_mhs_message_sets**
303360
parameters:
304361
- $ref: "#/components/parameters/ProductTeamId"
305362
- $ref: "#/components/parameters/ProductId"
@@ -327,12 +384,16 @@ paths:
327384
: post:
328385
operationId: createDeviceReferenceDataAdditionalInteractions
329386
summary: Create a Device Reference Data Additional Interactions resource (POST)
387+
tags:
388+
- Core EPR Creation Endpoints
330389
description: |
331390
This endpoint creates a Device Reference Data Additional Interactions resource for the specified Product.
332391
**Requirements:**
333392
- A valid Product Team must exist
334393
- A valid EPR Product must already exist under the Product Team
335394
- There can be no existing AS AdditionalInteractions DRD for the EPR Product already
395+
- Questionnaire response required: **spine_as_additional_interactions**
396+
- Refer to the questionnaire endpoint for details on this questionnaire response. **/questionnaire/spine_as_additional_interactions**
336397
parameters:
337398
- $ref: "#/components/parameters/ProductTeamId"
338399
- $ref: "#/components/parameters/ProductId"
@@ -360,6 +421,10 @@ paths:
360421
: get:
361422
operationId: readDeviceReferenceData
362423
summary: Read a Device Reference Data resource (GET)
424+
description: >
425+
Retrieve a Device Reference Data entity using a product team ID, product ID and Device Reference Data ID.
426+
tags:
427+
- Core EPR Read Endpoints
363428
parameters:
364429
- $ref: "#/components/parameters/ProductTeamId"
365430
- $ref: "#/components/parameters/ProductId"
@@ -384,8 +449,10 @@ paths:
384449
post:
385450
operationId: createDevice
386451
summary: Create a Device resource (POST)
452+
tags:
453+
- Core EPR Creation Endpoints
387454
description: |
388-
This endpoint has not yet been configured. Do not use.
455+
**This endpoint has not yet been configured. Do not use.**
389456
parameters:
390457
- $ref: "#/components/parameters/ProductTeamId"
391458
- $ref: "#/components/parameters/ProductId"
@@ -413,6 +480,10 @@ paths:
413480
: get:
414481
operationId: readDevice
415482
summary: Read a Device resource (GET)
483+
description: >
484+
Retrieve a device using a product team ID, product ID and device ID.
485+
tags:
486+
- Core EPR Read Endpoints
416487
parameters:
417488
- $ref: "#/components/parameters/ProductTeamId"
418489
- $ref: "#/components/parameters/ProductId"
@@ -437,14 +508,17 @@ paths:
437508
: post:
438509
operationId: createDeviceMessageHandlingSystem
439510
summary: Create a Message Handling System Device resource (POST)
511+
tags:
512+
- Core EPR Creation Endpoints
440513
description: |
441514
This endpoint creates a new Message Handling System Device resource for the specified Product.
442515
**Requirements:**
443516
- A valid Product Team must exist
444517
- A valid Product must exist under the Product Team
445518
- One existing MHS Message Set Device Reference Data must be present for the Product
446519
- No existing MHS device for the product
447-
- Must provide a spine_mhs questionnaire response
520+
- Questionnaire response required: **spine_mhs**
521+
- Refer to the questionnaire endpoint for details on this questionnaire response. **/questionnaire/spine_mhs**
448522
parameters:
449523
- $ref: "#/components/parameters/ProductTeamId"
450524
- $ref: "#/components/parameters/ProductId"
@@ -472,14 +546,17 @@ paths:
472546
: post:
473547
operationId: createDeviceAccreditedSystem
474548
summary: Create a Accredited System Device resource (POST)
549+
tags:
550+
- Core EPR Creation Endpoints
475551
description: |
476552
This endpoint creates a new Accredited System Device resource for the specified Product.
477553
**Requirements:**
478554
- A valid Product Team must exist
479555
- A valid Product must exist under the Product Team
480556
- One existing MHS Message Set Device Reference Data must be present for the Product
481557
- One existing AS Additional Interactions Device Reference Data must be present for the Product
482-
- Must provide a spine_as questionnaire response
558+
- Questionnaire response required: **spine_as**
559+
- Refer to the questionnaire endpoint for details on this questionnaire response. **/questionnaire/spine_as**
483560
parameters:
484561
- $ref: "#/components/parameters/ProductTeamId"
485562
- $ref: "#/components/parameters/ProductId"
@@ -507,6 +584,10 @@ paths:
507584
get:
508585
operationId: searchsdsdevice
509586
summary: Retrieve Device resources for SDS FHIR API (GET)
587+
description: >
588+
Retrieve a list of Devices to be used primarily by the SDS FHIR API.
589+
tags:
590+
- SDS
510591
parameters:
511592
- $ref: "#/components/parameters/NhsIdCode"
512593
- $ref: "#/components/parameters/NhsMhsManOrg"
@@ -530,6 +611,10 @@ paths:
530611
get:
531612
operationId: searchsdsendpoint
532613
summary: Retrieve Endpoint resources for SDS FHIR API (GET)
614+
description: >
615+
Retrieve a list of Endpoints to be used primarily by the SDS FHIR API.
616+
tags:
617+
- SDS
533618
parameters:
534619
- $ref: "#/components/parameters/NhsIdCode"
535620
- $ref: "#/components/parameters/NhsMhsInteration"
@@ -553,6 +638,16 @@ paths:
553638
get:
554639
operationId: readQuestionnaire
555640
summary: Read a Questionnaire resource (GET)
641+
description: |
642+
Retrieve information about the format of a questionnaire to be answered. To be used in conjunction with creating Devices and DeviceReferenceData. System generated fields are not required and will be populated by CPM. **Please note: Although examples are given it's impossible to layout exactly what format a questionnaire will take as the questionnaire itself uses json_schema to allow custom formats.**
643+
644+
IDs available are
645+
- spine_mhs
646+
- spine_as
647+
- spine_mhs_message_sets
648+
- spine_as_additional_interactions
649+
tags:
650+
- Core EPR Read Endpoints
556651
parameters:
557652
- $ref: "#/components/parameters/QuestionnaireId"
558653
- $ref: "#/components/parameters/HeaderVersion"

infrastructure/swagger/07_components--schemas--domain.yaml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,41 @@ components:
147147
Questionnaire:
148148
type: object
149149
properties:
150-
tbc:
150+
name:
151+
type: string
152+
version:
151153
type: string
154+
json_schema:
155+
type: object
156+
properties:
157+
$schema:
158+
type: string
159+
type:
160+
type: string
161+
properties:
162+
type: object
163+
properties:
164+
question:
165+
type: object
166+
properties:
167+
type:
168+
type: string
169+
system generated:
170+
type: boolean
171+
example:
172+
name: "questionnaire_1"
173+
version: "1"
174+
json_schema:
175+
$schema: "http://json-schema.org/draft-07/schema#"
176+
type: "object"
177+
properties:
178+
question_1:
179+
type: "string"
180+
system generated: false
181+
question_2:
182+
type: "string"
183+
system generated: true
184+
required: question_1
152185

153186
ProductSearchResponse:
154187
type: object
@@ -229,16 +262,25 @@ components:
229262
type: string
230263
name:
231264
type: string
265+
status:
266+
type: string
232267
product_id:
233268
type: string
234269
product_team_id:
235270
type: string
236271
ods_code:
237272
type: string
238-
status:
239-
type: string
240273
environment:
241274
type: string
275+
keys:
276+
type: array
277+
items:
278+
type: object
279+
properties:
280+
key_type:
281+
type: string
282+
key_value:
283+
type: string
242284
created_on:
243285
type: string
244286
updated_on:

infrastructure/swagger/08_components--schemas--other.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ components:
44
HeaderVersion:
55
type: string
66
pattern: "^[1-9][0-9]?(\\.[0-9])?$"
7+
example: 1
78

89
HeaderRequestId:
910
type: string

0 commit comments

Comments
 (0)