diff --git a/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs b/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs index 13ef8136..8f13d20e 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs @@ -17,8 +17,6 @@ namespace Microsoft.OpenApi.OData /// public class OpenApiConvertSettings { - private bool _enableODataAnnotationReferencesForResponses = true; - /// /// Gets/sets the service root. /// @@ -110,18 +108,13 @@ public class OpenApiConvertSettings /// /// Gets/sets a value indicating whether or not to reference @odata.nextLink and @odata.count in responses /// - [Obsolete("Deprecated in favor of EnableODataAnnotationReferencesForResponses. " + - "When both are provided, EnableODataAnnotationReferencesForResponses takes precedence.")] - public bool RefBaseCollectionPaginationCountResponse { get; set; } = true; + [Obsolete("Deprecated in favor of EnableODataAnnotationReferencesForResponses.")] + public bool RefBaseCollectionPaginationCountResponse { get { return EnableODataAnnotationReferencesForResponses; } } /// /// Gets/sets a value indicating whether or not to reference @odata.nextLink, @odata.deltaLink and @odata.count in responses /// - public bool EnableODataAnnotationReferencesForResponses - { - get => _enableODataAnnotationReferencesForResponses; - set => _enableODataAnnotationReferencesForResponses = value && this.RefBaseCollectionPaginationCountResponse; - } + public bool EnableODataAnnotationReferencesForResponses { get; set; } = true; /// /// Gets/sets a value that specifies the name of the operation for retrieving the next page in a collection of entities. @@ -356,7 +349,6 @@ internal OpenApiConvertSettings Clone() EnableCount = this.EnableCount, IncludeAssemblyInfo = this.IncludeAssemblyInfo, EnableODataAnnotationReferencesForResponses = this.EnableODataAnnotationReferencesForResponses, - RefBaseCollectionPaginationCountResponse = this.RefBaseCollectionPaginationCountResponse }; return newSettings;