-
Notifications
You must be signed in to change notification settings - Fork 500
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
Add automation for first three CAT APIs #8930
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Archer <[email protected]>
Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged. Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer. When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review. |
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.
Some suggestions to clarify the descriptions. Please include default values where appropriate. Thanks.
api: cat.aliases | ||
component: paths_and_http_methods | ||
--> | ||
## Paths and HTTP methods |
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.
## Paths and HTTP methods | |
## Path and HTTP methods |
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.
Do we want Paths
when there many and Path
when there's one?
Or do want a universal one? If it's universal then Paths and HTTP methods
makes more sense.
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.
I prefer Paths and HTTP methods
. If we need to change to the singular (which in this case we don't, since multiple path types exist), we can exclude the header and modify it in the options.
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.
@nhtruong: @kolchfa-aws and I discussed it. Path
would be more accurate than Paths
since each x-operation-id
usually encompasses one path in the API. We'll use omit_header
if the writer chooses to include multiple paths on a single page.
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. Multiple paths on a single page would still be documented as different APIs and thus be in different sections.
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.
Alternatively, we can just name this section "Endpoints" and change the API template.
Parameter | Type | Description | ||
:--- | :--- | :--- | ||
local | Boolean | Whether to return information from the local node only instead of from the cluster manager node. Default is `false`. | ||
expand_wildcards | Enum | Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. Default is `open`. | ||
`expand_wildcards` | String / String / String / String / List | Whether to expand wildcard expression to concrete indexes that are open, closed or both. |
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.
Why are there 4 instances of String in the type? Also, as a rule, we don't want slashes to signify "or". I would suggest "String or list". Also, the old description had supported values, which is helpful, and specified that the list should be comma-separated. The new description has less information.
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.
@nhtruong: IS there something in the spec that would cause 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.
That's coming form the spec. I'll update the code to handle this edge case.
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.
Sounds good. Let me know once that update is through and I'll update this PR with the updated descriptions.
bytes | Byte size | Specify the units for byte size. For example, `7kb` or `6gb`. For more information, see [Supported units]({{site.url}}{{site.baseurl}}/opensearch/units/). | ||
local | Boolean | Whether to return information from the local node only instead of from the cluster manager node. Default is `false`. | ||
cluster_manager_timeout | Time | The amount of time to wait for a connection to the cluster manager node. Default is 30 seconds. | ||
`bytes` | String | The unit used to display byte values. |
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.
`bytes` | String | The unit used to display byte values. | |
`bytes` | String | The units used to display byte values. |
local | Boolean | Whether to return information from the local node only instead of from the cluster manager node. Default is `false`. | ||
cluster_manager_timeout | Time | The amount of time to wait for a connection to the cluster manager node. Default is 30 seconds. | ||
`bytes` | String | The unit used to display byte values. | ||
`cluster_manager_timeout` | String | Operation timeout for connection to cluster-manager node. |
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.
`cluster_manager_timeout` | String | Operation timeout for connection to cluster-manager node. | |
`cluster_manager_timeout` | String | A timeout for connection to the cluster manager node. |
cluster_manager_timeout | Time | The amount of time to wait for a connection to the cluster manager node. Default is 30 seconds. | ||
`bytes` | String | The unit used to display byte values. | ||
`cluster_manager_timeout` | String | Operation timeout for connection to cluster-manager node. | ||
`format` | String | A short version of the Accept header (for example, `json`, `yaml`). |
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.
`format` | String | A short version of the Accept header (for example, `json`, `yaml`). | |
`format` | String | A short version of the HTTP accept header (for example, `json` or `yaml`). |
`format` | String | A short version of the Accept header (for example, `json`, `yaml`). | ||
`h` | List | Comma-separated list of column names to display. | ||
`help` | Boolean | Return help information. | ||
`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. |
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.
`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. | |
`local` | Boolean | If `true`, specifies to retrieve information only from the local node. If `false`, specifies to retrieve local information from the cluster manager node. |
`h` | List | Comma-separated list of column names to display. | ||
`help` | Boolean | Return help information. | ||
`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. | ||
`s` | List | Comma-separated list of column names or column aliases to sort by. |
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.
`s` | List | Comma-separated list of column names or column aliases to sort by. | |
`s` | List | A comma-separated list of column names or column aliases to sort the response. |
`help` | Boolean | Return help information. | ||
`local` | Boolean | Return local information, do not retrieve the state from cluster-manager node. | ||
`s` | List | Comma-separated list of column names or column aliases to sort by. | ||
`v` | Boolean | Verbose mode. Display column headers. |
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.
`v` | Boolean | Verbose mode. Display column headers. | |
`v` | Boolean | Whether to display column headers. |
api: cat.allocation | ||
component: query_parameters | ||
--> | ||
## Query parameters | ||
Parameter | Type | Description | ||
:--- | :--- | :--- |
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.
We also need to specify defaults for the query parameters that have them (e.g., local
).
api: cat.cluster_manager | ||
component: query_parameters | ||
--> | ||
## Query parameters |
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.
Same comments as above.
Adds automation for first three CAT APIs
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.