Burgyn / MMLib.SwaggerForOcelot

This repo contains swagger extension for ocelot.
MIT License
354 stars 95 forks source link

Route wildcard naming #68

Open johan-forsell opened 4 years ago

johan-forsell commented 4 years ago

First off; Thank you for developing this fine project! :)

However, we had quite some trouble getting the library to work for us.

Thing was that in Ocelot the route wildcards can be named whatever. In our case they were named {path} and Ocelot-wise that was all working fine. However after some debugging we found that SwaggerForOcelot does not allow this, and will only accept wildcards named {everything}.

My suggestion would be to either implement a fix that allows any wildcard naming, like Ocelot do, or to expressively state in the documentation that only the {everything} wildcard tag is supported.

It might help others 👍

Burgyn commented 4 years ago

Hi,

thanks for your issue.

Yes, unfortunately now this project support only {everything} as wildcard. I plan implemented this feature, but after issue #56. I don't have as much time as I would imagine.

Thanks a lot.

johan-forsell commented 4 years ago

I understand completely.

If I manage to conjure up some time myself, I'll implement the solution and send a PR. Should take some load off...

Thank you for your comitment :)

dgustala commented 2 years ago

Hi,

thanks for your issue.

Yes, unfortunately now this project support only {everything} as wildcard. I plan implemented this feature, but after issue #56. I don't have as much time as I would imagine.

Thanks a lot.

Hi, thanks for all your effort! I have a question: you said above that you only support {everything} as wildcard. But in the this example: https://github.com/Burgyn/Sample.OcelotWithRoutingParameters/blob/master/src/ApiGateway/ocelot.json ..you use both {everything}and {companyId} as wildcards. That's correct?

Burgyn commented 2 years ago

Hi @dgustala,

in this case {companyId} is not "wildcard", but a path parameter. If the same parameter at the same position exists in the downstream path, the documentation can be shown.

dgustala commented 2 years ago

Good to know. Thanks! And what about query parameters? Works in the same way than path parameters?