@openmixer/omx-contract 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/FreeMixer/omx-contract/raw/main/schema/omx-contract.schema.json",
4
4
  "title": "omx-contract data file",
5
- "description": "A map from an export name to one item: a scalar, a travels table or travel, a sheet, a list or a plugin's parameter selection. GPL-3.0-or-later.",
5
+ "description": "A map from an export name to one item: a scalar, a travels table or travel, a sheet or a list. GPL-3.0-or-later.",
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "$schema": { "type": "string" }
@@ -11,8 +11,8 @@
11
11
  "additionalProperties": { "$ref": "#/$defs/item" },
12
12
  "$defs": {
13
13
  "unit": {
14
- "description": "The closed list of units the items use; \"\" is a ratio or a fraction.",
15
- "enum": ["dB", "dBFS", "ms", "s", "min", "Hz", "oct", "cents", "%", ""]
14
+ "description": "The closed list of units the items use; \"x\" is a multiplier, \"\" is a ratio or a fraction.",
15
+ "enum": ["dB", "dBFS", "ms", "s", "min", "Hz", "oct", "cents", "%", "x", ""]
16
16
  },
17
17
  "text": { "type": "string", "minLength": 1 },
18
18
  "name": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]*$" },
@@ -97,7 +97,7 @@
97
97
  "fields": {
98
98
  "type": "object",
99
99
  "propertyNames": { "pattern": "^[a-z][A-Za-z0-9]*$" },
100
- "additionalProperties": { "$ref": "#/$defs/travel" },
100
+ "additionalProperties": { "oneOf": [{ "$ref": "#/$defs/travel" }, { "$ref": "#/$defs/ref" }] },
101
101
  "minProperties": 1
102
102
  },
103
103
  "travel": { "$ref": "#/$defs/travel" },
@@ -149,45 +149,15 @@
149
149
  "required": ["kind", "doc", "unit", "values"],
150
150
  "additionalProperties": false
151
151
  },
152
- "param": {
153
- "type": "object",
154
- "properties": {
155
- "symbol": { "type": "string", "pattern": "^[a-z][A-Za-z0-9]*$" },
156
- "from": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]*(\\.[a-z][A-Za-z0-9]*)?$" },
157
- "forKind": { "type": "string", "pattern": "^[a-z][A-Za-z0-9]*$" },
158
- "flags": { "type": "array", "items": { "enum": ["toggle"] }, "uniqueItems": true },
159
- "scale": { "enum": ["linear", "log"] },
160
- "since": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
161
- "doc": { "$ref": "#/$defs/text" }
162
- },
163
- "required": ["symbol", "from", "scale", "since"],
164
- "additionalProperties": false
165
- },
166
- "plugin": {
167
- "type": "object",
168
- "properties": {
169
- "kind": { "const": "plugin" },
170
- "doc": { "$ref": "#/$defs/text" },
171
- "why": { "$ref": "#/$defs/text" },
172
- "plugin": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
173
- "header": { "type": "string", "pattern": "^omx_[a-z0-9_]+_params\\.h$" },
174
- "prefix": { "type": "string", "pattern": "^OMX_[A-Z0-9_]+$" },
175
- "source": { "$ref": "#/$defs/text" },
176
- "params": { "type": "array", "items": { "$ref": "#/$defs/param" }, "minItems": 1 }
177
- },
178
- "required": ["kind", "doc", "plugin", "header", "prefix", "source", "params"],
179
- "additionalProperties": false
180
- },
181
152
  "item": {
182
153
  "type": "object",
183
154
  "required": ["kind"],
184
- "properties": { "kind": { "enum": ["scalar", "travels", "sheet", "list", "plugin"] } },
155
+ "properties": { "kind": { "enum": ["scalar", "travels", "sheet", "list"] } },
185
156
  "allOf": [
186
157
  { "if": { "properties": { "kind": { "const": "scalar" } } }, "then": { "$ref": "#/$defs/scalar" } },
187
158
  { "if": { "properties": { "kind": { "const": "travels" } } }, "then": { "$ref": "#/$defs/travels" } },
188
159
  { "if": { "properties": { "kind": { "const": "sheet" } } }, "then": { "$ref": "#/$defs/sheet" } },
189
- { "if": { "properties": { "kind": { "const": "list" } } }, "then": { "$ref": "#/$defs/list" } },
190
- { "if": { "properties": { "kind": { "const": "plugin" } } }, "then": { "$ref": "#/$defs/plugin" } }
160
+ { "if": { "properties": { "kind": { "const": "list" } } }, "then": { "$ref": "#/$defs/list" } }
191
161
  ]
192
162
  }
193
163
  }