Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/validate-descriptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
- name: Validate description with redocly
uses: fluximus-prime/redocly-cli-github-action@v1
with:
args: 'lint test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/${{ matrix.descriptions }} --skip-rule operation-4xx-response --skip-rule no-server-trailing-slash --skip-rule no-unused-components --skip-rule security-defined --skip-rule info-license-url --skip-rule info-license --skip-rule no-empty-servers --skip-rule operation-summary --skip-rule tag-description --max-problems 1000'
args: 'lint test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/${{ matrix.descriptions }} --skip-rule operation-4xx-response --skip-rule no-server-trailing-slash --skip-rule no-unused-components --skip-rule security-defined --skip-rule info-license-url --skip-rule info-license --skip-rule no-empty-servers --skip-rule operation-summary --skip-rule tag-description --generate-ignore-file --max-problems 1000'
3 changes: 0 additions & 3 deletions src/Microsoft.OpenApi.OData.Reader/Common/EdmModelHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Csdl;
using Microsoft.OData.Edm.Vocabularies;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.Interfaces;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Vocabulary.Capabilities;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.Interfaces;
using Microsoft.OpenApi.OData.Generator;
using System.Collections.Generic;

Expand Down
4 changes: 0 additions & 4 deletions src/Microsoft.OpenApi.OData.Reader/Common/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
using System.Linq;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Vocabularies;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.Interfaces;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Vocabulary;

Expand Down
3 changes: 0 additions & 3 deletions src/Microsoft.OpenApi.OData.Reader/Edm/ODataContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
using System.Linq;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Vocabularies;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Generator;
using Microsoft.OpenApi.OData.Operation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
using System.Collections.Generic;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Validation;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Generator;
Expand All @@ -25,7 +22,7 @@
/// </summary>
/// <param name="model">The Edm model.</param>
/// <returns>The converted Open API document object, <see cref="OpenApiDocument"/>.</returns>
public static OpenApiDocument ConvertToOpenApi(this IEdmModel model)

Check warning on line 25 in src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'static Microsoft.OpenApi.OData.EdmModelOpenApiExtensions.ConvertToOpenApi(this Microsoft.OData.Edm.IEdmModel! model) -> Microsoft.OpenApi.OpenApiDocument!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check warning on line 25 in src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'static Microsoft.OpenApi.OData.EdmModelOpenApiExtensions.ConvertToOpenApi(this Microsoft.OData.Edm.IEdmModel! model) -> Microsoft.OpenApi.OpenApiDocument!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check warning on line 25 in src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'static Microsoft.OpenApi.OData.EdmModelOpenApiExtensions.ConvertToOpenApi(this Microsoft.OData.Edm.IEdmModel! model) -> Microsoft.OpenApi.OpenApiDocument!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check warning on line 25 in src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'static Microsoft.OpenApi.OData.EdmModelOpenApiExtensions.ConvertToOpenApi(this Microsoft.OData.Edm.IEdmModel! model) -> Microsoft.OpenApi.OpenApiDocument!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
{
return model.ConvertToOpenApi(new OpenApiConvertSettings());
}
Expand All @@ -36,7 +33,7 @@
/// <param name="model">The Edm model.</param>
/// <param name="settings">The convert settings.</param>
/// <returns>The converted Open API document object, <see cref="OpenApiDocument"/>.</returns>
public static OpenApiDocument ConvertToOpenApi(this IEdmModel model, OpenApiConvertSettings settings)

Check warning on line 36 in src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'static Microsoft.OpenApi.OData.EdmModelOpenApiExtensions.ConvertToOpenApi(this Microsoft.OData.Edm.IEdmModel! model, Microsoft.OpenApi.OData.OpenApiConvertSettings! settings) -> Microsoft.OpenApi.OpenApiDocument!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check warning on line 36 in src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'static Microsoft.OpenApi.OData.EdmModelOpenApiExtensions.ConvertToOpenApi(this Microsoft.OData.Edm.IEdmModel! model, Microsoft.OpenApi.OData.OpenApiConvertSettings! settings) -> Microsoft.OpenApi.OpenApiDocument!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check warning on line 36 in src/Microsoft.OpenApi.OData.Reader/EdmModelOpenApiExtensions.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'static Microsoft.OpenApi.OData.EdmModelOpenApiExtensions.ConvertToOpenApi(this Microsoft.OData.Edm.IEdmModel! model, Microsoft.OpenApi.OData.OpenApiConvertSettings! settings) -> Microsoft.OpenApi.OpenApiDocument!' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
{
Utils.CheckArgumentNull(model, nameof(model));
Utils.CheckArgumentNull(settings, nameof(settings));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// ------------------------------------------------------------

using System.Collections.Generic;
using Microsoft.OpenApi.Models;

namespace Microsoft.OpenApi.OData.Extensions
{
Expand All @@ -21,6 +20,6 @@
/// <summary>
/// The route prefix parameters.
/// </summary>
public IEnumerable<OpenApiParameter>? Parameters { get; }

Check warning on line 23 in src/Microsoft.OpenApi.OData.Reader/Extensions/IODataRoutePathPrefixProvider.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'Microsoft.OpenApi.OData.Extensions.IODataRoutePathPrefixProvider.Parameters.get -> System.Collections.Generic.IEnumerable<Microsoft.OpenApi.OpenApiParameter!>?' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check warning on line 23 in src/Microsoft.OpenApi.OData.Reader/Extensions/IODataRoutePathPrefixProvider.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'Microsoft.OpenApi.OData.Extensions.IODataRoutePathPrefixProvider.Parameters.get -> System.Collections.Generic.IEnumerable<Microsoft.OpenApi.OpenApiParameter!>?' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// ------------------------------------------------------------

using System.Collections.Generic;
using Microsoft.OpenApi.Models;

namespace Microsoft.OpenApi.OData.Extensions
{
Expand All @@ -21,6 +20,6 @@
/// <summary>
/// Gets/sets the associated parameters for the path prefix.
/// </summary>
public IEnumerable<OpenApiParameter>? Parameters { get; set; }

Check warning on line 23 in src/Microsoft.OpenApi.OData.Reader/Extensions/ODataRoutePathPrefixProvider.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'Microsoft.OpenApi.OData.Extensions.ODataRoutePathPrefixProvider.Parameters.get -> System.Collections.Generic.IEnumerable<Microsoft.OpenApi.OpenApiParameter!>?' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check warning on line 23 in src/Microsoft.OpenApi.OData.Reader/Extensions/ODataRoutePathPrefixProvider.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'Microsoft.OpenApi.OData.Extensions.ODataRoutePathPrefixProvider.Parameters.get -> System.Collections.Generic.IEnumerable<Microsoft.OpenApi.OpenApiParameter!>?' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check warning on line 23 in src/Microsoft.OpenApi.OData.Reader/Extensions/ODataRoutePathPrefixProvider.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Symbol 'Microsoft.OpenApi.OData.Extensions.ODataRoutePathPrefixProvider.Parameters.get -> System.Collections.Generic.IEnumerable<Microsoft.OpenApi.OpenApiParameter!>?' is not part of the declared public API (https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;

Expand All @@ -24,7 +23,7 @@
Utils.CheckArgumentNull(context, nameof(context));

// An OAS document consists of a single OpenAPI Object represented as OpenApiDocument object.
// {

Check warning on line 26 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)

Check warning on line 26 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiDocumentGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)
// "openapi":"3.0.0",
// "info": …,
// "servers": …,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@
// ------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Exceptions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Properties;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.Models.Interfaces;
using System.Globalization;

namespace Microsoft.OpenApi.OData.Generator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.MicrosoftExtensions;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.Models.Interfaces;

namespace Microsoft.OpenApi.OData.Generator
{
Expand Down Expand Up @@ -125,7 +121,7 @@
Type = JsonSchemaType.Object,
Required = new HashSet<string>
{
"code", "message"

Check warning on line 124 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Define a constant instead of using this literal 'message' 4 times. (https://rules.sonarsource.com/csharp/RSPEC-1192)

Check warning on line 124 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiErrorSchemaGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Define a constant instead of using this literal 'message' 4 times. (https://rules.sonarsource.com/csharp/RSPEC-1192)
},
Properties = new Dictionary<string, IOpenApiSchema>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
using System.Reflection;
using System.Text.Json.Nodes;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;

Expand Down Expand Up @@ -48,7 +45,7 @@

// The value of title is the value of the unqualified annotation Core.Description
// of the main schema or the entity container of the OData service.
// TODO: https://github.com/Microsoft/OpenAPI.NET.OData/issues/2

Check warning on line 48 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Complete the task associated to this 'TODO' comment. (https://rules.sonarsource.com/csharp/RSPEC-1135)

Check warning on line 48 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Complete the task associated to this 'TODO' comment. (https://rules.sonarsource.com/csharp/RSPEC-1135)

// or the entity container
if (context.Model.EntityContainer != null)
Expand All @@ -74,7 +71,7 @@

// The value of version is the value of the annotation Core.SchemaVersion of the main schema.
// If no Core.SchemaVersion is present, a default version has to be provided as this is a required OpenAPI field.
// TODO: https://github.com/Microsoft/OpenAPI.NET.OData/issues/2

Check warning on line 74 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Complete the task associated to this 'TODO' comment. (https://rules.sonarsource.com/csharp/RSPEC-1135)

Check warning on line 74 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Complete the task associated to this 'TODO' comment. (https://rules.sonarsource.com/csharp/RSPEC-1135)

return context.Settings.SemVerVersion;
}
Expand All @@ -84,7 +81,7 @@
Debug.Assert(context != null);

// The value of description is the value of the annotation Core.LongDescription of the main schema.
// TODO: https://github.com/Microsoft/OpenAPI.NET.OData/issues/2

Check warning on line 84 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Complete the task associated to this 'TODO' comment. (https://rules.sonarsource.com/csharp/RSPEC-1135)

Check warning on line 84 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiInfoGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Complete the task associated to this 'TODO' comment. (https://rules.sonarsource.com/csharp/RSPEC-1135)

// or the entity container
if (context.EntityContainer != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
using System.Collections.Generic;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Edm;
using System.Linq;
using Microsoft.OpenApi.Models.Interfaces;
using System;

namespace Microsoft.OpenApi.OData.Generator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OData.Edm.Vocabularies;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Vocabulary.Capabilities;
using System.Diagnostics;
using System;
using System.Text.Json.Nodes;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.Models.Interfaces;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Extensions;

namespace Microsoft.OpenApi.OData.Generator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
using System.Collections.Generic;
using System.Net.Http;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.Interfaces;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.PathItem;

namespace Microsoft.OpenApi.OData.Generator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
using System.Linq;
using System.Collections.Generic;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.Models.Interfaces;

namespace Microsoft.OpenApi.OData.Generator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.Interfaces;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Vocabulary.Core;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,13 @@
using System.Diagnostics;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.OData.Properties;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.Exceptions;
using System.Linq;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.MicrosoftExtensions;
using Microsoft.OpenApi.OData.Vocabulary.Core;
using System.Text.Json.Nodes;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Models.References;
using System.Globalization;
using Microsoft.OpenApi.Models.Interfaces;

namespace Microsoft.OpenApi.OData.Generator
{
Expand Down Expand Up @@ -105,7 +99,7 @@
};
document.AddComponent(Constants.BaseCollectionPaginationCountResponse, responseSchema);

responseSchema.Properties ??= [];
responseSchema.Properties ??= new Dictionary<string, IOpenApiSchema>();
if (context.Settings.EnableCount)
responseSchema.Properties.Add(ODataConstants.OdataCount.Key, ODataConstants.OdataCount.Value);
if (context.Settings.EnablePagination)
Expand Down Expand Up @@ -752,7 +746,7 @@
// The type 'System.Double' is not supported in Open API document.
case EdmPrimitiveTypeKind.Double:
/*
{

Check warning on line 749 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)

Check warning on line 749 in src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs

View workflow job for this annotation

GitHub Actions / Build

Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)
double result;
if (Double.TryParse(property.DefaultValueString, out result))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@

using System.Linq;
using System.Collections.Generic;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Vocabulary.Capabilities;
using Microsoft.OpenApi.Models.References;

namespace Microsoft.OpenApi.OData.Generator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System;
using System.Diagnostics;
using System.Linq;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Vocabulary.Authorization;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// ------------------------------------------------------------

using System.Collections.Generic;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

using System.Collections.Generic;
using System.Text.Json.Nodes;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.Interfaces;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.OData.Edm" Version="8.2.3" />
<PackageReference Include="Microsoft.OpenApi" Version="2.0.0-preview.18" />
<PackageReference Include="Microsoft.OpenApi" Version="2.0.0-preview.22" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 0 additions & 2 deletions src/Microsoft.OpenApi.OData.Reader/OData/ODataConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.Interfaces;
using System.Collections.Generic;

namespace Microsoft.OpenApi.OData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Vocabulary.Core;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
using System.Net.Http;
using System.Text.Json.Nodes;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.Interfaces;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Generator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// ------------------------------------------------------------

using System.Net.Http;
using Microsoft.OpenApi.Models;

namespace Microsoft.OpenApi.OData.Operation;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
using System.Linq;
using System.Net.Http;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Generator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// ------------------------------------------------------------

using System.Net.Http;
using Microsoft.OpenApi.Models;

namespace Microsoft.OpenApi.OData.Operation;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
using System.Linq;
using System.Net.Http;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.Interfaces;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Generator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// ------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Vocabularies;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models.References;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Edm;
using Microsoft.OpenApi.OData.Generator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
using System.Collections.Generic;
using System.Net.Http;
using Microsoft.OData.Edm;
using Microsoft.OpenApi.Extensions;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.OData.Common;
using Microsoft.OpenApi.OData.Generator;

Expand Down
Loading
Loading