Skip to content

Commit 9e829ef

Browse files
Update API definitions
1 parent 9798e9c commit 9e829ef

5 files changed

Lines changed: 40 additions & 20 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: Server could not understand the request due to invalid syntax.
2+
content:
3+
application/json:
4+
schema:
5+
$ref: ../schemas/ProblemTypes/BadRequest.yaml
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
allOf:
2+
- title: Bad request
3+
- type: object
4+
properties:
5+
status:
6+
type: integer
7+
description: HTTP status code.
8+
minimum: 400
9+
maximum: 400
10+
invalidFields:
11+
$ref: ./InvalidFields.yaml
12+
- $ref: ./BaseProblem.yaml
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
type: array
2+
description: Invalid field details.
3+
items:
4+
type: object
5+
properties:
6+
field:
7+
type: string
8+
description: |-
9+
Name of the field.
10+
Dot notation is used for nested object field names.
11+
message:
12+
description: Message field.
13+
type: string
14+
example:
15+
- field: field1
16+
message: field1 is invalid
17+
- field: subObject.field2
18+
message: field2 is invalid
19+
- field: subObject.field2
20+
message: another error in the field2

openapi/components/schemas/ProblemTypes/ValidationError.yaml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,4 @@ allOf:
1111
- type: object
1212
properties:
1313
invalidFields:
14-
description: Invalid field details.
15-
type: array
16-
items:
17-
type: object
18-
properties:
19-
field:
20-
type: string
21-
description: |-
22-
Name of the field.
23-
Dot notation is used for nested object field names.
24-
message:
25-
description: Message field.
26-
type: string
27-
example:
28-
- field: field1
29-
message: field1 is invalid
30-
- field: subObject.field2
31-
message: field2 is invalid
32-
- field: subObject.field2
33-
message: another error in the field2
14+
$ref: ./InvalidFields.yaml

openapi/paths/reports@kyc-acceptance-summary.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ get:
127127
manualReviewTime:
128128
type: number
129129
description: Median duration in minutes between review and created time for manually reviewed documents.
130+
'400':
131+
$ref: ../components/responses/BadRequest.yaml
130132
'401':
131133
$ref: ../components/responses/Unauthorized.yaml
132134
'403':

0 commit comments

Comments
 (0)