{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/abmeter-ai/json-schema/abmeter-ai-parameter-exposure-schema.json",
  "title": "ParameterExposure",
  "description": "Record of a parameter value being resolved for a specific user",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/abmeter-ai-openapi.yml#/components/schemas/ParameterExposure",
  "type": "object",
  "properties": {
    "parameter_slug": {
      "$ref": "#/$defs/Slug",
      "description": "The slug of the parameter that was resolved"
    },
    "space_slug": {
      "$ref": "#/$defs/Slug",
      "description": "The slug of the space containing the parameter"
    },
    "resolved_value": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "boolean"
        },
        {
          "type": "number"
        }
      ],
      "description": "The resolved parameter value for this user"
    },
    "user_id": {
      "type": "string",
      "description": "The user ID this exposure is for"
    },
    "exposable_slug": {
      "$ref": "#/$defs/Slug",
      "nullable": true,
      "description": "Slug of the experiment or feature flag that provided the override (null for default values)"
    },
    "exposable_type": {
      "type": [
        "string",
        "null"
      ],
      "description": "Type of the exposable entity (e.g., Experiment or FeatureFlag). Will be null if the default value was used."
    },
    "audience_slug": {
      "$ref": "#/$defs/Slug",
      "nullable": true,
      "description": "Slug of the audience that matched (for experiments and feature flags)"
    },
    "resolved_at": {
      "type": "string",
      "format": "date-time",
      "description": "When this parameter value was resolved"
    }
  },
  "required": [
    "parameter_slug",
    "space_slug",
    "user_id",
    "resolved_value",
    "resolved_at",
    "exposable_slug",
    "audience_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)."
    }
  }
}