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
ashanbrown
changed the title
Bug: openapi parameter order depends on whether a dependency is consumed
Bug: openapi parameter order doesn't match the order in the path
Jul 24, 2024
Description
Unconsumed parameters appear to be added last to the openapi spec, which causes strange parameter ordering in other generated code. It looks like some effort was made to account for this at https://github.com/litestar-org/litestar/blame/ffaf5616b19f6f0f4128209c8b49dbcb41568aa2/tests/unit/test_openapi/test_schema.py#L613. I'm wondering if this is really the desired behavior. I would have expected the order in the openapi spec to match the order in the path. As it stands, it means that consuming a dependency will change the openapi spec and code generated from it.
URL to code causing the issue
No response
MCVE
No response
Steps to reproduce
No response
Screenshots
No response
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: