diff --git a/src/Kyoo.Authentication/Views/AccountApi.cs b/src/Kyoo.Authentication/Views/AccountApi.cs
index af569655..92af8127 100644
--- a/src/Kyoo.Authentication/Views/AccountApi.cs
+++ b/src/Kyoo.Authentication/Views/AccountApi.cs
@@ -177,6 +177,7 @@ namespace Kyoo.Authentication.Views
}
///
+ [ApiExplorerSettings(IgnoreApi = true)]
public async Task GetProfileDataAsync(ProfileDataRequestContext context)
{
User user = await _users.GetOrDefault(int.Parse(context.Subject.GetSubjectId()));
@@ -187,6 +188,7 @@ namespace Kyoo.Authentication.Views
}
///
+ [ApiExplorerSettings(IgnoreApi = true)]
public async Task IsActiveAsync(IsActiveContext context)
{
User user = await _users.GetOrDefault(int.Parse(context.Subject.GetSubjectId()));
diff --git a/src/Kyoo.Core/CoreModule.cs b/src/Kyoo.Core/CoreModule.cs
index fa7f9819..fc83caf5 100644
--- a/src/Kyoo.Core/CoreModule.cs
+++ b/src/Kyoo.Core/CoreModule.cs
@@ -138,7 +138,9 @@ namespace Kyoo.Core
{
string publicUrl = _configuration.GetPublicUrl();
- services.AddMvc().AddControllersAsServices();
+ services.AddMvcCore()
+ .AddControllersAsServices()
+ .AddApiExplorer();
services.AddControllers()
.AddNewtonsoftJson(x =>
{
diff --git a/src/Kyoo.Core/PluginsStartup.cs b/src/Kyoo.Core/PluginsStartup.cs
index 77618842..047077d5 100644
--- a/src/Kyoo.Core/PluginsStartup.cs
+++ b/src/Kyoo.Core/PluginsStartup.cs
@@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using Autofac;
using Kyoo.Abstractions;
using Kyoo.Abstractions.Controllers;
@@ -108,6 +109,9 @@ namespace Kyoo.Core
/// The service collection to fill.
public void ConfigureServices(IServiceCollection services)
{
+ foreach (Assembly assembly in _plugins.GetAllPlugins().Select(x => x.GetType().Assembly))
+ services.AddMvcCore().AddApplicationPart(assembly);
+
foreach (IPlugin plugin in _plugins.GetAllPlugins())
plugin.Configure(services);
diff --git a/src/Kyoo.Swagger/SwaggerModule.cs b/src/Kyoo.Swagger/SwaggerModule.cs
index a8aea7d4..c53703d4 100644
--- a/src/Kyoo.Swagger/SwaggerModule.cs
+++ b/src/Kyoo.Swagger/SwaggerModule.cs
@@ -21,6 +21,7 @@ using System.Collections.Generic;
using System.IO;
using Kyoo.Abstractions.Controllers;
using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;