Skip to content

Commit 5de2a4e

Browse files
authored
Merge pull request #430 from NHSDigital/release/2024-12-02
Release/2024 12 02
2 parents bce830f + b66fdbc commit 5de2a4e

File tree

22 files changed

+1646
-2
lines changed

22 files changed

+1646
-2
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+
## 2024-12-02
4+
- [PI-572] Create an AS Device
5+
- [PI-582] AS Additional Interations smoke test
6+
37
## 2024-11-27
48
- [PI-605] Bulk ETL (transform layer)
59
- [PI-582] Read MHS Device

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024.11.27
1+
2024.12.02

changelog/2024-12-02.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- [PI-572] Create an AS Device
2+
- [PI-582] AS Additional Interations smoke test

infrastructure/swagger/05_paths.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,32 @@ paths:
385385
- ${authoriser_name}: []
386386
- app-level0: []
387387

388+
/ProductTeam/{product_team_id}/Product/{product_id}/Device/AccreditedSystem:
389+
post:
390+
operationId: createDeviceAccreditedSystem
391+
summary: Create a Accredited System Device resource (POST)
392+
parameters:
393+
- $ref: "#/components/parameters/ProductTeamId"
394+
- $ref: "#/components/parameters/ProductId"
395+
- $ref: "#/components/parameters/HeaderVersion"
396+
- $ref: "#/components/parameters/HeaderRequestId"
397+
- $ref: "#/components/parameters/HeaderCorrelationId"
398+
requestBody:
399+
$ref: "#/components/requestBodies/AccreditedSystemDeviceCreateRequestBody"
400+
responses:
401+
"201":
402+
$ref: "#/components/responses/AsDeviceCreate"
403+
"400":
404+
$ref: "#/components/responses/BadRequest"
405+
"404":
406+
$ref: "#/components/responses/NotFound"
407+
x-amazon-apigateway-integration:
408+
<<: *ApiGatewayIntegration
409+
uri: ${method_createDeviceAccreditedSystem}
410+
security:
411+
- ${authoriser_name}: []
412+
- app-level0: []
413+
388414
/searchSdsDevice:
389415
get:
390416
operationId: searchsdsdevice

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,32 @@ components:
167167
questionnaire_responses:
168168
type: object
169169

170+
AsDeviceResponse:
171+
type: object
172+
properties:
173+
id:
174+
type: string
175+
name:
176+
type: string
177+
product_id:
178+
type: string
179+
product_team_id:
180+
type: string
181+
ods_code:
182+
type: string
183+
status:
184+
type: string
185+
created_on:
186+
type: string
187+
updated_on:
188+
type: string
189+
nullable: true
190+
deleted_on:
191+
type: string
192+
nullable: true
193+
questionnaire_responses:
194+
type: object
195+
170196
MhsDeviceResponse:
171197
type: object
172198
properties:

infrastructure/swagger/11_components--requestBodies.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,25 @@ components:
144144
- questionnaire_responses
145145
example:
146146
questionnaire_responses: { "spine_mhs": [{ "question": "answer" }] }
147+
AccreditedSystemDeviceCreateRequestBody:
148+
description: Request body to create a Accredited System Device object
149+
required: true
150+
content:
151+
application/json:
152+
schema:
153+
type: object
154+
properties:
155+
questionnaire_responses:
156+
type: object
157+
description: Questionnaire Responses for AS Device
158+
properties:
159+
spine_as:
160+
type: array
161+
description: spine_as questionnaire associated with the as device
162+
items:
163+
type: object
164+
description: spine_as questionnaire response
165+
required:
166+
- questionnaire_responses
167+
example:
168+
questionnaire_responses: { "spine_as": [{ "question": "answer" }] }

infrastructure/swagger/12_components--responses.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ components:
165165
application/json:
166166
schema:
167167
$ref: "#/components/schemas/DeviceResponse"
168+
AsDeviceCreate:
169+
description: Create Accredited System Device operation successful
170+
content:
171+
application/json:
172+
schema:
173+
$ref: "#/components/schemas/AsDeviceResponse"
168174
MhsDeviceCreate:
169175
description: Create Message Handling System Device operation successful
170176
content:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "connecting-party-manager"
3-
version = "2024.11.27"
3+
version = "2024.12.02"
44
description = "Repository for the Connecting Party Manager API and related services"
55
authors = ["NHS England"]
66
license = "LICENSE.md"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from api_utils.api_step_chain import execute_step_chain
2+
from event.aws.client import dynamodb_client
3+
from event.environment import BaseEnvironment
4+
from event.logging.logger import setup_logger
5+
6+
from .src.v1.steps import steps as v1_steps
7+
8+
9+
class Environment(BaseEnvironment):
10+
DYNAMODB_TABLE: str
11+
12+
13+
versioned_steps = {"1": v1_steps}
14+
cache = {
15+
**Environment.build().dict(),
16+
"DYNAMODB_CLIENT": dynamodb_client(),
17+
}
18+
19+
20+
def handler(event: dict, context=None):
21+
setup_logger(service_name=__file__)
22+
return execute_step_chain(
23+
event=event,
24+
cache=cache,
25+
versioned_steps=versioned_steps,
26+
)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from builder.lambda_build import build
2+
3+
if __name__ == "__main__":
4+
build(__file__)

0 commit comments

Comments
 (0)