qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: michael.roth@amd.com, kkostiuk@redhat.com, kwolf@redhat.com,
	jsnow@redhat.com, peter.maydell@linaro.org, eblake@redhat.com,
	jiri@resnulli.us, qemu-block@nongnu.org
Subject: [PATCH 05/11] docs/devel/qapi-code-gen: Improve the part on qmp-example directive
Date: Fri,  4 Apr 2025 14:14:07 +0200	[thread overview]
Message-ID: <20250404121413.1743790-6-armbru@redhat.com> (raw)
In-Reply-To: <20250404121413.1743790-1-armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 docs/devel/qapi-code-gen.rst | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
index ad517349fc..25a46fafb6 100644
--- a/docs/devel/qapi-code-gen.rst
+++ b/docs/devel/qapi-code-gen.rst
@@ -1038,20 +1038,15 @@ default to "Example:".
 A simple QMP example::
 
   # .. qmp-example::
-  #    :title: Using query-block
   #
-  #    -> { "execute": "query-block" }
-  #    <- { ... }
+  #     -> { "execute": "query-name" }
+  #     <- { "return": { "name": "Fred" } }
 
 More complex or multi-step examples where exposition is needed before
 or between QMP code blocks can be created by using the ``:annotated:``
 directive option.  When using this option, nested QMP code blocks must
 be entered explicitly with rST's ``::`` syntax.
 
-Highlighting in non-QMP languages can be accomplished by using the
-``.. code-block:: lang`` directive, and non-highlighted text can be
-achieved by omitting the language argument.
-
 For example::
 
   # .. qmp-example::
@@ -1061,11 +1056,21 @@ For example::
   #    This is a more complex example that can use
   #    ``arbitrary rST syntax`` in its exposition::
   #
-  #      -> { "execute": "query-block" }
-  #      <- { ... }
+  #     -> { "execute": "query-block" }
+  #     <- { "return": [
+  #             {
+  #               "device": "ide0-hd0",
+  #               ...
+  #             }
+  #             ...
+  #          ] }
   #
   #    Above, lengthy output has been omitted for brevity.
 
+Highlighting in non-QMP languages can be accomplished by using the
+``.. code-block:: lang`` directive, and non-highlighted text can be
+achieved by omitting the language argument.
+
 
 Examples of complete definition documentation::
 
-- 
2.48.1



  parent reply	other threads:[~2025-04-04 12:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 12:14 [PATCH 00/11] qapi: Documentation improvements Markus Armbruster
2025-04-04 12:14 ` [PATCH 01/11] docs/devel/qapi-code-gen: Tidy up whitespace Markus Armbruster
2025-04-04 12:14 ` [PATCH 02/11] qapi/rocker: Tidy up query-rocker-of-dpa-flows example Markus Armbruster
2025-04-07 15:06   ` Eric Blake
2025-04-08  7:04     ` Markus Armbruster
2025-04-04 12:14 ` [PATCH 03/11] docs/interop: Delete "QEMU Guest Agent Protocol Reference" TOC Markus Armbruster
2025-04-04 12:14 ` [PATCH 04/11] docs/interop: Sanitize QMP reference manuals TOC Markus Armbruster
2025-04-04 12:14 ` Markus Armbruster [this message]
2025-04-04 12:14 ` [PATCH 06/11] docs/sphinx/qmp_lexer: Generalize elision syntax Markus Armbruster
2025-04-07 15:15   ` Eric Blake
2025-04-08 20:46   ` John Snow
2025-04-09  5:50     ` Markus Armbruster
2025-04-04 12:14 ` [PATCH 07/11] docs/sphinx/qmp_lexer: Highlight elisions like comments, not prompts Markus Armbruster
2025-04-04 12:14 ` [PATCH 08/11] qapi/qapi-schema: Update introduction for example notation Markus Armbruster
2025-04-04 12:14 ` [PATCH 09/11] qapi/qapi-schema: Address the introduction's bit rot Markus Armbruster
2025-04-17 18:17   ` John Snow
2025-04-04 12:14 ` [PATCH 10/11] storage-daemon/qapi/qapi-schema: Add a proper introduction Markus Armbruster
2025-04-04 12:14 ` [PATCH 11/11] qga/qapi-schema: " Markus Armbruster
2025-04-07 15:18 ` [PATCH 00/11] qapi: Documentation improvements Eric Blake
2025-04-08  7:22 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250404121413.1743790-6-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=jsnow@redhat.com \
    --cc=kkostiuk@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).