Source code for edri.events.api.client.documentation

from http import HTTPMethod
from typing import Any

from edri.api.dataclass.api_event import api
from edri.dataclass.response import Response, response
from edri.events.api.group import Client

__all__ = ["EdriDocumentation"]


@response
class DocumentationResponse(Response):
    """
    Response wrapper for the API documentation endpoint.
    """
    api_resources: dict[str, Any]
    wrapped: bool


[docs] @api(url="/edri/docs", resource="edri-docs", method=HTTPMethod.GET, template="documentation.j2") class EdriDocumentation(Client): """ Serves the complete **API documentation page**. This endpoint may provide: - A **human-readable HTML representation** of all available API endpoints. - Endpoint **access methods** (HTTP, WebSocket). - **Parameters** and **cookies** supported by each endpoint. ### How It Works The content is **autogenerated** and reflects the real-time structure of registered API resources. This ensures the documentation always stays up-to-date. """ response: DocumentationResponse