Skip to content

Instantly share code, notes, and snippets.

@einarwh
Last active April 8, 2026 10:07
Show Gist options
  • Select an option

  • Save einarwh/e86ae6a967902e936038362311f052ad to your computer and use it in GitHub Desktop.

Select an option

Save einarwh/e86ae6a967902e936038362311f052ad to your computer and use it in GitHub Desktop.
Customer Schema (third version), published 03.03.2026. Renamed 'userId' to 'userName' and added 'items' property.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/hellish-enterprise/customer-schema-20260303.json",
"title": "Customer",
"description": "Validation schema for customers.",
"type": "object",
"required": ["userName", "email", "birthDate", "displayName", "items"],
"properties": {
"userName": {
"type": "string",
"minLength": 1
},
"email": {
"type": "string",
"format": "email"
},
"birthDate": {
"type": "string",
"format": "date"
},
"displayName": {
"type": "string",
"minLength": 1
},
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment