feat: fill argument descriptions from JSDoc @param and Python Args: (#12515)

* feat: fill argument descriptions from JSDoc @param and Python Args:

windmill-parser-ts reads the @param lines of the JSDoc block on the
entrypoint function and passes each description as the argument's otyp,
the way windmill-parser-py already passes docstring Args: text. The
editor's inferArgs now turns that text into the schema property's
description for Python and TypeScript, so both show in the run form.

Part of #2451

* fix: keep jsdoc descriptions apart from the union marker, describe server-side schemas

A JSDoc @param description containing both `[` and `|` would read as the
`T | T[]` union marker it shares `otyp` with, so the parser leaves it out.
main_arg_schema, used when a deploy sends no schema, now also turns a
non-union `otyp` into the property description for Python and TypeScript,
as the editor's inferArgs does.

* fix(cli): take argument descriptions from code in generate-metadata

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: keep a typed description on an empty doc entry and skip comment collection on the job path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: let a description from code fill an empty one, never replace a typed one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Raunak Burrows
2026-11-20 11:07:01 +01:00
committed by GitHub
co-authored by Claude Opus 5.5 Ruben Fiszel
parent d23f4d46bb
commit 2eddc5d9cc
7 changed files with 197 additions and 18 deletions
+6 -1
View File
@@ -1342,7 +1342,12 @@ pub fn infer_main_schema(
};
match sig {
Ok(sig) => serde_json::value::to_raw_value(&windmill_parser::json_schema::main_arg_schema(
&sig, previous,
&sig,
previous,
matches!(
language.as_str(),
"python3" | "deno" | "bun" | "bunnative" | "nativets"
),
))
.ok()
.map(|v| Schema(sqlx::types::Json(v))),