@ -1,4 +1,5 @@
using MediaBrowser.Common.Plugins ;
using MediaBrowser.Common.Plugins ;
using MediaBrowser.Controller.Configuration ;
using MediaBrowser.Controller.LiveTv ;
using MediaBrowser.Controller.LiveTv ;
using MediaBrowser.Model.ApiClient ;
using MediaBrowser.Model.ApiClient ;
using MediaBrowser.Model.Entities ;
using MediaBrowser.Model.Entities ;
@ -14,6 +15,17 @@ namespace Jellyfin.Server.Filters
/// </summary>
/// </summary>
public class AdditionalModelFilter : IDocumentFilter
public class AdditionalModelFilter : IDocumentFilter
{
{
private readonly IServerConfigurationManager _serverConfigurationManager ;
/// <summary>
/// Initializes a new instance of the <see cref="AdditionalModelFilter"/> class.
/// </summary>
/// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
public AdditionalModelFilter ( IServerConfigurationManager serverConfigurationManager )
{
_serverConfigurationManager = serverConfigurationManager ;
}
/// <inheritdoc />
/// <inheritdoc />
public void Apply ( OpenApiDocument swaggerDoc , DocumentFilterContext context )
public void Apply ( OpenApiDocument swaggerDoc , DocumentFilterContext context )
{
{
@ -29,6 +41,11 @@ namespace Jellyfin.Server.Filters
context . SchemaGenerator . GenerateSchema ( typeof ( SessionMessageType ) , context . SchemaRepository ) ;
context . SchemaGenerator . GenerateSchema ( typeof ( SessionMessageType ) , context . SchemaRepository ) ;
context . SchemaGenerator . GenerateSchema ( typeof ( ServerDiscoveryInfo ) , context . SchemaRepository ) ;
context . SchemaGenerator . GenerateSchema ( typeof ( ServerDiscoveryInfo ) , context . SchemaRepository ) ;
foreach ( var configuration in _serverConfigurationManager . GetConfigurationStores ( ) )
{
context . SchemaGenerator . GenerateSchema ( configuration . ConfigurationType , context . SchemaRepository ) ;
}
}
}
}
}
}
}