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

Adds cluster API example requests and responses #2870

Merged
merged 7 commits into from
Sep 20, 2024

Conversation

szabosteve
Copy link
Contributor

Overview

Related to #2482.
This PR adds request and response examples to the cluster APIs.

Copy link
Contributor

github-actions bot commented Sep 6, 2024

Following you can find the validation results for the APIs you have changed.

API Status Request Response
cluster.allocation_explain 🔴 5/5 1/5
cluster.health 🟢 153/153 153/153
cluster.put_settings 🟢 58/58 57/57
cluster.reroute 🟢 6/6 5/5
nodes.info 🔴 116/116 1/116
nodes.reload_secure_settings 🟢 2/2 2/2
tasks.get 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let me know if you want me to add the updates to the overlay files in this same PR

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
cluster.allocation_explain 🟢 4/4 4/4
cluster.health 🟢 153/153 153/153
cluster.put_settings 🟢 58/58 57/57
cluster.reroute 🟢 6/6 5/5
nodes.info 🔴 113/113 1/113
nodes.reload_secure_settings 🟢 2/2 2/2
tasks.get 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
cluster.allocation_explain 🟢 4/4 4/4
cluster.health 🟢 153/153 153/153
cluster.put_settings 🟢 58/58 57/57
cluster.reroute 🟢 6/6 5/5
nodes.info 🔴 113/113 1/113
nodes.reload_secure_settings 🟢 2/2 2/2
tasks.get 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

1 similar comment
Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
cluster.allocation_explain 🟢 4/4 4/4
cluster.health 🟢 153/153 153/153
cluster.put_settings 🟢 58/58 57/57
cluster.reroute 🟢 6/6 5/5
nodes.info 🔴 113/113 1/113
nodes.reload_secure_settings 🟢 2/2 2/2
tasks.get 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

@lcawl lcawl mentioned this pull request Sep 11, 2024
58 tasks
Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
cluster.allocation_explain 🟢 4/4 4/4
cluster.health 🟢 153/153 153/153
cluster.put_settings 🟢 58/58 57/57
cluster.reroute 🟢 6/6 5/5
nodes.info 🔴 113/113 1/113
nodes.reload_secure_settings 🟢 2/2 2/2
tasks.get 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
cluster.allocation_explain 🟢 4/4 4/4
cluster.health 🟢 153/153 153/153
cluster.put_settings 🟢 58/58 57/57
cluster.reroute 🟢 6/6 5/5
nodes.info 🔴 113/113 1/113
nodes.reload_secure_settings 🟢 2/2 2/2
tasks.get 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

@lcawl
Copy link
Contributor

lcawl commented Sep 19, 2024

I added a *.yaml file to this PR for your consideration. Right now all the *.json examples are returning linting errors like this:

 105666:17      warning  oas3-schema                 Property "type" is not expected to be here.                                         components.examples.nodesInfoResponseExample1.type
 105667:26      warning  oas3-schema                 Property "response_code" is not expected to be here.                                components.examples.nodesInfoResponseExample1.response_code

I tried converting the example to a YAML file then commenting out the extra fields (since yaml allows comments whereas json doesn't). This succeeds in solving the linting errors (since the comment fields are not carried forward to the output). Is this acceptable to use YAML instead of JSON format and is it okay to comment out those extra fields?

@szabosteve szabosteve merged commit 85a1534 into main Sep 20, 2024
6 checks passed
@szabosteve szabosteve deleted the szabosteve/api-examples-p3 branch September 20, 2024 07:20
lcawl added a commit that referenced this pull request Sep 24, 2024
Co-authored-by: lcawl <lcawley@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants