You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm having some issues with validating the openapi specs outputted by Litestar and not sure where to start. I'd like to build in a validator to validate the spec in order to make these apis publicly available as part of my CI/CD flow. Here's a simple example that doesn't pass validation just from adding BearerToken as a security scheme. In this case, the name key in BearerToken is the issue and removing it from the spec allows it to pass validation.
1. Initialize app like above just adding JWT auth according to the Litestar docs
2. Generate the openapi.json file
3. Use python-openapi/openapi-spec-validator to validate
4. Confirm spec does not validate.
I'm seeing some other examples of the generated openapi doc from litestar failing to validate. Let me know if you want me to file separate tickets or just keep it in this one.
Description
Hi,
I'm having some issues with validating the openapi specs outputted by Litestar and not sure where to start. I'd like to build in a validator to validate the spec in order to make these apis publicly available as part of my CI/CD flow. Here's a simple example that doesn't pass validation just from adding BearerToken as a security scheme. In this case, the
name
key inBearerToken
is the issue and removing it from the spec allows it to pass validation.This is being generated by this Litestar app:
And with using the validator, I'm getting this error:
URL to code causing the issue
No response
MCVE
Steps to reproduce
Screenshots
"![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"
Logs
No response
Litestar Version
2.9.1
Platform
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: