From 0ef1fe4644139f31549a48ca19c9f08982662f05 Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Sun, 9 Feb 2025 01:26:31 +0100 Subject: [PATCH] refactor: make schema names legal --- Shoko.Server/API/APIExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shoko.Server/API/APIExtensions.cs b/Shoko.Server/API/APIExtensions.cs index 0882bf796..8b9c9896d 100644 --- a/Shoko.Server/API/APIExtensions.cs +++ b/Shoko.Server/API/APIExtensions.cs @@ -224,7 +224,7 @@ private static string GetTypeName(string fullName) var firstPart = fullName[..fullName.IndexOf('`')]; var secondPart = fullName[(fullName.IndexOf('`') + 3)..^1]; - return ConvertTypeName(firstPart) + "<" + GetTypeName(secondPart) + ">"; + return ConvertTypeName(firstPart) + "_" + GetTypeName(secondPart) + "_"; } private static string ConvertTypeName(string fullName) @@ -233,7 +233,7 @@ private static string ConvertTypeName(string fullName) if (fullName.StartsWith("System.Collections.Generic.")) title = fullName.Split('.').Skip(3).Join('.'); else if (fullName.StartsWith("System.") || fullName.StartsWith("Microsoft.")) - title = "Core." + fullName.Split('.').Skip(1).Join('.'); + title = fullName.Split('.').Skip(1).Join('.'); // APIv0 (API independent plugin abstraction) schemas else if (fullName.StartsWith("Shoko.Plugin.Abstractions."))