MMLib.SwaggerForOcelot icon indicating copy to clipboard operation
MMLib.SwaggerForOcelot copied to clipboard

Route wildcard naming

Open johan-forsell opened this issue 6 years ago • 5 comments

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 👍

johan-forsell avatar Jan 22 '20 08:01 johan-forsell

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.

Burgyn avatar Jan 22 '20 17:01 Burgyn

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 :)

johan-forsell avatar Jan 22 '20 18:01 johan-forsell

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?

dgustala avatar Jan 06 '22 17:01 dgustala

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.

Burgyn avatar Jan 07 '22 18:01 Burgyn

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

dgustala avatar Jan 07 '22 18:01 dgustala