{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cervejabarata-com-br/json-schema/cervejabarata-com-br-menu-photo-upload-schema.json",
  "title": "MenuPhotoUpload",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cervejabarata-com-br-openapi.json#/components/schemas/MenuPhotoUpload",
  "type": "object",
  "properties": {
    "city": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "venue": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
      "description": "The bar's slug in that city"
    },
    "images": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 700000,
        "description": "A JPEG photo as a data URI (base64)"
      },
      "minItems": 1,
      "maxItems": 3
    },
    "contact": {
      "type": "string",
      "minLength": 5,
      "maxLength": 120,
      "description": "Phone or email, only to ask about these prices; deleted after 90 days"
    },
    "is_owner": {
      "type": "boolean",
      "description": "Sent by the bar's owner or manager"
    },
    "ref": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{16}$",
      "description": "The bar's own link token (?ref= on the page, from GET /api/admin/venues/{id}/menu-link): a valid one makes the upload trusted, so its prices inside the hard bounds are approved at once"
    },
    "consent": {
      "type": "boolean",
      "description": "LGPD consent: required with a contact"
    },
    "turnstile": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "description": "Cloudflare Turnstile token"
    }
  },
  "required": [
    "city",
    "venue",
    "images",
    "turnstile"
  ],
  "additionalProperties": false
}