From 8cad6dddb2b6099ae3b7be61e3f20ec6b42b448f Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Fri, 17 Jan 2025 11:55:02 -0800 Subject: [PATCH] [TM-1624] Fix the shape and documentation of the task reports. --- .../Resources/V2/Tasks/TaskReportResource.php | 2 +- .../V2/definitions/V2TaskActionRead.yml | 23 ++++++---- resources/docs/swagger-v2.yml | 42 ++++++++++++------- 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/app/Http/Resources/V2/Tasks/TaskReportResource.php b/app/Http/Resources/V2/Tasks/TaskReportResource.php index 99e4e52e1..0b919fd07 100644 --- a/app/Http/Resources/V2/Tasks/TaskReportResource.php +++ b/app/Http/Resources/V2/Tasks/TaskReportResource.php @@ -13,7 +13,7 @@ public function toArray($request) 'due_at' => $this->due_at, 'submitted_at' => $this->submitted_at, 'report_title' => $this->report_title, - 'update_at' => $this->updated_at, + 'updated_at' => $this->updated_at, 'status' => $this->status, 'update_request_status' => $this->update_request_status, 'nothing_to_report' => $this->nothing_to_report, diff --git a/openapi-src/V2/definitions/V2TaskActionRead.yml b/openapi-src/V2/definitions/V2TaskActionRead.yml index 364adcc98..1ad2e7e81 100644 --- a/openapi-src/V2/definitions/V2TaskActionRead.yml +++ b/openapi-src/V2/definitions/V2TaskActionRead.yml @@ -2,22 +2,29 @@ title: V2TaskActionRead type: object properties: uuid: - type: integer - type: - type: string - status: type: string due_at: type: string format: date-time - title: + submitted_at: type: string + format: date-time report_title: type: string + updated_at: + type: string + format: date-time + status: + type: string update_request_status: type: string - submitted_at: + nothing_to_report: + type: boolean + title: + type: string + type: type: string - format: date-time parent_name: - type: string \ No newline at end of file + type: string + completion: + type: integer diff --git a/resources/docs/swagger-v2.yml b/resources/docs/swagger-v2.yml index 2a10f4983..ff8bb04e2 100644 --- a/resources/docs/swagger-v2.yml +++ b/resources/docs/swagger-v2.yml @@ -42489,25 +42489,32 @@ definitions: type: object properties: uuid: - type: integer - type: - type: string - status: type: string due_at: type: string format: date-time - title: + submitted_at: type: string + format: date-time report_title: type: string + updated_at: + type: string + format: date-time + status: + type: string update_request_status: type: string - submitted_at: + nothing_to_report: + type: boolean + title: + type: string + type: type: string - format: date-time parent_name: type: string + completion: + type: integer StatusUpdate: title: StatusUpdate type: object @@ -75738,25 +75745,32 @@ paths: type: object properties: uuid: - type: integer - type: - type: string - status: type: string due_at: type: string format: date-time - title: + submitted_at: type: string + format: date-time report_title: type: string + updated_at: + type: string + format: date-time + status: + type: string update_request_status: type: string - submitted_at: + nothing_to_report: + type: boolean + title: + type: string + type: type: string - format: date-time parent_name: type: string + completion: + type: integer '/v2/tasks/{UUID}/submit': put: summary: Submit all task reports via a task