{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gloat/json-schema/gloat-user-response-schema.json",
  "title": "UserResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gloat-users-api-openapi.yml#/components/schemas/UserResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "roles": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Roles"
    },
    "groups": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Groups"
    },
    "permissions": {
      "items": {
        "$ref": "#/$defs/UserPermissionsResponse"
      },
      "type": "array",
      "title": "Permissions"
    }
  },
  "type": "object",
  "required": [
    "id",
    "roles",
    "groups",
    "permissions"
  ],
  "$defs": {
    "UserPermissionsResponse": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "target_groups": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Target Groups"
        },
        "access": {
          "type": "string",
          "title": "Access"
        }
      },
      "type": "object",
      "required": [
        "name",
        "access"
      ],
      "title": "UserPermissionsResponse"
    }
  }
}