Skip to content

Use operationId-derived aliases for generated CLI commands#1

Merged
cahaseler merged 1 commit into
SpaceMolt:mainfrom
CoinAnole:codex/operation-id-command-aliases
May 27, 2026
Merged

Use operationId-derived aliases for generated CLI commands#1
cahaseler merged 1 commit into
SpaceMolt:mainfrom
CoinAnole:codex/operation-id-command-aliases

Conversation

@CoinAnole
Copy link
Copy Markdown
Contributor

Summary

This updates command generation so the CLI also recognizes command names derived from OpenAPI operationId, not only the final API path segment.

For example, /api/v2/spacemolt_faction/info still dispatches to spacemolt_faction/info, but the user-facing CLI command faction_info now resolves correctly from operationId: spacemolt_faction_info.

Why

Some generated commands were exposed under path-segment names like faction/info or short action names like info, while the API and release notes document operation-id-style commands such as faction_info.

Changes

  • Add operation-id-derived aliases to generated SHORT_NAMES.
  • Regenerate src/commands.ts.
  • Add regression coverage for resolveCommand('faction_info').

Validation

  • bun run generate
  • bun test tests/dispatch.test.ts
  • bun test
  • bun run typecheck
  • Live smoke-tested with:
    • faction_info
    • faction/info
    • faction_list
    • help faction_info
    • help market_view_market

@cahaseler cahaseler merged commit bf88b0b into SpaceMolt:main May 27, 2026
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.

2 participants