-1

I have an issue most likely just not understanding how swashbuckle generates swagger json file.

I have a couple API's and all of them share some infrastructure so it is packaged and therefore is shared among all of them. In that infrastructure is added swagger configurations. So I know for sure they all share the same configurations as long as the package itself is up to date.

To my surprise I find that json generated for these APIs is rather different. I use it later with autorest, 2 of those work and one fails with error: Error: Collision detected inserting into object: constructor

The obvious difference I see between those is that the one which fails has some extra parameters generated, such as:

  • "Type"
  • "MethodBase"
  • "Exception"

I am puzzled why those are a part of that specific API swagger json even though all 3 APIs are very similar and as mentioned before all share the same swagger configurations. Am I missing something?

Package/framework versions:

  • .Net Core 3.1
  • Swashbuckle 5.0.0
  • Swashbuckle Filters 5.0.2
  • Autorest 3.0.6233

Thank you!

ag_
  • 69
  • 2
  • 1
    can you provide some code, please – Helder Sepulveda Feb 26 '20 at 22:57
  • @HelderSepulveda what code would you like to see? I do not really see how that is relevant as what I am really interested is how swashbuckle generates swagger json and why it is different in my 3 projects(2 are similar, one is different). – ag_ Feb 28 '20 at 10:31
  • The code reproducing your issue, you should read: https://stackoverflow.com/help/minimal-reproducible-example – Helder Sepulveda Feb 28 '20 at 15:15

1 Answers1

0

Issue addressed here to autorest github repo https://github.com/Azure/autorest/issues/3428. Might be good to have it tracked