-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
Currently, subcommands within the CLI do not consistently follow a standardized naming convention. This can lead to confusion and friction when mapping CLI usage to official OpenAPI services.
We propose adopting slug-based subcommands aligned with the official OpenAPI service identifiers. These slugs are already used across OpenAPI platforms, particularly within the console portal URLs, and represent a well-established convention.
Proposal
Subcommands should use the same service slugs that are used in the OpenAPI console URLs.
For example:
- If a service is accessible via:
https://console.openapi.com/apis/<slug>/...
- Then the CLI subcommand should be:
$ openapi <slug> ...
This ensures a 1:1 mapping between CLI usage and official service naming, reducing cognitive overhead for developers.
Benefits
- ✅ Consistency with official OpenAPI ecosystem
- ✅ Easier discoverability and memorability
- ✅ Reduced need for documentation lookup
- ✅ Alignment between web console and CLI workflows
Additional Notes
- Slugs should be treated as stable identifiers.
- Avoid introducing aliases unless strictly necessary.
- Future services can be integrated seamlessly by reusing their existing slugs.
Example
If the console URL is:
https://console.openapi.com/apis/company/documentation
Then the corresponding CLI usage should be:
openapi company ...