mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-04 10:02:15 +00:00
makeAllRequired made optional properties nullable by rewriting
"type": "array" to ["array", "null"]. OpenAI's Responses API with
strict: true rejects that form with an opaque "Invalid schema for
function" error when the property lives in an object reached through a
$defs entry that itself contains a $ref or an anyOf of $refs (for
example the Notion MCP server's query-sessions tool).
Express nullable array and object properties, both newly nullable and
already declared as a type pair, as {"anyOf": [<schema>, {"type":
"null"}]}, the form already used for $ref properties. Scalars keep the
["T", "null"] form. fixSchemaArrayItems now also looks inside the anyOf
variants so arrays without items keep getting a default.
Signed-off-by: Simon Ferquel's Clanker <simonferquel-clanker@users.noreply.github.com>