Skip to content

Commit

Permalink
Pull request: openapi: fix more docs issues
Browse files Browse the repository at this point in the history
Merge in DNS/adguard-home from fix-openapi to master

Squashed commit of the following:

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

    openapi: fix more docs issues
  • Loading branch information
ainar-g authored and heyxkhoa committed Mar 17, 2023
1 parent dc7687c commit fbbb43a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ go-lint: ; $(ENV) "$(SHELL)" ./scripts/make/go-lint.sh
go-test: ; $(ENV) "$(SHELL)" ./scripts/make/go-test.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
# infrastructure stops using them.
dependencies:
Expand Down
31 changes: 15 additions & 16 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@
'UpstreamsConfigResponse':
'type': 'object'
'description': 'Upstreams configuration response'
'additionalProperties':
'additionalProperties':
'type': 'string'
'Filter':
'type': 'object'
Expand Down Expand Up @@ -1514,6 +1514,8 @@
'properties':
'domain_or_ip':
'type': 'integer'
'additionalProperties':
'type': 'integer'
'StatsConfig':
'type': 'object'
'description': 'Statistics configuration'
Expand Down Expand Up @@ -1967,7 +1969,7 @@
'AddressInfoBeta':
'type': 'object'
'description': 'Port information'
'required':
'required':
- 'ip'
- 'port'
'properties':
Expand All @@ -1985,7 +1987,7 @@
'AddressInfo':
'type': 'object'
'description': 'Port information'
'required':
'required':
- 'ip'
- 'port'
'properties':
Expand All @@ -1999,7 +2001,7 @@
'AddressesInfo':
'type': 'object'
'description': 'AdGuard Home addresses configuration'
'required':
'required':
- 'dns_port'
- 'web_port'
- 'interfaces'
Expand All @@ -2021,7 +2023,7 @@
'AddressesInfoBeta':
'type': 'object'
'description': 'AdGuard Home addresses configuration'
'required':
'required':
- 'dns_port'
- 'web_port'
- 'interfaces'
Expand Down Expand Up @@ -2176,9 +2178,7 @@
'items':
'type': 'string'
'whois_info':
'type': 'array'
'items':
'$ref': '#/components/schemas/WhoisInfo'
'$ref': '#/components/schemas/WhoisInfo'
'disallowed':
'type': 'boolean'
'description': >
Expand All @@ -2193,9 +2193,8 @@
'WhoisInfo':
'type': 'object'
'properties':
'key':
'type': 'string'
'additionalProperties':
'type': 'string'

'Clients':
'type': 'object'
Expand Down Expand Up @@ -2289,7 +2288,7 @@
'example': false
'CheckConfigResponse':
'type': 'object'
'required':
'required':
- 'dns'
- 'web'
- 'static_ip'
Expand All @@ -2302,7 +2301,7 @@
'$ref': '#/components/schemas/CheckConfigStaticIpInfo'
'CheckConfigResponseInfo':
'type': 'object'
'required':
'required':
- 'status'
- 'can_autofix'
'properties':
Expand All @@ -2315,7 +2314,7 @@
'CheckConfigStaticIpInfoStatic':
'type': 'string'
'example': 'no'
'enum':
'enum':
- 'yes'
- 'no'
- 'error'
Expand All @@ -2338,7 +2337,7 @@
'type': 'object'
'description': >
AdGuard Home initial configuration for the first-install wizard.
'required':
'required':
- 'dns'
- 'web'
- 'username'
Expand All @@ -2360,7 +2359,7 @@
'type': 'object'
'description': >
AdGuard Home initial configuration for the first-install wizard.
'required':
'required':
- 'dns'
- 'web'
- 'username'
Expand Down
5 changes: 5 additions & 0 deletions scripts/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ if [ "$(git diff --cached --name-only -- '*.go' 'go.mod')" ]
then
make go-lint go-test
fi

if [ "$(git diff --cached --name-only -- './openapi/openapi.yaml')" ]
then
make openapi-lint
fi

0 comments on commit fbbb43a

Please sign in to comment.