Skip to content

Commit 74c6f65

Browse files
committed
Update swagger
1 parent c8fb6bf commit 74c6f65

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

infrastructure/swagger/05_paths.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ paths:
5050
- Options
5151
responses:
5252
"400":
53-
$ref: "#/components/responses/BadRequest"
53+
$ref: "#/components/responses/CreateProductTeamBadRequest"
5454
"200":
5555
description: "200 response"
5656
headers:
@@ -95,7 +95,7 @@ paths:
9595
"201":
9696
$ref: "#/components/responses/CPMProductTeamCreate"
9797
"400":
98-
$ref: "#/components/responses/BadRequest"
98+
$ref: "#/components/responses/CreateProductTeamBadRequest"
9999
"422":
100100
$ref: "#/components/responses/UnprocessableContent"
101101
parameters:

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ components:
6262
updated_on: "null"
6363
deleted_on: "null"
6464
keys:
65-
- key_type: "product_team_id_alias"
66-
key_value: "FOOBAR"
65+
- key_type: "product_team_id"
66+
key_value: "55e86121-3826-468c-a6f0-dd0f1fbc0259"
6767
CPMProductTeamDeleteResponse:
6868
type: object
6969
properties:
@@ -81,7 +81,7 @@ components:
8181
type: string
8282
name:
8383
type: string
84-
product_team_id:
84+
cpm_product_team_id:
8585
type: string
8686
ods_code:
8787
type: string
@@ -107,7 +107,7 @@ components:
107107
example:
108108
id: "P.1X3-XXX"
109109
name: "Sample Product"
110-
product_team_id: "55e86121-3826-468c-a6f0-dd0f1fbc0259"
110+
cpm_product_team_id: "55e86121-3826-468c-a6f0-dd0f1fbc0259"
111111
ods_code: "F5H1R"
112112
keys: []
113113
status: "active"

infrastructure/swagger/12_components--responses.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,33 @@ components:
7171
errors:
7272
- code: "VALIDATION_ERROR"
7373
message: "SearchProductQueryParams.__root__: Please provide exactly one valid query parameter: {'product_team_id', 'organisation_code'}."
74+
CreateProductTeamBadRequest:
75+
description: searchProductTeam Bad request
76+
content:
77+
application/json:
78+
schema:
79+
$ref: "#/components/schemas/ErrorResponse"
80+
examples:
81+
NotPermittedValidationError:
82+
value:
83+
errors:
84+
- code: "VALIDATION_ERROR"
85+
message: "CreateProductTeamIncomingParams.keys.0.key_type: value is not a valid enumeration member; permitted: 'product_team_id'"
86+
FormatValidationError:
87+
value:
88+
errors:
89+
- code: "VALIDATION_ERROR"
90+
message: "CreateProductTeamIncomingParams.keys.0.key_value: Key '' does not match the expected pattern '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' associated with key type 'product_team_id'"
91+
DuplicateKeyValidationError:
92+
value:
93+
errors:
94+
- code: "VALIDATION_ERROR"
95+
message: "CreateProductTeamIncomingParams.keys: Ensure that product_team_id only exists once within keys."
96+
MissingValue:
97+
value:
98+
errors:
99+
- code: "MISSING_VALUE"
100+
message: "CreateProductTeamIncomingParams.ods_code: field required"
74101
headers:
75102
Access-Control-Allow-Origin:
76103
schema:

0 commit comments

Comments
 (0)