An open source, non-profit web search engine
Use Scalar for displaying docs
Daoud Clarke91047ce02279
diff --git a/mwmbl/api.py b/mwmbl/api.pyindex 423bd97..abd03e1 100644--- a/mwmbl/api.py+++ b/mwmbl/api.py@@ -18,6 +18,8 @@ from ninja_extra import NinjaExtraAPIfrom ninja_jwt.controller import NinjaJWTDefaultControllerfrom mwmbl.exceptions import InvalidRequest+from scalar_ninja import ScalarViewer+api = NinjaExtraAPI(title="Mwmbl API",@@ -34,6 +36,7 @@ api = NinjaExtraAPI("Some crawler endpoints use a separate API key passed in the request body."),urls_namespace="api-v1",+ docs=ScalarViewer(openapi_url="/api/v1/openapi.json"),)# Register JWT token endpoints (/token/pair, /token/refresh, /token/verify)diff --git a/poetry.lock b/poetry.lockindex 2509ece..16c0150 100644--- a/poetry.lock+++ b/poetry.lock@@ -2163,6 +2163,17 @@ botocore = ">=1.33.2,<2.0a.0"[package.extras]crt = ["botocore[crt] (>=1.33.2,<2.0a.0)"]+[[package]]+name = "scalar-ninja"+version = "0.3.0"+description = "This plugin provides an easy way to render a beautiful API reference based on a OpenAPI/Swagger file with Django Ninja."+optional = false+python-versions = "*"+files = [+ {file = "scalar_ninja-0.3.0-py3-none-any.whl", hash = "sha256:8fb4aeecef527d8dfc81cd1ff00bffa66076a3201607f1bf4f2fb1c8206cadb2"},+ {file = "scalar_ninja-0.3.0.tar.gz", hash = "sha256:fe657fa3356cf80bfa30b3297690a1e42ce7b0daa73738042b175463eab3a65e"},+]+[[package]]name = "scikit-learn"version = "1.7.2"@@ -2712,4 +2723,4 @@ indexer = ["Levenshtein", "beautifulsoup4", "idna", "langdetect", "pyarrow", "py[metadata]lock-version = "2.0"python-versions = ">=3.11,<3.12"-content-hash = "ecf8a0708a7d4cf01077ba8e92a43fef4302bf28be80bdc381f58e78618a5d6b"+content-hash = "08f3ef79486bf5ac32fe28ab5a411fb220b5eb37d579641eefa0a0648fe7a341"diff --git a/pyproject.toml b/pyproject.tomlindex 8109776..13328e6 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -52,6 +52,7 @@ django-debug-toolbar = "^5.2.0"wasmtime = "^24.0.0"dotenv = "^0.9.9"py-spy = "^0.4.1"+scalar-ninja = "^0.3.0"[tool.poetry.extras]indexer = [