title: How return a yaml file as result of an asp.net core ViewComponent
body: <p>I want to create an asp.net core ViewComponent that dynamically return a yaml file based on some criteria:
  For example</p>
  <pre><code>namespace MyNameSpace {
  
  [ViewComponent(Name = nameof(MyViewComponent))]
  public class MyViewComponent : ViewComponent
  {
      
      public async Task&lt;IViewComponentResult&gt; InvokeAsync(object input)
      {
          string yamlDocument = GetYamlDocumentByInput(input);
          //how to proceed here so that my yamlDocument is returned with the right content type?
          return View(..., yamlDocument);
      }
  }}
  </code></pre>