{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fulcradynamics-com/json-schema/fulcradynamics-com-update-data-type-body-schema.json",
  "title": "UpdateDataTypeBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fulcradynamics-com-data-types-api-openapi.yml#/components/schemas/UpdateDataTypeBody",
  "additionalProperties": false,
  "properties": {
    "deprecated": {
      "description": "Mark (true) or unmark (false) this data type as deprecated",
      "type": "boolean"
    },
    "description": {
      "type": "string"
    },
    "icon": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "record_spec": {
      "$ref": "#/$defs/RecordSpecInput"
    }
  },
  "type": "object",
  "$defs": {
    "FulcraMetricRecordScale": {
      "additionalProperties": false,
      "properties": {
        "max": {
          "format": "int64",
          "type": "integer"
        },
        "min": {
          "format": "int64",
          "type": "integer"
        },
        "step": {
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "max",
        "min",
        "step"
      ],
      "type": "object"
    },
    "RecordSpecInput": {
      "additionalProperties": false,
      "properties": {
        "aggregation": {
          "enum": [
            "cumulative",
            "discrete"
          ],
          "type": "string"
        },
        "scale": {
          "$ref": "#/$defs/FulcraMetricRecordScale"
        },
        "schema": {
          "description": "JSON Schema fragment (JSON text) adding fields on top of the base type's own schema",
          "type": "string"
        },
        "type": {
          "description": "Must match the data type's actual base type, if provided",
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "value_map": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        }
      },
      "type": "object"
    }
  }
}