openapi: 3.0.3
info:
  title: Task API
  version: 1.0.0
  description: A small fictional task API.
  contact:
    name: API team
    email: api@example.org
servers:
  - url: https://api.tasks.test
paths:
  /tasks/{taskId}:
    get:
      operationId: getTask
      summary: Read a task
      description: Read one task by its identifier.
      tags: [tasks]
      parameters:
        - in: path
          name: taskId
          required: true
          description: Task identifier.
          schema:
            type: string
      responses:
        '200':
          description: A task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '404':
          description: Task not found.
components:
  schemas:
    Task:
      type: object
      required: [id, state]
      properties:
        id:
          type: string
        state:
          type: string
          enum: [ready, pending]
