Skip to content

Commit 3dd3de8

Browse files
committed
feature/PI-788-ui_delete_and_search reset for rebase
1 parent 76220f2 commit 3dd3de8

File tree

13 files changed

+1337
-2181
lines changed

13 files changed

+1337
-2181
lines changed

infrastructure/swagger/05_paths.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ tags:
1616
description: Create, Read and Delete Product IDs
1717
- name: Options
1818
description: These exist for CORS
19+
- name: Core EPR Creation Endpoints
20+
description: Core EPR API creation endpoints
21+
- name: Core EPR Read Endpoints
22+
description: Core EPR API read endpoints
23+
- name: Core EPR Deletion Endpoints
24+
description: Core EPR API deletion endpoints
25+
- name: SDS Search Endpoints
26+
description: Search Results provided for the SDS FHIR API
27+
1928
paths:
2029
/_status:
2130
get:
@@ -298,6 +307,48 @@ paths:
298307
- app-level0: []
299308

300309
/ProductTeam/{product_team_id}/Product/{product_id}:
310+
options:
311+
operationId: productactions
312+
summary: Product actions (OPTIONS)
313+
parameters:
314+
- $ref: "#/components/parameters/ProductTeamId"
315+
- $ref: "#/components/parameters/ProductId"
316+
tags:
317+
- Core Product ID Endpoints
318+
responses:
319+
"400":
320+
$ref: "#/components/responses/BadRequest"
321+
"200":
322+
description: "200 response"
323+
headers:
324+
Access-Control-Allow-Origin:
325+
schema:
326+
type: "string"
327+
Access-Control-Allow-Methods:
328+
schema:
329+
type: "string"
330+
Access-Control-Allow-Headers:
331+
schema:
332+
type: "string"
333+
content:
334+
application/json:
335+
schema:
336+
$ref: "#/components/schemas/Empty"
337+
x-amazon-apigateway-integration:
338+
responses:
339+
default:
340+
statusCode: "200"
341+
responseParameters:
342+
method.response.header.Access-Control-Allow-Methods: "'GET,OPTIONS,POST,DELETE'"
343+
method.response.header.Access-Control-Allow-Headers: "'apikey,authorization,content-type,version'"
344+
method.response.header.Access-Control-Allow-Origin: "'*'"
345+
requestTemplates:
346+
application/json: '{"statusCode": 200}'
347+
passthroughBehavior: "never"
348+
type: "mock"
349+
security:
350+
- ${authoriser_name}: []
351+
- app-level0: []
301352
get:
302353
operationId: readproductendpoint
303354
summary: Read a Product resource (GET)

infrastructure/swagger/12_components--responses.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,35 @@ components:
6969
message: "Duplicate 'Interaction ID' provided: value '<INTERACTION ID>' occurs <N> times in the questionnaire response."
7070
- code: "VALIDATION_ERROR"
7171
message: "SubCpmProductPathParams.environment: value is not a valid enumeration member; permitted: 'dev', 'qa', 'ref', 'int', 'prod'"
72+
SearchProductBadRequest:
73+
description: searchProduct Bad request
74+
content:
75+
application/json:
76+
schema:
77+
$ref: "#/components/schemas/ErrorResponse"
78+
examples:
79+
ValidationError:
80+
value:
81+
errors:
82+
- code: "VALIDATION_ERROR"
83+
message: "SearchProductQueryParams.__root__: Please provide exactly one valid query parameter: {'product_team_id', 'organisation_code'}."
84+
- code: "VALIDATION_ERROR"
85+
message: "SearchSDSDeviceQueryParams.foo: extra fields not permitted"
86+
headers:
87+
Access-Control-Allow-Origin:
88+
schema:
89+
$ref: "#/components/schemas/ErrorResponse"
90+
examples:
91+
ValidationErrorExtraFields:
92+
value:
93+
errors:
94+
- code: "VALIDATION_ERROR"
95+
message: "SearchSDSEndpointQueryParams.foo: extra fields not permitted"
96+
ValidationError:
97+
value:
98+
errors:
99+
- code: "VALIDATION_ERROR"
100+
message: "SearchSDSEndpointQueryParams.__root__: At least 2 query parameters should be provided of type, nhs_id_code, nhs_mhs_svc_ia and nhs_mhs_party_key"
72101
SearchProductBadRequest:
73102
description: searchProduct Bad request
74103
content:

infrastructure/swagger/13_components--parameters--query.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,17 @@ components:
1515
description: The organisation code to filter results by.
1616
schema:
1717
type: string
18+
ProductTeamIdQuery:
19+
name: product_team_id
20+
in: query
21+
required: false
22+
description: The ID of the product team to filter results by.
23+
schema:
24+
type: string
25+
OrganisationCodeQuery:
26+
name: organisation_code
27+
in: query
28+
required: false
29+
description: The organisation code to filter results by.
30+
schema:
31+
type: string

src/api/tests/smoke_tests/test_smoke.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,25 @@ def _request(base_url: str, headers: dict, path: str, method: str):
8383
"SearchProductQueryParams.__root__: Please provide exactly one valid query parameter: ('product_team_id', 'organisation_code')."
8484
],
8585
],
86+
[
87+
"/ProductTeam/123/Product/abc",
88+
"DELETE",
89+
404,
90+
],
91+
[
92+
"/ProductTeam/123",
93+
"DELETE",
94+
404,
95+
],
96+
[
97+
"/Product",
98+
"GET",
99+
400,
100+
["VALIDATION_ERROR"],
101+
[
102+
"SearchProductQueryParams.__root__: Please provide exactly one valid query parameter: ('product_team_id', 'organisation_code')."
103+
],
104+
],
86105
],
87106
)
88107
def test_smoke_tests(request_details):

test_ui/product_id_flow/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
tsconfig.tsbuildinfo
27+
tsconfig.*.tsbuildinfo

0 commit comments

Comments
 (0)