-
Notifications
You must be signed in to change notification settings - Fork 463
Closed
Labels
Description
What happens?
I installed Scalar FastAPI and setup the main.py
as per the documentation
from typing import Union
from fastapi import FastAPI
from scalar_fastapi import get_scalar_api_reference
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/scalar", include_in_schema=False)
async def scalar_html():
return get_scalar_api_reference(
openapi_url=app.openapi_url,
title=app.title + " - Scalar",
)
It works perfectly fine with the default FastAPI theme. I then try to change the theme by adding the config variable as below:
@app.get("/apidocs", include_in_schema=False)
async def scalar_html():
return get_scalar_api_reference(
openapi_url=app.openapi_url,
title=app.title,
theme="kepler",
)
It returns Internal Server Error
. The Docker logs show:
`TypeError: get_scalar_api_reference() got an unexpected keyword argument 'theme'
What is the best way to add theme and configuration changes to Scalar for FastAPI?
What did you expect to happen?
I excepted Scalar to adopt the kepler
theme for the documentation.
OpenAPI Document
No response
inyourtime