Skip to content

Commit

Permalink
Added HEAD /{index}/_doc/{id} 404 response. (#670)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Nov 13, 2024
1 parent 2cdd46a commit a84cb99
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added verbose output of the story being evaluated ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))
- Added `_search` with `sort: direction` ([#658](https://github.com/opensearch-project/opensearch-api-specification/pull/658))
- Added `_common.mapping:FlatObjectProperty` ([#661](https://github.com/opensearch-project/opensearch-api-specification/pull/661))
- Added `HEAD /{index}/_doc/{id}` returning `404` ([#670](https://github.com/opensearch-project/opensearch-api-specification/pull/670))

### Removed
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))
Expand Down
5 changes: 5 additions & 0 deletions spec/namespaces/_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,8 @@ paths:
responses:
'200':
$ref: '#/components/responses/exists@200'
'404':
$ref: '#/components/responses/exists@404'
post:
operationId: index.1
x-operation-group: index
Expand Down Expand Up @@ -2905,6 +2907,9 @@ components:
exists@200:
content:
application/json: {}
exists@404:
content:
application/json: {}
exists_source@200:
content:
application/json: {}
Expand Down
16 changes: 16 additions & 0 deletions tests/default/indices/doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ chapters:
id: '1'
response:
status: 200
- synopsis: Check whether a document exists.
path: /{index}/_doc/{id}
method: HEAD
parameters:
index: movies
id: '1'
response:
status: 200
- synopsis: Delete a document.
path: /{index}/_doc/{id}
method: DELETE
Expand All @@ -65,6 +73,14 @@ chapters:
id: '1'
response:
status: 404
- synopsis: Check whether a nonexistent document exists.
path: /{index}/_doc/{id}
method: HEAD
parameters:
index: movies
id: '1'
response:
status: 404
- synopsis: Delete a nonexistent document.
path: /{index}/_doc/{id}
method: DELETE
Expand Down

0 comments on commit a84cb99

Please sign in to comment.