-
Notifications
You must be signed in to change notification settings - Fork 101
add example requests for endpoints that do not use bodies #4489
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
Conversation
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
0139b80
to
3eb863a
Compare
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
@@ -1077,17 +1077,6 @@ actions: | |||
# update: | |||
# aggregations: | |||
# x-model: true | |||
# Examples |
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.
Thanks, Lisa! I forgot to look for this. :)
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.
Wow, this is great! LGTM
dcee65e
to
5f0408b
Compare
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
1 similar comment
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
@lcawl Preview URL for the latest version: https://www.elastic.co/docs/api/doc/elasticsearch/version/475682a4-c607-4ca5-a63c-26c1f9b636da/ |
ec158de
to
4bcbf90
Compare
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
Is it very simple to understand now when that info is required? e.g. is it only required in at least one request or response body file (and only in the one that we want to appear in the x-codeSamples)? And if there are multiple request or response body examples that have this field, which one is picked for use in x-codeSamples? IMO we should try to make this as clear and simple as possible (and if that means we leave the |
specification/_global/reindex/examples/request/ReindexExample1.yaml
Outdated
Show resolved
Hide resolved
...cation/_global/scripts_painless_execute/examples/request/ScriptsPainlessExecuteExample1.yaml
Outdated
Show resolved
Hide resolved
...cation/_global/scripts_painless_execute/examples/request/ScriptsPainlessExecuteExample1.yaml
Outdated
Show resolved
Hide resolved
...cation/_global/scripts_painless_execute/examples/request/ScriptsPainlessExecuteExample1.yaml
Outdated
Show resolved
Hide resolved
specification/_global/scroll/examples/request/ScrollExample1.yaml
Outdated
Show resolved
Hide resolved
specification/slm/put_lifecycle/examples/request/SlmPutLifecycleExample1.yaml
Outdated
Show resolved
Hide resolved
specification/slm/put_lifecycle/examples/request/SlmPutLifecycleExample1.yaml
Outdated
Show resolved
Hide resolved
specification/slm/put_lifecycle/examples/request/SlmPutLifecycleExample1.yaml
Outdated
Show resolved
Hide resolved
specification/slm/put_lifecycle/examples/request/SlmPutLifecycleExample1.yaml
Outdated
Show resolved
Hide resolved
specification/watcher/put_watch/examples/request/WatcherPutWatchExample1.yaml
Outdated
Show resolved
Hide resolved
The So to summarize. The And thanks for catching the callouts! I will do another pass to filter those out. |
74dbefe
to
89ee8fe
Compare
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
89ee8fe
to
9ccf819
Compare
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-9.0 9.0
# Navigate to the new working tree
cd .worktrees/backport-9.0
# Create a new branch
git switch --create backport-4489-to-9.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7d0defc6dd27928090c93b68b0105505f009f827
# Push it to GitHub
git push --set-upstream origin backport-4489-to-9.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.0 Then, create a pull request where the |
* add a few example requests for endpoints that do not use bodies * Remove x-codeSamples from overlay * restructure existing examples w/o bodies as request examples * skip examples w/o bodies when generating openapi examples * add a lot of missing examples * remove duplicate test * more examples missed in previous commit --------- Co-authored-by: lcawl <[email protected]>
* add a few example requests for endpoints that do not use bodies * Remove x-codeSamples from overlay * restructure existing examples w/o bodies as request examples * skip examples w/o bodies when generating openapi examples * add a lot of missing examples * remove duplicate test * more examples missed in previous commit --------- Co-authored-by: lcawl <[email protected]>
) * add a few example requests for endpoints that do not use bodies * Remove x-codeSamples from overlay * restructure existing examples w/o bodies as request examples * skip examples w/o bodies when generating openapi examples * add a lot of missing examples * remove duplicate test * more examples missed in previous commit --------- Co-authored-by: lcawl <[email protected]>
This PR adds missing examples of ES endpoints that do not use bodies. These are used to generate the
x-codeSamples
extension for OpenAPI.Some examples were reconstructucted from description fields used in response examples (when endpoints have them). For endpoints where there is no response example an example was obtained from an old 8.x alternatives report JSON file.
In a previous PR I added
method_request
fields to some responses. These are now unnecessary so they were removed.I have also removed the
x-codeSamples
overlay files. In a follow up change I will be adding the client languages for all examples, using the request converter to generate them.Preview: https://www.elastic.co/docs/api/doc/elasticsearch/version/475682a4-c607-4ca5-a63c-26c1f9b636da/
With all these changes, only the following endpoints are missing examples: