2020-10-01 14:10:47 +00:00
|
|
|
|
using MediaBrowser.Common.Plugins;
|
|
|
|
|
using MediaBrowser.Controller.LiveTv;
|
2021-04-03 12:54:09 +00:00
|
|
|
|
using MediaBrowser.Model.ApiClient;
|
2020-10-01 14:10:47 +00:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
using MediaBrowser.Model.Session;
|
|
|
|
|
using MediaBrowser.Model.SyncPlay;
|
|
|
|
|
using Microsoft.OpenApi.Models;
|
|
|
|
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
|
|
|
|
|
|
|
|
|
namespace Jellyfin.Server.Filters
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-04-03 12:54:09 +00:00
|
|
|
|
/// Add models not directly used by the API, but used for discovery and websockets.
|
2020-10-01 14:10:47 +00:00
|
|
|
|
/// </summary>
|
2021-04-03 12:54:09 +00:00
|
|
|
|
public class AdditionalModelFilter : IDocumentFilter
|
2020-10-01 14:10:47 +00:00
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
|
|
|
|
|
{
|
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(LibraryUpdateInfo), context.SchemaRepository);
|
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(IPlugin), context.SchemaRepository);
|
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(PlayRequest), context.SchemaRepository);
|
2020-10-01 15:39:57 +00:00
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(PlaystateRequest), context.SchemaRepository);
|
2020-10-01 14:10:47 +00:00
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(TimerEventInfo), context.SchemaRepository);
|
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(SendCommand), context.SchemaRepository);
|
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(GeneralCommandType), context.SchemaRepository);
|
|
|
|
|
|
2020-10-01 16:40:58 +00:00
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(GroupUpdate<object>), context.SchemaRepository);
|
2021-03-10 23:33:46 +00:00
|
|
|
|
|
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(SessionMessageType), context.SchemaRepository);
|
2021-04-03 12:54:09 +00:00
|
|
|
|
context.SchemaGenerator.GenerateSchema(typeof(ServerDiscoveryInfo), context.SchemaRepository);
|
2020-10-01 14:10:47 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|