Burgyn / MMLib.SwaggerForOcelot

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

Status code 500 using 8.1.0 with multiple routes #285

Open sjblack opened 11 months ago

sjblack commented 11 months ago

Describe the bug I receive a status code 500 when a downstream swagger document is loaded. (only in 8.1, 8.0 works fine)

Expected behavior Page to load successfully.

To Reproduce The Ocelot.json has a wildcard route (E.g '/api/v1/{everything}') and one that is more specific for a given method (E.g POST on /api/v1/resource) for rate limiting, this causes the following exception to be thrown from SwaggerJsonTransformers.cs line 195.

System.ArgumentException: 'Can not add property post to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.

satano commented 11 months ago

Hello @sjblack

This is caused by my PR #284. Could you provide your ocelot.json and related swagger.json which are processed? I will investigate and fix it. Thanks.