Skip to content

[finding] RestServer.normalizeConfig still discards the parsed api output — its ?? chain duplicates RestApiConfigSchema's defaults key for key, and the validate-only reason has expired #14366

Description

@os-trump

Blocked-by: #11984

Observation from #11984, which made normalizeConfig parse AND consume the four sibling sub-objects (crud / metadata / batch / routes) after measuring, per sub-object, that every key the method reads is one the schema declares. api was deliberately left as #11637 shaped it — validate-only, parsed output discarded, the normalized block built from a ?? chain over the raw cast — because flipping it is that seam's own change, not a rider on the siblings.

What is true on origin/main @ 08e49496f

Suggested shape

Consume the parse for api exactly as #11984 did for the siblings — parseDeclaredSubConfig('api', schemas.api, config.api) already returns the parsed output; build the api block from it and delete the ?? chain, keeping the .omit({ requireAuth: true }) and the version rationale. Pin: requireAuth: false still constructs and still warns via the plugin; every ?? default is now the schema's. Low risk, but it is a change to the seam #11637 / #12450 own and wants its own measurement; that is why it is filed rather than ridden on #11984.

Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions