framework
framework copied to clipboard
Improve foreign keys validation
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.