summaryrefslogtreecommitdiff
path: root/ext/data/schemas/dictionary-term-meta-bank-v3-schema.json
diff options
context:
space:
mode:
Diffstat (limited to 'ext/data/schemas/dictionary-term-meta-bank-v3-schema.json')
-rw-r--r--ext/data/schemas/dictionary-term-meta-bank-v3-schema.json28
1 files changed, 26 insertions, 2 deletions
diff --git a/ext/data/schemas/dictionary-term-meta-bank-v3-schema.json b/ext/data/schemas/dictionary-term-meta-bank-v3-schema.json
index 206e7152..96f2e54b 100644
--- a/ext/data/schemas/dictionary-term-meta-bank-v3-schema.json
+++ b/ext/data/schemas/dictionary-term-meta-bank-v3-schema.json
@@ -1,5 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
+ "definitions": {
+ "frequency": {
+ "oneOf": [
+ {
+ "type": ["string", "number"]
+ },
+ {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "value"
+ ],
+ "properties": {
+ "value": {
+ "type": "number"
+ },
+ "displayValue": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ }
+ },
"type": "array",
"description": "Custom metadata for terms.",
"additionalItems": {
@@ -28,7 +52,7 @@
{
"oneOf": [
{
- "type": ["number"],
+ "$ref": "#/definitions/frequency",
"description": "Frequency information for the term."
},
{
@@ -44,7 +68,7 @@
"description": "Reading for the term."
},
"frequency": {
- "type": ["number"],
+ "$ref": "#/definitions/frequency",
"description": "Frequency information for the term."
}
}