{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/frihet-io/json-schema/frihet-io-vendor-create-schema.json",
  "title": "VendorCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/frihet-io-vendors-api-openapi.yml#/components/schemas/VendorCreate",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Vendor name (person or company)"
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Contact email"
    },
    "phone": {
      "type": "string",
      "description": "Phone number"
    },
    "taxId": {
      "type": "string",
      "description": "Tax identification number (NIF/CIF/VAT)"
    },
    "address": {
      "$ref": "#/$defs/Address"
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "description": "Structured address. Canonical fields are `province` and `zip`.\nThe aliases `state` and `postalCode` are also accepted for backward compatibility.\n",
      "properties": {
        "street": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "province": {
          "type": "string",
          "description": "Province or state (canonical field)"
        },
        "zip": {
          "type": "string",
          "description": "Postal/ZIP code (canonical field)"
        },
        "country": {
          "type": "string"
        },
        "state": {
          "type": "string",
          "description": "Alias for `province` (backward compatibility)",
          "deprecated": true
        },
        "postalCode": {
          "type": "string",
          "description": "Alias for `zip` (backward compatibility)",
          "deprecated": true
        }
      }
    }
  }
}