From fca17c82d60ade54b5df1b28b5b942954de475e6 Mon Sep 17 00:00:00 2001 From: M-Kusumgar Date: Fri, 16 Aug 2024 12:54:11 +0100 Subject: [PATCH] review comments --- .gitattributes | 1 + R/api.R | 4 ++-- inst/schema/report_run_request.json | 4 +++- inst/schema/report_run_response.json | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7dc385e --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +R/porcelain.R linguist-generated=true diff --git a/R/api.R b/R/api.R index a2a2a50..02e2922 100644 --- a/R/api.R +++ b/R/api.R @@ -92,11 +92,11 @@ report_parameters <- function(root, ref, name) { ##' body data :: json(report_run_request) submit_report_run <- function(root, queue, data) { data <- jsonlite::parse_json(data) - job_id <- queue$submit( + task_id <- queue$submit( data$name, branch = data$branch, ref = data$hash, parameters = data$parameters ) - list(job_id = scalar(job_id)) + list(taskId = scalar(task_id)) } diff --git a/inst/schema/report_run_request.json b/inst/schema/report_run_request.json index 76b01e0..6f001d8 100644 --- a/inst/schema/report_run_request.json +++ b/inst/schema/report_run_request.json @@ -17,7 +17,9 @@ { "type": "object", "properties": {}, - "additionalProperties": true + "additionalProperties": { + "type": ["boolean", "integer", "number", "string"] + } } ] } diff --git a/inst/schema/report_run_response.json b/inst/schema/report_run_response.json index 1fd1405..e2cfd34 100644 --- a/inst/schema/report_run_response.json +++ b/inst/schema/report_run_response.json @@ -2,10 +2,10 @@ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { - "job_id": { + "taskId": { "type": "string" } }, - "required": ["job_id"], + "required": ["taskId"], "additionalProperties": false }