Open cringelord000222 opened 4 months ago
If this isnt working it may be a bug. I think Scalar supports ExternalDocumentation (https://github.com/search?q=repo%3Ascalar%2Fscalar%20ExternalDocumentation&type=code)
If this isnt working it may be a bug. I think Scalar supports ExternalDocumentation (https://github.com/search?q=repo%3Ascalar%2Fscalar%20ExternalDocumentation&type=code)
I've downloaded the spec.json
and the externalDocs
section does exist. It's just that this part is not rendering in the frontend.
# within spec.json
"externalDocs": {
"url": "https://github.com/litestar-org/litestar",
"description": "Repository"
}
MCVE
app.py
:
from litestar.app import Litestar
from litestar.openapi import OpenAPIConfig
from litestar.openapi.plugins import ScalarRenderPlugin
from litestar.openapi.spec import ExternalDocumentation
app = Litestar( openapi_config=OpenAPIConfig( title="title", version="version", external_docs=ExternalDocumentation( url="https://docs.litestar.dev", description="Repository", ), render_plugins=[ ScalarRenderPlugin(), ], ) )
2. Install deps `pip install litestar[standard]`
3. Run app: `litestar run --debug`
4. Open page: `open "https://127.0.0.1:8000/schema/"`
No docs
Summary
Hi there,
From what I've tried (
v2.9.0
), ExternalDocumentation only works onredoc
andswagger
, among the few litestar examples given in OpenAPI UI Plugins.Would love to have it on
Scalar
as well (ScalarRenderPlugin), since I read that it's going to be the default plugin forv3.0.0
.Not sure if this is the correct place to ask, but thanks in advance.
Basic Example
FYI, this is the rough code that I used:
Drawbacks and Impact
None
Unresolved questions
None