You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
2) Consider extension methods for adding any type of convention to the options
Right now options only supports adding IApplicationModelConvention - if you want to operate controllers/actions/parameters, you have have to write a bunch of for-loops. We could provide convenience overloads for you.
From functional tests:
public class ApiExplorerVisibilityEnabledConvention : IApplicationModelConvention
{
public void Apply(ApplicationModel application)
{
foreach (var controller in application.Controllers)
{
if (controller.ApiExplorerIsVisible == null)
{
controller.ApiExplorerIsVisible = true;
controller.ApiExplorerGroupName = controller.ControllerName;
}
}
}
}
VS
public class ApiExplorerVisibilityEnabledConvention : IControllerConvention
{
public void Apply(ControllerModel controller)
{
if (controller.ApiExplorerIsVisible == null)
{
controller.ApiExplorerIsVisible = true;
controller.ApiExplorerGroupName = controller.ControllerName;
}
}
}
The text was updated successfully, but these errors were encountered:
1) Consider shortening the property name:
VS
2) Consider extension methods for adding any type of convention to the options
Right now options only supports adding
IApplicationModelConvention
- if you want to operate controllers/actions/parameters, you have have to write a bunch of for-loops. We could provide convenience overloads for you.From functional tests:
VS
The text was updated successfully, but these errors were encountered: