{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nexus/json-schema/nexus-api-create-user-schema.json",
  "title": "ApiCreateUser",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nexus-security-management-users-api-openapi.yml#/components/schemas/ApiCreateUser",
  "required": [
    "emailAddress",
    "firstName",
    "lastName",
    "password",
    "status",
    "userId"
  ],
  "type": "object",
  "properties": {
    "userId": {
      "minLength": 1,
      "type": "string",
      "description": "The userid which is required for login. This value cannot be changed."
    },
    "firstName": {
      "minLength": 1,
      "type": "string",
      "description": "The first name of the user."
    },
    "lastName": {
      "minLength": 1,
      "type": "string",
      "description": "The last name of the user."
    },
    "emailAddress": {
      "minLength": 1,
      "type": "string",
      "description": "The email address associated with the user.",
      "format": "email"
    },
    "password": {
      "minLength": 1,
      "type": "string",
      "description": "The password for the new user."
    },
    "status": {
      "type": "string",
      "description": "The user's status, e.g. active or disabled.",
      "enum": [
        "active",
        "locked",
        "disabled",
        "changepassword"
      ]
    },
    "roles": {
      "uniqueItems": true,
      "type": "array",
      "description": "The roles which the user has been assigned within Nexus.",
      "items": {
        "type": "string",
        "description": "The roles which the user has been assigned within Nexus."
      }
    }
  }
}