[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/13] qapi: ensure all errors sections are uniformly typset
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 08/13] qapi: ensure all errors sections are uniformly typset |
Date: |
Wed, 19 Jun 2024 14:10:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
John Snow <jsnow@redhat.com> writes:
> Transactions have the only instance of an Errors section that isn't a
> rST list; turn it into one.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
Let;s explain the "why" a bit more clearly. Maybe
qapi: Nail down convention that Errors sections are lists
By unstated convention, Errors sections are rST lists. Document the
convention, and make the one exception conform.
> ---
> docs/devel/qapi-code-gen.rst | 7 +++++++
> qapi/transaction.json | 2 +-
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
> index f453bd35465..cee43222f19 100644
> --- a/docs/devel/qapi-code-gen.rst
> +++ b/docs/devel/qapi-code-gen.rst
> @@ -1011,6 +1011,13 @@ like this::
> "Returns" and "Errors" sections are only valid for commands. They
> document the success and the error response, respectively.
>
> +"Errors" sections should be formatted as an rST list, each entry
> +detailing a relevant error condition. For example::
> +
> + # Errors:
> + # - If @device does not exist, DeviceNotFound
> + # - Any other error returns a GenericError.
> +
> A "Since: x.y.z" tagged section lists the release that introduced the
> definition.
>
> diff --git a/qapi/transaction.json b/qapi/transaction.json
> index 5749c133d4a..07afc269d54 100644
> --- a/qapi/transaction.json
> +++ b/qapi/transaction.json
> @@ -235,7 +235,7 @@
> # additional detail.
> #
> # Errors:
> -# Any errors from commands in the transaction
> +# - Any errors from commands in the transaction
> #
> # Note: The transaction aborts on the first failure. Therefore, there
> # will be information on only one failed operation returned in an
Preferably with an improved commit message
Reviewed-by: Markus Armbruster <armbru@redhat.com>
- Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections, (continued)
[PATCH 05/13] qapi/parser: fix comment parsing immediately following a doc block, John Snow, 2024/06/18
[PATCH 06/13] docs/qapidoc: fix nested parsing under untagged sections, John Snow, 2024/06/18
[PATCH 07/13] qapi: fix non-compliant JSON examples, John Snow, 2024/06/18
[PATCH 08/13] qapi: ensure all errors sections are uniformly typset, John Snow, 2024/06/18
- Re: [PATCH 08/13] qapi: ensure all errors sections are uniformly typset,
Markus Armbruster <=
[PATCH 10/13] qapi: update prose in note blocks, John Snow, 2024/06/18
[PATCH 09/13] qapi: convert "Note" sections to plain rST, John Snow, 2024/06/18
- Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST, Markus Armbruster, 2024/06/19
- Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST, Markus Armbruster, 2024/06/20
- Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST, John Snow, 2024/06/20
- Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST, John Snow, 2024/06/20
- Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST, Markus Armbruster, 2024/06/21
- Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST, John Snow, 2024/06/21