diff --git a/dvc.lock b/dvc.lock index a1378cf..e5217c3 100644 --- a/dvc.lock +++ b/dvc.lock @@ -4,21 +4,21 @@ stages: cmd: ./gen.py > schema.json deps: - path: gen.py - md5: e49f62cdbd3ca8648a29c716ad19f14c - size: 5618 + md5: f288541652b71695ac41ffb3010c04e0 + size: 5621 outs: - path: schema.json - md5: 6dc7651926e6c6a7c035b26e011d4e72 - size: 11762 + md5: 0e60e20d728b734a770fc62532271c4f + size: 11671 check_updated: cmd: ./gen.py | diff schema.json - deps: - path: schema.json - md5: 6dc7651926e6c6a7c035b26e011d4e72 - size: 11762 + md5: 0e60e20d728b734a770fc62532271c4f + size: 11671 tests: cmd: pytest -vv tests.py deps: - path: schema.json - md5: 6dc7651926e6c6a7c035b26e011d4e72 - size: 11762 + md5: 0e60e20d728b734a770fc62532271c4f + size: 11671 diff --git a/examples/invalid/toplevel.extra.dvc.yaml b/examples/invalid/toplevel.extra.dvc.yaml new file mode 100644 index 0000000..ba7d6a6 --- /dev/null +++ b/examples/invalid/toplevel.extra.dvc.yaml @@ -0,0 +1,9 @@ +extra: foo + +stages: + stage1: + cmd: python train.py input output + deps: + - input + outs: + - output diff --git a/gen.py b/gen.py index 58bfdb7..b50c6ab 100755 --- a/gen.py +++ b/gen.py @@ -183,6 +183,7 @@ class DvcYamlModel(BaseModel): class Config: title = "dvc.yaml" + extra = "forbid" @staticmethod def schema_extra(schema: Dict[str, Any], _) -> None: diff --git a/schema.json b/schema.json index ae40a88..a2a1548 100644 --- a/schema.json +++ b/schema.json @@ -27,6 +27,7 @@ } } }, + "additionalProperties": false, "definitions": { "VarDecl": { "title": "VarDecl",