2 # Positive QAPI doc comment tests
4 { 'pragma': { 'doc-required': true } }
11 # *strong* _with emphasis_
34 # Since: the first age
37 # 1. Lorem ipsum dolor sit amet
39 # 2. Ut enim ad minim veniam
41 # Duis aute irure dolor
54 # @one: The _one_ {and only}
57 # @enum-feat: Also _one_ {and only}
59 # @two is undocumented
61 { 'enum': 'Enum', 'data':
62 [ { 'name': 'one', 'if': 'defined(IFONE)' }, 'two' ],
63 'features': [ 'enum-feat' ],
64 'if': 'defined(IFCOND)' }
71 { 'struct': 'Base', 'data': { 'base1': 'Enum' } }
77 # Another paragraph (but no @var: line)
80 # @variant1-feat: a feature
81 # @member-feat: a member feature
83 { 'struct': 'Variant1',
84 'features': [ 'variant1-feat' ],
85 'data': { 'var1': { 'type': 'str',
86 'features': [ 'member-feat' ],
87 'if': 'defined(IFSTR)' } } }
92 { 'struct': 'Variant2', 'data': {} }
97 # @union-feat1: a feature
100 'features': [ 'union-feat1' ],
102 'discriminator': 'base1',
103 'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } }
108 # @union-feat2: a feature
110 { 'union': 'SugaredUnion',
111 'features': [ 'union-feat2' ],
112 'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } }
120 # @alt-feat: a feature
122 { 'alternate': 'Alternate',
123 'features': [ 'alt-feat' ],
124 'data': { 'i': 'int', 'b': 'bool' } }
127 # == Another subsection
132 # @arg1: the first argument
138 # @cmd-feat1: a feature
139 # @cmd-feat2: another feature
140 # Note: @arg3 is undocumented
144 # - Lorem ipsum dolor sit amet
145 # - Ut enim ad minim veniam
147 # Duis aute irure dolor
158 'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' },
160 'features': [ 'cmd-feat1', 'cmd-feat2' ] }
164 # If you're bored enough to read this, go see a video of boxed cats
166 # @cmd-feat1: a feature
167 # @cmd-feat2: another feature
174 { 'command': 'cmd-boxed', 'boxed': true,
176 'features': [ 'cmd-feat1', 'cmd-feat2' ] }
183 { 'event': 'EVT-BOXED', 'boxed': true,
184 'features': [ 'feat3' ],