1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Invert required in set option to simplify generated rules.

This commit is contained in:
David Steele 2021-10-11 16:25:36 -04:00
parent 980b777a4a
commit 576b047634
2 changed files with 5 additions and 20 deletions

View File

@ -309,18 +309,17 @@ option:
set:
type: string
required: false
command:
expire:
required: false
expire: {}
info:
depend:
option: stanza
required: false
restore:
default: latest
required: true
verify:
internal: true
required: false
command-role:
main: {}

View File

@ -6053,7 +6053,7 @@ static const ParseRuleOption parseRuleOption[CFG_OPTION_TOTAL] =
(
PARSE_RULE_OPTION_NAME("set"),
PARSE_RULE_OPTION_TYPE(cfgOptTypeString),
PARSE_RULE_OPTION_REQUIRED(true),
PARSE_RULE_OPTION_REQUIRED(false),
PARSE_RULE_OPTION_SECTION(cfgSectionCommandLine),
PARSE_RULE_OPTION_COMMAND_ROLE_MAIN_VALID_LIST
@ -6066,19 +6066,11 @@ static const ParseRuleOption parseRuleOption[CFG_OPTION_TOTAL] =
PARSE_RULE_OPTION_OPTIONAL_LIST
(
PARSE_RULE_OPTION_OPTIONAL_COMMAND_OVERRIDE
(
PARSE_RULE_OPTION_OPTIONAL_COMMAND(cfgCmdExpire),
PARSE_RULE_OPTION_OPTIONAL_REQUIRED(false),
)
PARSE_RULE_OPTION_OPTIONAL_COMMAND_OVERRIDE
(
PARSE_RULE_OPTION_OPTIONAL_COMMAND(cfgCmdInfo),
PARSE_RULE_OPTION_OPTIONAL_DEPEND(cfgOptStanza),
PARSE_RULE_OPTION_OPTIONAL_REQUIRED(false),
)
PARSE_RULE_OPTION_OPTIONAL_COMMAND_OVERRIDE
@ -6086,13 +6078,7 @@ static const ParseRuleOption parseRuleOption[CFG_OPTION_TOTAL] =
PARSE_RULE_OPTION_OPTIONAL_COMMAND(cfgCmdRestore),
PARSE_RULE_OPTION_OPTIONAL_DEFAULT("latest"),
)
PARSE_RULE_OPTION_OPTIONAL_COMMAND_OVERRIDE
(
PARSE_RULE_OPTION_OPTIONAL_COMMAND(cfgCmdVerify),
PARSE_RULE_OPTION_OPTIONAL_REQUIRED(false),
PARSE_RULE_OPTION_OPTIONAL_REQUIRED(true),
)
),
),