Skip to content

Commit 3865d12

Browse files
committed
fix(docs): ensure class member order follows source
- Fixes issue where class members are sometimes listed alphabetically instead of by source in middleware documentation.(#4393) - Updates references to use the base module.
1 parent 59800ae commit 3865d12

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/reference/middleware/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
middleware
22
==========
33

4-
.. automodule:: litestar.middleware
5-
6-
4+
.. automodule:: litestar.middleware.base
5+
:members:
6+
77
.. toctree::
88
:maxdepth: 1
99

docs/release-notes/whats-new-2.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ Imports
187187
+----------------------------------------------------+------------------------------------------------------------------------+
188188
| ``starlite.AuthenticationResult`` | :class:`.middleware.authentication.AuthenticationResult` |
189189
+----------------------------------------------------+------------------------------------------------------------------------+
190-
| ``starlite.AbstractMiddleware`` | :class:`.middleware.AbstractMiddleware` |
190+
| ``starlite.AbstractMiddleware`` | :class:`.middleware.base.AbstractMiddleware` |
191191
+----------------------------------------------------+------------------------------------------------------------------------+
192-
| ``starlite.DefineMiddleware`` | :class:`.middleware.DefineMiddleware` |
192+
| ``starlite.DefineMiddleware`` | :class:`.middleware.base.DefineMiddleware` |
193193
+----------------------------------------------------+------------------------------------------------------------------------+
194-
| ``starlite.MiddlewareProtocol`` | :class:`.middleware.MiddlewareProtocol` |
194+
| ``starlite.MiddlewareProtocol`` | :class:`.middleware.base.MiddlewareProtocol` |
195195
+----------------------------------------------------+------------------------------------------------------------------------+
196196
| **Security** |
197197
+----------------------------------------------------+------------------------------------------------------------------------+

docs/release-notes/whats-new-3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ parameter.
337337
Middleware configuration constraints
338338
-------------------------------------
339339

340-
:class:`~litestar.middleware.ASGIMiddleware`\ s can now express constraints for how
340+
:class:`~litestar.middleware.base.ASGIMiddleware`\ s can now express constraints for how
341341
they are applied in the middleware stack, which are then validated on application
342342
startup.
343343

docs/usage/middleware/creating-middleware.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Extending ``ASGIMiddleware``
2525
----------------------------
2626

2727
While using functions is a perfectly viable approach, the recommended way to handle this
28-
is by using the :class:`~litestar.middleware.ASGIMiddleware` abstract base class, which
28+
is by using the :class:`~litestar.middleware.base.ASGIMiddleware` abstract base class, which
2929
also includes functionality to dynamically skip the middleware based on ASGI
3030
``scope["type"]``, handler ``opt`` keys or path patterns and a simple way to pass
3131
configuration to middlewares; It does not implement an ``__init__`` method, so
@@ -64,7 +64,7 @@ keep track of all these implicit couplings and dependencies, or downright imposs
6464
the middleware is implemented in a separate package and has no knowledge about how it is
6565
being applied.
6666

67-
To help with this, :class:`~litestar.middleware.ASGIMiddleware` allows to specify a set
67+
To help with this, :class:`~litestar.middleware.base.ASGIMiddleware` allows to specify a set
6868
of :class:`~litestar.middleware.constraints.MiddlewareConstraints` - Once configured,
6969
these will be validated on application startup.
7070

@@ -135,7 +135,7 @@ be the *last* middleware on the *last* layer (i.e. the route handler).
135135
Migrating from ``MiddlewareProtocol`` / ``AbstractMiddleware``
136136
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
137137

138-
:class:`~litestar.middleware.ASGIMiddleware` was introduced in Litestar 2.15. If you've
138+
:class:`~litestar.middleware.base.ASGIMiddleware` was introduced in Litestar 2.15. If you've
139139
been using ``MiddlewareProtocol`` / ``AbstractMiddleware`` to implement your middlewares
140140
before, there's a simple migration path to using ``ASGIMiddleware``.
141141

0 commit comments

Comments
 (0)