{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/track/json-schema/track-paginated-account-list-schema.json",
  "title": "PaginatedAccountList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/track-ledger-api-openapi.yml#/components/schemas/PaginatedAccountList",
  "type": "object",
  "required": [
    "count",
    "results"
  ],
  "properties": {
    "count": {
      "type": "integer"
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "previous": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Account"
      }
    }
  },
  "$defs": {
    "Account": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "code": {
          "type": "string",
          "maxLength": 10
        },
        "name": {
          "type": "string",
          "maxLength": 255
        },
        "account_type": {
          "$ref": "#/$defs/AccountTypeEnum"
        },
        "path": {
          "type": "string"
        },
        "is_active": {
          "type": "boolean"
        },
        "current_balance": {
          "type": "string",
          "format": "decimal",
          "pattern": "^-?\\d{0,19}(?:\\.\\d{0,2})?$",
          "readOnly": true
        }
      },
      "required": [
        "account_type",
        "code",
        "current_balance",
        "id",
        "name",
        "path"
      ]
    },
    "AccountTypeEnum": {
      "enum": [
        "asset",
        "liability",
        "equity",
        "revenue",
        "expense"
      ],
      "type": "string",
      "description": "* `asset` - Asset\n* `liability` - Liability\n* `equity` - Equity\n* `revenue` - Revenue\n* `expense` - Expense"
    }
  }
}