TestBuildInputSchemaRequiredInputs tests required field tracking.
(t *testing.T)
| 138 | |
| 139 | // TestBuildInputSchemaRequiredInputs tests required field tracking. |
| 140 | func TestBuildInputSchemaRequiredInputs(t *testing.T) { |
| 141 | inputs := map[string]any{ |
| 142 | "name": map[string]any{ |
| 143 | "type": "string", |
| 144 | "required": true, |
| 145 | }, |
| 146 | "optional": map[string]any{ |
| 147 | "type": "string", |
| 148 | "required": false, |
| 149 | }, |
| 150 | } |
| 151 | |
| 152 | _, required := buildInputSchema(inputs, defaultDescFn) |
| 153 | |
| 154 | assert.Contains(t, required, "name", "name should be required") |
| 155 | assert.NotContains(t, required, "optional", "optional should not be required") |
| 156 | } |
| 157 | |
| 158 | // TestBuildInputSchemaRequiredSorting tests that required list order is deterministic |
| 159 | // across multiple runs (callers typically sort the result). |
nothing calls this directly
no test coverage detected