{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/abmeter-ai/json-schema/abmeter-ai-feature-flag-schema.json",
  "title": "FeatureFlag",
  "description": "Feature toggle with audience targeting and parameter overrides",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/abmeter-ai-feature-flags-api-openapi.yml#/components/schemas/FeatureFlag",
  "type": "object",
  "properties": {
    "slug": {
      "$ref": "#/$defs/Slug"
    },
    "description": {
      "type": "string"
    },
    "space_slug": {
      "$ref": "#/$defs/Slug"
    },
    "state": {
      "type": "string",
      "enum": [
        "enabled",
        "disabled"
      ]
    },
    "audience_slug": {
      "$ref": "#/$defs/Slug",
      "description": "Slug of the global audience that determines who sees this feature"
    },
    "variant_slug": {
      "$ref": "#/$defs/Slug",
      "description": "Slug of the variant containing parameter overrides for this feature"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  },
  "required": [
    "slug",
    "state",
    "audience_slug",
    "variant_slug"
  ],
  "$defs": {
    "Slug": {
      "type": "string",
      "description": "Standardized identifier for entities used across the API. Recommended format: each entity type has its own prefix pattern followed by a short alphanumeric identifier (e.g., parameter-ab4c, space-main, audience-control)."
    }
  }
}