For Task<_> fields, the formatter to unwrap options is not applied because the type is not purely Option<_> or IEnumerable<_>.
If I naïvely use the inner type (defaulting to the original type if not async) when building the formatter, the Task<_> problem is fixed, but Async<_> fields stop working. It seems that the middleware that converts Async to Task is run after the formatter.
For
Task<_>
fields, the formatter to unwrap options is not applied because the type is not purelyOption<_>
orIEnumerable<_>
.If I naïvely use the inner type (defaulting to the original type if not async) when building the formatter, the
Task<_>
problem is fixed, butAsync<_>
fields stop working. It seems that the middleware that convertsAsync
toTask
is run after the formatter.