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

Endpoint shows in dropdown but it's content is not loaded

Open ondrix opened this issue 5 years ago • 4 comments

One of my serivces does not show swagger doc. Other looks fine but this one loads into dropdown but swagger doc does not load

To Reproduce If it is a possible attache:

  1. Original downstream swagger.json.
  2. Ocelot ReRoutes configuration. ocelot.zip

ondrix avatar Dec 09 '19 10:12 ondrix

Hi, thanks for the report.

Problem is that your downstream service documentation doesn't contains paths like /api/application/95/tasks.

This package unfortunately doesn't support parameter translating beetwen upstream and downstream path template.

I will support it when I finish issue #56.

Burgyn avatar Dec 09 '19 11:12 Burgyn

Thanks so much for taking the time on this package. Any idea on a timeline for this? We have routes like this:

{
    "DownstreamPathTemplate": "/{accountId}/api/{everything}",
    "DownstreamScheme": "http",
    "ServiceName": "account-api",
    "UpstreamPathTemplate": "/{accountId}/api/a/{everything}",
    "UpstreamHttpMethod": [],
}

and can't use this package until this issue is resolved.

Thanks again.

DaleyKD avatar Jul 27 '20 15:07 DaleyKD

Hi @DaleyKD

Thanks for your issue. Your use case looks different. @ondrix try to used constant value 95 instead of route parameter {something}.

Your scenario can work. See my example.

Burgyn avatar Jul 28 '20 12:07 Burgyn

@Burgyn : Thanks, man. I totally missed that.

While we may not use this in a production scenario for our needs, it does seem like it'll be VERY good for local development.

Thank you VERY much for your effort on this.

DaleyKD avatar Jul 28 '20 14:07 DaleyKD