From 5065d624437bf0f4e34f5cbee61f6e0142676002 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Mon, 23 Oct 2023 14:57:27 +0200 Subject: [PATCH] Update planner endpoint documentation --- lib/www/server/spec/openapi.yaml | 52 ++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/lib/www/server/spec/openapi.yaml b/lib/www/server/spec/openapi.yaml index 52b968e..1f07811 100644 --- a/lib/www/server/spec/openapi.yaml +++ b/lib/www/server/spec/openapi.yaml @@ -1232,9 +1232,55 @@ paths: content: application/json: schema: - type: array - items: - $ref: "#/components/schemas/PlannedSequence" + type: object + properties: + remarks: + type: string + description: Planner remarks + sequences: + type: array + items: + $ref: "#/components/schemas/PlannedSequence" + text/csv: + schema: + type: string + format: csv + description: | + Returns a CSV response containing one row for each planned sequence, with the following columns: + + * `sequence`: Sequence number + * `line`: Line number + * `fsp`: First shotpoint + * `lsp`: Last shotpoint + * `ts0`: Estimated timestamp of the first shotpoint + * `ts1`: Estimated timestamp of the last shotpoint + * `name`: Line name + * `remarks`: Arbitrary comments + * `num_points`: Number of shotpoints + * `duration`: Estimated duration in seconds + * `length`: Line length in metres + * `azimuth`: Line azimuth + * `lon0`: Longitude of the first shotpoint + * `lat0`: Latitude of the first shotpoint + * `lon1` Longitude of the last shotpoint + * `lat1`: Latitude of the last shotpoint + example: | + "sequence","line","fsp","lsp","ts0","ts1","name","remarks","num_points","duration","length","azimuth","lon0","lat0","lon1","lat1" + 81,5162,2422,1158,"2023-10-22T11:09:24.912Z","2023-10-22T12:56:03.395Z","2051621081S00000","",633,6398,15799.988472147348,26.4703415983101,2.474872,59.086695,2.596266,59.214146 + 82,5178,2444,1146,"2023-10-22T12:56:03.000Z","2023-10-22T14:45:33.607Z","2051781082S00000","",650,6570,16225.02094944685,26.470137885560813,2.469632,59.085264,2.594277,59.216147 + text/html: + schema: + type: string + format: html + description: | + An HTML representation of the plan. + application/pdf: + schema: + type: string + contentMediaType: application/pdf + description: | + A PDF representation of the plan. + post: description: Add a new sequence to the plan.