{"record":{"id":"d7457adc84827fe4","repo":"conductor-oss/conductor","slug":"location-unknown-json-schema-keyword-key-at","errorCode":null,"errorMessage":"{location}: unknown JSON Schema keyword '{key}' at {path}. Allowed keywords: {SUPPORTED}.","messagePattern":"(.+?): unknown JSON Schema keyword '(.+?)' at (.+?)\\. Allowed keywords: (.+?)\\.","errorType":"validation","errorClass":"UnsupportedSchemaException","httpStatus":null,"severity":"error","filePath":"agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/util/SchemaSubsetValidator.java","lineNumber":147,"sourceCode":"            if (SUPPORTED.contains(key)) continue;\n            if (KNOWN_UNSUPPORTED.contains(key)) {\n                throw new UnsupportedSchemaException(\n                        location\n                                + \": uses unsupported JSON Schema keyword '\"\n                                + key\n                                + \"' at \"\n                                + (path.isEmpty() ? \"<root>\" : path)\n                                + \". The PAC runtime validator implements a Draft-07 subset; \"\n                                + \"keywords like $ref/allOf/oneOf/format would silently pass at \"\n                                + \"runtime, producing permissive validation. Restrict the schema \"\n                                + \"to: \"\n                                + String.join(\", \", SUPPORTED)\n                                + \".\");\n            }\n            // Unknown keyword — not in either set. Could be a typo, could be\n            // a custom extension. Either way, ambiguous behaviour at runtime:\n            // reject loudly.\n            throw new UnsupportedSchemaException(\n                    location\n                            + \": unknown JSON Schema keyword '\"\n                            + key\n                            + \"' at \"\n                            + (path.isEmpty() ? \"<root>\" : path)\n                            + \". Allowed keywords: \"\n                            + String.join(\", \", SUPPORTED)\n                            + \".\");\n        }\n\n        // Recurse into nested schemas via ``properties`` and ``items``.\n        Object props = schema.get(\"properties\");\n        if (props instanceof Map<?, ?> propsMap) {\n            for (Map.Entry<?, ?> entry : propsMap.entrySet()) {\n                Object subSchema = entry.getValue();\n                if (subSchema instanceof Map<?, ?> subMap) {\n                    validateInternal(\n                            (Map<String, Object>) subMap,","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/util/SchemaSubsetValidator.java#L129-L165","documentation":"SchemaSubsetValidator.validate throws UnsupportedSchemaException when a schema contains a key that is neither in the SUPPORTED set nor in KNOWN_UNSUPPORTED — i.e. a typo or a custom/extension keyword. The runtime inline validator would ignore an unknown key (silent permissive validation), so this guard rejects loudly to surface the mistake.","triggerScenarios":"A schema with a misspelled keyword (`requireed`, `properites`), a vendor extension (`x-foo`), or a Draft-04/2019-09 keyword outside both sets. validate() iterates keys, finds one in neither set, and throws.","commonSituations":"Typo in a hand-written schema; copy-paste from an OpenAPI spec that uses `x-` extensions; mismatch between the Draft version the author had in mind and the supported subset.","solutions":["Compare the offending key against the SUPPORTED list in the error message — fix typos to match a supported keyword.","Remove vendor/extension (`x-*`) keys; they have no runtime effect anyway.","If you believe the keyword should be supported, add it to SUPPORTED in SchemaSubsetValidator AND implement it in JavaScriptBuilder.schemaValidatorScript (the two sets must stay in lockstep)."],"exampleFix":"// before\n{\"type\": \"object\", \"properites\": {\"x\": {\"type\": \"string\"}}, \"x-meta\": 1}\n// after\n{\"type\": \"object\", \"properties\": {\"x\": {\"type\": \"string\"}}}","handlingStrategy":"validation","validationCode":"try {\n    SchemaSubsetValidator.validate(schemaMap, \"tool/my-tool\");\n} catch (UnsupportedSchemaException e) {\n    // unknown keyword — surface so the author can fix the typo / drop the extension\n    throw new IllegalArgumentException(e.getMessage(), e);\n}","typeGuard":"boolean usesOnlyKnownKeywords(Map<String,Object> schema) {\n    try { SchemaSubsetValidator.validate(schema, \"precheck\"); return true; }\n    catch (UnsupportedSchemaException e) { return false; }\n}","tryCatchPattern":"try { SchemaSubsetValidator.validate(schema, location); }\ncatch (UnsupportedSchemaException e) { return badRequest(e.getMessage()); }","preventionTips":["Spell-check every schema keyword against the SUPPORTED list.","Drop vendor (`x-*`) extensions.","Lint schemas in CI with SchemaSubsetValidator."],"tags":["agentspan","json-schema","validation","typo","schema-subset"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}