mirror of
https://github.com/pi-hole/FTL.git
synced 2025-12-20 04:08:25 +00:00
Merge pull request #2696 from pi-hole/fix/api_dns_upstreams_docs
Fix API specs and example for dns.upstreams in config.yaml
This commit is contained in:
@@ -500,8 +500,8 @@ int get_json_config(struct ftl_conn *api, cJSON *json, const bool detailed)
|
|||||||
continue;
|
continue;
|
||||||
// Check equality of paths up to the requested level (if any)
|
// Check equality of paths up to the requested level (if any)
|
||||||
// Examples:
|
// Examples:
|
||||||
// requested was /config/dnsmasq -> skip all entries that do not start in dnsmasq.
|
// requested was /config/dns -> skip all entries that do not start in dns
|
||||||
// requested was /config/dnsmasq/dhcp -> skip all entries that do not start in dhcp
|
// requested was /config/dns/dhcp -> skip all entries that do not start in dhcp
|
||||||
// etc.
|
// etc.
|
||||||
if(!check_paths_equal(conf_item->p, requested_path, min_level - 1))
|
if(!check_paths_equal(conf_item->p, requested_path, min_level - 1))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -919,7 +919,7 @@ components:
|
|||||||
error:
|
error:
|
||||||
key: "bad_request"
|
key: "bad_request"
|
||||||
message: "Invalid path depth"
|
message: "Invalid path depth"
|
||||||
hint: "Use, e.g., DELETE /config/dnsmasq/upstreams/127.0.0.1 to remove \"127.0.0.1\" from config.dns.upstreams"
|
hint: "Use, e.g., DELETE /config/dns/upstreams/127.0.0.1 to remove \"127.0.0.1\" from config.dns.upstreams"
|
||||||
took: 0.003
|
took: 0.003
|
||||||
item_already_present:
|
item_already_present:
|
||||||
summary: Item to be added exists already
|
summary: Item to be added exists already
|
||||||
@@ -946,7 +946,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: config element
|
description: config element
|
||||||
example: "dnsmasq/upstreams"
|
example: "dns/upstreams"
|
||||||
value:
|
value:
|
||||||
in: path
|
in: path
|
||||||
name: value
|
name: value
|
||||||
|
|||||||
Reference in New Issue
Block a user