Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtualDirectory not reflects on swagger ui #85

Closed
karabiberoglu opened this issue Apr 20, 2020 · 7 comments
Closed

VirtualDirectory not reflects on swagger ui #85

karabiberoglu opened this issue Apr 20, 2020 · 7 comments
Labels
help wanted Extra attention is needed inactive

Comments

@karabiberoglu
Copy link

Hi,

in my configuration, I set the virtual directory.
when I check my rest methods on swagger ui, virtual directory is missing and when i try to execute the methods, I get 404 error.

but when i manually add virtual host to request url. it works.
are there any workaround to handle this issue?

Thanks,

@Burgyn
Copy link
Owner

Burgyn commented Apr 23, 2020

Hi,
thanks for your report.

Please, can you provide your ocelot.json configuration? And example of downstream swagger.json?

thanks.

@Burgyn Burgyn added the help wanted Extra attention is needed label Apr 23, 2020
@karabiberoglu
Copy link
Author

Thanks for your response, files are as following.

ocelot.json.txt
v1.json.txt

@Burgyn Burgyn closed this as completed May 5, 2020
@Burgyn Burgyn reopened this May 5, 2020
@Burgyn Burgyn added the bug Something isn't working label May 5, 2020
@Burgyn Burgyn pinned this issue May 5, 2020
@Burgyn Burgyn removed the bug Something isn't working label May 5, 2020
@Burgyn
Copy link
Owner

Burgyn commented May 5, 2020

Hi,

I'm not sure, but it's look like you have wrong configuration.

Your downstream path looks like this /MyWebApi/api/{everything}, so I suppouse that MyWebApi is name of your virtual directory in IIS. But to property VirtualDirectory you setting /MyApiGateway, why not /MyWebApi?

@Burgyn Burgyn unpinned this issue May 5, 2020
@stale
Copy link

stale bot commented May 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label May 26, 2020
@stale
Copy link

stale bot commented Jun 9, 2020

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

@stale stale bot closed this as completed Jun 9, 2020
@djesusnet
Copy link

djesusnet commented Oct 14, 2020

Hello guys,

I'm having trouble running Swagger from my gateway api.
image

As we saw the image when executing get, a 404 error occurs and when I go to the api other than the gateway, it works correctly. Do you know what it can be?

https://github.com/djesusnet/ExampleConfigSwaggerExampleApiGatewayOcelot

@Burgyn
Copy link
Owner

Burgyn commented Oct 16, 2020

Hi @djesusnet

You use Ocelot with version 16.0.1. which have breaking change, that rename ReRoutes -> Routes and you still using ReRoutes in your configuration.

Try rename ReRoutes to Routes and remove property TransformByOcelotConfig from SwaggerEndPoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed inactive
Projects
None yet
Development

No branches or pull requests

3 participants