check-jsonschema "Additional properties are not allowed" in CI
check-jsonschema validated your file against a schema with additionalProperties: false and found a key it does not define. It reports "Additional properties are not allowed ('X' was unexpected)".
What this error means
check-jsonschema fails with a per-file error like "Additional properties are not allowed ('labals' was unexpected)" pointing at the unknown key.
check-jsonschema
config.yaml::$.metadata: Additional properties are not allowed ('labals' was unexpected)Common causes
A typo in a key name
A misspelled key (labals for labels) is not defined in the schema, and strict schemas forbid unknown keys.
A field newer than the schema
The config uses a valid but recently added field the pinned schema does not include yet.
How to fix it
Correct or remove the unexpected key
- Read the JSON path and the quoted unexpected property.
- Fix the typo to a defined key, or remove the key.
- Re-run check-jsonschema to confirm.
Terminal
check-jsonschema --schemafile schema.json config.yamlPoint at a newer built-in schema
If a bundled schema lags, use --builtin-schema with a current name or supply an updated --schemafile.
Terminal
check-jsonschema --builtin-schema vendor.github-workflows .github/workflows/ci.ymlHow to prevent it
- Keep the referenced schema version current.
- Run check-jsonschema in a pre-commit hook to catch typos early.
- Review config and schema changes together.
Related guides
ajv "must NOT have additional properties" in CIFix ajv "must NOT have additional properties" in CI - the data contains a key the schema does not define whil…
check-jsonschema "Invalid JSON" parse error in CIFix check-jsonschema "Failed to parse ...: Invalid JSON" in CI - the instance or schema file is not valid JSO…
ajv "must have required property" validation error in CIFix ajv "must have required property 'X'" in CI - the JSON/YAML document is missing a field the JSON Schema m…