{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vviinn-com/json-schema/vviinn-com-predicted-product-schema.json",
  "title": "predicted-product",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vviinn-com-openapi.yaml#/components/schemas/predicted-product",
  "type": "object",
  "properties": {
    "id": {
      "description": "the id of the product to which the predictions belong",
      "type": "string"
    },
    "attributes": {
      "description": "each object represents a field of the product with its predicted value",
      "type": "array",
      "items": {
        "$ref": "#/$defs/predicted-attribute"
      }
    },
    "images": {
      "description": "each object represents an image of the product with its predicted fields",
      "type": "array",
      "items": {
        "$ref": "#/$defs/predicted-image"
      }
    }
  },
  "required": [
    "id",
    "attributes",
    "images"
  ],
  "$defs": {
    "predicted-attribute": {
      "description": "this object contains a prediction for an attribute",
      "type": "object",
      "properties": {
        "name": {
          "description": "the attribute's name",
          "type": "string"
        },
        "value": {
          "description": "the attribute's known value (according to the product catalog)",
          "nullable": true
        },
        "prediction": {
          "description": "the attribute's predicted value",
          "nullable": true
        },
        "confirmed": {
          "description": "the value that was confirmed by a user",
          "nullable": true
        }
      },
      "required": [
        "name",
        "value",
        "prediction"
      ]
    },
    "predicted-image": {
      "type": "object",
      "properties": {
        "url": {
          "description": "the url that identifies the image",
          "type": "string"
        },
        "attributes": {
          "description": "each object represents an attribute of the image with its predicted value",
          "type": "array",
          "items": {
            "$ref": "#/$defs/predicted-attribute"
          }
        }
      },
      "required": [
        "url",
        "attributes"
      ]
    }
  }
}