{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/UserInput",
  "title": "UserInput",
  "type": "object",
  "description": "Input for creating or updating a user.",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "User identifier."
    },
    "name": {
      "type": "string",
      "description": "User display name.",
      "maxLength": 256
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "User email address."
    },
    "password": {
      "type": "string",
      "format": "password",
      "description": "User password."
    },
    "role": {
      "type": "string",
      "description": "User service role.",
      "enum": [
        "User",
        "Power User",
        "Service Administrator"
      ]
    },
    "groups": {
      "type": "array",
      "description": "Group names to assign the user to.",
      "items": {
        "type": "string"
      }
    }
  }
}