Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix invalid json schema (required field) #172

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions schemas/deprecated.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"type": "object",
"additionalProperties": {
"type": "string"
},
"required": true
}
},
"replace": {
"type": "object",
Expand All @@ -19,6 +18,7 @@
}
}
},
"additionalProperties": false
"additionalProperties": false,
"required": ["old"]
}
}
43 changes: 20 additions & 23 deletions schemas/field.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"properties": {
"key": {
"description": "For documentation of a key",
"type": "string",
"required": true
"type": "string"
},
"value": {
"description": "For documentation of a tag (key and value)",
"type": "string"
}
},
"additionalProperties": false
"additionalProperties": false,
"required": ["key"]
},
{
"type": "object",
Expand Down Expand Up @@ -78,13 +78,11 @@
"url",
"wikidata",
"wikipedia"
],
"required": true
]
},
"label": {
"description": "English label for the field caption. A field can reference the label of another by using that field's identifier contained in brackets (e.g. {field}), in which case also the field's terms will be referenced from that field.",
"type": "string",
"required": true
"type": "string"
},
"geometry": {
"description": "If specified, only show the field for these kinds of geometry",
Expand Down Expand Up @@ -176,57 +174,55 @@
"properties": {
"key": {
"description": "The key of the required tag",
"type": "string",
"required": true
"type": "string"
}
},
"additionalProperties": false
"additionalProperties": false,
"required": ["key"]
},
{
"$id": "requires-key-equals-value",
"type": "object",
"properties": {
"key": {
"description": "The key of the required tag",
"type": "string",
"required": true
"type": "string"
},
"value": {
"description": "The value that the tag must have. (alternative to 'valueNot')",
"type": "string",
"required": true
"type": "string"
}
},
"additionalProperties": false
"additionalProperties": false,
"required": ["key", "value"]
},
{
"$id": "requires-key-not-value",
"type": "object",
"properties": {
"key": {
"description": "The key of the required tag",
"type": "string",
"required": true
"type": "string"
},
"valueNot": {
"description": "The value that the tag cannot have. (alternative to 'value')",
"type": "string",
"required": true
"type": "string"
}
},
"additionalProperties": false
"additionalProperties": false,
"required": ["key", "valueNot"]
},
{
"$id": "requires-not-key",
"type": "object",
"properties": {
"keyNot": {
"description": "A key that must not be present",
"type": "string",
"required": true
"type": "string"
}
},
"additionalProperties": false
"additionalProperties": false,
"required": ["keyNot"]
}
]
},
Expand Down Expand Up @@ -281,6 +277,7 @@
}
},
"additionalProperties": false,
"required": ["type", "label"],
"anyOf": [
{ "$id": "field-type-without-key-nor-keys", "properties": { "type": { "enum": ["restrictions"] } }, "allOf": [
{ "not": { "required": ["key"] }},
Expand Down
18 changes: 8 additions & 10 deletions schemas/preset.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"properties": {
"name": {
"description": "The English name for the feature. A preset can reference the label of another by using that preset's identifier contained in brackets (e.g. {preset}), in which case also the preset's aliases and terms will also be referenced from that preset.",
"type": "string",
"required": true
"type": "string"
},
"geometry": {
"description": "Valid geometry types for the feature, in order of preference",
Expand All @@ -16,16 +15,14 @@
"items": {
"type": "string",
"enum": ["point", "vertex", "line", "area", "relation"]
},
"required": true
}
},
"tags": {
"description": "Tags that must be present for the preset to match",
"type": "object",
"additionalProperties": {
"type": "string"
},
"required": true
}
},
"addTags": {
"description": "Tags that are added when changing to the preset (default is the same value as 'tags')",
Expand Down Expand Up @@ -93,15 +90,15 @@
"properties": {
"key": {
"description": "For documentation of a key",
"type": "string",
"required": true
"type": "string"
},
"value": {
"description": "For documentation of a tag (key and value)",
"type": "string"
}
},
"additionalProperties": false
"additionalProperties": false,
"required": ["key"]
},
"replacement": {
"description": "The ID of a preset that is preferable to this one",
Expand Down Expand Up @@ -129,5 +126,6 @@
"additionalProperties": false
}
},
"additionalProperties": false
"additionalProperties": false,
"required": ["name", "geometry", "tags"]
}
Loading