aboutsummaryrefslogtreecommitdiff
path: root/ext/data/schemas/dictionary-kanji-meta-bank-v3-schema.json
diff options
context:
space:
mode:
Diffstat (limited to 'ext/data/schemas/dictionary-kanji-meta-bank-v3-schema.json')
-rw-r--r--ext/data/schemas/dictionary-kanji-meta-bank-v3-schema.json26
1 files changed, 25 insertions, 1 deletions
diff --git a/ext/data/schemas/dictionary-kanji-meta-bank-v3-schema.json b/ext/data/schemas/dictionary-kanji-meta-bank-v3-schema.json
index 49f7c813..0864c9aa 100644
--- a/ext/data/schemas/dictionary-kanji-meta-bank-v3-schema.json
+++ b/ext/data/schemas/dictionary-kanji-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 kanji characters.",
"additionalItems": {
@@ -17,7 +41,7 @@
"description": "Type of data. \"freq\" corresponds to frequency information."
},
{
- "type": ["number"],
+ "$ref": "#/definitions/frequency",
"description": "Data for the character."
}
]