Skip to content

Rename post-split "dependencies" to "schemaDependencies" #591

Closed
@handrews

Description

@handrews

Previously, we split the old dependencies keyword in two:

  • requiredDependencies is an assertion in the validation vocabulary, and behaves the same as the old string array form of dependencies
  • dependencies is an applicator in the core spec's applicator vocabulary, and only supports the old schema form

This makes dependencies incompatible from draft-07 to draft-08: anything using the string form is now incorrect and will not work. This is also confusing for schema authors migrating to draft-08: there is a non-obvious change and they need to change how they think about this keyword.

Instead, let's do a true split, and make the schema case schemaDependencies. This does two things:

  1. It makes the behavior clear from the name, in a way that is consistent with requiredDependencies
  2. It allows schema authors to continue using dependencies with its pre-draft-08 semantics as an extension keyword

The second point is particularly compelling. It also gives implementors the ability to continue to support the existing dependencies behavior with draft-08 (presumably as an opt-in, or even better with a custom meta-schema using the new vocabulary support allowing schema authors to declare dependencies as an extension- we could even offer a "draft-08-transitional" meta-schema that provides this).

I've been worried about breaking the dependencies keyword in this draft, and I think this is a much better solution for both clarity and migration support.

Thoughts? Paging some folks who weighed in on other dependencies issues: @erayd @markchart @pipobscure

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions