{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/caliuapp-com/json-schema/caliuapp-com-tag-schema.json",
  "title": "Tag",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/caliuapp-com-openapi.json#/components/schemas/Tag",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "parentId": {
      "type": [
        "string",
        "null"
      ]
    },
    "handle": {
      "type": "string",
      "description": "Full hierarchical handle as written in note content, e.g. \"#work/project\" or \"#my project#\" (multi-word tags carry a closing hash)"
    },
    "color": {
      "type": [
        "string",
        "null"
      ]
    },
    "icon": {
      "type": [
        "string",
        "null"
      ]
    },
    "isPinned": {
      "type": "boolean",
      "description": "Pinned tags sort first in clients"
    },
    "noteCount": {
      "type": "number"
    },
    "createdAt": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "name",
    "parentId",
    "color",
    "icon",
    "createdAt"
  ]
}