summaryrefslogtreecommitdiff
path: root/schema/interface_definition.rng
diff options
context:
space:
mode:
authorrebortg <github@ghlr.de>2025-01-08 21:43:10 +0000
committerrebortg <github@ghlr.de>2025-01-08 21:43:10 +0000
commit4e8c8a4bc0f1f2b79c3aadd5b2e8e0fed0ea0160 (patch)
treeb21de7e212cc2cfe3497aecd887409ff8a691c59 /schema/interface_definition.rng
parent7bf02bfb68139fca05523aa33f73a593211aa388 (diff)
downloadvyos-1x-4e8c8a4bc0f1f2b79c3aadd5b2e8e0fed0ea0160.tar.gz
vyos-1x-4e8c8a4bc0f1f2b79c3aadd5b2e8e0fed0ea0160.zip
T6342: extend schema to handle documentation in the xml interface definition
Diffstat (limited to 'schema/interface_definition.rng')
-rw-r--r--schema/interface_definition.rng45
1 files changed, 39 insertions, 6 deletions
diff --git a/schema/interface_definition.rng b/schema/interface_definition.rng
index 94a828c3b..e3d582452 100644
--- a/schema/interface_definition.rng
+++ b/schema/interface_definition.rng
@@ -2,19 +2,19 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<!--
interface_definition.rnc: VyConf reference tree XML grammar
-
+
Copyright (C) 2014. 2017 VyOS maintainers and contributors <maintainers@vyos.net>
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
-
+
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -142,7 +142,7 @@
Nodes may have properties
For simplicity, any property is allowed in any node,
but whether they are used or not is implementation-defined
-
+
Leaf nodes may differ in number of values that can be
associated with them.
By default, a leaf node can have only one value.
@@ -150,7 +150,7 @@
"valueless" means it can have no values at all.
"hidden" means node visibility can be toggled, eg 'dangerous' commands,
"secret" allows a node to hide its value from unprivileged users.
-
+
"priority" is used to influence node processing order for nodes
with exact same dependencies and in compatibility modes.
-->
@@ -178,6 +178,39 @@
<ref name="completionHelp"/>
</zeroOrMore>
<optional>
+ <!--
+ "docs" is used to store documentation for a node in a structured format
+ It is used to generate documentation for the CLI and Web docs
+ -->
+ <group>
+ <element name="docs">
+ <interleave>
+ <optional>
+ <element name="headline">
+ <text/>
+ </element>
+ </optional>
+ <optional>
+ <element name="text">
+ <text/>
+ </element>
+ </optional>
+ <optional>
+ <element name="usageExample">
+ <text/>
+ </element>
+ </optional>
+ <zeroOrMore>
+ <element name="hints">
+ <attribute name="type"/>
+ <text/>
+ </element>
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </group>
+ </optional>
+ <optional>
<!-- These are meaningful only for leaf nodes -->
<group>
<element name="valueless">