{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudtruth/json-schema/cloudtruth-paginated-membership-list-schema.json",
  "title": "PaginatedMembershipList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudtruth-memberships-api-openapi.yml#/components/schemas/PaginatedMembershipList",
  "type": "object",
  "required": [
    "count",
    "results"
  ],
  "properties": {
    "count": {
      "type": "integer"
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "previous": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Membership"
      }
    }
  },
  "$defs": {
    "Membership": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "readOnly": true
        },
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true,
          "description": "A unique identifier for the membership."
        },
        "user": {
          "type": "string",
          "format": "uri",
          "description": "The user of the membership."
        },
        "organization": {
          "type": "string",
          "format": "uri",
          "description": "The organization that the user is a member of."
        },
        "role": {
          "allOf": [
            {
              "$ref": "#/$defs/RoleEnum"
            }
          ],
          "description": "The role that the user has in the organization.\n\n* `OWNER` - Owner\n* `ADMIN` - Administrator\n* `CONTRIB` - Contributor\n* `VIEWER` - Viewer\n* `NO_SECRETS` - NoSecretsViewer"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "modified_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "readOnly": true
        }
      },
      "required": [
        "created_at",
        "id",
        "modified_at",
        "organization",
        "role",
        "url",
        "user"
      ]
    },
    "RoleEnum": {
      "enum": [
        "OWNER",
        "ADMIN",
        "CONTRIB",
        "VIEWER",
        "NO_SECRETS"
      ],
      "type": "string",
      "description": "* `OWNER` - Owner\n* `ADMIN` - Administrator\n* `CONTRIB` - Contributor\n* `VIEWER` - Viewer\n* `NO_SECRETS` - NoSecretsViewer"
    }
  }
}