mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-08 23:00:51 +02:00
Merge pull request #7867 from crobibero/name-guid-pair
(cherry picked from commit 69cc1e0bd8
)
Signed-off-by: crobibero <cody@robibe.ro>
This commit is contained in:
parent
bacb41e142
commit
5ddf4e031c
|
@ -1,3 +1,6 @@
|
||||||
|
using System;
|
||||||
|
using Jellyfin.Extensions;
|
||||||
|
using Jellyfin.Server.Migrations;
|
||||||
using MediaBrowser.Common.Plugins;
|
using MediaBrowser.Common.Plugins;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.LiveTv;
|
using MediaBrowser.Controller.LiveTv;
|
||||||
|
@ -15,6 +18,8 @@ namespace Jellyfin.Server.Filters
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AdditionalModelFilter : IDocumentFilter
|
public class AdditionalModelFilter : IDocumentFilter
|
||||||
{
|
{
|
||||||
|
// Array of options that should not be visible in the api spec.
|
||||||
|
private static readonly Type[] _ignoredConfigurations = { typeof(MigrationOptions) };
|
||||||
private readonly IServerConfigurationManager _serverConfigurationManager;
|
private readonly IServerConfigurationManager _serverConfigurationManager;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -44,6 +49,11 @@ namespace Jellyfin.Server.Filters
|
||||||
|
|
||||||
foreach (var configuration in _serverConfigurationManager.GetConfigurationStores())
|
foreach (var configuration in _serverConfigurationManager.GetConfigurationStores())
|
||||||
{
|
{
|
||||||
|
if (_ignoredConfigurations.IndexOf(configuration.ConfigurationType) != -1)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
context.SchemaGenerator.GenerateSchema(configuration.ConfigurationType, context.SchemaRepository);
|
context.SchemaGenerator.GenerateSchema(configuration.ConfigurationType, context.SchemaRepository);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue