{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-enterprise-linux-8/json-schema/red-hat-enterprise-linux-8-distribution-details-schema.json",
  "title": "DistributionDetails",
  "description": "Complete metadata for a specific distribution from images library",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-enterprise-linux-8-image-builder-api-openapi.yml#/components/schemas/DistributionDetails",
  "properties": {
    "architectures": {
      "additionalProperties": {
        "$ref": "#/$defs/ArchitectureInfo"
      },
      "description": "Map of architecture names to their details",
      "type": "object"
    },
    "codename": {
      "description": "Codename of the distribution",
      "type": "string"
    },
    "module_platform_id": {
      "description": "Module platform ID for DNF modularity",
      "type": "string"
    },
    "name": {
      "description": "Name of the distribution",
      "type": "string"
    },
    "os_version": {
      "description": "Full OS version including minor version",
      "type": "string"
    },
    "ostree_ref": {
      "description": "Default OSTree reference template",
      "type": "string"
    },
    "product": {
      "description": "Product name",
      "type": "string"
    },
    "releasever": {
      "description": "Release version used in repo files",
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "type": "object",
  "$defs": {
    "ArchitectureInfo": {
      "description": "Architecture metadata from images library",
      "properties": {
        "image_types": {
          "additionalProperties": {
            "$ref": "#/$defs/ImageTypeInfo"
          },
          "description": "Map of image type names to their details",
          "type": "object"
        },
        "name": {
          "description": "Architecture name",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object",
      "x-go-type": "composer.ArchitectureInfo"
    },
    "BootMode": {
      "enum": [
        "legacy",
        "uefi",
        "hybrid",
        "none"
      ],
      "type": "string",
      "x-go-type": "composer.ImageTypeInfoBootMode"
    },
    "BtrfsSubvolume": {
      "properties": {
        "mountpoint": {
          "description": "Mountpoint for the subvolume\n",
          "type": "string"
        },
        "name": {
          "description": "The name of the subvolume, which defines the location (path) on the root volume\n",
          "type": "string"
        }
      },
      "required": [
        "name",
        "mountpoint"
      ],
      "type": "object",
      "x-go-type": "composer.BtrfsSubvolume"
    },
    "BtrfsVolume": {
      "properties": {
        "minsize": {
          "$ref": "#/$defs/minsize"
        },
        "part_type": {
          "description": "The partition type GUID for GPT partitions. For DOS partitions, this field can be used to set the (2 hex digit) partition type. If not set, the type will be automatically set based on the mountpoint or the payload type.\n",
          "type": "string"
        },
        "subvolumes": {
          "items": {
            "$ref": "#/$defs/BtrfsSubvolume"
          },
          "type": "array"
        },
        "type": {
          "enum": [
            "btrfs"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "subvolumes"
      ],
      "type": "object",
      "x-go-type": "composer.BtrfsVolume"
    },
    "Disk": {
      "properties": {
        "minsize": {
          "$ref": "#/$defs/minsize"
        },
        "partitions": {
          "items": {
            "$ref": "#/$defs/Partition"
          },
          "type": "array"
        },
        "type": {
          "description": "Type of the partition table\n",
          "enum": [
            "gpt",
            "dos"
          ],
          "type": "string"
        }
      },
      "required": [
        "partitions"
      ],
      "type": "object",
      "x-go-type": "composer.Disk"
    },
    "FilesystemTyped": {
      "properties": {
        "fs_type": {
          "description": "The filesystem type. Swap partitions must have an empty mountpoint.\n",
          "enum": [
            "ext4",
            "xfs",
            "vfat",
            "swap"
          ],
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "minsize": {
          "$ref": "#/$defs/minsize"
        },
        "mountpoint": {
          "type": "string"
        },
        "part_type": {
          "description": "The partition type GUID for GPT partitions. For DOS partitions, this field can be used to set the (2 hex digit) partition type. If not set, the type will be automatically set based on the mountpoint or the payload type.\n",
          "type": "string"
        },
        "type": {
          "enum": [
            "plain"
          ],
          "type": "string"
        }
      },
      "required": [
        "fs_type"
      ],
      "type": "object",
      "x-go-type": "composer.FilesystemTyped"
    },
    "ImageTypeInfo": {
      "description": "Image type metadata from images library",
      "properties": {
        "aliases": {
          "description": "Alternative names for this image type",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "base_partition_table": {
          "$ref": "#/$defs/Disk"
        },
        "boot_mode": {
          "$ref": "#/$defs/BootMode",
          "description": "Boot mode for the image"
        },
        "default_size": {
          "description": "Default image size in bytes",
          "format": "uint64",
          "type": "integer"
        },
        "exports": {
          "description": "Names of stages that produce the build output",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "filename": {
          "description": "Canonical filename for the image",
          "type": "string"
        },
        "iso_label": {
          "description": "ISO label (only for ISO image types)",
          "type": "string"
        },
        "mime_type": {
          "description": "MIME type of the image",
          "type": "string"
        },
        "name": {
          "description": "Image type name",
          "type": "string"
        },
        "ostree_ref": {
          "description": "Default OSTree ref for this image type",
          "type": "string"
        },
        "partition_type": {
          "$ref": "#/$defs/PartitionType",
          "description": "Partition table type"
        },
        "payload_package_sets": {
          "description": "Package set names safe for custom packages via custom repos",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "required_blueprint_options": {
          "description": "Customization options required by this image type",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "supported_blueprint_options": {
          "description": "Customization options supported by this image type",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "name"
      ],
      "type": "object",
      "x-go-type": "composer.ImageTypeInfo"
    },
    "LogicalVolume": {
      "properties": {
        "fs_type": {
          "description": "The filesystem type for the logical volume. Swap LVs must have an empty mountpoint.\n",
          "enum": [
            "ext4",
            "xfs",
            "vfat",
            "swap"
          ],
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "minsize": {
          "$ref": "#/$defs/minsize"
        },
        "mountpoint": {
          "description": "Mountpoint for the logical volume\n",
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "fs_type"
      ],
      "type": "object",
      "x-go-type": "composer.LogicalVolume"
    },
    "Partition": {
      "oneOf": [
        {
          "$ref": "#/$defs/FilesystemTyped"
        },
        {
          "$ref": "#/$defs/BtrfsVolume"
        },
        {
          "$ref": "#/$defs/VolumeGroup"
        }
      ],
      "type": "object",
      "x-go-type": "composer.Partition"
    },
    "PartitionType": {
      "enum": [
        "gpt",
        "dos"
      ],
      "type": "string",
      "x-go-type": "composer.ImageTypeInfoPartitionType"
    },
    "VolumeGroup": {
      "properties": {
        "logical_volumes": {
          "items": {
            "$ref": "#/$defs/LogicalVolume"
          },
          "type": "array"
        },
        "minsize": {
          "$ref": "#/$defs/minsize"
        },
        "name": {
          "description": "Volume group name (will be automatically generated if omitted)\n",
          "type": "string"
        },
        "part_type": {
          "description": "The partition type GUID for GPT partitions. For DOS partitions, this field can be used to set the (2 hex digit) partition type. If not set, the type will be automatically set based on the mountpoint or the payload type.\n",
          "type": "string"
        },
        "type": {
          "enum": [
            "lvm"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "logical_volumes"
      ],
      "type": "object",
      "x-go-type": "composer.VolumeGroup"
    },
    "minsize": {
      "description": "size with data units",
      "type": "string"
    }
  }
}