Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Support Scalar configuration #3951

Open
FHU-yezi opened this issue Jan 15, 2025 · 0 comments
Open

Enhancement: Support Scalar configuration #3951

FHU-yezi opened this issue Jan 15, 2025 · 0 comments
Labels
Accepted Change or enhancement is accepted for development. Enhancement This is a new feature or request

Comments

@FHU-yezi
Copy link

Summary

While researching the Scalar project, I found that some custom config is avaliable, the full list can be found here: https://github.com/scalar/scalar/blob/main/documentation/configuration.md.

Basic Example

There are an example from Scalar repo, for FastAPI, and support config: https://github.com/scalar/scalar/blob/main/packages/scalar_fastapi/scalar_fastapi/scalar_fastapi.py.

We need to change this file: https://github.com/litestar-org/litestar/blob/main/litestar/openapi/plugins.py#L351, ScalarRenderPlugin, to support this new feature. I also expect the config will be fully typed with Pydantic.

Drawbacks and Impact

I don't think this enhancement will comes with any drawbacks to current users.

Unresolved questions

Maybe we should also support to pass the config directly to Scalar in case of new config items added and we can use them without a Litestar update.

@FHU-yezi FHU-yezi added the Enhancement This is a new feature or request label Jan 15, 2025
@cofin cofin added the Accepted Change or enhancement is accepted for development. label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Change or enhancement is accepted for development. Enhancement This is a new feature or request
Projects
None yet
Development

No branches or pull requests

2 participants