Last active
March 8, 2019 14:14
-
-
Save dacioromero/be244500ee372fdf93c1a6073bdc46a9 to your computer and use it in GitHub Desktop.
Validated User JSON Schema for https://medium.com/p/71e0ebb840ae
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#", | |
"title": "User", | |
"description": "A user in the database", | |
"type": "object", | |
"properties": { | |
"email": { | |
"description": "Their email", | |
"type": "string", | |
"format": "email" | |
}, | |
"username": { | |
"description": "Their username", | |
"type": "string", | |
"minLength": 4, | |
"maxLength": 32 | |
}, | |
"password": { | |
"description": "Their password", | |
"type": "string", | |
"minLength": 16 | |
}, | |
"age": { | |
"description": "Their age", | |
"type": "integer", | |
"minimum": 0 | |
} | |
}, | |
"required": ["email", "username", "password", "age"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment