Skip to content

Add corresponding API operation ID to CLI docs JSON#1399

Open
david-crespo wants to merge 1 commit intomainfrom
cli-op-id-docs
Open

Add corresponding API operation ID to CLI docs JSON#1399
david-crespo wants to merge 1 commit intomainfrom
cli-op-id-docs

Conversation

@david-crespo
Copy link
Contributor

Closes #875

Was messing with linking to API endpoints corresponding to forms in the console (oxidecomputer/console#3153) and realized it would be nice to just link to the API endpoint and then let the API doc link you to the CLI if you want. Turns out I made an issue for this two years ago.

This can absolutely be done without the unstable-ext approach if you'd rather not, it's just neater with it — feels like the way it wants to be done. The alternative is using the command path to go find the corresponding CliCommand for a given clap Command.

unstable-ext seems relatively stable to me. It hasn't been mentioned in the release notes since August 2024. If they ever messed with it, it would be really easy to deal with.

Loading
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.

CLI docs: include corresponding API operation ID for each command so we can link to it

2 participants