From ed81b12c447f04f4dce3679fdb054eadea816e58 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sat, 30 Apr 2022 01:53:59 +0200 Subject: [PATCH] Regenerate schemas, see #789 --- Docs/Schemas/FilterConfigJson.schema.json | 1 + Docs/Schemas/FilterConfigJsonJSC.ts | 1 + Docs/Schemas/LayerConfigJson.schema.json | 72 +++++++++++++++++-- Docs/Schemas/LayerConfigJsonJSC.ts | 71 ++++++++++++++++-- Docs/Schemas/LayoutConfigJson.schema.json | 72 +++++++++++++++++-- Docs/Schemas/LayoutConfigJsonJSC.ts | 71 ++++++++++++++++-- .../LineRenderingConfigJson.schema.json | 6 +- Docs/Schemas/LineRenderingConfigJsonJSC.ts | 6 +- Docs/Schemas/MoveConfigJson.schema.json | 2 +- Docs/Schemas/MoveConfigJsonJSC.ts | 2 +- .../PointRenderingConfigJson.schema.json | 6 +- Docs/Schemas/PointRenderingConfigJsonJSC.ts | 6 +- ...tionableTagRenderingConfigJson.schema.json | 4 +- .../QuestionableTagRenderingConfigJsonJSC.ts | 4 +- Docs/Schemas/RewritableConfigJson.schema.json | 5 +- Docs/Schemas/RewritableConfigJsonJSC.ts | 5 +- .../TagRenderingConfigJson.schema.json | 2 +- Docs/Schemas/TagRenderingConfigJsonJSC.ts | 2 +- Docs/Schemas/TilesourceConfigJson.schema.json | 65 +++++++++++++++-- Docs/Schemas/TilesourceConfigJsonJSC.ts | 64 +++++++++++++++-- Docs/Schemas/UnitConfigJson.schema.json | 2 +- Docs/Schemas/UnitConfigJsonJSC.ts | 2 +- assets/layoutconfigmeta.json | 10 +++ 23 files changed, 423 insertions(+), 58 deletions(-) diff --git a/Docs/Schemas/FilterConfigJson.schema.json b/Docs/Schemas/FilterConfigJson.schema.json index ad6acfd29..5e5019560 100644 --- a/Docs/Schemas/FilterConfigJson.schema.json +++ b/Docs/Schemas/FilterConfigJson.schema.json @@ -31,6 +31,7 @@ "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/FilterConfigJsonJSC.ts b/Docs/Schemas/FilterConfigJsonJSC.ts index d8c787f83..014ec8b6f 100644 --- a/Docs/Schemas/FilterConfigJsonJSC.ts +++ b/Docs/Schemas/FilterConfigJsonJSC.ts @@ -31,6 +31,7 @@ export default { "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/LayerConfigJson.schema.json b/Docs/Schemas/LayerConfigJson.schema.json index b453cb0c7..7b46dfbdc 100644 --- a/Docs/Schemas/LayerConfigJson.schema.json +++ b/Docs/Schemas/LayerConfigJson.schema.json @@ -192,6 +192,9 @@ }, { "$ref": "#/definitions/default_5" + }, + { + "$ref": "#/definitions/default" } ] } @@ -212,7 +215,7 @@ "type": "object", "properties": { "title": { - "description": "The title - shown on the 'add-new'-button." + "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!" }, "tags": { "description": "The tags to add. It determines the icon too", @@ -290,7 +293,7 @@ } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", + "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", "type": "array", "items": { "anyOf": [ @@ -427,7 +430,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -462,7 +465,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -571,7 +574,7 @@ "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -713,7 +716,7 @@ ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -752,6 +755,61 @@ }, "additionalProperties": false }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ], + "additionalProperties": false + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -918,6 +976,7 @@ "additionalProperties": false }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -1008,6 +1067,7 @@ "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/LayerConfigJsonJSC.ts b/Docs/Schemas/LayerConfigJsonJSC.ts index 1153ffb2d..19fb40134 100644 --- a/Docs/Schemas/LayerConfigJsonJSC.ts +++ b/Docs/Schemas/LayerConfigJsonJSC.ts @@ -192,6 +192,9 @@ export default { }, { "$ref": "#/definitions/default_5" + }, + { + "$ref": "#/definitions/default" } ] } @@ -212,7 +215,7 @@ export default { "type": "object", "properties": { "title": { - "description": "The title - shown on the 'add-new'-button." + "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!" }, "tags": { "description": "The tags to add. It determines the icon too", @@ -290,7 +293,7 @@ export default { } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", + "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", "type": "array", "items": { "anyOf": [ @@ -426,7 +429,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -460,7 +463,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -567,7 +570,7 @@ export default { "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -708,7 +711,7 @@ export default { ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -746,6 +749,60 @@ export default { } } }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ] + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -911,6 +968,7 @@ export default { } }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -1000,6 +1058,7 @@ export default { "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/LayoutConfigJson.schema.json b/Docs/Schemas/LayoutConfigJson.schema.json index 47f2bd9a1..ec1bd4df9 100644 --- a/Docs/Schemas/LayoutConfigJson.schema.json +++ b/Docs/Schemas/LayoutConfigJson.schema.json @@ -324,7 +324,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -359,7 +359,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -468,7 +468,7 @@ "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -610,7 +610,7 @@ ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -649,6 +649,61 @@ }, "additionalProperties": false }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ], + "additionalProperties": false + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -815,6 +870,7 @@ "additionalProperties": false }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -905,6 +961,7 @@ "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { @@ -1262,6 +1319,9 @@ }, { "$ref": "#/definitions/default_5" + }, + { + "$ref": "#/definitions/default" } ] } @@ -1282,7 +1342,7 @@ "type": "object", "properties": { "title": { - "description": "The title - shown on the 'add-new'-button." + "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!" }, "tags": { "description": "The tags to add. It determines the icon too", @@ -1360,7 +1420,7 @@ } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", + "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", "type": "array", "items": { "anyOf": [ diff --git a/Docs/Schemas/LayoutConfigJsonJSC.ts b/Docs/Schemas/LayoutConfigJsonJSC.ts index f80e08e10..7b03e721b 100644 --- a/Docs/Schemas/LayoutConfigJsonJSC.ts +++ b/Docs/Schemas/LayoutConfigJsonJSC.ts @@ -323,7 +323,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -357,7 +357,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -464,7 +464,7 @@ export default { "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -605,7 +605,7 @@ export default { ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -643,6 +643,60 @@ export default { } } }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ] + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -808,6 +862,7 @@ export default { } }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -897,6 +952,7 @@ export default { "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { @@ -1249,6 +1305,9 @@ export default { }, { "$ref": "#/definitions/default_5" + }, + { + "$ref": "#/definitions/default" } ] } @@ -1269,7 +1328,7 @@ export default { "type": "object", "properties": { "title": { - "description": "The title - shown on the 'add-new'-button." + "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!" }, "tags": { "description": "The tags to add. It determines the icon too", @@ -1347,7 +1406,7 @@ export default { } }, "tagRenderings": { - "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", + "description": "All the tag renderings.\nA tag rendering is a block that either shows the known value or asks a question.\n\nRefer to the class `TagRenderingConfigJson` to see the possibilities.\n\nNote that we can also use a string here - where the string refers to a tag rendering defined in `assets/questions/questions.json`,\nwhere a few very general questions are defined e.g. website, phone number, ...\nFurthermore, _all_ the questions of another layer can be reused with `otherlayer.*`\nIf you need only a single of the tagRenderings, use `otherlayer.tagrenderingId`\nIf one or more questions have a 'group' or 'label' set, select all the entries with the corresponding group or label with `otherlayer.*group`\nRemark: if a tagRendering is 'lent' from another layer, the 'source'-tags are copied and added as condition.\nIf they are not wanted, remove them with an override\n\nA special value is 'questions', which indicates the location of the questions box. If not specified, it'll be appended to the bottom of the featureInfobox.\n\nAt last, one can define a group of renderings where parts of all strings will be replaced by multiple other strings.\nThis is mainly create questions for a 'left' and a 'right' side of the road.\nThese will be grouped and questions will be asked together", "type": "array", "items": { "anyOf": [ diff --git a/Docs/Schemas/LineRenderingConfigJson.schema.json b/Docs/Schemas/LineRenderingConfigJson.schema.json index 77bad73ac..a852559fd 100644 --- a/Docs/Schemas/LineRenderingConfigJson.schema.json +++ b/Docs/Schemas/LineRenderingConfigJson.schema.json @@ -50,7 +50,7 @@ ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -124,7 +124,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -159,7 +159,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/LineRenderingConfigJsonJSC.ts b/Docs/Schemas/LineRenderingConfigJsonJSC.ts index 1c35298ec..5f4e0a443 100644 --- a/Docs/Schemas/LineRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/LineRenderingConfigJsonJSC.ts @@ -50,7 +50,7 @@ export default { ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -123,7 +123,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -157,7 +157,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/MoveConfigJson.schema.json b/Docs/Schemas/MoveConfigJson.schema.json index 74106b056..d248960be 100644 --- a/Docs/Schemas/MoveConfigJson.schema.json +++ b/Docs/Schemas/MoveConfigJson.schema.json @@ -47,7 +47,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { diff --git a/Docs/Schemas/MoveConfigJsonJSC.ts b/Docs/Schemas/MoveConfigJsonJSC.ts index 0d7dede65..9c62ce5ca 100644 --- a/Docs/Schemas/MoveConfigJsonJSC.ts +++ b/Docs/Schemas/MoveConfigJsonJSC.ts @@ -46,7 +46,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { diff --git a/Docs/Schemas/PointRenderingConfigJson.schema.json b/Docs/Schemas/PointRenderingConfigJson.schema.json index c2ead69a4..dea072665 100644 --- a/Docs/Schemas/PointRenderingConfigJson.schema.json +++ b/Docs/Schemas/PointRenderingConfigJson.schema.json @@ -3,7 +3,7 @@ "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -128,7 +128,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -163,7 +163,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/PointRenderingConfigJsonJSC.ts b/Docs/Schemas/PointRenderingConfigJsonJSC.ts index 371378c9e..09c31651d 100644 --- a/Docs/Schemas/PointRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/PointRenderingConfigJsonJSC.ts @@ -3,7 +3,7 @@ export default { "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -127,7 +127,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -161,7 +161,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json index db2f3b007..8bf8cdfa1 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json +++ b/Docs/Schemas/QuestionableTagRenderingConfigJson.schema.json @@ -198,7 +198,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -233,7 +233,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts index 0fcdb00e0..3bdb30066 100644 --- a/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/QuestionableTagRenderingConfigJsonJSC.ts @@ -197,7 +197,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -231,7 +231,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/RewritableConfigJson.schema.json b/Docs/Schemas/RewritableConfigJson.schema.json index 7457df0e0..81d22de45 100644 --- a/Docs/Schemas/RewritableConfigJson.schema.json +++ b/Docs/Schemas/RewritableConfigJson.schema.json @@ -1,4 +1,5 @@ { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -68,7 +69,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -103,7 +104,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/RewritableConfigJsonJSC.ts b/Docs/Schemas/RewritableConfigJsonJSC.ts index 9ddb18038..49c3479eb 100644 --- a/Docs/Schemas/RewritableConfigJsonJSC.ts +++ b/Docs/Schemas/RewritableConfigJsonJSC.ts @@ -1,4 +1,5 @@ export default { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -67,7 +68,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -101,7 +102,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/TagRenderingConfigJson.schema.json b/Docs/Schemas/TagRenderingConfigJson.schema.json index 8562408cd..3ad494ccb 100644 --- a/Docs/Schemas/TagRenderingConfigJson.schema.json +++ b/Docs/Schemas/TagRenderingConfigJson.schema.json @@ -1,5 +1,5 @@ { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/TagRenderingConfigJsonJSC.ts b/Docs/Schemas/TagRenderingConfigJsonJSC.ts index 11afa40fc..b4a8e2990 100644 --- a/Docs/Schemas/TagRenderingConfigJsonJSC.ts +++ b/Docs/Schemas/TagRenderingConfigJsonJSC.ts @@ -1,5 +1,5 @@ export default { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { diff --git a/Docs/Schemas/TilesourceConfigJson.schema.json b/Docs/Schemas/TilesourceConfigJson.schema.json index c333681c2..fccfb49a8 100644 --- a/Docs/Schemas/TilesourceConfigJson.schema.json +++ b/Docs/Schemas/TilesourceConfigJson.schema.json @@ -72,7 +72,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -107,7 +107,7 @@ "additionalProperties": false }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -216,7 +216,7 @@ "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -358,7 +358,7 @@ ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -397,6 +397,61 @@ }, "additionalProperties": false }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ], + "additionalProperties": false + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -563,6 +618,7 @@ "additionalProperties": false }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -653,6 +709,7 @@ "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/TilesourceConfigJsonJSC.ts b/Docs/Schemas/TilesourceConfigJsonJSC.ts index e9120cab1..4cdaad0b5 100644 --- a/Docs/Schemas/TilesourceConfigJsonJSC.ts +++ b/Docs/Schemas/TilesourceConfigJsonJSC.ts @@ -71,7 +71,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { @@ -105,7 +105,7 @@ export default { ] }, "TagRenderingConfigJson": { - "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRenerdering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", + "description": "A TagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nFor an _editable_ tagRendering, use 'QuestionableTagRenderingConfigJson' instead, which extends this one", "type": "object", "properties": { "id": { @@ -212,7 +212,7 @@ export default { "type": "object", "properties": { "location": { - "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint", + "description": "All the locations that this point should be rendered at.\nUsing `location: [\"point\", \"centroid\"] will always render centerpoint.\n'projected_centerpoint' will show an item on the line itself, near the middle of the line. (LineStrings only)", "type": "array", "items": { "type": "string" @@ -353,7 +353,7 @@ export default { ] }, "fill": { - "description": "Wehter or not to fill polygons", + "description": "Whether or not to fill polygons", "anyOf": [ { "$ref": "#/definitions/TagRenderingConfigJson" @@ -391,6 +391,60 @@ export default { } } }, + "default": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", + "type": "object", + "properties": { + "rewrite": { + "type": "object", + "properties": { + "sourceString": { + "type": "array", + "items": { + "type": "string" + } + }, + "into": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + }, + "required": [ + "into", + "sourceString" + ] + }, + "renderings": { + "anyOf": [ + { + "$ref": "#/definitions/default_4" + }, + { + "$ref": "#/definitions/default_5" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_5" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/default_4" + } + } + ] + } + }, + "required": [ + "renderings", + "rewrite" + ] + }, "QuestionableTagRenderingConfigJson": { "description": "A QuestionableTagRenderingConfigJson is a single piece of code which converts one ore more tags into a HTML-snippet.\nIf the desired tags are missing and a question is defined, a question will be shown instead.", "type": "object", @@ -556,6 +610,7 @@ export default { } }, "default<(string|QuestionableTagRenderingConfigJson|{builtin:string;override:any;})[]>": { + "description": "Rewrites and multiplies the given renderings of type T.\n\nFor example:\n\n\n```\n{\n rewrite: {\n sourceString: [\"key\", \"a|b|c\"],\n into: [\n [\"X\", 0]\n [\"Y\", 1],\n [\"Z\", 2]\n ],\n renderings: {\n \"key\":\"a|b|c\"\n }\n }\n}\n```\nwill result in _three_ copies (as the values to rewrite into have three values, namely:\n\n[\n {\n // The first pair: key --> X, a|b|c --> 0\n \"X\": 0\n },\n {\n \"Y\": 1\n },\n {\n \"Z\": 2\n }\n\n]", "type": "object", "properties": { "rewrite": { @@ -645,6 +700,7 @@ export default { "type": "object", "properties": { "name": { + "description": "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags", "type": "string" }, "type": { diff --git a/Docs/Schemas/UnitConfigJson.schema.json b/Docs/Schemas/UnitConfigJson.schema.json index a8af51f40..0941241c7 100644 --- a/Docs/Schemas/UnitConfigJson.schema.json +++ b/Docs/Schemas/UnitConfigJson.schema.json @@ -61,7 +61,7 @@ "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { diff --git a/Docs/Schemas/UnitConfigJsonJSC.ts b/Docs/Schemas/UnitConfigJsonJSC.ts index 8c141bffe..27a62b6b2 100644 --- a/Docs/Schemas/UnitConfigJsonJSC.ts +++ b/Docs/Schemas/UnitConfigJsonJSC.ts @@ -60,7 +60,7 @@ export default { "type": "object", "properties": { "canonicalDenomination": { - "description": "The canonical value which will be added to the text.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'", + "description": "The canonical value which will be added to the value in OSM.\ne.g. \"m\" for meters\nIf the user inputs '42', the canonical value will be added and it'll become '42m'.\n\nImportant: often, _no_ canonical values are expected, e.g. in the case of 'maxspeed' where 'km/h' is the default.\nIn this case, an empty string should be used", "type": "string" }, "canonicalDenominationSingular": { diff --git a/assets/layoutconfigmeta.json b/assets/layoutconfigmeta.json index d8bc6cfbb..fd2565ce9 100644 --- a/assets/layoutconfigmeta.json +++ b/assets/layoutconfigmeta.json @@ -8845,6 +8845,16 @@ ], "type": "array" }, + { + "path": [ + "layers", + "filter", + "options", + "fields", + "name" + ], + "type": "string" + }, { "path": [ "layers",