1
0
mirror of https://github.com/bitwarden/server synced 2025-12-17 08:43:27 +00:00

swagger specs for public api

This commit is contained in:
Kyle Spearrin
2019-02-28 14:20:14 -05:00
parent b6696df055
commit 1c71af47bb
4 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
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";
}
}
}