{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-commerce-cloud/json-schema/sap-commerce-cloud-category-content-schema.json",
  "title": "CategoryContent",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sap-commerce-cloud-categories-api-openapi.yml#/components/schemas/CategoryContent",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Category code"
    },
    "name": {
      "type": "string",
      "description": "Category name"
    },
    "description": {
      "type": "string",
      "description": "Category description"
    },
    "image": {
      "$ref": "#/$defs/Image"
    },
    "subcategories": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CategoryRef"
      }
    },
    "products": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      }
    }
  },
  "$defs": {
    "CategoryRef": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Category code"
        },
        "name": {
          "type": "string",
          "description": "Category name"
        },
        "url": {
          "type": "string",
          "description": "Category URL"
        }
      }
    },
    "Image": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "Image URL"
        },
        "altText": {
          "type": "string",
          "description": "Alternative text"
        },
        "format": {
          "type": "string",
          "description": "Image format (thumbnail, product, zoom, cartIcon)"
        },
        "imageType": {
          "type": "string",
          "enum": [
            "PRIMARY",
            "GALLERY"
          ],
          "description": "Image type"
        },
        "galleryIndex": {
          "type": "integer",
          "description": "Position in gallery"
        }
      }
    }
  }
}