Bug: OpenAPI generation throws exception when using an optional path value #2222
Closed
1 of 4 tasks
Labels
Bug 🐛
This is something that is not working as expected
Description
I think I found an OpenAPI generation bug when using multiple paths on the same route with an optional path parameter value. The first call to /schema always fails with a 500 status code. Subsequent calls are successful but do not contain the problem route. I assume this is due to caching.
Another interesting thing I found is that if you load /schema/openapi.json first, you still get a 500 the first time but the cache is built with the route defined for subsequent calls. Although, the parameter is listed as a query parameter instead of a path parameter.
Thanks!
Kyle
URL to code causing the issue
No response
MCVE
Steps to reproduce
Screenshots
No response
Logs
Litestar Version
2.0.1
Platform
Funding
The text was updated successfully, but these errors were encountered: