@@ -78,21 +78,34 @@ title = "Contains iterations"
78
78
# Requirement 2.1: Either a single iteration in variable-based encoding #
79
79
# ########################################################################
80
80
81
- [[allOf .oneOf ]]
81
+ [allOf .if ]
82
+ properties.attributes.properties.iterationEncoding.oneOf = [
83
+ { const = { value = " variableBased" , datatype = " STRING" } },
84
+ { const = " variableBased" },
85
+ ]
86
+
87
+ [allOf .then ]
82
88
title = " Variable-based encoding"
83
89
properties.attributes.properties.iterationEncoding.properties.value = { const = " variableBased" }
84
90
85
- [allOf .oneOf .properties .data ]
91
+ [allOf .then .properties .data ]
86
92
type = " object"
87
93
title = " An iteration"
88
94
description = " A single iteration."
95
+
96
+ # Only require iteration data if snapshot attribute is defined
97
+ [allOf .then .properties .data .if ]
98
+ required = [" attributes" ]
99
+ properties.attributes.required = [" snapshot" ]
100
+
101
+ [allOf .then .properties .data .then ]
89
102
"$ref" = " iteration.json"
90
103
91
104
# ###########################################################################
92
105
# Requirement 2.2: Or multiple iterations in group- or file-based encoding #
93
106
# ###########################################################################
94
107
95
- [[ allOf .oneOf ] ]
108
+ [allOf .else ]
96
109
title = " Group-based (or file-based) encoding"
97
110
properties.attributes.properties.iterationEncoding.properties.value = { oneOf = [
98
111
{ const = " groupBased" },
@@ -101,22 +114,22 @@ properties.attributes.properties.iterationEncoding.properties.value = { oneOf =
101
114
102
115
# Base Path
103
116
104
- [allOf .oneOf .properties .data ]
117
+ [allOf .else .properties .data ]
105
118
type = " object"
106
119
title = " Base path"
107
120
description = " A map of all iterations/snapshots in the Series."
108
121
109
122
propertyNames.pattern = " ^(-?[0-9]*|attributes)$"
110
123
111
- [allOf .oneOf .properties .data .properties ]
124
+ [allOf .else .properties .data .properties ]
112
125
113
- [allOf .oneOf .properties .data .properties .attributes ]
126
+ [allOf .else .properties .data .properties .attributes ]
114
127
title = " Attribute layout"
115
128
description = " Custom attributes allowed, no required attributes defined."
116
129
"$ref" = " attributes.json"
117
130
118
131
# Base Path -> Iterations
119
132
120
- [allOf.oneOf .properties.data.patternProperties."^-?[0-9]*$"]
133
+ [allOf.else .properties.data.patternProperties."^-?[0-9]*$"]
121
134
title = " Iteration"
122
135
"$ref" = " iteration.json"
0 commit comments