Skip to content

Commit b9c1a1c

Browse files
fix(business data api): fix wrong BDM operation responses (#230)
1 parent 4035325 commit b9c1a1c

File tree

5 files changed

+45
-14
lines changed

5 files changed

+45
-14
lines changed

openapi/components/schemas/BusinessDataCreationResult.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ description: |
33
An object containing:
44
* the ID of the newly created Business Data, under the name of "newBusinessDataId"
55
* any unknown fields, provided as an array of names, under the name of "unknownFields"
6+
properties:
7+
newBusinessDataId:
8+
description: ID of the newly created Business Data
9+
type: number
10+
unknownFields:
11+
description: list of unknown input fields that are not declared in the Business Data type
12+
items:
13+
type: string
14+
type: array
615
example:
716
"newBusinessDataId": 1988
817
"unknownFields" : [ "notAValidField" ]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
type: object
2+
description: |
3+
An object containing:
4+
* the list of IDs of all the newly created Business Data, under the name of "createdIds"
5+
* the list of unknown fields, provided as an array of names, under the name of "unknownFields"
6+
properties:
7+
createdIds:
8+
description: List of IDs of the newly created Business Data
9+
items:
10+
type: number
11+
type: array
12+
unknownFields:
13+
description: list of unknown input fields that are not declared in the Business Data type
14+
items:
15+
type: string
16+
type: array
17+
example:
18+
createdIds: [198, 199]
19+
unknownFields: [ "department" ]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
type: object
2+
description: |
3+
An object containing:
4+
* any unknown fields, provided as an array of names, under the name of "unknownFields"
5+
properties:
6+
unknownFields:
7+
description: list of unknown input fields that are not declared in the Business Data type
8+
items:
9+
type: string
10+
type: array
11+
example:
12+
unknownFields : [ "notAValidField" ]

openapi/paths/API@bdm@businessData@{businessDataType}@import.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,7 @@ post:
4949
content:
5050
application/json:
5151
schema:
52-
type: object
53-
description: |
54-
An object containing:
55-
* the list of IDs of all the newly created Business Data, under the name of "createdIds"
56-
* the list of unknown fields, provided as an array of names, under the name of "unknownFields"
57-
example:
58-
createdIds: [198, 199]
59-
unknownFields: [ "department" ]
52+
$ref: '../components/schemas/BusinessDataImportResult.yaml'
6053

6154
'401':
6255
$ref: '../components/responses/Unauthorized.yaml'

openapi/paths/API@bdm@businessData@{businessDataType}@{persistenceId}.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ get:
2121
name: persistenceId
2222
required: true
2323
schema:
24-
type: number
24+
type: string
25+
maxLength: 250
26+
pattern: '^[A-Za-z0-9\_\-\.]{0,250}$'
2527
example: 1
2628
responses:
2729
'200':
@@ -88,11 +90,7 @@ put:
8890
content:
8991
application/json:
9092
schema:
91-
type: object
92-
description: |
93-
The list of unknown fields passed as inputs, provided as an array of names, under the name of "unknownFields"
94-
example:
95-
unknownFields: [ "notAValidField" ]
93+
$ref: '../components/schemas/BusinessDataUpdateResult.yaml'
9694
'401':
9795
$ref: '../components/responses/Unauthorized.yaml'
9896
'403':

0 commit comments

Comments
 (0)