mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-14 19:02:17 +03:00
fix(api): align combo body and legacy key access (#12070)
Alinha o body do combo e o acesso legado por chave, com testes atualizados (CLI api-generator + row parsers). Validado no worktree combinado. Obrigado!
This commit is contained in:
@@ -130,7 +130,10 @@ for (const [tag, ops] of Object.entries(byTag)) {
|
||||
lines.push(` .${flag}("--${kebab(p.name)} <${p.name}>", "${escapeStr(p.description)}")`);
|
||||
}
|
||||
if (hasBody) {
|
||||
lines.push(` .option("--body <jsonOrPath>", "JSON body or @path/to/file.json")`);
|
||||
const bodyFlag = op.requestBody.required ? "requiredOption" : "option";
|
||||
lines.push(
|
||||
` .${bodyFlag}("--body <jsonOrPath>", "JSON body or @path/to/file.json")`
|
||||
);
|
||||
}
|
||||
lines.push(` .action(async (opts, cmd) => {`);
|
||||
lines.push(` const gOpts = cmd.optsWithGlobals();`);
|
||||
|
||||
Reference in New Issue
Block a user