{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nexatron-io/json-schema/nexatron-io-metric-create-schema.json",
  "title": "MetricCreate",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nexatron-io-openapi.json#/components/schemas/MetricCreate",
  "properties": {
    "denominator_ref": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Denominator Ref"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "dimensions": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Dimensions",
      "type": "array"
    },
    "display_name": {
      "maxLength": 255,
      "title": "Display Name",
      "type": "string"
    },
    "expression": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expression"
    },
    "filters": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Filters"
    },
    "format": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Format"
    },
    "from_table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "From Table"
    },
    "grain": {
      "anyOf": [
        {
          "enum": [
            "year",
            "quarter",
            "month",
            "week",
            "day",
            "hour"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Grain"
    },
    "metric_type": {
      "default": "simple",
      "enum": [
        "simple",
        "derived",
        "cumulative",
        "ratio",
        "time_intelligence",
        "window",
        "cohort",
        "composite",
        "funnel",
        "semi_additive",
        "tree_node"
      ],
      "title": "Metric Type",
      "type": "string"
    },
    "name": {
      "maxLength": 255,
      "title": "Name",
      "type": "string"
    },
    "numerator_ref": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Numerator Ref"
    },
    "tags": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Tags",
      "type": "array"
    },
    "translations": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Translations"
    },
    "type_config": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Type Config"
    },
    "view_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "View Id"
    }
  },
  "required": [
    "name",
    "display_name"
  ],
  "type": "object"
}