{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/confighub/json-schema/confighub-extended-group-schema.json",
  "title": "ExtendedGroup",
  "description": "Group with additional related entities expanded based on the request's include parameter.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/confighub-group-api-openapi.yml#/components/schemas/ExtendedGroup",
  "type": "object",
  "properties": {
    "Error": {
      "$ref": "#/$defs/ResponseError"
    },
    "Group": {
      "allOf": [
        {
          "$ref": "#/$defs/Group"
        }
      ],
      "description": "The Group."
    },
    "ViewColumns": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ViewColumn"
      },
      "description": "The values of the columns of the View named by the view parameter, in the View's column order. A column that selects several values, such as one with a wildcard, has an entry for each, all with the column's Name.",
      "x-go-type-skip-optional-pointer": true
    }
  },
  "$defs": {
    "ErrorItem": {
      "type": "object",
      "properties": {
        "Description": {
          "type": "string",
          "description": "A clear explanation of what went wrong",
          "x-go-type-skip-optional-pointer": true
        },
        "Item": {
          "type": "string",
          "description": "The name of the field, resource, or entity that the error relates to",
          "x-go-type-skip-optional-pointer": true
        }
      }
    },
    "ErrorMetadata": {
      "type": "object",
      "properties": {
        "EntityID": {
          "type": "string",
          "description": "Optional ID of the entity this error relates to",
          "x-go-type-skip-optional-pointer": true
        },
        "EntitySlug": {
          "type": "string",
          "description": "Optional slug of the entity this error relates to",
          "x-go-type-skip-optional-pointer": true
        },
        "EntityType": {
          "type": "string",
          "description": "Optional type of the entity this error relates to",
          "x-go-type-skip-optional-pointer": true
        },
        "Items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ErrorItem"
          },
          "description": "Collection of error details",
          "x-go-type-skip-optional-pointer": true
        }
      }
    },
    "Group": {
      "required": [
        "Slug"
      ],
      "type": "object",
      "properties": {
        "CreatedAt": {
          "type": "string",
          "description": "The timestamp when the entity was created in \"2023-01-01T12:00:00Z\" format.",
          "format": "date-time",
          "readOnly": true,
          "x-confighub-where": {
            "dataType": "time"
          },
          "x-go-type-skip-optional-pointer": true,
          "x-omitzero": true
        },
        "DisplayName": {
          "type": "string",
          "description": "Friendly name for the entity.",
          "x-confighub-where": {
            "dataType": "string"
          },
          "x-go-type-skip-optional-pointer": true
        },
        "EntityType": {
          "type": "string",
          "description": "The type of entity.",
          "readOnly": true,
          "x-go-type-skip-optional-pointer": true
        },
        "ExternalID": {
          "type": "string",
          "description": "Unique identifier for the External Identity Provider record matching this Group.",
          "readOnly": true,
          "x-confighub-where": {
            "dataType": "string"
          },
          "x-go-type-skip-optional-pointer": true
        },
        "GroupID": {
          "type": "string",
          "description": "Unique identifier for a Group. (readonly)",
          "format": "uuid",
          "x-confighub-where": {
            "dataType": "uuid"
          },
          "x-go-type-skip-optional-pointer": true,
          "x-omitzero": true
        },
        "HiddenReason": {
          "maxLength": 64,
          "pattern": "^([A-Za-z0-9]([\\-_.A-Za-z0-9]*[A-Za-z0-9])?)?$",
          "type": "string",
          "description": "The reason the entity is hidden, if it is. A hidden entity is left out of List and Search results, and of what bulk operations act on, unless the include_hidden parameter names its reason or is *, or the where parameter names the entity by Slug or ID. ConfigHub/YAML Units are created hidden with the reason BackingUnit unless given another.",
          "x-go-type-skip-optional-pointer": true
        },
        "Slug": {
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9]([\\-_.A-Za-z0-9]*[A-Za-z0-9])?$",
          "type": "string",
          "description": "Unique URL-safe identifier for the entity.",
          "x-confighub-where": {
            "dataType": "string"
          },
          "x-go-type-skip-optional-pointer": true
        },
        "UpdatedAt": {
          "type": "string",
          "description": "The timestamp when the entity was last updated in \"2023-01-01T12:00:00Z\" format.",
          "format": "date-time",
          "readOnly": true,
          "x-confighub-where": {
            "dataType": "time"
          },
          "x-go-type-skip-optional-pointer": true,
          "x-omitzero": true
        },
        "Version": {
          "type": "integer",
          "description": "An entity-specific sequence number used for optimistic concurrency control. The value read must be sent in calls to Update.",
          "format": "int64",
          "readOnly": false,
          "x-go-type-skip-optional-pointer": true
        }
      },
      "description": "A Group of Users, a subject in an entity's Permissions. Groups and their membership are managed in the identity provider, and like Users are not scoped to an Organization; a Group is provisioned when a User in it logs in. Bot Users are the exception: they are added to a Group through the API."
    },
    "ResponseError": {
      "type": "object",
      "properties": {
        "Details": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Additional context messages",
          "x-go-type-skip-optional-pointer": true
        },
        "ErrorMetadata": {
          "allOf": [
            {
              "$ref": "#/$defs/ErrorMetadata"
            }
          ],
          "description": "Structured error details like field violations"
        },
        "Message": {
          "type": "string",
          "description": "The primary error message",
          "x-go-type-skip-optional-pointer": true
        },
        "Status": {
          "type": "integer",
          "description": "HTTP status code",
          "x-go-type-skip-optional-pointer": true
        },
        "Type": {
          "type": "string",
          "description": "The category of the error, as a code: UserInput, Validation, Data, Authentication, Permission, NotFound, Conflict, AlreadyExists, Unprocessable, Locked, PreconditionFailed, TooManyRequests, Unexpected, GatewayTimeout, or ServiceUnavailable",
          "x-go-type-skip-optional-pointer": true
        }
      }
    },
    "ViewColumn": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "x-go-type-skip-optional-pointer": true
        },
        "Value": {
          "type": "string",
          "x-go-type-skip-optional-pointer": true
        }
      }
    }
  }
}