Skip to content
Snippets Groups Projects

Security

Merged Jitka Viceníková requested to merge security into develop
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
+ 138
18
@@ -10,45 +10,165 @@ tags:
- name: Visualization
components:
schemas:
VisualizationSchemaDto:
CarDto:
type: object
title: Visualization
description: visualization of given data
title: Car
description: Formula
required:
- message
- id
properties:
message:
id:
type: integer
format: int64
description: Id of the car
example: 1
components:
type: array
description: List of components in the car
items:
$ref: '#/components/schemas/CarComponentDto'
driver:
$ref: '#/components/schemas/DriverDto'
CarComponentType:
type: string
description: Type of a component
enum:
- CHASSIS
- ENGINE
- FRONTWING
- SUSPENSION
CarComponentDto:
type: object
title: Component
description: Component of a car
required:
- id
- componentType
- information
properties:
id:
type: integer
format: int64
description: Id of the component
example: 1
componentType:
$ref: '#/components/schemas/CarComponentType'
weight:
type: number
description: Weight of the component
example: 50.5
information:
type: string
description: short message
VisualizationSchemaCreateDto:
description: Specific information about component
example: lightweight front wing v2 (black)
Characteristic:
type: string
enum:
- aggressiveness
- driving on the wet
- react quickly
- remain completely focused
- adaptability to the environment
- strong neck
- ability to interact with the team
- efficient cardiovascular systems
- excellent when overtaking
- excellent starter
- excellent in the corners
- excellent in straight lines
DriverDto:
type: object
title: VisualizationRequest
description: data to visualize
title: Driver
description: Driver of a car
required:
- data
- id
- name
- surname
- nationality
- characteristics
properties:
data:
id:
type: integer
format: int64
description: Id of the driver
example: 1
name:
type: string
description: Name of the driver
example: Max
surname:
type: string
description: data about cars
description: Surname of the driver
example: Verstappen
height:
type: integer
description: Height in cm
example: 170
birthday:
type: string
description: Date of birth
format: date
example: 1997-09-30
nationality:
type: string
description: Nationality of the driver
example: Dutch
characteristics:
type: array
description: Set of driver's characteristics
items:
$ref: '#/components/schemas/Characteristic'
responses:
NotFound:
description: The specified resource was not found
content:
application/json:
schema:
type: object
title: NotFound
properties:
message:
type: string
Unexpected:
description: Unexpected error
content:
application/json:
schema:
type: object
title: Unexpected
properties:
message:
type: string
paths:
/visualization:
post:
tags:
- Visualization
summary: Creates a visualization of given JSON
operationId: getVisualization
summary: Creates a visualization of given car
operationId: generateCarPdf
requestBody:
required: true
description: Request body with receiver and message for new notification
description: Request body with the car for visualization
content:
application/json:
schema:
$ref: '#/components/schemas/VisualizationSchemaCreateDto'
type: object
properties:
car:
$ref: '#/components/schemas/CarDto'
required:
- car
responses:
"200":
description: OK
content:
application/json:
application/pdf:
schema:
$ref: '#/components/schemas/VisualizationSchemaDto'
type: string
format: binary
default:
$ref: '#/components/responses/Unexpected'
Loading