Skip to content

schema: publish the instance shape as #/$defs/instance#13

Merged
mbreissi merged 1 commit into
mainfrom
feat/instance-schema-alias
Jul 23, 2026
Merged

schema: publish the instance shape as #/$defs/instance#13
mbreissi merged 1 commit into
mainfrom
feat/instance-schema-alias

Conversation

@mbreissi

Copy link
Copy Markdown
Contributor

Adds a one-line $ref alias so this component's per-instance config shape is reachable at the fixed name #/$defs/instance, while keeping its domain name.

Why

The deployment compatibility guard (edgecommons/edgecommons, DESIGN-cli §8.5.5) and edgecommons component validate validate a component's own config in two parts: component.global against the schema root, and each component.instances[] entry against #/$defs/instance. Global and an instance are genuinely different shapes — both additionalProperties: false, and they share subschemas — so they cannot be merged into one document, and the tool needs a fixed name to find the instance shape without knowing this component's vocabulary.

What

One $ref in config.schema.json; the existing domain-named subschema is unchanged. Verified: the schema still parses, and every instance in this repo's own sample/test configs validates through the alias. No code reads the schema at runtime, so there is no behavior change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LsX7cWVGLszurNYMVwMJGo

The deployment compatibility guard and `edgecommons component validate`
resolve a component's per-instance config through the fixed name
`#/$defs/instance`. This adds a one-line $ref so the shape keeps its
domain name (`route`) while tooling can find it uniformly. No behavior
change: the component reads no schema at runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsX7cWVGLszurNYMVwMJGo
@mbreissi
mbreissi marked this pull request as ready for review July 23, 2026 17:40
@mbreissi
mbreissi merged commit 378d32a into main Jul 23, 2026
4 checks passed
@mbreissi
mbreissi deleted the feat/instance-schema-alias branch July 23, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant