这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG] apigeecli apihub apis get allows you to provide an empty id, behaving like list command instead #685

@Tr00Story

Description

@Tr00Story

Describe the bug
It is possible to provide an empty string as an id to the "apihub apis get" command (example: apigeecli apihub apis get --id ""), which will make it behave just like "apigeecli apihub apis list" instead.
I understand why it would behave this way, since the REST request is virtually the same, but I believe it would be useful to protect against this scenario.

Version
apigeecli version 2.13.0

To Reproduce

  1. Perform a "apihub apis get" with an empty string as the id (example: apigeecli apihub apis get --id "")

Note: This step is assuming you've previously set the organization and region, otherwise include the -o and -r flags.

Expected behavior
Since this is a "get" operation, we should get an error saying that no id (or an invalid one) was provided.

Actual behavior
The output from 1. is the same as if you would've done "apigeecli apihub apis list".

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions