Skip to content

Commit 69ef44f

Browse files
factorydroidechobt
authored andcommitted
fix(cli): improve --output-schema help text with JSON Schema format details
Fixes bounty issue #1401 The --output-schema flag previously had a vague description 'JSON schema file for structured output'. This change improves the help text to: - Mention the JSON Schema format (draft-07 or later) - Provide a concrete example of a valid schema - Link to json-schema.org for full specification
1 parent 0b8fdfe commit 69ef44f

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

cortex-cli/src/main.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,23 @@ struct ExecCommand {
241241
#[arg(short, long, default_value = "human")]
242242
format: String,
243243

244-
/// JSON schema file for structured output
245-
#[arg(long)]
244+
/// JSON Schema file (draft-07+) defining the expected output structure.
245+
/// See https://json-schema.org for format details
246+
#[arg(
247+
long,
248+
value_name = "FILE",
249+
long_help = "Path to a JSON Schema file (draft-07 or later) for structured output.\n\n\
250+
The schema defines the expected structure of the output. Example:\n\n\
251+
{\n \
252+
\"type\": \"object\",\n \
253+
\"properties\": {\n \
254+
\"summary\": { \"type\": \"string\" },\n \
255+
\"items\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } }\n \
256+
},\n \
257+
\"required\": [\"summary\"]\n\
258+
}\n\n\
259+
See https://json-schema.org for the full JSON Schema specification."
260+
)]
246261
output_schema: Option<PathBuf>,
247262

248263
/// Additional writable directories

0 commit comments

Comments
 (0)