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
Path to subdirectory url should be included in the Swagger.
Actual Behavior
It isn't.
Steps to Reproduce the Problem
load the swagger page, no basePath value
The Issue's effect
As there's no basepath, Swagger-ui is unable to redirect the method to the correct path when it is not at the root url.
e.g. If the service is deployed to http://bob.com/Jane/
then a method DoSomething should be accessible in Swagger UI as http://bob.com/Jane/DoSomething
However because the basepath is not being included by Nancy Swagger, the Swagger Ui generates this as: http://bob.com/DoSomething
The alternative is to generate the swagger ui based on the entire deployed path not assuming the url is always deployed at root.
The text was updated successfully, but these errors were encountered:
Yeah, this is probably something that was overlooked.
I'll look into this tomorrow, if I get the chance.
Feel free to submit a PR yourself, as it should be pretty easy if you just add it to the SwaggerMetadataProvider.SetInfo function (and to the Info object).
Edit:
I was mistaken - the basePath is not part of the info object.
jnallard
added a commit
to jnallard/Nancy.Swagger
that referenced
this issue
Jan 11, 2018
Expected Behavior
Path to subdirectory url should be included in the Swagger.
Actual Behavior
It isn't.
Steps to Reproduce the Problem
The Issue's effect
As there's no basepath, Swagger-ui is unable to redirect the method to the correct path when it is not at the root url.
e.g. If the service is deployed to http://bob.com/Jane/
then a method DoSomething should be accessible in Swagger UI as http://bob.com/Jane/DoSomething
However because the basepath is not being included by Nancy Swagger, the Swagger Ui generates this as:
http://bob.com/DoSomething
The alternative is to generate the swagger ui based on the entire deployed path not assuming the url is always deployed at root.
The text was updated successfully, but these errors were encountered: