-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added validation of configuration file
- Loading branch information
ruff
committed
Sep 30, 2024
1 parent
4d4c540
commit 394d1e5
Showing
4 changed files
with
181 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,4 +82,5 @@ _backup* | |
/composer.lock | ||
|
||
/examples/Example1.php | ||
!/src/bin | ||
/examples/config.json | ||
!/src/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"required": [ | ||
"dateFormat", | ||
"ublSupportEnabled", | ||
"accounts" | ||
], | ||
"properties": { | ||
"dateFormat": { | ||
"type": "string" | ||
}, | ||
"ublSupportEnabled": { | ||
"type": "boolean" | ||
}, | ||
"accounts": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"identifier": { | ||
"type": "string" | ||
}, | ||
"host": { | ||
"type": "string" | ||
}, | ||
"port": { | ||
"type": "integer", | ||
"minimum": 0, | ||
"maximu,": 65535 | ||
}, | ||
"protocol": { | ||
"type": "string", | ||
"oneOf": [ | ||
{ | ||
"const": "imap" | ||
}, | ||
{ | ||
"const": "legacy-imap" | ||
}, | ||
{ | ||
"const": "pop3" | ||
}, | ||
{ | ||
"const": "nntp" | ||
} | ||
] | ||
}, | ||
"encryption": { | ||
"type": [ | ||
"string", | ||
"boolean" | ||
], | ||
"oneOf": [ | ||
{ | ||
"const": false | ||
}, | ||
{ | ||
"const": "ssl" | ||
}, | ||
{ | ||
"const": "tls" | ||
}, | ||
{ | ||
"const": "starttls" | ||
}, | ||
{ | ||
"const": "notls" | ||
} | ||
] | ||
}, | ||
"validateCert": { | ||
"type": "boolean" | ||
}, | ||
"username": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"authentication": { | ||
"type": [ | ||
"string", | ||
"null" | ||
], | ||
"oneOf": [ | ||
{ | ||
"const": null | ||
}, | ||
{ | ||
"const": "oauth" | ||
} | ||
] | ||
}, | ||
"timeout": { | ||
"type": "integer" | ||
}, | ||
"foldersToWatch": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"mimeTypesToWatch": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"handlers": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"classname": { | ||
"type": "string" | ||
}, | ||
"properties": { | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |