{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loopgantt-com/json-schema/loopgantt-com-create-gantt-response-schema.json",
  "title": "CreateGanttResponse",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loopgantt-com-openapi.json#/components/schemas/CreateGanttResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "startDate": {
          "type": "string",
          "format": "date"
        },
        "taskCount": {
          "type": "integer"
        },
        "dependencyCount": {
          "type": "integer"
        },
        "claimUrl": {
          "type": "string",
          "format": "uri",
          "description": "Open to view + export the chart (PNG/PDF) and to save it to an account. Share this link with the user — it is the only handle to the chart."
        },
        "previewUrl": {
          "type": "string",
          "format": "uri",
          "description": "Same as claimUrl"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "description": "Deleted after this time unless opened (then 30 days from creation) or claimed"
        },
        "expiresInDays": {
          "type": "integer"
        },
        "schedule": {
          "$ref": "#/$defs/ScheduleSummary"
        },
        "imageUrl": {
          "type": "string",
          "format": "uri",
          "description": "PNG of the chart (same token). Show it inline when the client supports images."
        },
        "deadline": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "The project deadline you supplied, or null."
        },
        "fit": {
          "type": [
            "object",
            "null"
          ],
          "description": "Project-level deadline fit (null without a deadline).",
          "properties": {
            "deadline": {
              "type": "string",
              "format": "date"
            },
            "projectEndDate": {
              "type": "string",
              "format": "date"
            },
            "late": {
              "type": "boolean"
            },
            "days": {
              "type": "integer",
              "description": "Calendar days from projectEndDate to the deadline: >0 buffer, <0 late"
            }
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "rateLimit": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer"
            },
            "remaining": {
              "type": "integer"
            }
          }
        }
      }
    }
  },
  "$defs": {
    "ScheduleSummary": {
      "type": "object",
      "description": "Computed by the same critical-path engine as the LoopGantt app",
      "properties": {
        "projectStartDate": {
          "type": "string",
          "format": "date"
        },
        "projectEndDate": {
          "type": "string",
          "format": "date"
        },
        "projectDurationDays": {
          "type": "integer"
        },
        "criticalPath": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Task ids on the critical path, in order"
        },
        "tasks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScheduledTask"
          }
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "taskIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "ScheduledTask": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "start": {
          "type": "string",
          "format": "date"
        },
        "end": {
          "description": "Last working day of the task (inclusive). Milestones: start = end.",
          "type": "string",
          "format": "date"
        },
        "durationDays": {
          "type": "integer"
        },
        "isMilestone": {
          "type": "boolean"
        },
        "isCritical": {
          "type": "boolean",
          "description": "On the critical path (zero total float)"
        },
        "totalFloat": {
          "type": "integer",
          "description": "Working days the task can slip without moving the project end"
        },
        "isPhase": {
          "type": "boolean",
          "description": "Top-level phase; start/end are the envelope of its tasks."
        },
        "deadline": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "Finish-by marker supplied for the task, or null."
        },
        "fit": {
          "type": [
            "object",
            "null"
          ],
          "description": "How the scheduled end relates to the deadline; null without a deadline.",
          "properties": {
            "late": {
              "type": "boolean"
            },
            "days": {
              "type": "integer",
              "description": "Calendar days from the scheduled end to the deadline: >0 buffer, <0 late"
            }
          }
        }
      }
    }
  }
}