From a0fe0d30f0ea9b7aa47cedc332a6df64a1efbe26 Mon Sep 17 00:00:00 2001 From: jrb0001 Date: Mon, 28 May 2018 20:20:19 +0200 Subject: [PATCH] Make attribute name and labels more strict --- data/schema/SCHEMA-SCHEMA | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/data/schema/SCHEMA-SCHEMA b/data/schema/SCHEMA-SCHEMA index fd0129c82..c4ae676a6 100644 --- a/data/schema/SCHEMA-SCHEMA +++ b/data/schema/SCHEMA-SCHEMA @@ -10,6 +10,8 @@ key: mnt-by required multiple lookup=dn42.mntner > [mntner] key: remarks optional multiple > [text]... mnt-by: DN42-MNT remarks: # option descriptions + Attribute names must match /[a-zA-Z]([a-zA-Z0-9_\-]*[a-zA-Z0-9])?/. ++ required : object required to have at least one optional @@ -38,12 +40,12 @@ remarks: # option descriptions * must come last in option list + [label] string value. A positional string argument required. - Text inside brackets represent a label for the string. + Text inside brackets represent a label for the string and must match the same rules as attribute names. If follwed by '...' values are gathered as an array. + {enum1|enum2|} enumeration. One option in pipe('|') deliniation is allowed. - If there is a trailing pipe it means the enum is optional. + If there is a trailing pipe it means the enum is optional. Enum values must match the same rules as attribute names. + - label=str keyword argument. Label for value with type 'str', 'int', or 'decimal' + label=str keyword argument. Label for value with type 'str', 'int', or 'decimal'. The label must match the same rules as attribute names. + - 'literal' Literal value. literal text value. + 'literal' Literal value. literal text value which must not contain any whitespace or single quotes.