1# -*- Mode: Python -*- 2# Positive QAPI doc comment tests 3 4{ 'pragma': { 'doc-required': true } } 5 6## 7# = Section 8# 9# == Subsection 10# 11# *strong* _with emphasis_ 12# @var {in braces} 13# * List item one 14# - Two, multiple 15# lines 16# 17# 3. Three 18# Still in list 19# 20# Not in list 21# - Second list 22# Note: still in list 23# 24# Note: not in list 25# 1. Third list 26# is numbered 27# 28# - another item 29# 30# | example 31# | multiple lines 32# 33# Returns: the King 34# Since: the first age 35# Notes: 36# 37# 1. Lorem ipsum dolor sit amet 38# 39# 2. Ut enim ad minim veniam 40# 41# Duis aute irure dolor 42# 43# Example: 44# 45# -> in 46# <- out 47# Examples: 48# - *verbatim* 49# - {braces} 50## 51 52## 53# @Enum: 54# @one: The _one_ {and only} 55# 56# @two is undocumented 57## 58{ 'enum': 'Enum', 'data': 59 [ { 'name': 'one', 'if': 'defined(IFONE)' }, 'two' ], 60 'if': 'defined(IFCOND)' } 61 62## 63# @Base: 64# @base1: 65# the first member 66## 67{ 'struct': 'Base', 'data': { 'base1': 'Enum' } } 68 69## 70# @Variant1: 71# A paragraph 72# 73# Another paragraph (but no @var: line) 74# 75# Features: 76# @variant1-feat: a feature 77## 78{ 'struct': 'Variant1', 79 'features': [ 'variant1-feat' ], 80 'data': { 'var1': { 'type': 'str', 'if': 'defined(IFSTR)' } } } 81 82## 83# @Variant2: 84## 85{ 'struct': 'Variant2', 'data': {} } 86 87## 88# @Object: 89## 90{ 'union': 'Object', 91 'base': 'Base', 92 'discriminator': 'base1', 93 'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } } 94 95## 96# @SugaredUnion: 97## 98{ 'union': 'SugaredUnion', 99 'data': { 'one': 'Variant1', 'two': { 'type': 'Variant2', 'if': 'IFTWO' } } } 100 101## 102# == Another subsection 103## 104 105## 106# @cmd: 107# @arg1: the first argument 108# 109# @arg2: the second 110# argument 111# 112# Features: 113# @cmd-feat1: a feature 114# @cmd-feat2: another feature 115# Note: @arg3 is undocumented 116# Returns: @Object 117# TODO: frobnicate 118# Notes: 119# - Lorem ipsum dolor sit amet 120# - Ut enim ad minim veniam 121# 122# Duis aute irure dolor 123# Example: 124# 125# -> in 126# <- out 127# Examples: 128# - *verbatim* 129# - {braces} 130# Since: 2.10 131## 132{ 'command': 'cmd', 133 'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' }, 134 'returns': 'Object', 135 'features': [ 'cmd-feat1', 'cmd-feat2' ] } 136 137## 138# @cmd-boxed: 139# If you're bored enough to read this, go see a video of boxed cats 140# Features: 141# @cmd-feat1: a feature 142# @cmd-feat2: another feature 143# Example: 144# 145# -> in 146# 147# <- out 148## 149{ 'command': 'cmd-boxed', 'boxed': true, 150 'data': 'Object', 151 'features': [ 'cmd-feat1', 'cmd-feat2' ] } 152