87 lines
2.2 KiB
YAML
87 lines
2.2 KiB
YAML
|
openapi: 3.0.0
|
|||
|
info:
|
|||
|
title: ShutterStock Service API
|
|||
|
version: 1.0.0
|
|||
|
description: API для общения с ShutterStock.
|
|||
|
|
|||
|
paths:
|
|||
|
/:
|
|||
|
get:
|
|||
|
summary: Поиск изображений на Shutterstock
|
|||
|
description: Выполняет поиск изображений на Shutterstock по заданным параметрам
|
|||
|
tags:
|
|||
|
- Shutterstock
|
|||
|
requestBody:
|
|||
|
description: Параметры поиска изображений
|
|||
|
required: true
|
|||
|
content:
|
|||
|
application/json:
|
|||
|
schema:
|
|||
|
$ref: '#/components/schemas/ImgSearchReq'
|
|||
|
responses:
|
|||
|
'200':
|
|||
|
description: OK
|
|||
|
content:
|
|||
|
application/json:
|
|||
|
schema:
|
|||
|
$ref: '#/components/schemas/ImgSearchResp'
|
|||
|
'400':
|
|||
|
description: Bad request
|
|||
|
content:
|
|||
|
application/json:
|
|||
|
schema:
|
|||
|
$ref: '#/components/schemas/ErrorResponse'
|
|||
|
'500':
|
|||
|
description: Internal server error
|
|||
|
content:
|
|||
|
application/json:
|
|||
|
schema:
|
|||
|
$ref: '#/components/schemas/ErrorResponse'
|
|||
|
|
|||
|
components:
|
|||
|
schemas:
|
|||
|
ImgSearchReq:
|
|||
|
type: object
|
|||
|
properties:
|
|||
|
query:
|
|||
|
type: string
|
|||
|
aspect_ratio:
|
|||
|
type: number
|
|||
|
format: float
|
|||
|
aspect_ratio_max:
|
|||
|
type: number
|
|||
|
format: float
|
|||
|
aspect_ratio_min:
|
|||
|
type: number
|
|||
|
format: float
|
|||
|
width_from:
|
|||
|
type: integer
|
|||
|
width_to:
|
|||
|
type: integer
|
|||
|
height_from:
|
|||
|
type: integer
|
|||
|
height_to:
|
|||
|
type: integer
|
|||
|
|
|||
|
ImgSearchResp:
|
|||
|
type: object
|
|||
|
properties:
|
|||
|
data:
|
|||
|
type: array
|
|||
|
description: Массив с результатами
|
|||
|
items:
|
|||
|
$ref: '#/components/schemas/ImgSearchData'
|
|||
|
|
|||
|
ImgSearchData:
|
|||
|
type: object
|
|||
|
properties:
|
|||
|
id:
|
|||
|
type: string
|
|||
|
description: Идентификатор изображения
|
|||
|
|
|||
|
ErrorResponse:
|
|||
|
type: object
|
|||
|
properties:
|
|||
|
error:
|
|||
|
type: string
|
|||
|
description: Error
|