- applies code review suggestions
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
This commit is contained in:
parent
892003ef2a
commit
a8bb14f26e
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue