Skip to content

Commit

Permalink
(feat/export report csv): Export reports to CSV (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrajashkr authored Oct 17, 2020
1 parent c1d615d commit ff1d92e
Show file tree
Hide file tree
Showing 12 changed files with 1,296 additions and 32 deletions.
26 changes: 26 additions & 0 deletions docs/devguide/docs/swagger-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,32 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/error_response'
# Report Export
'/v1/{test_id}/reports/{report_id}/export/{file_format}':
get:
operationId: export-report
tags:
- Reports
summary: Exports a report to a file in the required format
description: Exports a report to a file in the required format.
responses:
"200":
description: Success
"400":
description: Unsupported File Format
# Export Comparison Report
'/v1/tests/reports/compare/export/{file_format}':
get:
operationId: export-comparison-report
tags:
- Reports
summary: Exports a comparison report.
description: Exports a comparison report from multiple tests.
responses:
"200":
description: Success
"400":
description: Unsupported File Format
# Config
/v1/config:
get:
Expand Down
70 changes: 70 additions & 0 deletions docs/openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,76 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/error_response'
# Report Export
'/v1/{test_id}/reports/{report_id}/export/{file_format}':
get:
operationId: export-report
tags:
- Reports
parameters:
- in: path
name: test_id
description: The test id.
required: true
schema:
type: string
format: uuid
example: 4bf5d7ab-f310-4a64-8ec2-d65c06188ec1
- in: path
name: report_id
description: The id of the report to retrieve.
required: true
schema:
type: string
- in: path
name: file_format
description: The file format for export.
required: true
schema:
type: string
enum: [csv]
summary: Exports a report to a file in the required format
description: Exports a report to a file in the required format.
responses:
"200":
description: Success
"400":
description: Unsupported File Format
# Export Comparison Report
'/v1/tests/reports/compare/export/{file_format}':
get:
operationId: export-comparison-report
tags:
- Reports
parameters:
- in: path
name: file_format
description: The file format for export.
required: true
schema:
type: string
enum: [csv]
- in: query
name: report_ids
description: List of report IDs that are part of comparison
schema:
type: array
style: form
explode: false
- in: query
name: test_ids
description: List of test IDs that are part of comparison
schema:
type: array
style: form
explode: false
summary: Exports a comparison report.
description: Exports a comparison report from multiple tests.
responses:
"200":
description: Success
"400":
description: Unsupported File Format
# Config
/v1/config:
get:
Expand Down
Loading

0 comments on commit ff1d92e

Please sign in to comment.