Skip to content
Draft
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
45 changes: 45 additions & 0 deletions schemas/vector/metatileQueuePopulator/full/v1.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$id": "https://mapcolonies.com/vector/metatileQueuePopulator/full/v1",
"type": "object",
"title": "metatileQueuePopulatorFullV1",
"description": "Metatile Queue Populator's full schema",
"unevaluatedProperties": false,
"allOf": [
{
"$ref": "https://mapcolonies.com/vector/metatileQueuePopulator/shared/v1"
},
{
"type": "object",
"required": ["db"],
"properties": {
"db": {
"$ref": "https://mapcolonies.com/common/db/full/v2"
}
}
},
{
"$ref": "#/definitions/appSchema"
}
],
"definitions": {
"appSchema": {
"type": "object",
"required": ["app"],
"properties": {
"app": {
"description": "app configuration",
"type": "object",
"default": {},
"properties": {
"projectName": {
"type": "string",
"description": "The name of the project",
"x-env-value": "APP_PROJECT_NAME"
}
},
"required": ["projectName"]
}
}
}
}
}
71 changes: 71 additions & 0 deletions schemas/vector/metatileQueuePopulator/shared/v1.configs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[
{
"name": "vector-metatilequeuepopulator-shared",
"value": {
"telemetry": {
"shared": {
"serviceName": "metatileQueuePopulator"
},
"tracing": {
"isEnabled": false
},
"logger": {
"level": "info",
"prettyPrint": false
},
"metrics": {
"enabled": true,
"buckets": [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 15, 50, 250, 500]
}
},
"openapiConfig": {
"filePath": "./openapi3.yaml",
"basePath": "/docs",
"rawPath": "/api",
"uiPath": "/api"
},
"server": {
"port": 8080,
"request": {
"payload": {
"limit": "1mb"
}
},
"response": {
"compression": {
"enabled": true,
"options": null
}
}
},
"app": {
"consumeDelay": {
"enabled": true,
"delaySec": 60,
"tilesQueueSizeLimit": 400000
},
"enableRequestQueueHandling": true,
"force": {
"api": false,
"expiredTiles": false
},
"metatileSize": 8,
"requestQueueCheckIntervalSec": 30,
"tilesBatchSize": 10000
},
"db": {
"$ref": { "configName": "db-connection", "version": "latest" },
"ssl": {
"enabled": false
}
},
"queue": {
"expireInSeconds": 600,
"retryBackoff": true,
"retryLimit": 3,
"retryDelaySeconds": 60,
"retentionHours": 87660
}
}
}
]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$id": "https://mapcolonies.com/vector/metatileQueuePopulator/v1",
"$id": "https://mapcolonies.com/vector/metatileQueuePopulator/shared/v1",
"type": "object",
"title": "metatileQueuePopulatorV1",
"description": "Metatile Queue Populator's schema",
"title": "metatileQueuePopulatorSharedV1",
"description": "Metatile Queue Populator's shared schema",
"allOf": [
{
"$ref": "https://mapcolonies.com/common/boilerplate/v2"
Expand All @@ -19,7 +19,7 @@
"required": ["db"],
"properties": {
"db": {
"$ref": "https://mapcolonies.com/common/db/full/v1"
"$ref": "https://mapcolonies.com/common/db/partial/v1"
}
}
},
Expand All @@ -38,14 +38,7 @@
"app": {
"description": "app configuration",
"type": "object",
"default": {},
"unevaluatedProperties": false,
"properties": {
"projectName": {
"type": "string",
"description": "The name of the project",
"x-env-value": "APP_PROJECT_NAME"
},
"enableRequestQueueHandling": {
"type": "boolean",
"description": "Flag to enable request queue handling",
Expand Down Expand Up @@ -100,6 +93,13 @@
},
"then": {
"required": ["delaySec", "tilesQueueSizeLimit"]
},
"else": {
"properties": {
"enabled": {
"const": false
}
}
}
},
"force": {
Expand All @@ -121,15 +121,7 @@
}
}
},
"required": [
"projectName",
"enableRequestQueueHandling",
"requestQueueCheckIntervalSec",
"tilesBatchSize",
"metatileSize",
"consumeDelay",
"force"
]
"required": ["enableRequestQueueHandling", "requestQueueCheckIntervalSec", "tilesBatchSize", "metatileSize", "consumeDelay", "force"]
}
}
},
Expand All @@ -141,7 +133,6 @@
"description": "queue configuration",
"type": "object",
"default": {},
"unevaluatedProperties": false,
"properties": {
"expireInSeconds": {
"type": "integer",
Expand Down Expand Up @@ -186,7 +177,6 @@
"description": "metrics configuration",
"type": "object",
"default": {},
"unevaluatedProperties": false,
"properties": {
"enabled": {
"type": "boolean",
Expand Down
170 changes: 170 additions & 0 deletions schemas/vector/retiler/full/v1.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
{
"$id": "https://mapcolonies.com/vector/retiler/full/v1",
"type": "object",
"title": "vectorRetilerFullSchemaV1",
"description": "Vector's Retiler full schema",
"unevaluatedProperties": false,
"allOf": [
{
"$ref": "https://mapcolonies.com/vector/retiler/shared/v1"
},
{
"type": "object",
"required": ["app"],
"properties": {
"app": {
"type": "object",
"description": "Application configuration",
"required": ["queueName", "map", "project", "tilesStorage", "jobQueue", "parallelism"],
"properties": {
"project": {
"$ref": "#/definitions/project"
},
"forceProcess": {
"type": "boolean",
"description": "Force process all tiles",
"default": false,
"x-env-value": "APP_FORCE_PROCESS"
},
"queueName": {
"type": "string",
"description": "Job queue name",
"default": "retiler-queue",
"x-env-value": "QUEUE_NAME"
},
"parallelism": {
"type": "integer",
"description": "Number of parallel jobs",
"default": 1,
"x-env-value": "APP_PARALLELISM"
},
"jobQueue": {
"$ref": "#/definitions/jobQueue"
},
"map": {
"$ref": "#/definitions/map"
},
"tilesStorage": {
"type": "object",
"description": "Tiles storage configuration",
"required": ["layout"],
"properties": {
"layout": {
"$ref": "#/definitions/tilesStorageLayout"
}
}
}
}
}
}
}
],
"definitions": {
"project": {
"type": "object",
"description": "Project configuration",
"required": ["name", "stateUrl"],
"properties": {
"name": {
"type": "string",
"description": "Project name",
"x-env-value": "APP_PROJECT_NAME"
},
"stateUrl": {
"type": "string",
"description": "Project rendered state URL",
"x-env-value": "APP_PROJECT_STATE_URL"
}
}
},
"jobQueue": {
"type": "object",
"required": ["pgBoss"],
"properties": {
"pgBoss": {
"allOf": [
{
"$ref": "https://mapcolonies.com/common/db/full/v2"
}
]
}
}
},
"map": {
"type": "object",
"description": "DigitalMap provider configuration",
"required": ["provider", "url", "wms"],
"properties": {
"provider": {
"enum": ["wms", "arcgis"],
"description": "DigitalMap provider kind",
"x-env-value": "MAP_PROVIDER"
},
"url": {
"type": "string",
"description": "DigitalMap provider URL",
"x-env-value": "MAP_URL"
},
"wms": {
"type": "object",
"required": ["version"],
"properties": {
"version": {
"$comment": "Should I use enum instead of string?",
"type": "string",
"description": "WMS version",
"default": "1.3.0",
"x-env-value": "MAP_WMS_VERSION"
},
"layers": {
"type": "string",
"description": "WMS layers",
"x-env-value": "MAP_WMS_LAYERS"
},
"styles": {
"type": "string",
"description": "WMS styles",
"x-env-value": "MAP_WMS_STYLES"
},
"isZoomLayers": {
"type": "boolean",
"description": "Is zoom layers project",
"default": false,
"x-env-value": "MAP_WMS_ZOOM_LAYERS",
"$comment": "This will be deleted in the future with new QGIS versions"
}
}
}
},
"if": {
"properties": {
"provider": {
"const": "wms"
}
}
},
"then": {
"required": ["wms"],
"properties": {
"wms": {
"type": "object",
"required": ["layers", "styles"]
}
}
},
"else": {}
},
"tilesStorageLayout": {
"type": "object",
"required": ["format"],
"properties": {
"format": {
"type": "string",
"pattern": "^.+\\{z\\}\\/\\{x\\}\\/\\{y\\}\\..+$",
"description": "Tiles storage layout format",
"x-env-value": "TILES_STORAGE_LAYOUT_FORMAT"
}
}
}
}
}
Loading