Add openapi kotlin generator to project
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: QR-access-hardware-contract
|
||||
description: 'Сервис предоставления информации по qr-кодам. Сервис для взаимодействия с микрокомпьютерами'
|
||||
contact:
|
||||
email: taigusiobaka@gmail.com
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: https://{To be done}
|
||||
tags:
|
||||
- name: qr-sync
|
||||
description: Синхронизация qr-кодов
|
||||
paths:
|
||||
/qr:
|
||||
get:
|
||||
tags:
|
||||
- qr-sync
|
||||
summary: Получение qr кодов
|
||||
description: Получение qr кодов за сегодня, за исключением прошедшего времени
|
||||
operationId: getQrCodes
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/QrCodesResponse'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
'500':
|
||||
description: Server internal error
|
||||
/qr-used/{qrId}:
|
||||
post:
|
||||
parameters:
|
||||
- name: qrId
|
||||
in: path
|
||||
description: id qr кода для пометки
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- qr-sync
|
||||
summary: Отметка qr-кода как использованного(Для сбора метрик).
|
||||
description: Отправляется микрокомпьютером, когда qr-код был задействован.
|
||||
operationId: markQrCodeAsUsed
|
||||
responses:
|
||||
'200':
|
||||
description: Successfull mark
|
||||
'401':
|
||||
description: Unauthorized
|
||||
'500':
|
||||
description: Server internal error
|
||||
components:
|
||||
schemas:
|
||||
QrCodesResponse:
|
||||
type: object
|
||||
properties:
|
||||
qrCodes:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/QrCode'
|
||||
QrCode:
|
||||
type: object
|
||||
properties:
|
||||
startDateTime:
|
||||
type: string
|
||||
format: date-time
|
||||
example: '2025-01-01T00:00:00Z'
|
||||
endDateTime:
|
||||
type: string
|
||||
format: date-time
|
||||
example: '2025-01-01T01:00:00Z'
|
||||
doorId:
|
||||
type: string
|
||||
format: uuid
|
||||
example: '7e033fcb-6a0c-4548-80f4-50922834014d'
|
||||
keyCode:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 'dd654b6c-a671-488e-8fc9-eb564d0a8f22'
|
||||
Reference in New Issue
Block a user