{"id":"json-schema-required-missing","version":"1.0.0","description":"List every property a JSON Schema 2020-12 \"required\" keyword demands but the instance lacks, with JSON Pointers.","supported_operations":["find missing required properties in llm json output","which required fields are missing from this json","list required keys absent at every nesting level","json pointer of each missing required field","check structured output for missing required properties","report required property violations against a 2020-12 schema"],"unsupported_operations":["repairing the output by inserting default values for the missing properties","other assertions (type, enum, minLength, pattern, format): see json-schema-type-mismatches for type","schemas using allOf/anyOf/oneOf/not/if/patternProperties/dependentSchemas, remote or anchor $ref (unsupported_input)"],"semantics":["Validation 6.5.3: at each object instance location, every name in an applicable schema's \"required\" array that is not an own property of the object is reported; non-objects ignore \"required\". A property whose value is null is present.","Applicability follows Core 2020-12: properties (10.3.2.1), additionalProperties as a subschema (10.3.2.3), items as a single subschema (10.3.1.2), same-document fragment $ref with sibling keywords (8.2.3.1), $defs, and boolean subschemas (4.3.2). Other keywords are ignored (Core 6.5) except the unsupported applicators, which throw unsupported_input.","instance_pointer is the object location and property_pointer the location the missing member would have, both RFC 6901 JSON string representations (\"\" is the root; \"~\" -> \"~0\", \"/\" -> \"~1\"). keyword_location is the evaluation path including \"$ref\" steps (Core 12.3.1); schema_pointer is the \"required\" keyword's own location in the schema document.","Order: instance locations in pre-order (object members by ascending UTF-16 code units of their names, array elements by index); at one location, applicable schemas in application order (the schema, then its $ref chain); within one keyword, the order of the \"required\" array.","count is the total number of missing properties; at most max_results are listed, in order, and truncated is true when count exceeds it. valid is true exactly when count is 0.","Input must be JSON only: non-finite numbers, holes, non-plain objects, and lone surrogates in any string or any property name (schema or instance) throw invalid_input. A $ref cycle with no instance progress throws not_computable (Core 9.4.1)."],"limits":{"max_input_bytes":262144,"max_depth":64,"max_nodes":20000,"max_schema_evaluations":100000,"max_results":256,"max_output_bytes":1048576},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["schema","instance"],"properties":{"schema":{"type":["object","boolean"],"additionalProperties":{"description":"Any JSON value (keyword value)."},"description":"A JSON Schema 2020-12 schema (object or boolean)."},"instance":{"description":"The JSON value to diagnose (any JSON value)."}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","count","truncated","missing"],"properties":{"valid":{"type":"boolean"},"count":{"type":"integer","minimum":0},"truncated":{"type":"boolean"},"missing":{"type":"array","maxItems":256,"items":{"type":"object","additionalProperties":false,"required":["instance_pointer","property","property_pointer","keyword_location","schema_pointer"],"properties":{"instance_pointer":{"type":"string","pattern":"^(?:/[\\s\\S]*)?$"},"property":{"type":"string"},"property_pointer":{"type":"string","pattern":"^(?:/[\\s\\S]*)?$"},"keyword_location":{"type":"string","pattern":"^(?:/[\\s\\S]*)?$"},"schema_pointer":{"type":"string","pattern":"^(?:/[\\s\\S]*)?$"}}}}}},"examples":[{"input":{"schema":{"type":"object","properties":{"user":{"type":"object","required":["id","email"]}},"required":["user","total"]},"instance":{"user":{"id":7}}},"output":{"valid":false,"count":2,"truncated":false,"missing":[{"instance_pointer":"","property":"total","property_pointer":"/total","keyword_location":"/required","schema_pointer":"/required"},{"instance_pointer":"/user","property":"email","property_pointer":"/user/email","keyword_location":"/properties/user/required","schema_pointer":"/properties/user/required"}]}},{"input":{"schema":{"items":{"required":["a/b"]}},"instance":[{"a/b":null},{}]},"output":{"valid":false,"count":1,"truncated":false,"missing":[{"instance_pointer":"/1","property":"a/b","property_pointer":"/1/a~1b","keyword_location":"/items/required","schema_pointer":"/items/required"}]}}],"execute_url":"/v1/tools/json-schema-required-missing/versions/1.0.0/execute"}