openapi: 3.0.1
info:
  title: Create project plans with Project Plan 365
  version: v1
paths:
  /chatgptapi/project:
    post:
      tags:
        - Project
      description: Creates a project plan using the provided tasks.
      operationId: createProjectPlan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectRequestModel'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponseModel'
components:
  schemas:
    ProjectRequestModel:
      type: object
      properties:
        tasks:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                description: This is the task's unique identifier. It must be a whole number (no decimals).
                format: int32
              name:
                type: string
                description: Name of the task
              duration:
                type: string
                description: Duration of the task in days
                nullable: true
              wbs:
                type: string
                description: Work Breakdown Structure code associated with the task, start from 1
                nullable: true
              predecessors:
                type: string
                description: List of integer unique identifiers of tasks that are predecessors to this task. It needs to use id field of the task.
                nullable: true
              cost:
                type: string
                description: Estimated cost of the task. It can be empty.
                nullable: true
              startDate:
                type: string
                description: Start date of the task
                nullable: true
              endDate:
                type: string
                description: End date of the task
                nullable: true
              notes:
                type: string
                description: Additional notes or comments related to the task
                nullable: true
              resources:
                type: array
                items:
                  type: string
                description: List of resources associated with the task
                nullable: true
            additionalProperties: false
      additionalProperties: false
    ProjectResponseModel:
      type: object
      properties:
        linkToOnlineProjectPlan365:
          type: string
          description: Link to the online Project Plan 365
        linkToDownloadMPPProjectFile:
          type: string
          description: Link to download the project in MPP format
      additionalProperties: false
