|
3 | 3 | namespace LEGO.AsyncAPI.Readers
|
4 | 4 | {
|
5 | 5 | using System;
|
6 |
| - using System.Collections.Generic; |
7 | 6 | using System.IO;
|
8 | 7 | using System.Linq;
|
9 |
| - using System.Text.Json; |
10 | 8 | using System.Text.Json.Nodes;
|
11 | 9 | using System.Threading;
|
12 | 10 | using System.Threading.Tasks;
|
13 |
| - using Json.More; |
14 | 11 | using Json.Pointer;
|
15 | 12 | using LEGO.AsyncAPI.Exceptions;
|
16 | 13 | using LEGO.AsyncAPI.Extensions;
|
17 | 14 | using LEGO.AsyncAPI.Models;
|
18 | 15 | using LEGO.AsyncAPI.Models.Interfaces;
|
19 |
| - using LEGO.AsyncAPI.Readers.Exceptions; |
20 | 16 | using LEGO.AsyncAPI.Readers.Interface;
|
21 | 17 | using LEGO.AsyncAPI.Readers.Services;
|
22 | 18 | using LEGO.AsyncAPI.Services;
|
@@ -238,7 +234,7 @@ private void ResolveExternalReferences(AsyncApiDiagnostic diagnostic, IAsyncApiS
|
238 | 234 | this.context.Workspace.RegisterComponent(reference.Reference.ExternalResource, stream);
|
239 | 235 | }
|
240 | 236 |
|
241 |
| - var component = this.ResolveArtifactReferences(stream, reference, diagnostic); |
| 237 | + var component = this.ResolveStreamReferences(stream, reference, diagnostic); |
242 | 238 | if (component == null)
|
243 | 239 | {
|
244 | 240 | diagnostic.Errors.Add(new AsyncApiError(string.Empty, $"Unable to deserialize reference '{reference.Reference.Reference}'"));
|
@@ -268,7 +264,7 @@ private JsonNode ReadToJson(Stream stream)
|
268 | 264 | return default;
|
269 | 265 | }
|
270 | 266 |
|
271 |
| - private IAsyncApiSerializable ResolveArtifactReferences(Stream stream, IAsyncApiReferenceable reference, AsyncApiDiagnostic diagnostic) |
| 267 | + private IAsyncApiSerializable ResolveStreamReferences(Stream stream, IAsyncApiReferenceable reference, AsyncApiDiagnostic diagnostic) |
272 | 268 | {
|
273 | 269 | JsonNode json = null;
|
274 | 270 | try
|
|
0 commit comments