Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added HEAD /{index}/_doc/{id} returning 404. #670

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading