File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
src/Microsoft.OpenApi/Extensions
Microsoft.OpenApi.Readers.Tests/V31Tests
Microsoft.OpenApi.Tests/PublicApi Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 1616using Microsoft . OpenApi . Writers ;
1717using Xunit ;
1818using Microsoft . OpenApi . Exceptions ;
19+ using System ;
1920
2021namespace 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}
Original file line number Diff line number Diff 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}
200199namespace Microsoft.OpenApi.Interfaces
You can’t perform that action at this time.
0 commit comments