Skip to content

bug: Add missing CLI commands/actions to operations #581

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

Merged

Conversation

Dorthu
Copy link
Collaborator

@Dorthu Dorthu commented Dec 24, 2021

This is for the Linode CLI.

In the current CLI release, we see this:

wsmith@linode::linode-cli[master]$ linode-cli default --help
linode-cli default [ACTION]

Available actions:
┌──────────────────────┬────────────────────────┐
│ action               │ summary                │
├──────────────────────┼────────────────────────┤
│ getEntityTransfers   │ Entity Transfers List  │
│ createEntityTransfer │ Entity Transfer Create │
│ getEntityTransfer    │ Entity Transfer View   │
│ deleteEntityTransfer │ Entity Transfer Cancel │
│ acceptEntityTransfer │ Entity Transfer Accept │
│ import               │ Domain Import          │
└──────────────────────┴────────────────────────┘

These operations appear in "default" because they have no
x-linode-cli-command defined in the spec (so they fall into the
default command). This isn't ideal. Additionally, many of those
commands are using their operationId as their action since they lack a
x-linode-cli-action element.

This change adds a command and action to all of the above.

This is for the Linode CLI.

In the current CLI release, we see this:

```bash
wsmith@linode::linode-cli[master]$ linode-cli default --help
linode-cli default [ACTION]

Available actions:
┌──────────────────────┬────────────────────────┐
│ action               │ summary                │
├──────────────────────┼────────────────────────┤
│ getEntityTransfers   │ Entity Transfers List  │
│ createEntityTransfer │ Entity Transfer Create │
│ getEntityTransfer    │ Entity Transfer View   │
│ deleteEntityTransfer │ Entity Transfer Cancel │
│ acceptEntityTransfer │ Entity Transfer Accept │
│ import               │ Domain Import          │
└──────────────────────┴────────────────────────┘
```

These operations appear in "default" because they have no
`x-linode-cli-command` defined in the spec (so they fall into the
default command).  This isn't ideal.  Additionally, many of those
commands are using their operationId as their action since they lack a
`x-linode-cli-action` element.

This change adds a command and action to all of the above.
@Dorthu Dorthu requested a review from bbiggerr December 24, 2021 02:35
Copy link
Contributor

@bbiggerr bbiggerr left a comment

Choose a reason for hiding this comment

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

Entity Transfer endpoints are deprecated -- should commands have x-linode-cli-skip: true?

@Dorthu
Copy link
Collaborator Author

Dorthu commented Jan 4, 2022

I didn't realize these were renamed. I'll mark them as skipped instead.

Dorthu added a commit to linode/linode-cli that referenced this pull request Jan 4, 2022
Related to linode/linode-api-docs#581

It is possible that every operation in a path is skipped in the CLI via
the `x-linode-cli-skip` spec extension.  In this case, that path's
command should not be present in the CLI at all, as it would have no
actions associated to it.  The above-linked PR introduces the first
paths that are entirely skipped in this way.

This change removes all empty commands from the CLI after building the
entire command/action structure.
@Dorthu
Copy link
Collaborator Author

Dorthu commented Jan 4, 2022

Opened an associated CLI PR to remove the "default" command from the CLI, which otherwise would be empty (as all operations in it were skipped)

@bbiggerr bbiggerr merged commit 1262119 into linode:development Jan 10, 2022
lgarber-akamai pushed a commit to lgarber-akamai/linode-cli that referenced this pull request Oct 26, 2022
Related to linode/linode-api-docs#581

It is possible that every operation in a path is skipped in the CLI via
the `x-linode-cli-skip` spec extension.  In this case, that path's
command should not be present in the CLI at all, as it would have no
actions associated to it.  The above-linked PR introduces the first
paths that are entirely skipped in this way.

This change removes all empty commands from the CLI after building the
entire command/action structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants