AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Please update description for AddMvcCore / FormatFilter usage.

Open Igor-Pchelko opened this issue 8 years ago • 5 comments

If endpoint or controller uses FormatFilter attribute then the corresponding service should be registered:

services.AddMvcCore()
  ...
  .AddFormatterMappings

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Igor-Pchelko avatar Nov 06 '18 15:11 Igor-Pchelko

@Igor-Pchelko I don't understand your request.

Rick-Anderson avatar Nov 08 '18 18:11 Rick-Anderson

In case if Mvc stack is bootstrapped with AddMvcCore to use FormatFilter attribute we need to call AddFormatterMappings to register corresponding service.

Here are is an example of issue: https://stackoverflow.com/questions/53045783/using-formatfilter-attribute-within-mvc-core-2-1-3-api

In documentation this is not mentioned.

Igor-Pchelko avatar Nov 08 '18 19:11 Igor-Pchelko

@dougbu should this be added to the doc?

Rick-Anderson avatar Jan 04 '19 02:01 Rick-Anderson

@Igor-Pchelko we would not recommend using AddMvcCore(...) in most cases.

@Rick-Anderson I wouldn't document this particular aspect of using AddMvcCore(...) at all. However, it's worth adding a fairly prominent note wherever AddMvcCore(...) is mentioned. That note should state the API is intended only for very advanced uses, that many choices when using it can break applications, and that we do not document those nuances.

dougbu avatar Jan 04 '19 16:01 dougbu

FYI @rynowak

dougbu avatar Jan 04 '19 16:01 dougbu