Skip to content

Commit

Permalink
🍱 Fix json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Feb 14, 2024
1 parent 9817232 commit 98a9ee0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
24 changes: 12 additions & 12 deletions src/zathura_language_server/assets/json/zathurarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@
"properties": {
"normal": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -625,12 +626,12 @@
null
]
}
},
"uniqueItems": true
}
}
},
"fullscreen": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -749,12 +750,12 @@
null
]
}
},
"uniqueItems": true
}
}
},
"presentation": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -873,12 +874,12 @@
null
]
}
},
"uniqueItems": true
}
}
},
"index": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -997,8 +998,7 @@
null
]
}
},
"uniqueItems": true
}
}
}
}
Expand All @@ -1010,8 +1010,8 @@
"properties": {
"normal": {
"type": "array",
"uniqueItems": true,
"items": {
"uniqueItems": true,
"anyOf": [
{
"type": "string",
Expand Down Expand Up @@ -1058,8 +1058,8 @@
},
"fullscreen": {
"type": "array",
"uniqueItems": true,
"items": {
"uniqueItems": true,
"anyOf": [
{
"type": "string",
Expand Down Expand Up @@ -1106,8 +1106,8 @@
},
"presentation": {
"type": "array",
"uniqueItems": true,
"items": {
"uniqueItems": true,
"anyOf": [
{
"type": "string",
Expand Down Expand Up @@ -1154,8 +1154,8 @@
},
"index": {
"type": "array",
"uniqueItems": true,
"items": {
"uniqueItems": true,
"anyOf": [
{
"type": "string",
Expand Down
5 changes: 3 additions & 2 deletions src/zathura_language_server/misc/zathurarc.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ def init_schema() -> dict[str, Any]:
for mode in ["normal", "fullscreen", "presentation", "index"]:
schemas[filetype]["properties"]["unmap"]["properties"][mode] = {
"type": "array",
"items": {"uniqueItems": True, "anyOf": anyOf},
"uniqueItems": True,
"items": {"anyOf": anyOf},
}
schemas[filetype]["properties"]["map"]["properties"][mode] = {
"type": "array",
"uniqueItems": True,
"items": {
"type": "object",
"additionalProperties": False,
Expand All @@ -120,7 +122,6 @@ def init_schema() -> dict[str, Any]:
"function": {"type": "string", "enum": functions},
"argument": {"type": "string", "enum": arguments + [None]},
},
"uniqueItems": True,
},
}

Expand Down

0 comments on commit 98a9ee0

Please sign in to comment.