OpenAI schema error
Fix OpenAI strict mode’s incomplete required array
Make optional JSON Schema fields compatible with OpenAI strict function calling without losing null semantics.
In OpenAI strict mode, all properties must appear in required. Optionality is expressed by allowing null, not by omitting the property from required.
Read the schema and its provider wrapper as one contract. APITC distinguishes target requirements from portable JSON Schema, applies mechanical repairs only when intent is recoverable, and identifies transformations that can change meaning.
Diagnostic procedure
Repair the schema, then recompile.
- 01
List every property
Copy every key from properties into the object’s required array.
- 02
Preserve optionality
For previously optional fields, allow null with a type array or an anyOf branch.
- 03
Repeat recursively
Apply the same rule to every nested object and object inside array items.
{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"integer"}},"required":["query"]}{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":["integer","null"]}},"required":["query","limit"],"additionalProperties":false}$.inputSchemaClose this objectOpenAI strict requires additionalProperties: false on every object.
$.inputSchemaRequired array is incompleteStrict mode requires every property in required. APITC will make limit nullable.
No account · no upload · no endpoint calledOpen the full tool schema compiler and operating notes →
FAQ
Before you ship
Does APITC upload my schema?
No. Parsing, diagnostics, and compilation run in your browser tab.
Is the compiled result guaranteed to preserve meaning?
Safe repairs are deterministic. When OpenAI cannot express a source constraint, APITC labels the transform as lossy instead of hiding it.
Protocol behavior checked against the OpenAI function calling guide. Recheck your pinned provider/API version before production deployment.