Home:ALL Converter>Swashbuckle for custom model binder

Swashbuckle for custom model binder

Ask Time:2019-01-25T22:36:37         Author:GrahamB

Json Formatter

In WebAPI (.net core 2.1) I've got a URL query string that has the format of &title=fred&author=blogs&sort=-title (etc.). I'm trying out various ways of model binding this into a single "facets" dictionary of , e.g "title","fred" etc. The most flexible to is use a custom model binder.

However when I use Swashbuckle the swagger UI shows a parameter of 'request' that takes a type object. I can enter my raw querystring in here but then this gets sent on the URL as &request=title=fred&author=blogs.

Is there a way to tell Swashbuckle to not send the &request on the URL but to just send the raw contents?

Author:GrahamB,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54367400/swashbuckle-for-custom-model-binder
yy