Describe the bug
When a router is added to an app using include_router, and the prefix parameter contains a url variable (e.g. '/{account}/devices'), the variable is not included as a parameter in the swagger documentation.
To Reproduce
Steps to reproduce the behavior:
app.include_router with a prefix.app.include_router(
device_router,
prefix="/{account}/devices"
)
Try it out buttonExpected behavior
When browsing the swagger docs on http://localhost:8080/docs, I want to be able to use the Try it out feature.
Screenshots

Environment:
Additional context
Didn't test but should you copy the openapi.json output to the swagger editor website, do you get the same issue? this is just to get a sense if the generated schema looks correct.
Also, don't think it will make any difference but latest version is 0.42.0
Yeah this sounds like a bug in the openapi schema generation. Probably worth a check to see if updating to 0.42 fixes it.
I'll try both of those suggestions @euri10 & @dmontagu.
I have another app on 0.39.1 that I tried this with and it looks like it is working.
I'm going to test a couple more cases before closing this.
Thanks for the help here everyone! :clap: :bow:
I assume you solved your problem, so thanks for reporting back and closing the issue :+1:
Most helpful comment
Yeah this sounds like a bug in the openapi schema generation. Probably worth a check to see if updating to 0.42 fixes it.