Skip to content

Commit d566c1f

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

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-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

+10-4
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,21 @@ 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+
oneOf:
194+
- type: integer
195+
description: The expected HTTP status code.
196+
- type: array
197+
description: List of acceptable HTTP status codes.
198+
items:
199+
type: integer
200+
minItems: 1
196201
content_type:
197202
type: string
198203
default: application/json
199204
payload:
200205
$ref: '#/definitions/Payload'
201-
required: [status]
206+
required:
207+
- status
202208
additionalProperties: false
203209

204210
ActualResponse:

0 commit comments

Comments
 (0)