{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/duck-hub-com/json-schema/duck-hub-com-v1-create-modifier-group-dto-schema.json",
  "title": "V1CreateModifierGroupDto",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/duck-hub-com-openapi.json#/components/schemas/V1CreateModifierGroupDto",
  "type": "object",
  "properties": {
    "externalId": {
      "type": "string",
      "description": "Caller-defined stable id; the group is thereafter addressed by :ref."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "type": {
      "type": "string",
      "enum": [
        "single_choice",
        "add_ingredients",
        "remove_ingredients"
      ]
    },
    "isRequired": {
      "type": "boolean"
    },
    "options": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V1ModifierGroupOptionInputDto"
      }
    }
  },
  "required": [
    "name",
    "type"
  ],
  "$defs": {
    "V1ModifierGroupOptionInputDto": {
      "type": "object",
      "properties": {
        "ingredientRef": {
          "type": "string",
          "description": "Ingredient ref (externalId or opaque id)."
        },
        "priceAdjustment": {
          "type": "number",
          "minimum": -100000000,
          "maximum": 100000000
        },
        "sortOrder": {
          "type": "number"
        }
      },
      "required": [
        "ingredientRef"
      ]
    }
  }
}