{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compteam-io/json-schema/compteam-io-discount-code-validation-schema.json",
  "title": "DiscountCodeValidation",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compteam-io-discount-codes-api-openapi.yml#/components/schemas/DiscountCodeValidation",
  "properties": {
    "code": {
      "type": "string",
      "title": "Code"
    },
    "category": {
      "type": "string",
      "enum": [
        "membership",
        "gear",
        "seminar"
      ],
      "title": "Category"
    },
    "target_ids": {
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "type": "array",
      "title": "Target Ids"
    },
    "gross_amount": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0.0
        },
        {
          "type": "string"
        }
      ],
      "title": "Gross Amount"
    },
    "currency": {
      "type": "string",
      "title": "Currency"
    },
    "existing_discount_amount": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0.0
        },
        {
          "type": "string"
        }
      ],
      "title": "Existing Discount Amount",
      "default": "0"
    }
  },
  "type": "object",
  "required": [
    "code",
    "category",
    "gross_amount",
    "currency"
  ]
}