diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-05 16:03:59 -0800 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-05 16:03:59 -0800 |
| commit | 8d50b63be5dd754d9260adbf69323f3ac2b8cb08 (patch) | |
| tree | 6f273fabfc8162d84bf85fc803a8f8efa996aa04 /src/server/Session/session_config_schema.ts | |
| parent | d4e7e354ec9209f117054ead9970ea9f180dd17b (diff) | |
default configuration
Diffstat (limited to 'src/server/Session/session_config_schema.ts')
| -rw-r--r-- | src/server/Session/session_config_schema.ts | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/src/server/Session/session_config_schema.ts b/src/server/Session/session_config_schema.ts index 34d1ad523..0acb304db 100644 --- a/src/server/Session/session_config_schema.ts +++ b/src/server/Session/session_config_schema.ts @@ -1,17 +1,9 @@ import { Schema } from "jsonschema"; const emailPattern = /^(([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+)?$/g; -const localPortPattern = /\/[a-zA-Z]+/g; +const localPortPattern = /\/[a-zA-Z]*/g; const properties: { [name: string]: Schema } = { - recipients: { - type: "array", - items: { - type: "string", - pattern: emailPattern - }, - minLength: 1 - }, ports: { type: "object", properties: { @@ -25,16 +17,42 @@ const properties: { [name: string]: Schema } = { type: "string", pattern: localPortPattern }, - signature: { type: "string" }, - masterIdentifier: { type: "string", minLength: 1 }, - workerIdentifier: { type: "string", minLength: 1 }, + email: { + type: "object", + properties: { + recipients: { + type: "array", + items: { + type: "string", + pattern: emailPattern + }, + minLength: 1 + }, + signature: { + type: "string", + minLength: 1 + } + }, + required: ["recipients"] + }, + masterIdentifier: { + type: "string", + minLength: 1 + }, + workerIdentifier: { + type: "string", + minLength: 1 + }, showServerOutput: { type: "boolean" }, - pollingIntervalSeconds: { type: "number", minimum: 1, maximum: 86400 } + pollingIntervalSeconds: { + type: "number", + minimum: 1, + maximum: 86400 + } }; export const configurationSchema: Schema = { id: "/configuration", type: "object", properties, - required: Object.keys(properties) };
\ No newline at end of file |
