Open chbndrhnns opened 9 months ago
Thanks @chbndrhnns,
Not sure if this is inconsistent.
If you change your example spec to (note the trailing slash after hello
):
"paths": {
"/hello/": {
"get": {
You get the same behaviour as the UI.
I guess we could remove these two lines though so we use the raw path for the UI, which is configurable by the user: https://github.com/spec-first/connexion/blob/211bdb03f6b20f7dc90fe0037e57cd142c48deb5/connexion/middleware/swagger_ui.py#L130 https://github.com/spec-first/connexion/blob/211bdb03f6b20f7dc90fe0037e57cd142c48deb5/connexion/middleware/swagger_ui.py#L151
Thanks, you are right about the solution.
there is a discussion about this on starlette side. I would want this to be configurable on. Objection side, as well. However, using a middleware to make it work might also be a workaround.
Description
/ui
returns a redirect and a call to/ui/
returns the swagger page/bla
returns the content and a call to/bla/
returns a redirectExpected behaviour
Consistent (and configurable) behaviour
Actual behaviour
Inconsistent
Steps to reproduce
Additional info:
Output of the commands: