{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/altoviz-com/json-schema/altoviz-com-unit-schema.json",
  "title": "Unit",
  "description": "Unit",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/altoviz-com-units-api-openapi.yml#/components/schemas/Unit",
  "type": "object",
  "properties": {
    "code": {
      "type": [
        "string",
        "null"
      ],
      "description": "Code"
    },
    "conversion": {
      "type": "number",
      "description": "Conversion",
      "format": "double",
      "readOnly": true
    },
    "decimals": {
      "type": [
        "number",
        "null"
      ],
      "description": "Decimals",
      "format": "double",
      "readOnly": true
    },
    "id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Unit Id",
      "format": "int32",
      "readOnly": true
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name",
      "readOnly": true
    },
    "type": {
      "$ref": "#/$defs/UnitType"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "UnitType": {
      "enum": [
        "Time",
        "Weight",
        "Area",
        "Volume",
        "Dimension",
        "Other"
      ],
      "type": "string"
    }
  }
}