Found while covering content/docs/plugins/plugin-map.mdx for #5174 batch 5 (PR #7294). Filed unassigned and not fixed there — that PR's surface is the UNGATED_DOCS ledger plus three doc pages, and this is a package type.
What
ObjectMapSchema declares objectName as required:
exportinterfaceObjectMapSchemaextendsBaseSchema{type: 'object-map';objectName: string;// requireddata?: ViewData;staticData?: any[];
...
}The component does not need it. ObjectMap branches on staticDatafirst, and every other read of objectName is guarded:
packages/plugin-map/src/ObjectMap.tsx:153 — if (schema.staticData) { ... items: schema.staticData }, returning before the object branch.:160 — if (schema.objectName) for the object branch.:741 — if (!objectName) return; in the schema-fetch effect.:218, :279, :322 — memo keys all written schema.objectName ?? '', i.e. authored defensively for the absent case.
So the "Value Provider (Static)" route the docs teach — staticData plus a map field mapping, no objectName — is a supported, exercised path that the type rejects.
Measured
content/docs/plugins/plugin-map.mdx documents three static-data maps (basic "With Static Data", "Value Provider (Static)", and the venueMap example). PR #7294 annotates every other schema literal on that page with ObjectMapSchema and leaves these unannotated, because annotating them produces TS2741 for a missing property the component never reads. That is a deliberate hole in the page's gate coverage, and it closes when this is decided.
Two readings, not resolved here
objectName should be optional. It matches the component, it matches the memo keys already written ?? '', and it makes the documented static-data example expressible. Risk: objectName becomes optional for the object-provider route too, where it IS required — trading a false rejection for a missed one, unless expressed as a discriminated union.- A discriminated union.
staticData present ⇒ objectName optional; otherwise required. Precise, and it is the shape that would let a metadata author be told which keys their chosen provider needs. More type machinery, and ObjectMapSchema is referenced from ObjectQLComponentSchema and packages/plugin-map/dist/ObjectMap.d.ts, so the blast radius wants checking.
Reading 2 is the one that makes AI-authored metadata hard to get wrong, which is the direction this repo generally takes; reading 1 is the one-line version. Someone who owns the authoring contract should pick.
Reachability
Nothing breaks at runtime — static-data maps render today. The cost is type-level: a TypeScript author annotating a static-data map is told to supply an objectName that is never read, and the natural workaround is to invent a fake one, which then reaches the memo keys as real content.
Structurally the mirror of #5903 (ObjectGantt reads 11 keys ObjectGanttSchema does not declare — reads without declaration; this is a declaration without reads). Related: #5157 (whether ObjectMapConfigSchema should be .strict()).
Found while covering
content/docs/plugins/plugin-map.mdxfor #5174 batch 5 (PR #7294). Filed unassigned and not fixed there — that PR's surface is theUNGATED_DOCSledger plus three doc pages, and this is a package type.What
ObjectMapSchemadeclaresobjectNameas required:The component does not need it.
ObjectMapbranches onstaticDatafirst, and every other read ofobjectNameis guarded:packages/plugin-map/src/ObjectMap.tsx:153—if (schema.staticData) { ... items: schema.staticData }, returning before the object branch.:160—if (schema.objectName)for the object branch.:741—if (!objectName) return;in the schema-fetch effect.:218,:279,:322— memo keys all writtenschema.objectName ?? '', i.e. authored defensively for the absent case.So the "Value Provider (Static)" route the docs teach —
staticDataplus amapfield mapping, noobjectName— is a supported, exercised path that the type rejects.Measured
content/docs/plugins/plugin-map.mdxdocuments three static-data maps (basic "With Static Data", "Value Provider (Static)", and thevenueMapexample). PR #7294 annotates every other schema literal on that page withObjectMapSchemaand leaves these unannotated, because annotating them producesTS2741for a missing property the component never reads. That is a deliberate hole in the page's gate coverage, and it closes when this is decided.Two readings, not resolved here
objectNameshould be optional. It matches the component, it matches the memo keys already written?? '', and it makes the documented static-data example expressible. Risk:objectNamebecomes optional for the object-provider route too, where it IS required — trading a false rejection for a missed one, unless expressed as a discriminated union.staticDatapresent ⇒objectNameoptional; otherwise required. Precise, and it is the shape that would let a metadata author be told which keys their chosen provider needs. More type machinery, andObjectMapSchemais referenced fromObjectQLComponentSchemaandpackages/plugin-map/dist/ObjectMap.d.ts, so the blast radius wants checking.Reading 2 is the one that makes AI-authored metadata hard to get wrong, which is the direction this repo generally takes; reading 1 is the one-line version. Someone who owns the authoring contract should pick.
Reachability
Nothing breaks at runtime — static-data maps render today. The cost is type-level: a TypeScript author annotating a static-data map is told to supply an
objectNamethat is never read, and the natural workaround is to invent a fake one, which then reaches the memo keys as real content.Structurally the mirror of #5903 (
ObjectGanttreads 11 keysObjectGanttSchemadoes not declare — reads without declaration; this is a declaration without reads). Related: #5157 (whetherObjectMapConfigSchemashould be.strict()).