Skip to content

[native_assets_cli] Should then protocol extension schemas not 'extend' the base schema? #2085

Closed
@dcharkes

Description

@dcharkes

#2064 (comment)

In #2064 the protocol extensions extend the base schema. This means that if we combine two extensions together we would run validation rules twice. It could be cleaner if the extensions don't actually $refer to the base schema.

On the other hand, not referring to the base schema means it's not immediately visible that this is meant as an extension. So, we'd lose that explicitness.

For correctness it doesn't matter, running the same validation rules doesn't change the semantics.

For performance it might or might not matter. Validators should/could be optimizing redundant checks away. Using deep stacks allOf and anyOf seems fairly common in schemas. And running 600+ tests runs <1.0s in that PR.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions