Skip to content

Commit 9198a2c

Browse files
committed
code cleanup
1 parent 80e7d84 commit 9198a2c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Microsoft.OpenApi/Services/OpenApiWorkspace.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

44
using System;
55
using System.Collections.Generic;
66
using System.IO;
77
using System.Linq;
8-
using Json.More;
98
using Json.Schema;
109
using Microsoft.OpenApi.Extensions;
1110
using Microsoft.OpenApi.Interfaces;

test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/OpenApiDiagnosticTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ public async Task DiagnosticReportMergedForExternalReference()
5656
Assert.NotNull(result);
5757
Assert.NotNull(result.OpenApiDocument.Workspace);
5858
Assert.True(result.OpenApiDocument.Workspace.Contains("TodoReference.yaml"));
59-
result.OpenApiDiagnostic.Errors.Should().BeEquivalentTo(new List<OpenApiError> {
60-
new( new OpenApiException("[File: ./TodoReference.yaml] Invalid Reference identifier 'object-not-existing'.")) });
59+
result.OpenApiDiagnostic.Errors.Should().BeEquivalentTo(new List<OpenApiError>
60+
{
61+
new OpenApiError("", "[File: ./TodoReference.yaml] Paths is a REQUIRED field at #/"),
62+
new(new OpenApiException("[File: ./TodoReference.yaml] Invalid Reference identifier 'object-not-existing'."))
63+
});
6164
}
6265
}
6366

test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/Samples/OpenApiDiagnosticReportMerged/TodoReference.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ components:
2323
type: object
2424
properties:
2525
id:
26-
type:string
26+
type: string

0 commit comments

Comments
 (0)