Skip to content

[Question]: RequestBody Parameter Ordering #3706

@ramneettung-msft

Description

@ramneettung-msft

What are you wanting to achieve?

Hi,

We were generating our swagger using a different library before on netframework, and have recently migrated to netcore and started to use swashbuckle. We notice that the request body is added to the end of the parameter list and there doesn't seem to be a way to adjust where in the parameter list it appears. This is causing an issue for us since we have previously generated swaggers with the request body as the 2nd parameter in the list and now it appears in a different spot. I believe this appears as a breaking change in our swagger.

Can you please help and point if I am missing anywhere that I can adjust this. Or do we need a feature enhancement for something like this?

Thanks,
Ramneet

What code or approach do you have so far?

  • Filters
  • Preserialization filters

Additional context

I was thinking maybe of putting my own middleware that executes after the SwaggerMiddleware that would adjust the JSON directly before returning it but i believe that the current Middleware just returns a response right away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionstaleStale issues or pull requests

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions