framework icon indicating copy to clipboard operation
framework copied to clipboard

Improve foreign keys validation

Open roll opened this issue 3 years ago • 0 comments

Overview

Currently, in v5 we do normalizationfrom standards@1 in the Schema.from_descriptor step and lose some validation errors because of it e.g. missing foreignKeys.reference.resource. See this failing test:

def test_schema_metadata_not_valid_multiple_errors():
    schema = Schema.from_descriptor("data/schema-invalid-multiple-errors.json")
    assert len(schema.list_metadata_errors()) == 5

Also, it will be better to rebase on a proper ForeignKey class as it's error prone to work with dicts in the model.

roll avatar Aug 04 '22 08:08 roll