Skip to content

fix: docs[ReceiveRoutePlugin] documentation#4290

Merged
sobolevn merged 1 commit intolitestar-org:mainfrom
Shekhrozx:main
Sep 14, 2025
Merged

fix: docs[ReceiveRoutePlugin] documentation#4290
sobolevn merged 1 commit intolitestar-org:mainfrom
Shekhrozx:main

Conversation

@Shekhrozx
Copy link
Copy Markdown
Contributor

Description

Fixed a documentation error: updated route.http_methods to the correct attribute route.methods when logging registered routes.

before:

    from litestar.plugins import ReceiveRoutePlugin
    from litestar.routes import BaseRoute

    class RouteLoggerPlugin(ReceiveRoutePlugin):
        def receive_route(self, route: BaseRoute) -> None:
            print(f"Route registered: {route.path} [{', '.join(route.http_methods)}]")

after:

print(f"Route registered: {route.path} [{', '.join(route.methods)}]")

@Shekhrozx Shekhrozx requested review from a team as code owners September 14, 2025 06:41
@github-actions github-actions bot added area/docs This PR involves changes to the documentation size: small type/bug pr/external Triage Required 🏥 This requires triage labels Sep 14, 2025
Copy link
Copy Markdown
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! It is methods, not http_methods:

Thanks!

@sobolevn sobolevn merged commit 57dcd5c into litestar-org:main Sep 14, 2025
28 checks passed
provinzkraut pushed a commit that referenced this pull request Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs This PR involves changes to the documentation pr/external size: small Triage Required 🏥 This requires triage type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants