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

Ambiguous paths in _nodes API #2806

Open
lcawl opened this issue Aug 23, 2024 · 0 comments
Open

Ambiguous paths in _nodes API #2806

lcawl opened this issue Aug 23, 2024 · 0 comments
Labels

Comments

@lcawl
Copy link
Contributor

lcawl commented Aug 23, 2024

💬 Questions and Help

When I run "make lint-docs" it outputs the following error for the elasticsearch-openapi.json file:

error path-params Paths "/_nodes/{node_id}" and "/_nodes/{metric}" must not be equivalent...

I believe it's because the {node_id} and {metric} are both strings or array of strings so these paths are considered to be identical and thus ambiguous.

I attempted to make them less identical by putting an enum in the definition for the metric path parameter with the values from https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html

However the linter still considered them to be identical (I guess because there's nothing stopping the node ID values from matching those metric enum values.

This type of situation seems to be discussed in issues like OAI/OpenAPI-Specification#2564

Is this something that we want the linter to treat as an error (so that in the future maybe we have less ambiguous paths), or should I reduce the severity to warning or turn it off entirely?

@lcawl lcawl added the question label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant