{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/emporix/main/json-schema/emporix-label-schema.json",
  "title": "label",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emporix-label-service-openapi.yml#/components/schemas/label",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique ID of the label."
    },
    "name": {
      "type": "string",
      "description": "Name of the label."
    },
    "mediaId": {
      "type": "string",
      "description": "Id of the media."
    },
    "image": {
      "type": "string",
      "description": "Image URL."
    },
    "cloudinaryUrl": {
      "type": "string",
      "description": "Cludinary path."
    },
    "overlay": {
      "$ref": "#/$defs/overlay"
    },
    "description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      ],
      "description": "Localized resource description in a form of a map of translations."
    },
    "metadata": {
      "$ref": "#/$defs/metadata"
    }
  },
  "$defs": {
    "metadata": {
      "title": "Metadata",
      "description": "Metadata",
      "type": "object",
      "properties": {
        "createdAt": {
          "description": "The creation date.",
          "type": "string"
        },
        "modifiedAt": {
          "description": "The modification date.",
          "type": "string"
        },
        "version": {
          "description": "The document version number.",
          "type": "integer"
        }
      }
    },
    "overlay": {
      "description": "If present and `isTrue` is actually true the label should be printed on associated products on the described position.",
      "properties": {
        "isTrue": {
          "type": "boolean"
        },
        "position": {
          "type": "number"
        }
      },
      "required": [
        "position"
      ]
    }
  }
}