Skip to content

Commit da66b31

Browse files
committed
Added support for an array of status codes
Signed-off-by: Owais <[email protected]>
1 parent afac9c3 commit da66b31

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
118118
- Fixed Aggregation schemas ([#801](https://github.com/opensearch-project/opensearch-api-specification/pull/801))
119119
- Fixed FilterQueryRequestProcessor to use correct query type ([#821](https://github.com/opensearch-project/opensearch-api-specification/pull/821))
120120
- Fixed `knn.train_model`'s request body `method` field to accept an object rather than a string ([#814](https://github.com/opensearch-project/opensearch-api-specification/pull/814))
121-
- Fixed REST status codes for RBAC and provisioning for Flow Framework plugin
121+
- Fixed REST status codes for RBAC and provisioning for Flow Framework plugin ([#842](https://github.com/opensearch-project/opensearch-api-specification/pull/842))
122122

123123
### Changed
124124
- Changed `tasks._common:TaskInfo` and `tasks._common:TaskGroup` to be composed of a `tasks._common:TaskInfoBase` ([#683](https://github.com/opensearch-project/opensearch-api-specification/pull/683))

json_schemas/test_story.schema.yaml

+11-4
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,22 @@ definitions:
190190
type: object
191191
properties:
192192
status:
193-
type: integer
194-
description: The expected HTTP status code. Default to 200.
195-
default: 200
193+
anyOf:
194+
- type: integer
195+
description: The expected HTTP status code. Default to 200.
196+
- type: array
197+
description: List of acceptable HTTP status codes.
198+
items:
199+
type: integer
200+
minItems: 1
201+
uniqueItems: true
196202
content_type:
197203
type: string
198204
default: application/json
199205
payload:
200206
$ref: '#/definitions/Payload'
201-
required: [status]
207+
required:
208+
- status
202209
additionalProperties: false
203210

204211
ActualResponse:

0 commit comments

Comments
 (0)