Skip to content

Commit 674fe14

Browse files
committed
Changed mermaid styles to make them readonly
1 parent 5d87820 commit 674fe14

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs

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

44
using System;
55
using System.Collections.Generic;
6+
using System.Collections.ObjectModel;
67
using System.IO;
78
using System.Linq;
89
using Microsoft.OpenApi.Models;
@@ -255,7 +256,7 @@ public void WriteMermaid(StreamWriter writer)
255256
/// <summary>
256257
/// Dictionary that maps a set of HTTP methods to HTML color. Keys are sorted, uppercased, concatenated HTTP methods.
257258
/// </summary>
258-
public static Dictionary<string, MermaidNodeStyle> MermaidNodeStyles = new Dictionary<string, MermaidNodeStyle>(StringComparer.OrdinalIgnoreCase)
259+
public readonly static IReadOnlyDictionary<string, MermaidNodeStyle> MermaidNodeStyles = new Dictionary<string, MermaidNodeStyle>(StringComparer.OrdinalIgnoreCase)
259260
{
260261
{ "GET", new MermaidNodeStyle("lightSteelBlue", MermaidNodeShape.SquareCornerRectangle) },
261262
{ "POST", new MermaidNodeStyle("Lightcoral", MermaidNodeShape.OddShape) },
@@ -341,7 +342,7 @@ public class MermaidNodeStyle
341342
/// </summary>
342343
/// <param name="color"></param>
343344
/// <param name="shape"></param>
344-
public MermaidNodeStyle(string color, MermaidNodeShape shape)
345+
internal MermaidNodeStyle(string color, MermaidNodeShape shape)
345346
{
346347
Color = color;
347348
Shape = shape;

0 commit comments

Comments
 (0)