83 lines
2.1 KiB
YAML
83 lines
2.1 KiB
YAML
info:
|
|
title: Parameters API
|
|
version: '1.0'
|
|
openapi: '3.1.0'
|
|
tags:
|
|
- name: Routes
|
|
paths:
|
|
/api:
|
|
get:
|
|
tags:
|
|
- Routes
|
|
summary: Get all parameters
|
|
description: Get all parameters
|
|
responses:
|
|
200:
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Parameter'
|
|
example: [
|
|
{
|
|
"id": 0,
|
|
"title": "A thing happening somewhere",
|
|
"type": 1,
|
|
"icon": null,
|
|
"icon_gray": null
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "The fox jumping over a cat",
|
|
"type": 1,
|
|
"icon": {
|
|
"original_name": "fox_jump.jpeg",
|
|
"url": "/images/SHA256_HASH.jpeg",
|
|
"sha256": "SHA256"
|
|
},
|
|
"icon_gray": {
|
|
"original_name": "fox_jump.gray.jpeg",
|
|
"url": "/images/SHA256_HASH.jpeg",
|
|
"sha256": "SHA256"
|
|
}
|
|
}
|
|
]
|
|
components:
|
|
schemas:
|
|
Image:
|
|
type: object
|
|
properties:
|
|
source_name:
|
|
type: string
|
|
example: "source_file.jpeg"
|
|
url:
|
|
type: string
|
|
example: "/images/SHA256_HASH.jpeg"
|
|
sha256:
|
|
type: string
|
|
required:
|
|
- source_name
|
|
- url
|
|
- example
|
|
Parameter:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: number
|
|
example: 0
|
|
title:
|
|
type: string
|
|
example: 'A quick brown fox jumping over a lazy cat'
|
|
type:
|
|
type: number
|
|
example: 0
|
|
icon:
|
|
$ref: '#/components/schemas/Image'
|
|
icon_gray:
|
|
$ref: '#/components/schemas/Image'
|
|
required:
|
|
- id
|
|
- title
|
|
- type |