From 339e83a818c96527793b7dadfdcc10415ed0a975 Mon Sep 17 00:00:00 2001 From: Archi Date: Sat, 23 Apr 2022 14:58:22 +0200 Subject: [PATCH] Use saner custom schema IDs in swagger --- ArchiSteamFarm/IPC/Startup.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/IPC/Startup.cs b/ArchiSteamFarm/IPC/Startup.cs index 98d8bec77..af899f192 100644 --- a/ArchiSteamFarm/IPC/Startup.cs +++ b/ArchiSteamFarm/IPC/Startup.cs @@ -260,7 +260,11 @@ internal sealed class Startup { } ); - options.CustomSchemaIds(static type => type.GetUnifiedName()); + // We require custom schema IDs due to conflicting type names, choosing the proper one is tricky as there is no good answer and any kind of convention has a potential to create conflict + // FullName and Name both do, ToString() for unknown to me reason doesn't, and I don't have courage to call our WebUtilities.GetUnifiedName() better than what .NET ships with (because it isn't) + // Let's use ToString() until we find a good enough reason to change it + options.CustomSchemaIds(static type => type.ToString()); + options.EnableAnnotations(true, true); options.SchemaFilter();