Skip to content

schema: fix reference to axes to use URLs, too - #203

Merged
jo-mueller merged 2 commits into
ome:mainfrom
jo-mueller:patch-fix-axes-reference
Sep 9, 2026
Merged

jo-mueller merged 2 commits into
ome:mainfrom
jo-mueller:patch-fix-axes-reference

Conversation

@jo-mueller

@jo-mueller jo-mueller commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Pointed out by @will-moore more here. The reference to the axes schema doesn't use the correct format because axes are not defined in the same schema document. This likely will need to be fixed for 0.1 .... 0.5 as well.

Edit: The axes schema doesn't sit in its own document for version 0.1...0.5, so this doesn't need to be backported 👍

@jo-mueller jo-mueller added the bug Something isn't working label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Automated Review URLs

Comment thread schemas/coordinate_systems.schema Outdated
@jo-mueller

jo-mueller commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

I was also just looking at the 0.5 branch, where axes don't exist in their own separate file, so it doesn't need to be referenced via an URL. I think this would be the only place where this fix needs to be made.

In fact, I don't see a compelling reason why the axes.schema has to be its own file (that a schema resolver would need to find) in the first place. axes metadata is only ever used inside coordinateSystems metadata. This design choice may have historic reasons (@bogovicj ?).

If nothing speaks against it, I could inline the axes.schema into the coordinate_systems.schema in a follow-up PR. Unless I end up breaking the validator or something like that

@will-moore

Copy link
Copy Markdown
Member

@jo-mueller Currently, the validator will try to load a axes.schema for v0.6 since it's hard-coded.
But with https://github.com/ome/ome-ngff-validator/pull/86/changes we detect find which schemas need loading dynamically. So it would be nice to get that in (which depends on ome/ngff#581) before inlining the axes.schema.

@lubianat lubianat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't have the complete background, but it is self contained and I trust @jo-mueller with the decision.

@jo-mueller
jo-mueller merged commit cf12979 into ome:main Sep 9, 2026
4 checks passed
@jo-mueller
jo-mueller deleted the patch-fix-axes-reference branch September 9, 2026 13:02
@will-moore

Copy link
Copy Markdown
Member

Thanks, this is fixed for v0.6.

It's still unchanged for v0.6.dev4 at https://raw.githubusercontent.com/ome/ngff-spec/0.6.dev4/schemas/coordinate_systems.schema but that's kinda minor issue now.
I'll leave the workaround in for that at ome/ome-ngff-validator#86 for now, which is OK.

@will-moore

Copy link
Copy Markdown
Member

https://deploy-preview-86--ome-ngff-validator.netlify.app/?source=https://radosgw.public.os.wwu.de/rfc5-transform-test-data/P2A_B6_M2_Scene_2.ome.zarr/ is giving an error:

can't resolve reference coordinate_systems.schema from id https://ngff.openmicroscopy.org/0.6/schemas/scene.schema

Which I haven't fully debugged, but I think is due to the different ways that schemas are referenced in
https://raw.githubusercontent.com/ome/ngff-spec/0.6/schemas/scene.schema

This has various refs:

"$ref": "https://ngff.openmicroscopy.org/0.6/schemas/_version.schema"
"$ref": "coordinate_systems.schema"
"$ref": "coordinate_transformations.schema#/$defs/coordinateTransformation",

The last 2 should probably look like:

"$ref": "https://ngff.openmicroscopy.org/0.6/schemas/_version.schema"
"$ref": "https://ngff.openmicroscopy.org/0.6/schemas/coordinate_systems.schema#/$defs/coordinateSystem"
"$ref": "https://ngff.openmicroscopy.org/0.6/schemas/coordinate_transformations.schema#/$defs/coordinateTransformation",

@jo-mueller

Copy link
Copy Markdown
Contributor Author

I think this should be fixed once ome/ngff#612 is merged. Currently, I think there's nothing on the ngff page that serves 0.6 schemas, because version 0.6 is available neither as a tag or a submodule.

  • Tag: 0.6 was tagged, but the page hasn't been rebuilt since then so the respective schemas aren't served accordingly
  • Submodule: See feat: add 0.6 to submodules ngff#612. This adds 0.6 as a submodule, the schemas should then be hardcopied to the ngff page's _html_extra from where the schemas are served.

@will-moore

Copy link
Copy Markdown
Member

OK, happy to wait and see, but even the raw schema https://github.com/ome/ngff-spec/blob/main/schemas/scene.schema has these different refs, similar to what was fixed in this PR above.
So it looks like they need the same fix?

clbarnes added a commit to clbarnes/ngff-spec that referenced this pull request Sep 15, 2026
ome#203

Co-Authored-By: Johannes Soltwedel <38459088+jo-mueller@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants