Skip to content

RFC-4: give the orientation slot its range directly - #599

Merged
thewtex merged 1 commit into
ome:mainfrom
vboussot:rfc4-orientation-slot-range
Sep 3, 2026
Merged

RFC-4: give the orientation slot its range directly#599
thewtex merged 1 commit into
ome:mainfrom
vboussot:rfc4-orientation-slot-range

Conversation

@vboussot

Copy link
Copy Markdown
Contributor

orientation on SpaceAxis carries a one-element any_of and no range, so the generator emits the default string range beside the reference:

"anyOf": [{"$ref": "#/$defs/AnatomicalOrientation"}, {"type": "null"}],
"type": "string"

Both constraints apply, so this branch of the schema rejects every oriented axis and null alike; a document only validates through the generic Axis branch of the axes anyOf, which checks less than SpaceAxis means to.

Stating the range directly removes the stray type, keeps the null branch the description promises, and lets orientation.ts type the attribute AnatomicalOrientation rather than string. Regenerated with pixi run gen-all; the markdown keeps the orphan: true front matter from 0d68c8b.

Independent of #595, which touches the same generated files; whichever merges second regenerates cleanly.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Review URLs

`orientation` carried a one-element `any_of` and no `range`, so the
generator emitted the default string range beside the reference:

    "anyOf": [{"$ref": "#/$defs/AnatomicalOrientation"}, {"type": "null"}],
    "type": "string"

Both apply, so the SpaceAxis branch rejected every oriented axis and null
alike; validators only pass through the generic Axis branch of the axes
anyOf. With the range stated directly the stray type is gone, the null
branch stays, and `orientation.ts` types the attribute
`AnatomicalOrientation` rather than `string`.

The markdown keeps the `orphan: true` front matter 0d68c8b added by hand.
@vboussot
vboussot force-pushed the rfc4-orientation-slot-range branch from 0607f43 to c6395ce Compare September 1, 2026 00:55

@thewtex thewtex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@thewtex
thewtex merged commit 476090e into ome:main Sep 3, 2026
4 checks passed
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.

3 participants