util/uri.c: remove brackets that wrap `return` statement's content.
[qemu.git] / tests / qapi-schema / doc-good.json
blob97ab4625ff13efb752af4951bc667d0dd1486274
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': [ 'one', 'two' ] }
61 # @Base:
62 # @base1:
63 #   the first member
65 { 'struct': 'Base', 'data': { 'base1': 'Enum' } }
68 # @Variant1:
69 # A paragraph
71 # Another paragraph (but no @var: line)
73 { 'struct': 'Variant1', 'data': { 'var1': 'str' } }
76 # @Variant2:
78 { 'struct': 'Variant2', 'data': {} }
81 # @Object:
83 { 'union': 'Object',
84   'base': 'Base',
85   'discriminator': 'base1',
86   'data': { 'one': 'Variant1', 'two': 'Variant2' } }
89 # @SugaredUnion:
91 { 'union': 'SugaredUnion',
92   'data': { 'one': 'Variant1', 'two': 'Variant2' } }
95 # == Another subsection
99 # @cmd:
100 # @arg1: the first argument
102 # @arg2: the second
103 # argument
104 # Note: @arg3 is undocumented
105 # Returns: @Object
106 # TODO: frobnicate
107 # Notes:
108 # - Lorem ipsum dolor sit amet
109 # - Ut enim ad minim veniam
111 # Duis aute irure dolor
112 # Example:
114 # -> in
115 # <- out
116 # Examples:
117 # - *verbatim*
118 # - {braces}
119 # Since: 2.10
121 { 'command': 'cmd',
122   'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' },
123   'returns': 'Object' }
126 # @cmd-boxed:
127 # If you're bored enough to read this, go see a video of boxed cats
128 # Example:
130 # -> in
132 # <- out
134 { 'command': 'cmd-boxed', 'boxed': true,
135   'data': 'Object' }