Fix: ToolCrudObjects header inputSchema JSON Schema compliance (#38299)
create_customer_invoice and create_other_document declare a 'header' object whose schema has 'required: [socid]' but no 'properties' entry. This is technically allowed by JSON Schema but stricter validators flag it as suspicious: the 'required' array references a property that is not declared in 'properties'. Beyond compliance, the omission means LLMs (and human reviewers) have no machine-readable description of which fields are actually accepted in the 'header' object. The Dolibarr backend already accepts socid, date, duree_validite, note_public, note_private and others -- this patch documents the most useful ones explicitly so consumer tools can produce richer payloads. Tested with: create_other_document object_type=proposal accepting a 'header' that contains all of socid + date + duree_validite + note_public -> all four fields are correctly mapped to the Propal object (Dolibarr already accepts unknown properties via dynamic property assignment, so this is purely a schema-documentation change).
This commit is contained in:
parent
e735bed124
commit
dbae20fb5e
1 changed files with 13 additions and 0 deletions
|
|
@ -196,6 +196,12 @@ If user says 'order' without any qualifier, they mean a SALES ORDER - use this t
|
|||
"header" => [
|
||||
"type" => "object",
|
||||
"description" => "Invoice header data. Must include 'socid' (Customer ID).",
|
||||
"properties" => [
|
||||
"socid" => ["type" => "integer", "description" => "Customer ID (Thirdparty ID)"],
|
||||
"date" => ["type" => "string", "description" => "Invoice date (YYYY-MM-DD)"],
|
||||
"note_public" => ["type" => "string", "description" => "Public note"],
|
||||
"note_private" => ["type" => "string", "description" => "Private note"]
|
||||
],
|
||||
"required" => ["socid"]
|
||||
],
|
||||
"lines" => [
|
||||
|
|
@ -233,6 +239,13 @@ If user says 'order' without any qualifier, they mean a SALES ORDER - use this t
|
|||
"header" => [
|
||||
"type" => "object",
|
||||
"description" => "Header data. Must include 'socid'.",
|
||||
"properties" => [
|
||||
"socid" => ["type" => "integer", "description" => "Thirdparty ID (Customer for proposal, Supplier for supplier_*)"],
|
||||
"date" => ["type" => "string", "description" => "Document date (YYYY-MM-DD)"],
|
||||
"duree_validite" => ["type" => "integer", "description" => "Validity in days (proposal only)"],
|
||||
"note_public" => ["type" => "string", "description" => "Public note"],
|
||||
"note_private" => ["type" => "string", "description" => "Private note"]
|
||||
],
|
||||
"required" => ["socid"]
|
||||
],
|
||||
"lines" => [
|
||||
|
|
|
|||
Loading…
Reference in a new issue