diff --git a/schemas/raster/common/httpRetry/v1.schema.json b/schemas/raster/common/httpRetry/v1.schema.json new file mode 100644 index 00000000..e9777144 --- /dev/null +++ b/schemas/raster/common/httpRetry/v1.schema.json @@ -0,0 +1,23 @@ +{ + "description": "Http reply schema", + "$id": "https://mapcolonies.com/raster/common/httpRetry/v1", + "type": "object", + "properties": { + "attempts": { + "type": "number", + "x-env-value": "HTTP_RETRY_ATTEMPTS", + "default": 5 + }, + "delay": { + "oneOf": [{ "type": "number" }, { "const": "exponential" }], + "x-env-value": "HTTP_RETRY_DELAY", + "default": "exponential" + }, + "shouldResetTimeout": { + "type": "boolean", + "x-env-value": "DISABLE_HTTP_CLIENT_LOGS", + "default": true + } + }, + "required": ["attempts", "delay", "shouldResetTimeout"] +} diff --git a/schemas/raster/common/jobManager/v1.schema.json b/schemas/raster/common/jobManager/v1.schema.json new file mode 100644 index 00000000..94804210 --- /dev/null +++ b/schemas/raster/common/jobManager/v1.schema.json @@ -0,0 +1,60 @@ +{ + "description": "Job Manager configurations schema", + "$id": "https://mapcolonies.com/raster/common/jobManager/v1", + "type": "object", + "properties": { + "jobDomain": { + "type": "string", + "x-env-value": "JOB_DOMAIN", + "default": "RASTER" + }, + "ingestionNewJobType": { + "type": "string", + "x-env-value": "INGESTION_NEW_JOB_TYPE" + }, + "initTaskType": { + "type": "string", + "x-env-value": "INIT_TASK_TYPE" + }, + "ingestionUpdateJobType": { + "type": "string", + "x-env-value": "INGESTION_UPDATE_JOB_TYPE" + }, + "ingestionSwapUpdateJobType": { + "type": "string", + "x-env-value": "INGESTION_SWAP_UPDATE_JOB_TYPE" + }, + "supportedIngestionSwapTypes": { + "type": "array", + "items": { + "properties": { + "productType": { + "type": "string" + }, + "productSubType": { + "type": "string" + } + }, + "required": ["productType", "productSubType"], + "type": "object" + }, + "x-env-value": "SUPPORTED_INGESTION_SWAP_TYPES" + }, + "forbiddenJobTypesForParallelIngestion": { + "type": "array", + "items": { + "type": "string" + }, + "x-env-value": "FORBIDDEN_TYPES_FOR_PARALLEL_INGESTION" + } + }, + "required": [ + "jobDomain", + "ingestionNewJobType", + "initTaskType", + "ingestionUpdateJobType", + "ingestionSwapUpdateJobType", + "supportedIngestionSwapTypes", + "forbiddenJobTypesForParallelIngestion" + ] +} diff --git a/schemas/raster/common/servicesUrls/v1.schema.json b/schemas/raster/common/servicesUrls/v1.schema.json new file mode 100644 index 00000000..9a09f4d8 --- /dev/null +++ b/schemas/raster/common/servicesUrls/v1.schema.json @@ -0,0 +1,20 @@ +{ + "description": "services Urls schema", + "$id": "https://mapcolonies.com/raster/common/servicesUrls/v1", + "type": "object", + "properties": { + "jobManagerURL": { + "type": "string", + "x-env-value": "JOB_MANAGER_URL" + }, + "mapProxyApiServiceUrl": { + "type": "string", + "x-env-value": "MAP_PROXY_API_SERVICE_URL" + }, + "catalogServiceURL": { + "type": "string", + "x-env-value": "CATALOG_SERVICE_URL" + } + }, + "required": ["jobManagerURL", "mapProxyApiServiceUrl", "catalogServiceURL"] +} diff --git a/schemas/raster/ingestion/ingestionTrigger/v1.schema.json b/schemas/raster/ingestion/ingestionTrigger/v1.schema.json new file mode 100644 index 00000000..9251b854 --- /dev/null +++ b/schemas/raster/ingestion/ingestionTrigger/v1.schema.json @@ -0,0 +1,132 @@ +{ + "$id": "https://mapcolonies.com/raster/ingestion/ingestionTrigger/v1", + "description": "The full ingestion trigger service schema", + "type": "object", + "required": ["services", "jobManager", "httpRetry", "validationValuesByInfo", "storageExplorer"], + "allOf": [ + { + "$ref": "https://mapcolonies.com/common/boilerplate/v4" + }, + { + "type": "object", + "properties": { + "services": { + "$ref": "https://mapcolonies.com/raster/common/servicesUrls/v1" + } + } + }, + { + "type": "object", + "properties": { + "httpRetry": { + "$ref": "https://mapcolonies.com/raster/common/httpRetry/v1" + } + } + }, + { + "type": "object", + "properties": { + "jobManager": { + "$ref": "https://mapcolonies.com/raster/common/jobManager/v1" + } + } + }, + { + "type": "object", + "properties": { + "disableHttpClientLogs": { + "type": "boolean", + "x-env-value": "DISABLE_HTTP_CLIENT_LOGS", + "default": false + } + } + }, + { + "type": "object", + "properties": { + "storageExplorer": { + "$ref": "#/definitions/storageExplorer" + } + } + }, + { + "type": "object", + "properties": { + "validationValuesByInfo": { + "$ref": "#/definitions/validationValuesByInfo" + } + } + } + ], + "definitions": { + "storageExplorer": { + "type": "object", + "properties": { + "layerSourceDir": { + "type": "string", + "default": "/layerSources", + "x-env-value": "STORAGE_EXPLORER_LAYER_SOURCE_DIR" + }, + "displayNameDir": { + "type": "string", + "x-env-value": "STORAGE_EXPLORER_DISPLAY_NAME_DIR" + }, + "watchDirectory": { + "type": "string", + "default": "watch", + "x-env-value": "STORAGE_EXPLORER_WATCH_DIRECTORY" + }, + "validFileExtensions": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "x-env-value": "STORAGE_EXPLORER_VALID_FILE_EXTENSIONS" + } + }, + "required": ["displayNameDir", "validFileExtensions", "layerSourceDir", "watchDirectory"] + }, + "validationValuesByInfo": { + "type": "object", + "properties": { + "crs": { + "type": "array", + "items": { + "type": "number" + }, + "uniqueItems": true, + "default": [4326], + "minItems": 1, + "x-env-value": "CRS" + }, + "fileFormat": { + "type": "array", + "items": { + "type": "string" + }, + "default": ["GPKG"], + "minItems": 1, + "x-env-value": "FILE_FORMAT" + }, + "tileSize": { + "type": "number", + "default": 256, + "const": 256, + "x-env-value": "TILE_SIZE" + }, + "resolutionFixedPointTolerance": { + "type": "number", + "default": 12, + "x-env-value": "RESOLUTION_FIXED_POINT_TOLERANCE" + }, + "extentBufferInMeters": { + "type": "number", + "default": 50, + "x-env-value": "EXTENT_BUFFER_IN_METERS" + } + }, + "required": ["crs", "fileFormat", "tileSize", "resolutionFixedPointTolerance", "extentBufferInMeters"] + } + } +}