{
  "openapi": "3.0.3",
  "info": { "title": "Fictional work queue", "version": "1.0.0" },
  "paths": {
    "/tasks/{taskId}": {
      "get": {
        "parameters": [
          { "name": "taskId", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["id", "state"],
                  "properties": {
                    "id": { "type": "string" },
                    "state": { "type": "string", "enum": ["ready", "pending"] }
                  }
                },
                "examples": {
                  "ready": { "value": { "id": "task-7", "state": "ready" } },
                  "pending": { "value": { "id": "task-7", "state": "pending" } }
                }
              }
            }
          },
          "503": {
            "description": "Temporary service failure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["code"],
                  "properties": { "code": { "type": "string" } }
                },
                "example": { "code": "TEMP_UNAVAILABLE" }
              }
            }
          }
        }
      }
    }
  }
}
