Schema object shape and extra field topic

JSON Schema additionalProperties unknown field and object shape tools

A local workflow for additionalProperties unknown-field blocking, extra-value typing, closed-object constraints, metadata maps, and pre-release object-shape drift checks.

Direct answer

When an API or config object should allow only a fixed field set, or should allow extra keys only when their values follow one rule, express that object shape with additionalProperties and validate a short sample locally. additionalProperties:false blocks unexpected fields such as debugNote or tempFlag. additionalProperties:{type:"string"} fits metadata maps, env maps, and labels, while JSON Patch can document the remove or move path used to fix drift.

Long-tail searches covered
JSON Schema additionalPropertiesextra field validationunknown field blockingclosed object validationobject shape driftmetadata map schemaJSON Schema extra property

Common lookup scenarios

Block unknown fields in orders or config objects

Confirm a closed object only allows whitelisted fields

Require metadata or label extra values to match one type

Debug object-shape drift and leftover debug fields

Review properties, patternProperties, extra-field rules, and remediation patches before release

Recommended workflow

  1. Format the schema and JSON sample
  2. Use properties for fixed-field allowlists
  3. Set additionalProperties to false or to a value schema
  4. Run Schema validation and inspect keyword plus instancePath
  5. Use key paths, Pointer, JSONPath, Deep Diff, and JSON Patch to trace unexpected fields and fixes

Related tool entries

A local workflow for additionalProperties unknown-field blocking, extra-value typing, closed-object constraints, metadata maps, and pre-release object-shape drift checks.

FAQ

When an API or config object should allow only a fixed field set, or should allow extra keys only when their values follow one rule, express that object shape with additionalProperties and validate a short sample locally. additionalProperties:false blocks unexpected fields such as debugNote or tempFlag. additionalProperties:{type:"string"} fits metadata maps, env maps, and labels, while JSON Patch can document the remove or move path used to fix drift.

What does additionalProperties:false block?

It rejects any extra key that is neither listed in properties nor matched by patternProperties, which is useful for fixed order, config, and API object shapes.

Why can extra-field behavior look confusing with allOf?

additionalProperties only sees properties and patternProperties in the same schema object. If your object shape is split across composed schemas, review where those fields are declared and validate with short isolated samples.

Continue with these topics

Searchable topic pages that group related tools, answer specific lookup intents, and make Chakan easier for search engines and AI systems to understand.

FinanceMust Do

Unified social credit code format and check-digit guide

A local-first guide to the 18-character unified social credit code structure, GB 32100-2015 check digit, authority/category segments, and safe validation boundaries.

Open topic
LifeMust Do

TDEE, BMR, sleep-cycle, and daily water-intake planning

A local-first planning topic that connects TDEE, BMR, BMI, healthy-weight range, sleep-cycle timing, and daily water-intake estimates without medical claims.

Open topic
FinanceMust Do

Stock profit, dividend yield, savings-goal, compound interest, and inflation planning

A safe formula-based topic for stock profit, dividend yield, savings-goal backsolving, monthly compounding, retirement gaps, inflation-adjusted purchasing power, ROI, CAGR, and target-price planning.

Open topic