Skip to content

Commit

Permalink
chore(openapi): added scan
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-segning committed Jul 16, 2024
1 parent d4649dd commit a64688b
Showing 1 changed file with 140 additions and 3 deletions.
143 changes: 140 additions & 3 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tags:
- name: file

paths:
'/files/upload':
'/api/files/upload':
post:
summary: Upload a file
tags: [ file ]
Expand All @@ -39,7 +39,7 @@ paths:
multipart/form-data:
schema:
$ref: '#/components/schemas/FileUpload'
'/files/download/{file_id}':
'/api/files/download/{file_id}':
get:
summary: Get a file
tags: [ file ]
Expand All @@ -63,9 +63,146 @@ paths:
description: 'File not found'
'500':
description: 'Internal server error'

'/api/scans':
get:
summary: Get all scans
tags: [ scan ]
operationId: getScans
description: Get all scans
parameters:
- name: page
in: query
required: false
description: Page number
schema:
type: number
- name: size
in: query
required: false
description: Size of page
schema:
type: number
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Scan'
'500':
description: 'Internal server error'
post:
summary: Create a scan
tags: [ scan ]
operationId: createScan
description: Create a scan
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Scan'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Scan'
'400':
description: 'Bad request'
'500':
description: 'Internal server error'
'/api/scans/{scan_id}':
get:
summary: Get a scan
tags: [ scan ]
operationId: getScan
description: Get a scan
parameters:
- name: scan_id
in: path
required: true
description: Scan ID
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Scan'
'404':
description: 'Scan not found'
'500':
description: 'Internal server error'
put:
summary: Update a scan
tags: [ scan ]
operationId: updateScan
description: Update a scan
parameters:
- name: scan_id
in: path
required: true
description: Scan ID
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Scan'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Scan'
'400':
description: 'Bad request'
'404':
description: 'Scan not found'
'500':
description: 'Internal server error'
delete:
summary: Delete a scan
tags: [ scan ]
operationId: deleteScan
description: Delete a scan
parameters:
- name: scan_id
in: path
required: true
description: Scan ID
schema:
type: string
responses:
'200':
description: OK
'404':
description: 'Scan not found'
'500':
description: 'Internal server error'
components:
schemas:
Scan:
type: object
properties:
id:
type: string
created_at:
type: string
updated_at:
type: string
meta_data:
additionalProperties:
type: string
title:
type: string
FileUpload:
type: object
properties:
Expand Down

0 comments on commit a64688b

Please sign in to comment.