-
Notifications
You must be signed in to change notification settings - Fork 115
Fix optional bodies #5271
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
Fix optional bodies #5271
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,7 +83,7 @@ export interface Request extends RequestBase { | |
| */ | ||
| wait_for_completion?: boolean | ||
| } | ||
| body: { | ||
| body?: { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. YAML test that restores a snapshot without a body: https://github.com/elastic/elasticsearch/blob/a82b5cfb0ff7d22b95c56a8e7dcd7c5f3ba4ff24/modules/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/20_repository.yml#L139-L144
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| /** | ||
| * The feature states to restore. | ||
| * If `include_global_state` is `true`, the request restores all feature states in the snapshot by default. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YAML test that creates a snapshot without a body: https://github.com/elastic/elasticsearch/blob/a82b5cfb0ff7d22b95c56a8e7dcd7c5f3ba4ff24/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/snapshot.create/10_basic.yml#L23-L27
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/elastic/elasticsearch/blob/a59c182f9f7e9d1bf3d6eecbc0e44f24ff91d053/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestCreateSnapshotAction.java#L48
applyContentParserchecks for body content