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

Using the Consul service discovery, it was found that the request path in the gateway swagger document does not have the "KeyToPath" property attached #293

Open
qiangboy opened this issue Apr 10, 2024 · 1 comment
Assignees

Comments

@qiangboy
Copy link

Describe the bug
As stated in the title.

Expected behavior
I found that there is a line of code in the source code SwaggerForOcelotMiddleware.cs that reads "if (SwaggerServiceDiscoveryProvider. ServiceProviderType!=" Consul ")". Why is this?

To Reproduce
If it is a possible attache:

  1. Original downstream swagger.json.
  2. Ocelot ReRoutes configuration.
@qiangboy qiangboy changed the title Using the Consul service discovery, it was found that the request path in the gateway swagger document does not have the "KeyToPath" attribute attached Using the Consul service discovery, it was found that the request path in the gateway swagger document does not have the "KeyToPath" property attached Apr 10, 2024
@jblascoisazac
Copy link

Im having the same issue. When using Consul with service discovery, the lib is not updating the endpoints to match the upstream template. If I remove the condition:

if (SwaggerServiceDiscoveryProvider.ServiceProviderType != "Consul")

Everything works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants