Skip to content

Cannot pass JSONSchema7 schema to compile as it requires JSONSchema4 #359

@G-Rath

Description

@G-Rath

Currently the types are using JSONSchema4 as the type for schema, which means TypeScript won't let you pass objects of type JSONSchema7 due to type differences.

Specifically, exclusiveMaximum & exclusiveMinimum are typed as boolean | undefined in JSONSchema4, but as number | undefined in JSONSchema7. (there probably are more differences - I've not compared the two further than that).

I think the right type to use would be a union of the different schemas supported, i.e JSONSchema7 | JSONSchema4.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions