-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Documentation fixes #2086
base: development
Are you sure you want to change the base?
API Documentation fixes #2086
Conversation
Added a section for "Local DNS Records" in API documentation Fixed capitalisation of Pi-hole configuration, which was creating 2 sections in API documentation Amended incorrect description of the until common parameter Signed-off-by: Luis Tavares <[email protected]>
Signed-off-by: Luis Tavares <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your submission. The spell check found a small glitch, see below.
To be honest, I am not sure how I feel about adding dedicated documentation for local DNS records where /config
is already documented. Yes, I see how you are getting here (making it more obvious) but one might then come and ask why we are doing it for local DNS records and local CNAMEs but not for other array-like settings (e.g., DNS upstream servers) where the same PUT
/DELETE
can be used.
Also, there is some glitch when you leave the field empty, you get the full config instead:
Co-authored-by: Dominik <[email protected]> Signed-off-by: Luis Tavares <[email protected]>
You're correct authentication is required, must be a leftover when I copied from another section Co-authored-by: Dominik <[email protected]> Signed-off-by: Luis Tavares <[email protected]>
Yes, I know :-) My comment was more meant into the direction "is there any way to prevent this from happening?". I could have been clearer about my intention. As you have dedicated parameters:
record_type:
in: path
name: type
schema:
type: string
enum:
- hosts
- cnameRecords
required: true
description: The type of DNS record hosts (A) or cnameRecord (CNAME)
example: hosts
allowEmptyValue: false <----------------------- but I haven't tested it myself.
Ah yes, right. That is in the description of Or, of course, you don't need to know it at all if you are using https://pi.hole/admin/settings/dnsrecords which does everything for you (if configuring via the web interface).
Where did you add something describing this? I have only see the examples. |
I looked at the It is in the description/example of the |
What does this PR aim to accomplish?:
Fix some typos in the API documentation and add a new section
How does this PR accomplish the above?:
Fixed an incorrect description in the "until" parameter, it was using the same description as "from"
Fixed capitalization of "Pi-hole configuration", which was creating 2 sections in API documentation, "Pi-hole Configuration" and "Pi-hole configuration"
Added a section for "Local DNS Records" with examples how to add and remove "A" and "CNAME" records.
Removed "$ref: 'common.yaml#/components/schemas/took'" from requestBody
Link documentation PRs if any are needed to support this PR:
N/A
By submitting this pull request, I confirm the following:
git rebase
)