Add /api/version documentation

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2021-01-30 09:29:14 +01:00
parent afb154e402
commit 0758dc9cc7
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
3 changed files with 61 additions and 11 deletions

View File

@ -254,14 +254,3 @@ components:
type: null
description: "Additional data (if available)"
example: null
parameters:
logs:
dns:
nextID:
in: query
description: (Optional) ID of next line to return
name: nextID
schema:
type: integer
required: false
example: 219

View File

@ -64,3 +64,6 @@ paths:
/lists:
$ref: 'lists.yaml#/components/paths/direct'
/version:
$ref: 'version.yaml#/components/paths/version'

View File

@ -0,0 +1,58 @@
openapi: 3.0.2
components:
paths:
version:
get:
summary: Get Pi-hole version
description: |
Request versions of the individual Pi-hole components
responses:
'200':
description: OK
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/version'
schemas:
version:
type: object
properties:
web:
type: object
properties:
branch:
type: string
description: web branch
example: "master"
tag:
type: string
description: web tag
example: "v6.0"
core:
type: object
properties:
branch:
type: string
description: core branch
example: "master"
tag:
type: string
description: core tag
example: "v6.0"
ftl:
type: object
properties:
branch:
type: string
description: FTL branch
example: "master"
tag:
type: string
description: FTL tag
example: "v6.0"
date:
type: string
description: FTL build time
example: "2021-05-12 21:04:55 +0200"