Skip to content

Commit dca155d

Browse files
authored
yaml: disallow extra properties / fixes (#648)
As discussed during the recent editor meeting, we disallow extra top-level attributes in the PEtab yaml file to facilitate validation. Any additional information users might want to exclude can be handled via `extensions`. This also fixes some typos and a broken link in the schema.
1 parent 903398d commit dca155d

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

doc/v2/_static/petab_schema_v2.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# For syntax see: https://json-schema.org/understanding-json-schema/index.html
2-
#$schema: "https://json-schema.org/draft/2019-09/meta/core"
3-
$schema: "http://json-schema.org/draft-06/schema"
1+
# For syntax see: https://json-schema.org/understanding-json-schema
2+
$schema: "https://json-schema.org/draft/2020-12/schema"
43
description: PEtab parameter estimation problem config file schema
54

65
properties:
76

87
format_version:
9-
anyof:
8+
anyOf:
109
- type: string
1110
# (corresponding to PEP 440).
1211
pattern: ^([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*((a|b|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))?(\.dev(0|[1-9][0-9]*))?$
@@ -121,7 +120,9 @@ properties:
121120

122121
required:
123122
- format_version
124-
- parameter_file
123+
- parameter_files
125124
- model_files
126125
- observable_files
127126
- measurement_files
127+
128+
additionalProperties: false

0 commit comments

Comments
 (0)