Skip to content

feat: pull schema from ngff page's dev branch - #85

Closed
jo-mueller wants to merge 2 commits into
ome:mainfrom
jo-mueller:pull-06-schemas
Closed

feat: pull schema from ngff page's dev branch#85
jo-mueller wants to merge 2 commits into
ome:mainfrom
jo-mueller:pull-06-schemas

Conversation

@jo-mueller

@jo-mueller jo-mueller commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This PR changes the location from which to pull the schemas to the dev subpage of the ngff page, see also ome/ngff#563. I'm not entirely sure why this previously worked with 0.6.dev4 hardcoded into the URL, though 🤔

@netlify

netlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploy Preview for ome-ngff-validator ready!

Name Link
🔨 Latest commit b6a8e8f
🔍 Latest deploy log https://app.netlify.com/projects/ome-ngff-validator/deploys/6a6b04ee1300e100084a73ce
😎 Deploy Preview https://deploy-preview-85--ome-ngff-validator.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@will-moore

Copy link
Copy Markdown
Member

It worked previously because the schema at e.g. https://raw.githubusercontent.com/ome/ngff-spec/refs/heads/main/schemas/image.schema had

"$id": "https://ngff.openmicroscopy.org/0.6.dev4/schemas/image.schema"

Now it has this: (which is why validation is failing)

"$id": "https://ngff.openmicroscopy.org/0.6rc0/schemas/image.schema"

@will-moore

Copy link
Copy Markdown
Member

Both these builds have the same issue:

https://ome.github.io/ome-ngff-validator/?source=https://livingobjects.ebi.ac.uk/idr/zarr/test-data/v0.6.dev4/idr0050/4995115_output_to_ms.zarr/4995115_cropped_700_700_400_400_rot45.zarr

https://deploy-preview-85--ome-ngff-validator.netlify.app/?source=https://livingobjects.ebi.ac.uk/idr/zarr/test-data/v0.6.dev4/idr0050/4995115_output_to_ms.zarr/4995115_cropped_700_700_400_400_rot45.zarr

Since the schema at https://ngff.openmicroscopy.org/dev/schemas/image.schema
also has:

"$id": "https://ngff.openmicroscopy.org/0.6rc0/schemas/image.schema",

But this PR sets something different:

schema["$id"] = `https://ngff.openmicroscopy.org/dev/schemas/${name}.schema`;

so that the validation library can't find any schema named https://ngff.openmicroscopy.org/0.6rc0/schemas/image.schema.

NB: it's really annoying that when I go to https://ngff.openmicroscopy.org/dev/schemas/image.schema in my browser, I am forced to download the schema instead of viewing it in the browser

@jo-mueller

jo-mueller commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

NB: it's really annoying that when I go to https://ngff.openmicroscopy.org/dev/schemas/image.schema in my browser, I am forced to download the schema instead of viewing it in the browser

This behavior can probably be changed somehow 🤔

An alternative (probably longer-lasting) fix is here: ome/ngff#564

This will expose the schemas under both

"$id": "https://ngff.openmicroscopy.org/0.6rc0/schemas/image.schema",
"$id": "https://ngff.openmicroscopy.org/dev/schemas/image.schema",

which makes sense, I think.

I'm not sure why this worked before for 0.6.devX and doesn't work anymore for 0.6rc0, but the linked PR should solve that on a more permanent basis.

@will-moore

Copy link
Copy Markdown
Member

It worked before because the schemas contain e.g.

"$id": "https://ngff.openmicroscopy.org/0.6.dev4/schemas/image.schema"

This corresponds to the id that we set in JavaScript:

schema["$id"] = `https://ngff.openmicroscopy.org/0.6.dev4/schemas/${name}.schema`;

NOW, the schemas have

"$id": "https://ngff.openmicroscopy.org/0.6rc0/schemas/image.schema"

but this is DOESN'T match the JavaScript:

schema["$id"] = `https://ngff.openmicroscopy.org/dev/schemas/${name}.schema`;

The problem is that the JavaScript doesn't know how the schemas are referenced within the schema, so we have to hard-code it.

@lubianat

lubianat commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@jo-mueller from what we discussed on the PR review, the current plan would be using the tags on ngff-spec directly, right? Also discussed on:

@lubianat

lubianat commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

+, using https://raw.githubusercontent.com/ome/ngff-spec/<version>/schemas/image.schema directly also fixes the
content negotiation/forced download issue, as GitHub opens the raw file in the browser by default

@lubianat lubianat mentioned this pull request Aug 5, 2026
@jo-mueller jo-mueller closed this Aug 12, 2026
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