Skip to content
Draft
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
75 changes: 75 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,75 @@
{
"$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",
"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": {
"required":["application","schema"],
"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"
}
},
"if": {
"properties": { "enabled": { "const": true } }
},
"then": {
"required": ["value"]
}
}
}
},
"schema": {
"type": "object",
"properties": {
"provider": { "type": "string", "x-env-value": "SCHEMA_PROVIDER" },
"filePath": { "type": "string", "x-env-value": "SCHEMA_FILE_PATH" }
}
}
}
}
}
}