-
Notifications
You must be signed in to change notification settings - Fork 97
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
Failed to load API definition issue #266
Comments
please provide more information. Some logs from your gateway, logs from browsers, ... Thanks. |
The log from gateway: RequestPath: /swagger/docs/v1/scheduling An unhandled exception has occurred while executing the request. Exception: |
This is still very general. Please provide your gateway configuration and try to explain how you host in IIS. If you use Thank you. |
I don't use virtual directory. At this point, I host two sites, Gateway, which is publicly accessible through https, and one microservice that is accessed by gateway via http at the port 5001. |
My gateway configuration: { |
Swagger endpoints: { |
@Burgyn any idea? |
At the moment, I can't think of anything you might have a problem with. It normally works on IIS. Please check all addresses and ports to see if they match. Also check the logs in the browser (network tab) to see what kind of query the SwaggerUI is sending internally, if there has been any change in the base address. |
Hey @ljubomir-bacovic . I really want to help you, but without relevant information and your proper investigation it will not work. Check all logs and configurations properly (
|
I tried to explain as much as I could. Also, I spent two full days investigating this issue and trying to understand it. There is not much information online, since locally everything works perfectly when I start from Visual Studio. Also, the gateway and the API work on the server as well, we use them to develop frontend. But we would like to have Swagger deployed, so that the frontend team can understand the API better. |
From this url http://localhost:5001/swagger/v1/swagger.json you get correct I can't help more. So far I haven't had a problem with IIS. |
No, when I try this on the server, I get 404 error. |
So that means that the issue is that Swagger is not working on API level. I will try to investigate that. |
Yes, that was the issue. Thanks a lot for your help. It works like a charm now! |
That's good to hear. |
Hello,
I successfully installed Swagger for Ocelot and it runs fine on my localhost. However, when I publish to IIS server, I get this error.
I tried to find if anyone else had the same problem, but noticed that anyone who reported this issue, had it on localhost. I am puzzled why it works locally, but not on the server?
The gateway and microservices work, I can access them normally through Postman.
The text was updated successfully, but these errors were encountered: