You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some schemas erroneously pass strict validation checks #5991
If a schema isn't included in ajvNotStrictMode, it should be subject to strict validation in its entirety. That means that the use of type unions in schemas should result in strict validation failing with the following error message:
Error: strict mode: use allowUnionTypes to allow union type keyword at "..." (strictTypes)
❌ Actual Behavior
Strict validation passes in exceptional circumstances.
JSON, YAML, or TOML file that does not work.
The current revision of host-meta.json, whose issues have since been fixed in #5990. Other such cases exist.
I haven't seen this issue arise in quite some time, so I'm wondering if this issue is specific to schemas using draft-04, or otherwise prior to draft-07.
In the build system, I believe we don't enable all strict validation checks, but a large subset. Maybe this is what is being encountered? In the past, we also have excluded some large files from certain checks (separate from ajvNotStrictMode). But I'm not sure if host-meta.json is one of them.
That's the thing. In migration, I've frequently encountered this error, which is why "type": [ is one of the first things I check for. If there's a separate exclusion from ajvNotStrictMode, for some reason, it's highly likely to be the cause. Although, I searched the entire repository for the text host-meta, and it only appeared in schemas and their corresponding catalog entry, so I'm not sure where this extraneous exclusion would be located, assuming it's based on file names, rather than size.
Activity
Vessel9817 commentedon Aug 31, 2026
I haven't seen this issue arise in quite some time, so I'm wondering if this issue is specific to schemas using draft-04, or otherwise prior to draft-07.
Vessel9817 commentedon Sep 6, 2026
As demonstrated by 2633e7a (draft-07), this is an incorrect assumption.
hyperupcall commentedon Sep 15, 2026
In the build system, I believe we don't enable all strict validation checks, but a large subset. Maybe this is what is being encountered? In the past, we also have excluded some large files from certain checks (separate from
ajvNotStrictMode). But I'm not sure ifhost-meta.jsonis one of them.Vessel9817 commentedon Sep 15, 2026
That's the thing. In migration, I've frequently encountered this error, which is why
"type": [is one of the first things I check for. If there's a separate exclusion fromajvNotStrictMode, for some reason, it's highly likely to be the cause. Although, I searched the entire repository for the texthost-meta, and it only appeared in schemas and their corresponding catalog entry, so I'm not sure where this extraneous exclusion would be located, assuming it's based on file names, rather than size.Merge upstream/master into strict-validation-5991 (resolves SchemaSto…
Migrate null type unions to anyOf in strict schemas (#5991) (#6362)
Migrate null type unions to anyOf in strict schemas (#5991) batch 2 (#…