mirror of
https://github.com/bitwarden/server
synced 2025-12-16 16:23:31 +00:00
14 lines
433 B
C#
14 lines
433 B
C#
using Microsoft.AspNetCore.Mvc.ApplicationModels;
|
|
|
|
namespace Bit.Api.Utilities
|
|
{
|
|
public class ApiExplorerGroupConvention : IControllerModelConvention
|
|
{
|
|
public void Apply(ControllerModel controller)
|
|
{
|
|
var controllerNamespace = controller.ControllerType.Namespace;
|
|
controller.ApiExplorer.GroupName = controllerNamespace.Contains(".Public.") ? "public" : "internal";
|
|
}
|
|
}
|
|
}
|