aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Extensions
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server/Extensions')
-rw-r--r--Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs35
1 files changed, 1 insertions, 34 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
index 04dd19eda..8373fd50f 100644
--- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
+++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
@@ -255,6 +255,7 @@ namespace Jellyfin.Server.Extensions
c.AddSwaggerTypeMappings();
c.SchemaFilter<IgnoreEnumSchemaFilter>();
+ c.SchemaFilter<FlagsEnumSchemaFilter>();
c.OperationFilter<RetryOnTemporarilyUnavailableFilter>();
c.OperationFilter<SecurityRequirementsOperationFilter>();
c.OperationFilter<FileResponseFilter>();
@@ -342,25 +343,6 @@ namespace Jellyfin.Server.Extensions
}
});
- /*
- * Support BlurHash dictionary
- */
- options.MapType<Dictionary<ImageType, Dictionary<string, string>>>(() =>
- new OpenApiSchema
- {
- Type = "object",
- Properties = typeof(ImageType).GetEnumNames().ToDictionary(
- name => name,
- _ => new OpenApiSchema
- {
- Type = "object",
- AdditionalProperties = new OpenApiSchema
- {
- Type = "string"
- }
- })
- });
-
// Support dictionary with nullable string value.
options.MapType<Dictionary<string, string?>>(() =>
new OpenApiSchema
@@ -373,21 +355,6 @@ namespace Jellyfin.Server.Extensions
}
});
- // Manually describe Flags enum.
- options.MapType<TranscodeReason>(() =>
- new OpenApiSchema
- {
- Type = "array",
- Items = new OpenApiSchema
- {
- Reference = new OpenApiReference
- {
- Id = nameof(TranscodeReason),
- Type = ReferenceType.Schema,
- }
- }
- });
-
// Swashbuckle doesn't use JsonOptions to describe responses, so we need to manually describe it.
options.MapType<Version>(() => new OpenApiSchema
{