There are cases were I would like to send parameters that are used by a custom formatter in order to adjust how to generate that format. For example, say you want to tell the csv formatter to use \t instead of , as a field separator.
What’s the best way to pass that in a GET/POST request? Sure you can add any querystring params and have the formatter extract those, but that will trigger warnings (that, granted, can be muted) about mismatched request params. Is there another trick or convention preferred?
I’d just have an explicit property for it, the feature isn’t going to be discoverable otherwise. Other than that you can have a magic property convention like you suggest and add it to Config.IgnoreWarningsOnPropertyNames.
Sounds like you’re getting the default behavior of CSV Format:
//Add a response filter to add a 'Content-Disposition' header so browsers treat it natively as a .csv file
appHost.GlobalResponseFilters.Add((req, res, dto) =>
if (req.ResponseContentType == MimeTypes.Csv)
In which case you can remove the built-in CsvFormat and just register it yourself, e.g:
Plugins.RemoveAll(x => x is CsvFormat);