{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/unplain-io/json-schema/unplain-io-feature-list-result-schema.json",
  "title": "FeatureListResult",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/unplain-io-openapi.json#/components/schemas/FeatureListResult",
  "type": "object",
  "required": [
    "items",
    "total",
    "page",
    "pageCount",
    "pageSize",
    "sort"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FeatureRequest"
      }
    },
    "total": {
      "type": "integer",
      "minimum": 0
    },
    "page": {
      "type": "integer",
      "minimum": 1
    },
    "pageCount": {
      "type": "integer",
      "minimum": 0
    },
    "pageSize": {
      "type": "integer",
      "const": 20
    },
    "sort": {
      "type": "string",
      "enum": [
        "top",
        "new",
        "shipped"
      ]
    }
  },
  "$defs": {
    "FeatureRequest": {
      "type": "object",
      "required": [
        "id",
        "text",
        "status",
        "voteCount",
        "createdAt",
        "voted"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "text": {
          "type": "string",
          "maxLength": 200
        },
        "status": {
          "type": "string",
          "enum": [
            "requested",
            "planned",
            "building",
            "shipped"
          ],
          "description": "`declined` requests exist but are never returned publicly, so they cannot be resubmitted as new ideas."
        },
        "voteCount": {
          "type": "integer",
          "minimum": 0
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "voted": {
          "type": "boolean",
          "description": "Whether the calling browser has voted for this request."
        }
      }
    }
  }
}