diff --git a/src/libs/Directory.Build.props b/src/libs/Directory.Build.props index 4b3e613bc9..59ca1de691 100644 --- a/src/libs/Directory.Build.props +++ b/src/libs/Directory.Build.props @@ -39,7 +39,7 @@ - 0.13.6 + 0.13.7 0.1 v dev diff --git a/src/libs/OpenApiGenerator.Core/Json/SystemTextJsonSerializer.cs b/src/libs/OpenApiGenerator.Core/Json/SystemTextJsonSerializer.cs index 185d017a25..d254061f0f 100644 --- a/src/libs/OpenApiGenerator.Core/Json/SystemTextJsonSerializer.cs +++ b/src/libs/OpenApiGenerator.Core/Json/SystemTextJsonSerializer.cs @@ -60,7 +60,7 @@ public static string GetContextType(string type) var result = string.Concat(type .Replace("global::", string.Empty) - .TrimEnd('?') + .Replace("?", string.Empty) .Replace("System.Collections.Generic.", string.Empty) .Replace("System.", string.Empty) .Split(ContextTypeSeparators, StringSplitOptions.RemoveEmptyEntries) diff --git a/src/tests/OpenApiGenerator.UnitTests/JsonTests.JsonSerializerContextTypes.cs b/src/tests/OpenApiGenerator.UnitTests/JsonTests.JsonSerializerContextTypes.cs index 650aaf2de1..462bb5b693 100644 --- a/src/tests/OpenApiGenerator.UnitTests/JsonTests.JsonSerializerContextTypes.cs +++ b/src/tests/OpenApiGenerator.UnitTests/JsonTests.JsonSerializerContextTypes.cs @@ -14,5 +14,6 @@ public void ContextTypes() GetContextType("global::System.Collections.Generic.List").Should().Be("ListByteArray"); GetContextType("global::System.Collections.Generic.List").Should().Be("ListByteArrayArray"); GetContextType("bool").Should().Be("NullableBoolean"); + GetContextType("global::System.AllOf").Should().Be("NullableAllOfIntegrationAppsCreateFromManifestResponse"); } } \ No newline at end of file