Skip to content
67 changes: 67 additions & 0 deletions schemas/vector/externalToOsmTagMapping/v1.schema.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using this schema test prefix (redis key prefis) config and logic

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't create redis schema by yourself
we already created a common one here

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"$id": "https://mapcolonies.com/vector/externalToOsmTagMapping/v1",
"type": "object",
"title": "vectorExternalToOsmTagMappingV1",
"description": "Mapping configuration for external vector data to OSM tags",
"allOf": [
{ "$ref": "https://mapcolonies.com/common/boilerplate/v2" },
{ "$ref": "#/definitions/databases" },
{ "$ref": "#/definitions/appSchema" }
],
"definitions": {
"databases": {
"type": "object",
"properties": {
"db": {
"type": "object",
"required": ["redis"],
"properties": {
"redis": {
"allOf": [
{ "$ref": "https://mapcolonies.com/common/redis/v2" },
{
"type": "object",
"properties": {
"connectTimeoutMs": {
"type": "number",
"x-env-value": "REDIS_CONNECT_TIMEOUT",
"default": 5000,
"minimum": 500
}
},
"required": ["connectTimeoutMs"]
}
]
}
}
}
}
},
"appSchema": {
"type": "object",
"properties": {
"application": {
"type": "object",
"required": ["hashKey"],
"properties": {
"hashKey": {
"type": "object",
"required": ["enabled"],
"properties": {
"enabled": { "type": "boolean", "x-env-value": "APP_HASHKEY_ENABLED" },
"value": { "type": "string", "x-env-value": "APP_HASHKEY_VALUE" }
}
}
}
},
"schema": {
"type": "object",
"properties": {
"provider": { "type": "string", "x-env-value": "SCHEMA_PROVIDER" },
"filePath": { "type": "string", "x-env-value": "SCHEMA_FILE_PATH" }
}
}
}
}
}
}