{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/launchflag-dev/json-schema/launchflag-dev-flag-schema.json",
  "title": "Flag",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/launchflag-dev-openapi.json#/components/schemas/Flag",
  "type": "object",
  "required": [
    "key"
  ],
  "properties": {
    "key": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "boolean",
        "multivariate"
      ]
    },
    "failMode": {
      "type": "string",
      "enum": [
        "open",
        "closed"
      ],
      "description": "What your app should answer when it cannot reach us. Closed for money and auth."
    },
    "essential": {
      "type": "boolean",
      "description": "Essential flags are left alone by emergency off."
    },
    "requires": {
      "type": [
        "string",
        "null"
      ],
      "description": "Key of a flag this one depends on. While that flag is off for a user, this one is off for them too. Cycles are refused."
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}