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

Status code 500 using 8.1.0 with multiple routes #285

Open
sjblack opened this issue Dec 8, 2023 · 1 comment
Open

Status code 500 using 8.1.0 with multiple routes #285

sjblack opened this issue Dec 8, 2023 · 1 comment
Assignees

Comments

@sjblack
Copy link

sjblack commented Dec 8, 2023

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
Copy link
Contributor

satano commented Dec 11, 2023

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.

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