Skip to content

Commit 7cebb68

Browse files
baywetCopilot
andcommitted
chore(reader): prune unused JsonNode helpers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 318db4c commit 7cebb68

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

src/Microsoft.OpenApi/Reader/JsonNodeHelper.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
using System.Collections.Generic;
66
using System.Globalization;
77
using System.Linq;
8-
using System.Text.Json;
98
using System.Text.Json.Nodes;
10-
using System.Text.Json.Serialization;
119

1210
namespace Microsoft.OpenApi.Reader
1311
{
@@ -162,11 +160,6 @@ public static JsonNode CreateAny(this JsonNode? node)
162160
return node ?? JsonNullSentinel.JsonNull;
163161
}
164162

165-
public static string GetRaw(this JsonNode node)
166-
{
167-
return JsonSerializer.Serialize(node, SourceGenerationContext.Default.JsonNode);
168-
}
169-
170163
public static string? GetScalarValue(this JsonNode? node)
171164
{
172165
var scalarNode = node is JsonValue value ? value : throw new OpenApiException("Expected scalar value.");
@@ -184,16 +177,6 @@ public static string GetRaw(this JsonNode node)
184177
return jsonObject.TryGetPropertyValue("$id", out var idNode) ? idNode?.GetScalarValue() : null;
185178
}
186179

187-
public static string? GetSummaryValue(this JsonObject jsonObject)
188-
{
189-
return jsonObject.TryGetPropertyValue("summary", out var summaryNode) ? summaryNode?.GetScalarValue() : null;
190-
}
191-
192-
public static string? GetDescriptionValue(this JsonObject jsonObject)
193-
{
194-
return jsonObject.TryGetPropertyValue("description", out var descriptionNode) ? descriptionNode?.GetScalarValue() : null;
195-
}
196-
197180
public static void ParseMap<T>(
198181
this JsonObject? JsonObject,
199182
T domainObject,
@@ -288,7 +271,4 @@ private static void ParseField<T>(
288271
}
289272
}
290273
}
291-
292-
[JsonSerializable(typeof(JsonNode))]
293-
internal partial class SourceGenerationContext : JsonSerializerContext { }
294274
}

0 commit comments

Comments
 (0)