From 9e68a522cb901e81aee1c419c5ec34b5ad9a585d Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Mon, 22 Apr 2019 12:45:50 +0300 Subject: [PATCH] * update openapi.yaml --- openapi/openapi.yaml | 72 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 7 deletions(-) diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 72fc07c5..5395ca99 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -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)"