Skip to content

Commit 3d7aa58

Browse files
committed
chore: cleans up api surface
Signed-off-by: Vincent Biret <[email protected]>
1 parent 844b9b1 commit 3d7aa58

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Microsoft.OpenApi/Extensions/OpenApiTypeMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ internal static string ToFirstIdentifier(this JsonSchemaType schemaType)
7070
/// </summary>
7171
/// <param name="schemaType"></param>
7272
/// <returns></returns>
73-
public static string ToSingleIdentifier(this JsonSchemaType schemaType)
73+
internal static string ToSingleIdentifier(this JsonSchemaType schemaType)
7474
{
7575
return schemaType.ToIdentifiersInternal().Single();
7676
}

test/Microsoft.OpenApi.Readers.Tests/V31Tests/OpenApiSchemaTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.OpenApi.Writers;
1717
using Xunit;
1818
using Microsoft.OpenApi.Exceptions;
19+
using System;
1920

2021
namespace Microsoft.OpenApi.Readers.Tests.V31Tests
2122
{
@@ -561,7 +562,7 @@ public void ReturnSingleIdentifierWorks()
561562
var types = JsonSchemaType.Integer | JsonSchemaType.Null;
562563

563564
Assert.Equal("integer", type.ToSingleIdentifier());
564-
Assert.Throws<OpenApiException>(() => types.ToSingleIdentifier());
565+
Assert.Throws<InvalidOperationException>(() => types.ToSingleIdentifier());
565566
}
566567
}
567568
}

test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ namespace Microsoft.OpenApi.Extensions
194194
public static string[]? ToIdentifiers(this Microsoft.OpenApi.Models.JsonSchemaType? schemaType) { }
195195
public static Microsoft.OpenApi.Models.JsonSchemaType ToJsonSchemaType(this string identifier) { }
196196
public static Microsoft.OpenApi.Models.JsonSchemaType? ToJsonSchemaType(this string[] identifier) { }
197-
public static string ToSingleIdentifier(this Microsoft.OpenApi.Models.JsonSchemaType schemaType) { }
198197
}
199198
}
200199
namespace Microsoft.OpenApi.Interfaces

0 commit comments

Comments
 (0)