You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem I have is that the client's code generator changes the order of parameters because I used an old implementation of Swashbuckle for .NET 4.8, which placed the key parameter at the end.
Now, I just want to preserve as much as possible and maintain the same order of parameters.
The text was updated successfully, but these errors were encountered:
AFAIR, the ordering is controlled by the serialisation code in the Microsoft.OpenApi library that we depend on. We are not able to directly control the JSON serialisation of their primitives themselves, so if they are special-casing the body to go at the end when it's serialised, there's not really anything we can do about it.
What are you wanting to achieve?
I want to have my custom parameter at the end of parameters list in the swagger.json.
The example what I want to see:
What code or approach do you have so far?
I used the following code :
in Program.cs:
But now I have only the
key
parameter is placed before thebody
parameter:Additional context
The problem I have is that the client's code generator changes the order of parameters because I used an old implementation of Swashbuckle for .NET 4.8, which placed the key parameter at the end.
Now, I just want to preserve as much as possible and maintain the same order of parameters.
The text was updated successfully, but these errors were encountered: