"""Integrate Betty with `ReDoc <https://redocly.com/redoc/>`_."""
from __future__ import annotations
from pathlib import Path
from typing_extensions import override
from betty.locale.localizable import _, Localizable
from betty.project.extension import Extension, UserFacingExtension
from betty.extension.webpack import Webpack, WebpackEntryPointProvider
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Sequence
[docs]
class HttpApiDoc(UserFacingExtension, WebpackEntryPointProvider):
"""
Provide user-friendly HTTP API documentation.
"""
[docs]
@override
@classmethod
def description(cls) -> Localizable:
return _(
'Display the HTTP API documentation in a user-friendly way using <a href="https://github.com/Redocly/redoc">ReDoc</a>.'
)