diff --git a/schemas/three_d/common/nfs/v1.schema.json b/schemas/three_d/common/nfs/v1.schema.json new file mode 100644 index 0000000..d0fdbc8 --- /dev/null +++ b/schemas/three_d/common/nfs/v1.schema.json @@ -0,0 +1,13 @@ +{ + "$id": "https://mapcolonies.com/three_d/common/nfs/v1", + "description": "The NFS schema", + "type": "object", + "properties": { + "pvPath": { + "type": "string", + "description": "The path for the mounted volume", + "x-env-value": "PV_PATH" + } + }, + "required": ["pvPath"] +} diff --git a/schemas/three_d/common/provider/v1.schema.json b/schemas/three_d/common/provider/v1.schema.json new file mode 100644 index 0000000..1636121 --- /dev/null +++ b/schemas/three_d/common/provider/v1.schema.json @@ -0,0 +1,51 @@ +{ + "$id": "https://mapcolonies.com/three_d/common/provider/v1", + "description": "The provider schema (NFS or S3)", + "type": "object", + "required": ["provider", "config"], + "properties": { + "provider": { + "enum": ["S3", "NFS"], + "description": "The provider: S3/NFS" + } + }, + "if": { + "type": "object", + "properties": { + "provider": { + "const": "S3" + } + } + }, + "then": { + "type": "object", + "properties": { + "config": { + "type": "object", + "allOf": [ + { + "$ref": "https://mapcolonies.com/common/s3/full/v1" + }, + { + "type": "object", + "properties": { + "maxAttempts": { + "type": "number", + "description": "How many times a request will be made", + "default": 3 + } + } + } + ] + } + } + }, + "else": { + "type": "object", + "properties": { + "config": { + "$ref": "https://mapcolonies.com/three_d/common/nfs/v1" + } + } + } +}