Created
March 23, 2023 15:39
-
-
Save zquintana/3cebdb4ebd8bf3452b3d557dd30ed46b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: "3.0.2" | |
info: | |
title: Task Service API | |
version: "1.0" | |
servers: | |
- url: http://localhost:8000/ | |
- url: https://gateway.prod.ptech-ops.com/v1/tasks | |
paths: | |
/{taskId}/comments: | |
post: | |
description: 'Add a task comment' | |
operationId: 'createComment' | |
tags: | |
- tasks | |
parameters: | |
- in: path | |
name: taskId | |
required: true | |
schema: | |
type: string | |
requestBody: | |
description: 'Create comment arguments' | |
required: true | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/CreateComment' | |
responses: | |
'200': | |
description: 'Create task comment' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Comment' | |
get: | |
description: "Retrieve task comments" | |
operationId: "getComments" | |
tags: | |
- tasks | |
parameters: | |
- in: path | |
name: taskId | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: "Retrieve task comments" | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Comment' | |
/{taskId}: | |
get: | |
description: "Retrieve a single task" | |
operationId: "getTask" | |
tags: | |
- tasks | |
parameters: | |
- in: path | |
name: taskId | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: Retrieve a single task | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Task' | |
/rfps/{rfpId}/tasks: | |
get: | |
description: "Retrieve tasks for RFP" | |
operationId: "getTasks" | |
tags: | |
- tasks | |
parameters: | |
- in: path | |
name: rfpId | |
required: true | |
schema: | |
type: integer | |
responses: | |
'200': | |
description: OK | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Task' | |
post: | |
description: 'Create task for RFP' | |
operationId: "createTask" | |
tags: | |
- tasks | |
parameters: | |
- in: path | |
name: rfpId | |
required: true | |
schema: | |
type: integer | |
requestBody: | |
description: 'Create task arguments' | |
required: true | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/CreateTask' | |
responses: | |
'200': | |
description: Task created | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Task' | |
components: | |
schemas: | |
CreateComment: | |
type: object | |
properties: | |
author: | |
$ref: '#/components/schemas/User' | |
comment: | |
type: string | |
CreateTask: | |
type: object | |
properties: | |
name: | |
type: string | |
description: | |
type: string | |
assignees: | |
type: array | |
items: | |
type: integer | |
dueDate: | |
type: string | |
format: date-time | |
owner: | |
$ref: '#/components/schemas/User' | |
required: | |
- name | |
- owner | |
User: | |
type: object | |
properties: | |
id: | |
type: integer | |
email: | |
type: string | |
format: email | |
firstName: | |
type: string | |
lastName: | |
type: string | |
Comment: | |
type: object | |
properties: | |
taskId: | |
type: string | |
createdAt: | |
type: string | |
comment: | |
type: string | |
Task: | |
type: object | |
properties: | |
id: | |
type: string | |
rfpId: | |
type: integer | |
createdAt: | |
type: string | |
format: date-time | |
name: | |
type: string | |
description: | |
type: string | |
snoozedUntil: | |
type: string | |
format: date-time | |
dueDate: | |
type: string | |
format: date-time | |
completedAt: | |
type: string | |
owner: | |
$ref: '#/components/schemas/User' | |
assignees: | |
type: array | |
items: | |
type: integer | |
comments: | |
type: array | |
items: | |
$ref: '#/components/schemas/Comment' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment