migration: fix COLO broken caused by a previous commit
[qemu/kevin.git] / tests / qapi-schema / doc-good.json
blobd992e713d97e083023116fcd4f1a3aa7f863c90a
1 # -*- Mode: Python -*-
2 # Positive QAPI doc comment tests
4 { 'pragma': { 'doc-required': true } }
6 ##
7 # = Section
9 # == Subsection
11 # *strong* _with emphasis_
12 # @var {in braces}
13 # * List item one
14 # - Two, multiple
15 #   lines
17 # 3. Three
18 # Still in list
20 #   Not in list
21 # - Second list
22 # Note: still in list
24 # Note: not in list
25 # 1. Third list
26 #    is numbered
28 # - another item
30 # | example
31 # | multiple lines
33 # Returns: the King
34 # Since: the first age
35 # Notes:
37 # 1. Lorem ipsum dolor sit amet
39 # 2. Ut enim ad minim veniam
41 # Duis aute irure dolor
43 # Example:
45 # -> in
46 # <- out
47 # Examples:
48 # - *verbatim*
49 # - {braces}
53 # @Enum:
54 # @one: The _one_ {and only}
56 # @two is undocumented
58 { 'enum': 'Enum', 'data':
59   [ { 'name': 'one', 'if': 'defined(IFONE)' }, 'two' ],
60   'if': 'defined(IFCOND)' }
63 # @Base:
64 # @base1:
65 #   the first member
67 { 'struct': 'Base', 'data': { 'base1': 'Enum' } }
70 # @Variant1:
71 # A paragraph
73 # Another paragraph (but no @var: line)
75 # Features:
76 # @variant1-feat: a feature
78 { 'struct': 'Variant1',
79   'features': [ 'variant1-feat' ],
80   'data': { 'var1': { 'type': 'str', 'if': 'defined(IFSTR)' } } }
83 # @Variant2:
85 { 'struct': 'Variant2', 'data': {} }
88 # @Object:
90 { 'union': 'Object',
91   'base': 'Base',
92   'discriminator': 'base1',
93   'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } }
96 # @SugaredUnion:
98 { 'union': 'SugaredUnion',
99   'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } }
102 # @Alternate:
103 # @i: an integer
104 # @b is undocumented
106 { 'alternate': 'Alternate',
107   'data': { 'i': 'int', 'b': 'bool' } }
110 # == Another subsection
114 # @cmd:
115 # @arg1: the first argument
117 # @arg2: the second
118 # argument
120 # Features:
121 # @cmd-feat1: a feature
122 # @cmd-feat2: another feature
123 # Note: @arg3 is undocumented
124 # Returns: @Object
125 # TODO: frobnicate
126 # Notes:
127 # - Lorem ipsum dolor sit amet
128 # - Ut enim ad minim veniam
130 # Duis aute irure dolor
131 # Example:
133 # -> in
134 # <- out
135 # Examples:
136 # - *verbatim*
137 # - {braces}
138 # Since: 2.10
140 { 'command': 'cmd',
141   'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' },
142   'returns': 'Object',
143   'features': [ 'cmd-feat1', 'cmd-feat2' ] }
146 # @cmd-boxed:
147 # If you're bored enough to read this, go see a video of boxed cats
148 # Features:
149 # @cmd-feat1: a feature
150 # @cmd-feat2: another feature
151 # Example:
153 # -> in
155 # <- out
157 { 'command': 'cmd-boxed', 'boxed': true,
158   'data': 'Object',
159   'features': [ 'cmd-feat1', 'cmd-feat2' ] }
162 # @EVT-BOXED:
164 { 'event': 'EVT-BOXED',  'boxed': true,
165   'data': 'Object' }