diff --git a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataPathProvider.cs b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataPathProvider.cs index bf18997..3427d02 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Edm/ODataPathProvider.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Edm/ODataPathProvider.cs @@ -387,7 +387,7 @@ namespace Microsoft.OpenApi.OData.Edm { if(currentPath == null) throw new ArgumentNullException(nameof(currentPath)); if(convertSettings == null) throw new ArgumentNullException(nameof(convertSettings)); - if(!convertSettings.IncludeDollarCountPathSegments) return; + if(!convertSettings.EnableDollarCountPath) return; var countPath = currentPath.Clone(); countPath.Push(ODataDollarCountSegment.Instance); AppendPath(countPath); diff --git a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs index 3cbb9a9..67a9e29 100644 --- a/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs +++ b/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs @@ -67,7 +67,7 @@ namespace Microsoft.OpenApi.OData.Generator schemas[schema.Key] = schema.Value; } - if(context.Settings.IncludeDollarCountPathSegments) + if(context.Settings.EnableDollarCountPath) schemas[Constants.DollarCountSchemaName] = new OpenApiSchema { Type = "integer", Format = "int32" diff --git a/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs b/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs index 72bff80..be319c3 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs @@ -186,7 +186,7 @@ namespace Microsoft.OpenApi.OData /// /// Gets/sets a value indicating whether or not add OData $count segments in the description for collections. /// - public bool IncludeDollarCountPathSegments { get; set; } = true; + public bool EnableDollarCountPath { get; set; } = true; internal OpenApiConvertSettings Clone() { @@ -218,7 +218,7 @@ namespace Microsoft.OpenApi.OData ShowSchemaExamples = this.ShowSchemaExamples, ShowRootPath = this.ShowRootPath, PathProvider = this.PathProvider, - IncludeDollarCountPathSegments = this.IncludeDollarCountPathSegments, + EnableDollarCountPath = this.EnableDollarCountPath, }; return newSettings; diff --git a/src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt b/src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt index ed58c36..97ec543 100644 --- a/src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt +++ b/src/Microsoft.OpenApi.OData.Reader/PublicAPI.Unshipped.txt @@ -128,8 +128,8 @@ Microsoft.OpenApi.OData.OpenApiConvertSettings.PathPrefix.get -> string Microsoft.OpenApi.OData.OpenApiConvertSettings.PathPrefix.set -> void Microsoft.OpenApi.OData.OpenApiConvertSettings.PathProvider.get -> Microsoft.OpenApi.OData.Edm.IODataPathProvider Microsoft.OpenApi.OData.OpenApiConvertSettings.PathProvider.set -> void -Microsoft.OpenApi.OData.OpenApiConvertSettings.IncludeDollarCountPathSegments.get -> bool -Microsoft.OpenApi.OData.OpenApiConvertSettings.IncludeDollarCountPathSegments.set -> void +Microsoft.OpenApi.OData.OpenApiConvertSettings.EnableDollarCountPath.get -> bool +Microsoft.OpenApi.OData.OpenApiConvertSettings.EnableDollarCountPath.set -> void Microsoft.OpenApi.OData.OpenApiConvertSettings.PrefixEntityTypeNameBeforeKey.get -> bool Microsoft.OpenApi.OData.OpenApiConvertSettings.PrefixEntityTypeNameBeforeKey.set -> void Microsoft.OpenApi.OData.OpenApiConvertSettings.RequireDerivedTypesConstraintForBoundOperations.get -> bool diff --git a/test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/ODataPathProviderTests.cs b/test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/ODataPathProviderTests.cs index dfe27a3..2daaa80 100644 --- a/test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/ODataPathProviderTests.cs +++ b/test/Microsoft.OpenAPI.OData.Reader.Tests/Edm/ODataPathProviderTests.cs @@ -93,7 +93,7 @@ namespace Microsoft.OpenApi.OData.Edm.Tests IEdmModel model = GetInheritanceModel(string.Empty); ODataPathProvider provider = new ODataPathProvider(); var settings = new OpenApiConvertSettings { - IncludeDollarCountPathSegments = false, + EnableDollarCountPath = false, }; // Act