- applies code review suggestions

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
This commit is contained in:
Vincent Biret 2021-11-23 13:40:54 -05:00
parent 892003ef2a
commit a8bb14f26e
No known key found for this signature in database
GPG key ID: 32426322EDFFB7E3
3 changed files with 5 additions and 1 deletions

View file

@ -79,6 +79,7 @@ namespace Microsoft.OpenApi.OData.Common
/// extension for discriminator value support
/// </summary>
public static string xMsDiscriminatorValue = "x-ms-discriminator-value";
/// <summary>
/// Name used for the OpenAPI referenced schema for OData Count operations responses.
/// </summary>

View file

@ -16,6 +16,7 @@ namespace Microsoft.OpenApi.OData.Edm
/// Get the static instance of $count segment.
/// </summary>
internal static ODataDollarCountSegment Instance = new();
/// <inheritdoc />
public override ODataSegmentKind Kind => ODataSegmentKind.DollarCount;

View file

@ -377,12 +377,14 @@ namespace Microsoft.OpenApi.OData.Edm
newPath.Push(ODataRefSegment.Instance); // $ref
AppendPath(newPath);
}
/// <summary>
/// Create $count paths.
/// </summary>
/// <param name="currentPath">The current OData path.</param>
/// <param name="convertSettings">The settings for the current conversion.</param>
private void CreateCountPath(ODataPath currentPath, OpenApiConvertSettings convertSettings) {
private void CreateCountPath(ODataPath currentPath, OpenApiConvertSettings convertSettings)
{
if(currentPath == null) throw new ArgumentNullException(nameof(currentPath));
if(convertSettings == null) throw new ArgumentNullException(nameof(convertSettings));
if(!convertSettings.IncludeDollarCountPathSegments) return;