{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "User",
  "type": "object",
  "required": [
    "id",
    "first_name",
    "last_name",
    "email"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "minimum": 1
    },
    "first_name": {
      "type": "string"
    },
    "last_name": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "phone": {
      "type": "string"
    },
    "birth_date": {
      "type": "string",
      "format": "date"
    },
    "address": {
      "type": "object",
      "required": [
        "city"
      ],
      "properties": {
        "street": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string",
          "minLength": 2,
          "maxLength": 2
        },
        "zip": {
          "type": "string",
          "pattern": "^[0-9]{5}$"
        }
      }
    },
    "signup_date": {
      "type": "string",
      "format": "date"
    },
    "active": {
      "type": "boolean"
    }
  }
}
