Skip to content

fix: removes public mermaid types that were not usuable #2429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<NoWarn>$(NoWarn);NU5048;NU5104;CA1848;</NoWarn>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<AnalysisMode>All</AnalysisMode>
<AssemblyOriginatorKeyFile>..\Microsoft.OpenApi.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -51,7 +52,10 @@
<!-- Make internals available for Unit Testing -->
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Microsoft.OpenApi.Hidi.Tests</_Parameter1>
<_Parameter1>Microsoft.OpenApi.Hidi.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<!-- End Unit test Internals -->
Expand Down
4 changes: 0 additions & 4 deletions src/Microsoft.OpenApi.Hidi/Properties/AssemblyInfo.cs

This file was deleted.

3 changes: 3 additions & 0 deletions src/Microsoft.OpenApi/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

using System.Runtime.CompilerServices;

[assembly:
InternalsVisibleTo(
"Microsoft.OpenApi.Hidi, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
[assembly:
InternalsVisibleTo(
"Microsoft.OpenApi.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

var root = Create();

var paths = doc?.Paths;

Check warning on line 94 in src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)

Check warning on line 94 in src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)

Check warning on line 94 in src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)

Check warning on line 94 in src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)

Check warning on line 94 in src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)

Check warning on line 94 in src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this unnecessary check for null. (https://rules.sonarsource.com/csharp/RSPEC-2589)
if (paths != null)
{
foreach (var path in paths)
Expand Down Expand Up @@ -251,7 +251,7 @@
/// <summary>
/// Dictionary that maps a set of HTTP methods to HTML color. Keys are sorted, upper-cased, concatenated HTTP methods.
/// </summary>
public readonly static IReadOnlyDictionary<string, MermaidNodeStyle> MermaidNodeStyles = new Dictionary<string, MermaidNodeStyle>(StringComparer.OrdinalIgnoreCase)
internal static readonly IReadOnlyDictionary<string, MermaidNodeStyle> MermaidNodeStyles = new Dictionary<string, MermaidNodeStyle>(StringComparer.OrdinalIgnoreCase)
{
{ "GET", new MermaidNodeStyle("lightSteelBlue", MermaidNodeShape.SquareCornerRectangle) },
{ "POST", new MermaidNodeStyle("Lightcoral", MermaidNodeShape.OddShape) },
Expand Down Expand Up @@ -334,7 +334,7 @@
/// <summary>
/// Defines the color and shape of a node in a Mermaid graph diagram
/// </summary>
public class MermaidNodeStyle
internal class MermaidNodeStyle
{
/// <summary>
/// Create a style that defines the color and shape of a diagram element
Expand All @@ -361,7 +361,7 @@
/// <summary>
/// Shapes supported by Mermaid diagrams
/// </summary>
public enum MermaidNodeShape
internal enum MermaidNodeShape
{
/// <summary>
/// Rectangle with square corners
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<IsPackable>false</IsPackable>
<AnalysisMode>All</AnalysisMode>
<NoWarn>CA2007</NoWarn>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\src\Microsoft.OpenApi.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
15 changes: 1 addition & 14 deletions test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[assembly: System.Reflection.AssemblyMetadata("IsTrimmable", "True")]
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/Microsoft/OpenAPI.NET")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Hidi, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Readers.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")]
Expand Down Expand Up @@ -356,19 +357,6 @@ namespace Microsoft.OpenApi
Object = 32,
Array = 64,
}
public enum MermaidNodeShape
{
SquareCornerRectangle = 0,
RoundedCornerRectangle = 1,
Circle = 2,
Rhombus = 3,
OddShape = 4,
}
public class MermaidNodeStyle
{
public string Color { get; }
public Microsoft.OpenApi.MermaidNodeShape Shape { get; }
}
public sealed class MethodExpression : Microsoft.OpenApi.RuntimeExpression
{
public const string Method = "$method";
Expand Down Expand Up @@ -1413,7 +1401,6 @@ namespace Microsoft.OpenApi
}
public class OpenApiUrlTreeNode
{
public static readonly System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.OpenApi.MermaidNodeStyle> MermaidNodeStyles;
public System.Collections.Generic.IDictionary<string, System.Collections.Generic.List<string>> AdditionalData { get; set; }
public System.Collections.Generic.IDictionary<string, Microsoft.OpenApi.OpenApiUrlTreeNode> Children { get; }
public bool IsParameter { get; }
Expand Down
Loading