From 5ddf4e031c48d1df59c3fceb28f1faf965ab6868 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Fri, 10 Jun 2022 10:39:51 -0600 Subject: [PATCH] Merge pull request #7867 from crobibero/name-guid-pair (cherry picked from commit 69cc1e0bd86eec085398ef237cc510c3ae8db278) Signed-off-by: crobibero --- Jellyfin.Server/Filters/AdditionalModelFilter.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Jellyfin.Server/Filters/AdditionalModelFilter.cs b/Jellyfin.Server/Filters/AdditionalModelFilter.cs index 44e5b0d1e7..487948f815 100644 --- a/Jellyfin.Server/Filters/AdditionalModelFilter.cs +++ b/Jellyfin.Server/Filters/AdditionalModelFilter.cs @@ -1,3 +1,6 @@ +using System; +using Jellyfin.Extensions; +using Jellyfin.Server.Migrations; using MediaBrowser.Common.Plugins; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.LiveTv; @@ -15,6 +18,8 @@ namespace Jellyfin.Server.Filters /// 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; /// @@ -44,6 +49,11 @@ namespace Jellyfin.Server.Filters foreach (var configuration in _serverConfigurationManager.GetConfigurationStores()) { + if (_ignoredConfigurations.IndexOf(configuration.ConfigurationType) != -1) + { + continue; + } + context.SchemaGenerator.GenerateSchema(configuration.ConfigurationType, context.SchemaRepository); } }