4 # Positive QAPI doc comment tests
6 { 'pragma': { 'doc-required': true } }
36 # Since: the first age
39 # 1. Lorem ipsum dolor sit amet
41 # 2. Ut enim ad minim veniam
43 # Duis aute irure dolor
57 # @one: The _one_ {and only}
60 # @enum-feat: Also _one_ {and only}
61 # @enum-member-feat: a member feature
63 # @two is undocumented
66 'data': [ { 'name': 'one', 'if': 'IFONE',
67 'features': [ 'enum-member-feat' ] },
69 'features': [ 'enum-feat' ],
78 { 'struct': 'Base', 'data': { 'base1': 'Enum' },
79 'if': { 'all': ['IFALL1', 'IFALL2'] } }
86 # Another paragraph (but no @var: line)
89 # @variant1-feat: a feature
90 # @member-feat: a member feature
92 { 'struct': 'Variant1',
93 'features': [ 'variant1-feat' ],
94 'data': { 'var1': { 'type': 'str',
95 'features': [ 'member-feat' ],
102 { 'struct': 'Variant2', 'data': {} }
108 # @union-feat1: a feature
111 'features': [ 'union-feat1' ],
113 'discriminator': 'base1',
114 'data': { 'one': 'Variant1',
115 'two': { 'type': 'Variant2',
116 'if': { 'any': ['IFONE', 'IFTWO'] } } } }
125 # @alt-feat: a feature
127 { 'alternate': 'Alternate',
128 'features': [ 'alt-feat' ],
129 'data': { 'i': 'int', 'b': 'bool' },
130 'if': { 'not': { 'any': [ 'IFONE', 'IFTWO' ] } } }
133 # == Another subsection
139 # @arg1: the first argument
145 # @cmd-feat1: a feature
146 # @cmd-feat2: another feature
147 # Note: @arg3 is undocumented
152 # - Lorem ipsum dolor sit amet
153 # - Ut enim ad minim veniam
155 # Duis aute irure dolor
166 'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' },
168 'features': [ 'cmd-feat1', 'cmd-feat2' ] }
172 # If you're bored enough to read this, go see a video of boxed cats
174 # @cmd-feat1: a feature
175 # @cmd-feat2: another feature
182 { 'command': 'cmd-boxed', 'boxed': true,
184 'features': [ 'cmd-feat1', 'cmd-feat2' ] }
192 { 'event': 'EVT_BOXED', 'boxed': true,
193 'features': [ 'feat3' ],