Skip to content

Commit a26096c

Browse files
committed
fix: removes public mermaid types that were not usuable
Signed-off-by: Vincent Biret <[email protected]>
1 parent a0d1845 commit a26096c

File tree

6 files changed

+11
-17
lines changed

6 files changed

+11
-17
lines changed

src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<NoWarn>$(NoWarn);NU5048;NU5104;CA1848;</NoWarn>
1717
<PackageReadmeFile>readme.md</PackageReadmeFile>
1818
<AnalysisMode>All</AnalysisMode>
19+
<AssemblyOriginatorKeyFile>..\Microsoft.OpenApi.snk</AssemblyOriginatorKeyFile>
1920
</PropertyGroup>
2021

2122
<ItemGroup>

src/Microsoft.OpenApi.Hidi/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
using System.Runtime.CompilerServices;
33

44
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
5+
[assembly: InternalsVisibleTo("Microsoft.OpenApi.Hidi.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]

src/Microsoft.OpenApi/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
using System.Runtime.CompilerServices;
55

6+
[assembly:
7+
InternalsVisibleTo(
8+
"Microsoft.OpenApi.Hidi, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
69
[assembly:
710
InternalsVisibleTo(
811
"Microsoft.OpenApi.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]

src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public void WriteMermaid(TextWriter writer)
251251
/// <summary>
252252
/// Dictionary that maps a set of HTTP methods to HTML color. Keys are sorted, upper-cased, concatenated HTTP methods.
253253
/// </summary>
254-
public readonly static IReadOnlyDictionary<string, MermaidNodeStyle> MermaidNodeStyles = new Dictionary<string, MermaidNodeStyle>(StringComparer.OrdinalIgnoreCase)
254+
internal static readonly IReadOnlyDictionary<string, MermaidNodeStyle> MermaidNodeStyles = new Dictionary<string, MermaidNodeStyle>(StringComparer.OrdinalIgnoreCase)
255255
{
256256
{ "GET", new MermaidNodeStyle("lightSteelBlue", MermaidNodeShape.SquareCornerRectangle) },
257257
{ "POST", new MermaidNodeStyle("Lightcoral", MermaidNodeShape.OddShape) },
@@ -334,7 +334,7 @@ private static string SanitizeMermaidNode(string token)
334334
/// <summary>
335335
/// Defines the color and shape of a node in a Mermaid graph diagram
336336
/// </summary>
337-
public class MermaidNodeStyle
337+
internal class MermaidNodeStyle
338338
{
339339
/// <summary>
340340
/// Create a style that defines the color and shape of a diagram element
@@ -361,7 +361,7 @@ internal MermaidNodeStyle(string color, MermaidNodeShape shape)
361361
/// <summary>
362362
/// Shapes supported by Mermaid diagrams
363363
/// </summary>
364-
public enum MermaidNodeShape
364+
internal enum MermaidNodeShape
365365
{
366366
/// <summary>
367367
/// Rectangle with square corners

test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<IsPackable>false</IsPackable>
99
<AnalysisMode>All</AnalysisMode>
1010
<NoWarn>CA2007</NoWarn>
11+
<SignAssembly>true</SignAssembly>
12+
<AssemblyOriginatorKeyFile>..\..\src\Microsoft.OpenApi.snk</AssemblyOriginatorKeyFile>
1113
</PropertyGroup>
1214

1315
<ItemGroup>

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[assembly: System.Reflection.AssemblyMetadata("IsTrimmable", "True")]
22
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/Microsoft/OpenAPI.NET")]
3+
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Hidi, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
34
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Readers.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
45
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
56
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")]
@@ -356,19 +357,6 @@ namespace Microsoft.OpenApi
356357
Object = 32,
357358
Array = 64,
358359
}
359-
public enum MermaidNodeShape
360-
{
361-
SquareCornerRectangle = 0,
362-
RoundedCornerRectangle = 1,
363-
Circle = 2,
364-
Rhombus = 3,
365-
OddShape = 4,
366-
}
367-
public class MermaidNodeStyle
368-
{
369-
public string Color { get; }
370-
public Microsoft.OpenApi.MermaidNodeShape Shape { get; }
371-
}
372360
public sealed class MethodExpression : Microsoft.OpenApi.RuntimeExpression
373361
{
374362
public const string Method = "$method";
@@ -1413,7 +1401,6 @@ namespace Microsoft.OpenApi
14131401
}
14141402
public class OpenApiUrlTreeNode
14151403
{
1416-
public static readonly System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.OpenApi.MermaidNodeStyle> MermaidNodeStyles;
14171404
public System.Collections.Generic.IDictionary<string, System.Collections.Generic.List<string>> AdditionalData { get; set; }
14181405
public System.Collections.Generic.IDictionary<string, Microsoft.OpenApi.OpenApiUrlTreeNode> Children { get; }
14191406
public bool IsParameter { get; }

0 commit comments

Comments
 (0)