fuzz: add virtio-9p configurations for fuzzing
[qemu/ar7.git] / tests / qapi-schema / doc-good.json
blobe9af0857db792dd9151a0b80ac2179682121d205
1 # -*- Mode: Python -*-
2 # vim: filetype=python
4 # Positive QAPI doc comment tests
6 { 'pragma': { 'doc-required': true } }
8 ##
9 # = Section
11 # == Subsection
13 # *with emphasis*
14 # @var {in braces}
16 # * List item one
17 # * Two, multiple
18 #   lines
20 # * Three
21 #   Still in list
23 # Not in list
25 # - Second list
26 #   Note: still in list
28 # Note: not in list
30 # 1. Third list
31 #    is numbered
33 # 2. another item
35 # Returns: the King
36 # Since: the first age
37 # Notes:
39 # 1. Lorem ipsum dolor sit amet
41 # 2. Ut enim ad minim veniam
43 # Duis aute irure dolor
45 # Example:
47 # -> in
48 # <- out
49 # Examples:
50 # - *verbatim*
51 # - {braces}
55 # @Enum:
56 # @one: The _one_ {and only}
58 # Features:
59 # @enum-feat: Also _one_ {and only}
61 # @two is undocumented
63 { 'enum': 'Enum', 'data':
64   [ { 'name': 'one', 'if': 'defined(IFONE)' }, 'two' ],
65   'features': [ 'enum-feat' ],
66   'if': 'defined(IFCOND)' }
69 # @Base:
70 # @base1:
71 # the first member
73 { 'struct': 'Base', 'data': { 'base1': 'Enum' } }
76 # @Variant1:
77 # A paragraph
79 # Another paragraph (but no @var: line)
81 # Features:
82 # @variant1-feat: a feature
83 # @member-feat: a member feature
85 { 'struct': 'Variant1',
86   'features': [ 'variant1-feat' ],
87   'data': { 'var1': { 'type': 'str',
88                       'features': [ 'member-feat' ],
89                       'if': 'defined(IFSTR)' } } }
92 # @Variant2:
94 { 'struct': 'Variant2', 'data': {} }
97 # @Object:
98 # Features:
99 # @union-feat1: a feature
101 { 'union': 'Object',
102   'features': [ 'union-feat1' ],
103   'base': 'Base',
104   'discriminator': 'base1',
105   'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } }
108 # @SugaredUnion:
109 # Features:
110 # @union-feat2: a feature
112 { 'union': 'SugaredUnion',
113   'features': [ 'union-feat2' ],
114   'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } }
117 # @Alternate:
118 # @i: an integer
119 #     @b is undocumented
121 # Features:
122 # @alt-feat: a feature
124 { 'alternate': 'Alternate',
125   'features': [ 'alt-feat' ],
126   'data': { 'i': 'int', 'b': 'bool' } }
129 # == Another subsection
133 # @cmd:
134 # @arg1: the first argument
136 # @arg2: the second
137 #        argument
139 # Features:
140 # @cmd-feat1: a feature
141 # @cmd-feat2: another feature
142 # Note: @arg3 is undocumented
143 # Returns: @Object
144 # TODO: frobnicate
145 # Notes:
147 # - Lorem ipsum dolor sit amet
148 # - Ut enim ad minim veniam
150 # Duis aute irure dolor
151 # Example:
153 # -> in
154 # <- out
155 # Examples:
156 # - *verbatim*
157 # - {braces}
158 # Since: 2.10
160 { 'command': 'cmd',
161   'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' },
162   'returns': 'Object',
163   'features': [ 'cmd-feat1', 'cmd-feat2' ] }
166 # @cmd-boxed:
167 # If you're bored enough to read this, go see a video of boxed cats
168 # Features:
169 # @cmd-feat1: a feature
170 # @cmd-feat2: another feature
171 # Example:
173 # -> in
175 # <- out
177 { 'command': 'cmd-boxed', 'boxed': true,
178   'data': 'Object',
179   'features': [ 'cmd-feat1', 'cmd-feat2' ] }
182 # @EVT-BOXED:
183 # Features:
184 # @feat3: a feature
186 { 'event': 'EVT-BOXED',  'boxed': true,
187   'features': [ 'feat3' ],
188   'data': 'Object' }