{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/4chems-com/json-schema/4chems-com-members-list-out-schema.json",
  "title": "MembersListOut",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/4chems-com-authz-api-openapi.yml#/components/schemas/MembersListOut",
  "properties": {
    "tenant_id": {
      "type": "string",
      "title": "Tenant Id"
    },
    "members": {
      "items": {
        "$ref": "#/$defs/MemberOut"
      },
      "type": "array",
      "title": "Members"
    }
  },
  "type": "object",
  "required": [
    "tenant_id",
    "members"
  ],
  "$defs": {
    "AssignmentOut": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "subject_type": {
          "type": "string",
          "title": "Subject Type"
        },
        "subject": {
          "type": "string",
          "title": "Subject"
        },
        "role": {
          "type": "string",
          "title": "Role"
        },
        "scope_type": {
          "type": "string",
          "title": "Scope Type"
        },
        "scope_id": {
          "type": "string",
          "title": "Scope Id"
        },
        "expires_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expires At"
        },
        "granted_by": {
          "type": "string",
          "title": "Granted By"
        },
        "granted_at": {
          "type": "string",
          "format": "date-time",
          "title": "Granted At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "subject_type",
        "subject",
        "role",
        "scope_type",
        "scope_id",
        "expires_at",
        "granted_by",
        "granted_at"
      ],
      "title": "AssignmentOut"
    },
    "MemberOut": {
      "properties": {
        "subject": {
          "type": "string",
          "title": "Subject"
        },
        "assignments": {
          "items": {
            "$ref": "#/$defs/AssignmentOut"
          },
          "type": "array",
          "title": "Assignments"
        }
      },
      "type": "object",
      "required": [
        "subject",
        "assignments"
      ],
      "title": "MemberOut"
    }
  }
}