Created
December 4, 2024 20:44
-
-
Save itxtoledo/b46aa179ad4844027fe646f9658c719e to your computer and use it in GitHub Desktop.
JSON Schema for validating SMTP configurations. This schema ensures that each configuration in an array contains the required properties (host, port, user, and pass) with the correct data types and disallows additional properties.
This file contains hidden or 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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"host": { | |
"type": "string" | |
}, | |
"port": { | |
"type": "number" | |
}, | |
"user": { | |
"type": "string" | |
}, | |
"pass": { | |
"type": "string" | |
} | |
}, | |
"required": ["host", "port", "user", "pass"], | |
"additionalProperties": false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment