{"id":"json-schema-errors-format","version":"1.0.0","description":"Render JSON Schema output units as a 2020-12 basic or flag output document with fixed English error messages.","supported_operations":["turn json schema validation units into readable error messages","json schema 2020-12 basic output document from error units","error messages for llm retry prompt from schema validation errors","sort schema errors by instance location json pointer","render required property not found message","format json schema errors as flag or basic output"],"unsupported_operations":["validating an instance (use json-schema-output-validate first)","detailed or verbose hierarchical output structures","localized or user-supplied message templates","free-form error objects that are not output units"],"semantics":["Input errors are output units: {kind, keyword_location, absolute_keyword_location?, instance_location, keyword?, params?}. Assertion units need keyword and exactly the params listed for it (type: expected, actual; multipleOf, maximum, exclusiveMaximum, minimum, exclusiveMinimum: limit; maxLength, minLength, maxProperties, minProperties, maxItems, minItems: limit, count; required, properties, additionalProperties: property; prefixItems, items, allOf: index; uniqueItems: indexes; anyOf: branch_count; oneOf: branch_count, passing_count; enum, const, not, $ref, false_schema: none). Branch units carry neither. Locations must be RFC 6901 pointers; absolute_keyword_location must be <URI>#<RFC 6901 fragment>.","format is \"basic\" when omitted: {valid, errors:[{keyword_location, absolute_keyword_location?, instance_location, error}]} as in JSON Schema 2020-12 core 12.4.2 with snake_case keys; valid is true exactly when errors is empty. \"flag\" returns only {valid} (core 12.4.1).","order is \"evaluation\" when omitted (input order kept). \"instance_location\" sorts stably by instance_location, then keyword_location, comparing RFC 6901 tokens one by one: array-index tokens first in numeric order, other tokens by UTF-16 code units, a proper prefix first; equal keys keep input order.","Messages are fixed templates. Branch units: \"A subschema had errors.\"; required: \"Required property '<property>' not found.\"; additionalProperties: \"Additional property '<property>' found but was invalid.\"; minItems: \"Expected at least <limit> items but found <count>\" (these three wordings are the examples of core 12.4.2). Every template is listed in the README; property names are inserted verbatim and numbers use ECMAScript Number::toString.","No output cap is declared: each output unit is at most 96 bytes longer (as JSON) than its input unit, because it copies the locations, drops keyword and params, and adds one fixed template; so output stays within max_input_bytes + 256 x 96 bytes."],"limits":{"max_input_bytes":65536,"max_units":256},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["errors"],"properties":{"errors":{"type":"array","maxItems":256,"items":{"type":"object","additionalProperties":false,"required":["kind","keyword_location","instance_location"],"properties":{"kind":{"type":"string","enum":["assertion","branch"]},"keyword_location":{"type":"string"},"absolute_keyword_location":{"type":"string"},"instance_location":{"type":"string"},"keyword":{"type":"string","enum":["type","enum","const","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","required","maxProperties","minProperties","maxItems","minItems","uniqueItems","anyOf","oneOf","not","properties","additionalProperties","prefixItems","items","allOf","$ref","false_schema"]},"params":{"type":"object","additionalProperties":false,"properties":{"expected":{"type":"array","items":{"type":"string","enum":["array","boolean","integer","null","number","object","string"]}},"actual":{"type":"string","enum":["array","boolean","integer","null","number","object","string"]},"limit":{"type":"number"},"count":{"type":"integer","minimum":0},"property":{"type":"string"},"index":{"type":"integer","minimum":0},"indexes":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"integer","minimum":0}},"branch_count":{"type":"integer","minimum":1},"passing_count":{"type":"integer","minimum":0}}}}}},"format":{"type":"string","enum":["basic","flag"]},"order":{"type":"string","enum":["evaluation","instance_location"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid"],"properties":{"valid":{"type":"boolean"},"errors":{"type":"array","maxItems":256,"items":{"type":"object","additionalProperties":false,"required":["keyword_location","instance_location","error"],"properties":{"keyword_location":{"type":"string"},"absolute_keyword_location":{"type":"string"},"instance_location":{"type":"string"},"error":{"type":"string"}}}}}},"examples":[{"input":{"errors":[{"kind":"assertion","keyword_location":"/properties/age/minimum","instance_location":"/age","keyword":"minimum","params":{"limit":0}},{"kind":"assertion","keyword_location":"/required","instance_location":"","keyword":"required","params":{"property":"name"}}],"order":"instance_location"},"output":{"valid":false,"errors":[{"keyword_location":"/required","instance_location":"","error":"Required property 'name' not found."},{"keyword_location":"/properties/age/minimum","instance_location":"/age","error":"Expected a value at least 0."}]}},{"input":{"errors":[],"format":"flag"},"output":{"valid":true}}],"execute_url":"/v1/tools/json-schema-errors-format/versions/1.0.0/execute"}