Skip to content

Ambiguous paths in _nodes API #2806

Open
@lcawl

Description

@lcawl

💬 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions