{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/programmes-net/json-schema/programmes-net-luhn-validate-schema.json",
  "title": "luhn.validate",
  "description": "Validate a number, auto-detecting its type or using the one you choose.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/programmes-net-formatters-validators-api-openapi.yml#/components/schemas/luhn.validate",
  "type": "object",
  "properties": {
    "operation": {
      "const": "validate"
    },
    "input": {
      "type": "string",
      "description": "A card number, IBAN, ISBN or EAN/UPC (spaces and dashes are ignored).",
      "maxLength": 32768
    },
    "options": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Which check to run.",
          "enum": [
            "auto",
            "card",
            "iban",
            "isbn",
            "gtin",
            "luhn"
          ],
          "default": "auto"
        }
      }
    }
  },
  "required": [
    "operation"
  ]
}