Skip to content

Commit 9ca404f

Browse files
jnsnowMarkus Armbruster
authored andcommitted
docs/qapi-domain: add :namespace: override option
Akin to the :module: override option, the :namespace: options allows you to forcibly override the contextual namespace associatied with a definition. We don't necessarily actually need this, but I felt compelled to stick close to how the Python domain works that offers context overrides. As of this commit, it is possible to add e.g. ":namespace: QMP" to any QAPI directive to forcibly associate that definition with a given namespace. Signed-off-by: John Snow <[email protected]> Message-ID: <[email protected]> Acked-by: Markus Armbruster <[email protected]> Signed-off-by: Markus Armbruster <[email protected]>
1 parent 74d40b0 commit 9ca404f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/devel/qapi-domain.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ QAPI standard options
466466

467467
All QAPI directives -- *except* for module -- support these common options.
468468

469+
* ``:namespace: name`` -- This option allows you to override the
470+
namespace association of a given definition.
469471
* ``:module: modname`` -- Borrowed from the Python domain, this option allows
470472
you to override the module association of a given definition.
471473
* ``:since: x.y`` -- Allows the documenting of "Since" information, which is

docs/sphinx/qapi_domain.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,9 @@ class QAPIObject(QAPIDescription):
294294
)
295295
option_spec.update(
296296
{
297-
# Borrowed from the Python domain:
298-
"module": directives.unchanged, # Override contextual module name
297+
# Context overrides:
298+
"namespace": directives.unchanged,
299+
"module": directives.unchanged,
299300
# These are QAPI originals:
300301
"since": directives.unchanged,
301302
"ifcond": directives.unchanged,

0 commit comments

Comments
 (0)