Skip to content

Commit

Permalink
Fix API dns/blocking documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Kordowski <[email protected]>
  • Loading branch information
akordowski committed Dec 27, 2023
1 parent a8d2991 commit f549b46
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/api/docs/content/specs/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ components:
description: |
Change the current blocking mode by setting `blocking` to the desired value.
The optional `timer` object may used to set a timer. Once this timer elapsed, the opposite blocking mode is automatically set.
For instance, you can request `{blocking: true, timer: 60}` to disable Pi-hole for one minute.
For instance, you can request `{blocking: false, timer: 60}` to disable Pi-hole for one minute.
Blocking will be automatically resumed afterwards.
You can terminate a possibly running timer by setting `timer` to `null` (the set mode becomes permanent).
Expand All @@ -39,9 +39,8 @@ components:
'application/json':
schema:
allOf:
- $ref: 'dns.yaml#/components/schemas/blocking'
- $ref: 'dns.yaml#/components/schemas/blocking_bool'
- $ref: 'dns.yaml#/components/schemas/timer'
- $ref: 'common.yaml#/components/schemas/took'
responses:
'200':
description: OK
Expand Down Expand Up @@ -83,6 +82,14 @@ components:
- "failed"
- "unknown"
example: "enabled"
blocking_bool:
type: object
properties:
blocking:
type: boolean
description: Blocking status
default: true
example: true
timer:
type: object
properties:
Expand Down

0 comments on commit f549b46

Please sign in to comment.