{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowral-app/json-schema/flowral-app-brainstorm-schema.json",
  "title": "Brainstorm",
  "description": "A brainstorm with every idea on its board.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowral-app-brainstorms-api-openapi.yml#/components/schemas/Brainstorm",
  "allOf": [
    {
      "$ref": "#/$defs/BrainstormSummary"
    },
    {
      "type": "object",
      "properties": {
        "ideas": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Idea"
          }
        }
      },
      "required": [
        "ideas"
      ]
    }
  ],
  "$defs": {
    "BrainstormSummary": {
      "type": "object",
      "description": "A brainstorm without its ideas — what list endpoints return.",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "archived": {
          "type": "boolean"
        },
        "public": {
          "type": "boolean",
          "description": "Whether this brainstorm is published — readable by anyone with its link, with no account."
        },
        "publicUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The published link, or null when private."
        },
        "ideaCount": {
          "type": "integer"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "name",
        "archived"
      ]
    },
    "Idea": {
      "type": "object",
      "description": "One box on a brainstorm board.",
      "properties": {
        "id": {
          "type": "string"
        },
        "brainstormId": {
          "type": "string"
        },
        "parentId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The idea this nests under, or null for a root idea."
        },
        "title": {
          "type": "string"
        },
        "notes": {
          "type": [
            "string",
            "null"
          ]
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "assigneeId": {
          "type": [
            "string",
            "null"
          ]
        },
        "commentCount": {
          "type": "integer"
        },
        "fileCount": {
          "type": "integer"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "brainstormId",
        "title"
      ]
    }
  }
}