From d9949b75f9e5ea8144e3df911c61156c62fbdd24 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 25 Apr 2024 13:06:04 -0400 Subject: [PATCH] Initial start to server config spec --- server.json | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 server.json diff --git a/server.json b/server.json new file mode 100644 index 0000000..1b2657c --- /dev/null +++ b/server.json @@ -0,0 +1,65 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Server Configuration for scyllaridae", + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Label of the server configuration. Only used to help identify what the config does." + }, + "destination-http-method": { + "type": "string", + "description": "HTTP method used for sending data to the destination server." + }, + "file-header": { + "type": "string", + "description": "Header name for the file resource if it's not passed in the event." + }, + "arg-header": { + "type": "string", + "description": "Header name for additional arguments passed to the command." + }, + "forward-auth": { + "type": "boolean", + "description": "Indicates whether the authentication header should be forwarded." + }, + "allowed-mimetypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of MIME types allowed for processing. Either the full mimetype or globs image/*" + }, + "cmd-by-mimetype": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "cmd": { + "type": "string", + "description": "Command to execute." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Arguments for the command. %s is a special value used to place the value from arg-header" + } + }, + "required": ["cmd", "args"] + }, + "description": "Commands and arguments ran by MIME type. The default mimetype is used for all mimetypes if an allowed mimetype does not have an explicit command." + } + }, + "required": [ + "label", + "destination-http-method", + "file-header", + "arg-header", + "forward-auth", + "allowed-mimetypes", + "cmd-by-mimetype" + ] +} +