Skip to content

Path parameters ignore x-forge-params default / required / positional #161

Description

@G4brym

derivePathParams in packages/cli/generator/arg-derivation.ts hard-codes path parameters as required: true and reads only hidden and description from x-forge-params. default, required and positional are dropped, even though the x-forge-params-valid-format lint rule accepts them and query/body parameters already honour them.

Example: AI Search sets x-forge-params: { namespace: { default: "default" } } on /accounts/{account_id}/ai-search/namespaces/{namespace}/..., but:

  • every cf ai-search command still requires the namespace flag;
  • create takes it as a positional: cf ai-search create <namespace> <id>.

Expected: a path parameter with a default becomes an optional flag, defaulting to that value, and is never chosen as the positional. For example cf ai-search create <id>.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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