{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/emile-wine/json-schema/emile-wine-wine-create-schema.json",
  "title": "WineCreate",
  "description": "User-provided wine reference. All fields except `name` are optional;\nthe LLM-enrichment step fills the gaps when configured.\n\n`color` is restricted to the same allowlist as the CHECK constraint\non `wine_references.color` so an invalid value is rejected at the\nedge instead of bubbling up as a Postgres error.",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emile-wine-openapi.json#/components/schemas/WineCreate",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Name"
    },
    "producer": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Producer"
    },
    "appellation": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Appellation"
    },
    "region": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ],
      "title": "Region"
    },
    "country": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ],
      "title": "Country"
    },
    "color": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "rouge",
            "blanc",
            "rosé",
            "effervescent",
            "liquoreux",
            "other"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Color"
    }
  },
  "type": "object",
  "required": [
    "name"
  ]
}