Added version.json

This commit is contained in:
Andrey Meshkov 2018-11-26 13:22:14 +03:00 committed by Eugene Bujak
parent fcf7b2185e
commit fb24447915

View File

@ -5,6 +5,7 @@ info:
version: 0.91.0 version: 0.91.0
schemes: schemes:
- http - http
basePath: /control
produces: produces:
- application/json - application/json
tags: tags:
@ -135,6 +136,24 @@ paths:
8.8.4.4: OK 8.8.4.4: OK
"192.168.1.104:53535": "Couldn't communicate with DNS server" "192.168.1.104:53535": "Couldn't communicate with DNS server"
/version.json:
get:
tags:
- global
operationId: getVersionJson
summary: 'Gets information about the latest available version of AdGuard'
produces:
- 'application/json'
responses:
200:
description: 'Version info'
schema:
$ref: "#/definitions/VersionInfo"
500:
description: 'Cannot write answer'
502:
description: 'Cannot retrieve the version.json file contents'
# -------------------------------------------------- # --------------------------------------------------
# Query log methods # Query log methods
# -------------------------------------------------- # --------------------------------------------------
@ -723,6 +742,43 @@ definitions:
example: example:
- '||example.org^' - '||example.org^'
- '||example.com^' - '||example.com^'
VersionInfo:
type: "object"
description: "Information about the latest available version of AdGuard Home"
required:
- "version"
- "announcement"
- "announcement_url"
- "download_darwin_amd64"
- "download_linux_amd64"
- "download_linux_386"
- "download_linux_arm"
- "selfupdate_min_version"
properties:
version:
type: "string"
example: "v0.9"
announcement:
type: "string"
example: "AdGuard Home v0.9 is now available!"
announcement_url:
type: "string"
example: "https://github.com/AdguardTeam/AdGuardHome/releases/tag/v0.9"
download_darwin_amd64:
type: "string"
example: "https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.9/AdGuardHome_v0.9_MacOS.zip"
download_linux_amd64:
type: "string"
example: "https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.9/AdGuardHome_v0.9_linux_amd64.tar.gz"
download_linux_386:
type: "string"
example: "https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.9/AdGuardHome_v0.9_linux_386.tar.gz"
download_linux_arm:
type: "string"
example: "https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.9/AdGuardHome_v0.9_linux_arm.tar.gz"
selfupdate_min_version:
type: "string"
example: "v0.0"
Stats: Stats:
type: "object" type: "object"
description: "General server stats for the last 24 hours" description: "General server stats for the last 24 hours"