Skip to content
Latchkey

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

  1. Read the JSON path and the quoted unexpected property.
  2. Fix the typo to a defined key, or remove the key.
  3. Re-run check-jsonschema to confirm.
Terminal
check-jsonschema --schemafile schema.json config.yaml

Point 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.yml

How 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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →