diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataSegment.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataSegment.cs index ca3e8ee67..e65467ebf 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataSegment.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataSegment.cs @@ -109,6 +109,7 @@ public string GetPathItemName(OpenApiConvertSettings settings) /// The existing parameters. /// The path item name. public abstract string GetPathItemName(OpenApiConvertSettings settings, HashSet parameters); + /// /// Provides any deprecation information for the segment. /// diff --git a/src/Microsoft.OpenApi.OData.Reader/OpenApiExtensions/OpenApiDeprecationExtension.cs b/src/Microsoft.OpenApi.OData.Reader/OpenApiExtensions/OpenApiDeprecationExtension.cs index 7ff2b475c..69c0069d0 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OpenApiExtensions/OpenApiDeprecationExtension.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OpenApiExtensions/OpenApiDeprecationExtension.cs @@ -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; diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/OpenApiExtensions/OpenApiDeprecationExtensionTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/OpenApiExtensions/OpenApiDeprecationExtensionTests.cs index 8d241a07f..add99cbd5 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/OpenApiExtensions/OpenApiDeprecationExtensionTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/OpenApiExtensions/OpenApiDeprecationExtensionTests.cs @@ -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; @@ -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() { @@ -41,6 +45,7 @@ public void WritesNothingWhenNoValues() Assert.Null(extension.Description); Assert.Empty(result); } + [Fact] public void WritesAllValues() { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs index 773817222..662927d2b 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Operation/EdmFunctionOperationHandlerTests.cs @@ -42,6 +42,7 @@ public void SetsDeprecationInformation() var extension = operation.Extensions["x-ms-deprecation"]; Assert.NotNull(extension); } + [Fact] public void DoesntSetDeprecationInformation() { diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/DeprecatedRevisionTypeTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/DeprecatedRevisionTypeTests.cs index a80b8a9b0..1e7999864 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/DeprecatedRevisionTypeTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Vocabulary/Capabilities/DeprecatedRevisionTypeTests.cs @@ -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;