diff mbox series

[25/42] docs/qapidoc: generate entries for undocumented members

Message ID 20250205231208.1480762-26-jsnow@redhat.com (mailing list archive)
State New
Headers show
Series docs: add sphinx-domain rST generator to qapidoc | expand

Commit Message

John Snow Feb. 5, 2025, 11:11 p.m. UTC
Presently, we never have any empty text entries for members. The next
patch will explicitly generate such sections, so enable support for it
in advance.

The parser will generate placeholder sections to indicate undocumented
members, but it's the qapidoc generator that's responsible for deciding
what to do with that stub section.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 docs/sphinx/qapidoc.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
index 5d946a46637..2d83556629d 100644
--- a/docs/sphinx/qapidoc.py
+++ b/docs/sphinx/qapidoc.py
@@ -221,11 +221,10 @@  def visit_member(self, section: QAPIDoc.ArgSection) -> None:
         # TODO?: features for members (documented at entity-level,
         # but sometimes defined per-member. Should we add such
         # information to member descriptions when we can?)
-        assert section.text
         self.generate_field(
             self.member_field_type,
             section.member,
-            section.text,
+            section.text if section.text else "(Not Documented.)",
             section.info,
         )