]> git.proxmox.com Git - mirror_qemu.git/commit
docs/devel/qapi-code-gen: Improve QAPI schema language doc
authorMarkus Armbruster <armbru@redhat.com>
Fri, 13 Sep 2019 20:13:48 +0000 (22:13 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 24 Sep 2019 12:07:22 +0000 (14:07 +0200)
commitb6c37ebaaf074cac8fe8a4781dc3e79db23e914e
tree3bb26562dbc37cab4069d21179d38e3a7834b461
parent634c82c1639cd4173bc53f0a3ac026d757e9d1c4
docs/devel/qapi-code-gen: Improve QAPI schema language doc

We document the language by giving patterns of valid JSON objects.
The patterns contain placeholders we don't define anywhere; their
names have to speak for themselves.  I guess they do, but I'd prefer a
bit more rigor.  Provide a grammar instead, and rework the text
accordingly.

Documentation for QAPI schema conditionals (commit 967c885108,
6cc32b0e1487adbbffd4..3e270dcacc) and feature flags (commit
6a8c0b5102) was bolted on.  The sections documenting types, commands
and events don't mention them.  Section "Features" and "Configuring
the schema" then provide additional syntax for types, commands and
events.  I hate that.  Fix the sections documenting types, commands
and events to provide accurate syntax, and point to "Features" and
"Configuring the schema" for details.

We talk about "(top-level) expressions other than include and pragma".
Adopt more convenient terminology: a (top-level) expression is either
a directive (include or pragma) or a definition (anything else).

Avoid the terms "dictionary" and "key".  Stick to JSON terminology
"object" and "member name" instead.

While there, make spacing more consistent.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190913201349.24332-16-armbru@redhat.com>
docs/devel/qapi-code-gen.txt