Skip to content

Commit

Permalink
- addresses initial review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Dec 16, 2021
1 parent f5ca214 commit 23c693e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Microsoft.OpenApi.OData.Reader/Edm/ODataSegment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public string GetPathItemName(OpenApiConvertSettings settings)
/// <param name="parameters">The existing parameters.</param>
/// <returns>The path item name.</returns>
public abstract string GetPathItemName(OpenApiConvertSettings settings, HashSet<string> parameters);

/// <summary>
/// Provides any deprecation information for the segment.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using System;
using System.Linq;
using Microsoft.OpenApi;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Writers;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using System;
using System.IO;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Writers;
using Xunit;

Expand All @@ -17,11 +21,11 @@ public void ExtensionNameMatchesExpected()
// Act
string name = extension.Name;
string expectedName = "x-ms-deprecation";
Assert.Equal(expectedName, name);

// Assert
Assert.Equal(expectedName, name);
}

[Fact]
public void WritesNothingWhenNoValues()
{
Expand All @@ -41,6 +45,7 @@ public void WritesNothingWhenNoValues()
Assert.Null(extension.Description);
Assert.Empty(result);
}

[Fact]
public void WritesAllValues()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public void SetsDeprecationInformation()
var extension = operation.Extensions["x-ms-deprecation"];
Assert.NotNull(extension);
}

[Fact]
public void DoesntSetDeprecationInformation()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using System;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Vocabularies;
Expand Down

0 comments on commit 23c693e

Please sign in to comment.