* update openapi.yaml

This commit is contained in:
Simon Zolin 2019-04-22 12:45:50 +03:00
parent faa7c7b2d4
commit 9e68a522cb
1 changed files with 65 additions and 7 deletions

View File

@ -739,6 +739,26 @@ paths:
description: OK
schema:
$ref: "#/definitions/AddressesInfo"
/install/check_config:
post:
tags:
- install
operationId: installCheckConfig
summary: "Checks configuration"
parameters:
- in: "body"
name: "body"
description: "Configuration to be checked"
required: true
schema:
$ref: "#/definitions/CheckConfigRequest"
responses:
200:
description: OK
schema:
$ref: "#/definitions/CheckConfigResponse"
400:
description: "Failed to parse JSON or cannot listen on the specified address"
/install/configure:
post:
tags:
@ -1320,17 +1340,18 @@ definitions:
type: "integer"
format: "int32"
example: 53
warning:
type: "string"
example: "Cannot bind to this port"
AddressesInfo:
type: "object"
description: "AdGuard Home addresses configuration"
properties:
dns:
$ref: "#/definitions/AddressInfo"
web:
$ref: "#/definitions/AddressInfo"
dns_port:
type: "integer"
format: "int32"
example: 53
web_port:
type: "integer"
format: "int32"
example: 80
interfaces:
type: "object"
description: "Network interfaces dictionary (key is the interface name)"
@ -1353,6 +1374,43 @@ definitions:
items:
$ref: "#/definitions/Client"
description: "Clients array"
CheckConfigRequest:
type: "object"
description: "Configuration to be checked"
properties:
dns:
$ref: "#/definitions/CheckConfigRequestInfo"
web:
$ref: "#/definitions/CheckConfigRequestInfo"
CheckConfigRequestInfo:
type: "object"
properties:
ip:
type: "string"
example: "127.0.0.1"
port:
type: "integer"
format: "int32"
example: 53
autofix:
type: "boolean"
example: false
CheckConfigResponse:
type: "object"
properties:
dns:
$ref: "#/definitions/CheckConfigResponseInfo"
web:
$ref: "#/definitions/CheckConfigResponseInfo"
CheckConfigResponseInfo:
type: "object"
properties:
status:
type: "string"
example: ""
can_autofix:
type: "boolean"
example: false
InitialConfiguration:
type: "object"
description: "AdGuard Home initial configuration (for the first-install wizard)"