{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/safetyculture/json-schema/safetyculture-s12-thepub-v1-get-user-groups-response-schema.json",
  "title": "GetUserGroupsResponse",
  "description": "Result returned from `GetUserGroups`",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/safetyculture-groups-api-openapi.yml#/components/schemas/s12.thepub.v1.GetUserGroupsResponse",
  "type": "object",
  "properties": {
    "groups": {
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "#/$defs/s12.thepub.v1.GetUserGroupsResponse.Group"
      },
      "description": "The groups that the user is a member of."
    }
  },
  "$defs": {
    "s12.thepub.v1.GetUserGroupsResponse.Group": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the group."
        },
        "name": {
          "type": "string",
          "description": "The name of the group."
        },
        "type": {
          "description": "The type of the group.",
          "allOf": [
            {
              "$ref": "#/$defs/s12.thepub.v1.GetUserGroupsResponse.Group.Type"
            }
          ]
        }
      },
      "description": "A group returned from `GetUserGroups`",
      "title": "GetUserGroupsResponseGroup"
    },
    "s12.thepub.v1.GetUserGroupsResponse.Group.Type": {
      "type": "string",
      "enum": [
        "group",
        "organisation"
      ],
      "default": "group",
      "title": "- group: Group\n - organisation: Organisation"
    }
  }
}