c# - Custom route for Swashbuckle -


i trying register custom route swashbuckle. can't figure 1 out.

what need add extension current route.

so example: instead of swagger/ui need set swagger.aspx/ui.. since application hosted on server have no access , running iis6.

any ideas?

i have tried:

routetable.routes.remove(routetable.routes["swagger_docs"]); routetable.routes.remove(routetable.routes["swagger_ui"]); config.enableswagger("docs.aspx/{apiversion}/swagger", c => c.singleapiversion("v1", "a title api")).enableswaggerui("swagger.aspx/{*assetpath}"); 

but no success... :(

in theory should work! there similar config in unittests: https://github.com/domaindrivendev/swashbuckle/blob/e0053e1864defa3c4f73ca2a960eb876e257cc9e/swashbuckle.tests/owin/multiswaggerowinstartup.cs

but there bug lurking in there...


your best bet create custom swashbuckle suit needs.

you need change defaultroutetemplate: https://github.com/domaindrivendev/swashbuckle/blob/e0053e1864defa3c4f73ca2a960eb876e257cc9e/swashbuckle.core/application/httpconfigurationextensions.cs#l15


Comments