Found while reviewing #308 (JSON Schema 2019-09 support).
Problem
In src/parser/jsonParser.ts the keyword gate is:
if (keyword === 'dependencies') {
return context.schemaDraft <= SchemaDraft.v7;
}
When a schema does not declare $schema, effectiveDraft defaults to v2020_12. As a result, schemas that use the legacy dependencies keyword without declaring a draft will no longer have dependencies validated at all (silently dropped).
Existing tests cover dependencies with an explicit $schema (draft-07 enabled, 2019-09 disabled), but there is no test for the no-$schema case.
Question / suggested direction
Confirm this is intended. If backward compatibility matters for undeclared schemas, consider still honoring dependencies when no draft is declared, and add an explicit test.
Severity
Medium — possible backward-compat regression for schemas without $schema.
Found while reviewing #308 (JSON Schema 2019-09 support).
Problem
In
src/parser/jsonParser.tsthe keyword gate is:When a schema does not declare
$schema,effectiveDraftdefaults tov2020_12. As a result, schemas that use the legacydependencieskeyword without declaring a draft will no longer havedependenciesvalidated at all (silently dropped).Existing tests cover
dependencieswith an explicit$schema(draft-07 enabled, 2019-09 disabled), but there is no test for the no-$schemacase.Question / suggested direction
Confirm this is intended. If backward compatibility matters for undeclared schemas, consider still honoring
dependencieswhen no draft is declared, and add an explicit test.Severity
Medium — possible backward-compat regression for schemas without
$schema.