Pull request: openapi: fix more docs issues

Merge in DNS/adguard-home from fix-openapi to master

Squashed commit of the following:

commit bd95a502666372443b937cbcb690e307cd943342
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Jan 14 13:23:37 2021 +0300

    openapi: fix more docs issues
This commit is contained in:
Ainar Garipov 2021-01-14 13:48:52 +03:00
parent 4474e9fcf9
commit f2c6e1c682
3 changed files with 22 additions and 16 deletions

View File

@ -80,6 +80,8 @@ go-lint: ; $(ENV) "$(SHELL)" ./scripts/make/go-lint.sh
go-test: ; $(ENV) "$(SHELL)" ./scripts/make/go-test.sh go-test: ; $(ENV) "$(SHELL)" ./scripts/make/go-test.sh
go-tools: ; $(ENV) "$(SHELL)" ./scripts/make/go-tools.sh go-tools: ; $(ENV) "$(SHELL)" ./scripts/make/go-tools.sh
openapi-lint: ; cd ./openapi/ && $(YARN) test
# TODO(a.garipov): Remove the legacy targets once the build # TODO(a.garipov): Remove the legacy targets once the build
# infrastructure stops using them. # infrastructure stops using them.
dependencies: dependencies:

View File

@ -1283,7 +1283,7 @@
'UpstreamsConfigResponse': 'UpstreamsConfigResponse':
'type': 'object' 'type': 'object'
'description': 'Upstreams configuration response' 'description': 'Upstreams configuration response'
'additionalProperties': 'additionalProperties':
'type': 'string' 'type': 'string'
'Filter': 'Filter':
'type': 'object' 'type': 'object'
@ -1514,6 +1514,8 @@
'properties': 'properties':
'domain_or_ip': 'domain_or_ip':
'type': 'integer' 'type': 'integer'
'additionalProperties':
'type': 'integer'
'StatsConfig': 'StatsConfig':
'type': 'object' 'type': 'object'
'description': 'Statistics configuration' 'description': 'Statistics configuration'
@ -1967,7 +1969,7 @@
'AddressInfoBeta': 'AddressInfoBeta':
'type': 'object' 'type': 'object'
'description': 'Port information' 'description': 'Port information'
'required': 'required':
- 'ip' - 'ip'
- 'port' - 'port'
'properties': 'properties':
@ -1985,7 +1987,7 @@
'AddressInfo': 'AddressInfo':
'type': 'object' 'type': 'object'
'description': 'Port information' 'description': 'Port information'
'required': 'required':
- 'ip' - 'ip'
- 'port' - 'port'
'properties': 'properties':
@ -1999,7 +2001,7 @@
'AddressesInfo': 'AddressesInfo':
'type': 'object' 'type': 'object'
'description': 'AdGuard Home addresses configuration' 'description': 'AdGuard Home addresses configuration'
'required': 'required':
- 'dns_port' - 'dns_port'
- 'web_port' - 'web_port'
- 'interfaces' - 'interfaces'
@ -2021,7 +2023,7 @@
'AddressesInfoBeta': 'AddressesInfoBeta':
'type': 'object' 'type': 'object'
'description': 'AdGuard Home addresses configuration' 'description': 'AdGuard Home addresses configuration'
'required': 'required':
- 'dns_port' - 'dns_port'
- 'web_port' - 'web_port'
- 'interfaces' - 'interfaces'
@ -2176,9 +2178,7 @@
'items': 'items':
'type': 'string' 'type': 'string'
'whois_info': 'whois_info':
'type': 'array' '$ref': '#/components/schemas/WhoisInfo'
'items':
'$ref': '#/components/schemas/WhoisInfo'
'disallowed': 'disallowed':
'type': 'boolean' 'type': 'boolean'
'description': > 'description': >
@ -2193,9 +2193,8 @@
'WhoisInfo': 'WhoisInfo':
'type': 'object' 'type': 'object'
'properties': 'additionalProperties':
'key': 'type': 'string'
'type': 'string'
'Clients': 'Clients':
'type': 'object' 'type': 'object'
@ -2289,7 +2288,7 @@
'example': false 'example': false
'CheckConfigResponse': 'CheckConfigResponse':
'type': 'object' 'type': 'object'
'required': 'required':
- 'dns' - 'dns'
- 'web' - 'web'
- 'static_ip' - 'static_ip'
@ -2302,7 +2301,7 @@
'$ref': '#/components/schemas/CheckConfigStaticIpInfo' '$ref': '#/components/schemas/CheckConfigStaticIpInfo'
'CheckConfigResponseInfo': 'CheckConfigResponseInfo':
'type': 'object' 'type': 'object'
'required': 'required':
- 'status' - 'status'
- 'can_autofix' - 'can_autofix'
'properties': 'properties':
@ -2315,7 +2314,7 @@
'CheckConfigStaticIpInfoStatic': 'CheckConfigStaticIpInfoStatic':
'type': 'string' 'type': 'string'
'example': 'no' 'example': 'no'
'enum': 'enum':
- 'yes' - 'yes'
- 'no' - 'no'
- 'error' - 'error'
@ -2338,7 +2337,7 @@
'type': 'object' 'type': 'object'
'description': > 'description': >
AdGuard Home initial configuration for the first-install wizard. AdGuard Home initial configuration for the first-install wizard.
'required': 'required':
- 'dns' - 'dns'
- 'web' - 'web'
- 'username' - 'username'
@ -2360,7 +2359,7 @@
'type': 'object' 'type': 'object'
'description': > 'description': >
AdGuard Home initial configuration for the first-install wizard. AdGuard Home initial configuration for the first-install wizard.
'required': 'required':
- 'dns' - 'dns'
- 'web' - 'web'
- 'username' - 'username'

View File

@ -11,3 +11,8 @@ if [ "$(git diff --cached --name-only -- '*.go' 'go.mod')" ]
then then
make go-lint go-test make go-lint go-test
fi fi
if [ "$(git diff --cached --name-only -- './openapi/openapi.yaml')" ]
then
make openapi-lint
fi