meta: also validate the schema for sources

When validating the manifest, now also validate the schema for
the supplied sources.
This commit is contained in:
Christian Kellner 2020-05-29 15:56:40 +02:00 committed by David Rheinsberg
parent 9930f6ebfb
commit 5891beab4e

View file

@ -473,4 +473,11 @@ def validate(manifest: Dict, index: Index) -> ValidationResult:
res = schema.validate(asm)
result.merge(res, path=["pipeline", "assembler"])
# sources
sources = manifest.get("sources", {})
for name, source in sources.items():
schema = index.get_schema("Source", name)
res = schema.validate(source)
result.merge(res, path=["sources", name])
return result