Skip to content

Properties listed in required should be declared in properties #8

@gregsdennis

Description

@gregsdennis

This is implemented by AJV's strict mode.

Comments

I feel there are legitimate times when this is desired (e.g. inside an if/then/else or oneOf). Usually a parent schema can declare properties but the subschemas would only control which properties are required. - @gregsdennis

I don't thing we should do this one. The only way this would make sense is if you could analyze the whole schema (including external references) to determine if the property isn't declared in any sub-schema that applies to a location. To the best of my knowledge, that's way outside the capabilities of Spectral. - @jdesrosiers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions