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>.
derivePathParamsinpackages/cli/generator/arg-derivation.tshard-codes path parameters asrequired: trueand reads onlyhiddenanddescriptionfromx-forge-params.default,requiredandpositionalare dropped, even though thex-forge-params-valid-formatlint 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:cf ai-searchcommand still requires the namespace flag;createtakes 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>.