Skip to content

Commit 6ae4c43

Browse files
authored
Document endpoint tags (#58)
1 parent 0b8114c commit 6ae4c43

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/api.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ SchemaGenerator
3131
By default the value is ``{"title": "API", "version": "1.0"}``
3232

3333

34-
.. method:: api()
34+
.. method:: api(tags=())
3535

3636
Use as a decorator to register a handler function to be part of the API schema.
3737

@@ -43,7 +43,9 @@ SchemaGenerator
4343
in the schema. When the handler is executed, the request body will be read and
4444
validated against that type.
4545

46-
.. method:: api_view()
46+
:param tags: Sequence of strings used to specify tags to group endpoints.
47+
48+
.. method:: api_view(tags=())
4749

4850
Use as a decorator to register a :class:`aiohttp.web.View` class to be part of
4951
the API schema. This will register each endpoint method defined in the class.

docs/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ You can use docstrings to customise the summary and description shown in the sch
8888
description.
8989
"""
9090
91+
Tags
92+
++++
93+
94+
Tags can be added to group endpoints using the ``tags`` parameter in the decorators
95+
(see :meth:`aiohttp_schema.SchemaGenerator.api`).
96+
9197
Library Installation
9298
--------------------
9399

0 commit comments

Comments
 (0)