`disabled` defaults to false.
description: The RREntry object represents a single record.
required:
- content
- - disabled # PatchZone endpoint complains if this is missing
properties:
content:
type: string
description: 'The content of this record'
disabled:
type: boolean
- description: 'Whether or not this record is disabled'
+ description: 'Whether or not this record is disabled. When unset, the record is not disabled'
set-ptr:
type: boolean
description: 'If set to true, the server will find the matching reverse zone and create a PTR there. Existing PTR records are replaced. If no matching reverse Zone, an error is thrown. Only valid in client bodies, only valid for A and AAAA types. Not returned by the server. This feature is deprecated and will be removed in 4.3.0.'
const auto& items = container["records"].array_items();
for(const auto& record : items) {
string content = stringFromJson(record, "content");
- rr.disabled = boolFromJson(record, "disabled");
+ rr.disabled = false;
+ if(!record["disabled"].is_null()) {
+ rr.disabled = boolFromJson(record, "disabled");
+ }
// validate that the client sent something we can actually parse, and require that data to be dotted.
try {