Skip to content

Commit a28aa21

Browse files
committed
chore: replace interface with concrete type
1 parent c035940 commit a28aa21

File tree

72 files changed

+355
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+355
-355
lines changed

src/Microsoft.OpenApi.Hidi/Extensions/OpenApiExtensibleExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal static class OpenApiExtensibleExtensions
1313
/// <param name="extensions">A dictionary of <see cref="IOpenApiExtension"/>.</param>
1414
/// <param name="extensionKey">The key corresponding to the <see cref="IOpenApiExtension"/>.</param>
1515
/// <returns>A <see cref="string"/> value matching the provided extensionKey. Return null when extensionKey is not found. </returns>
16-
internal static string GetExtension(this IDictionary<string, IOpenApiExtension> extensions, string extensionKey)
16+
internal static string GetExtension(this Dictionary<string, IOpenApiExtension> extensions, string extensionKey)
1717
{
1818
if (extensions.TryGetValue(extensionKey, out var value) && value is OpenApiAny { Node: JsonValue castValue } && castValue.TryGetValue<string>(out var stringValue))
1919
{

src/Microsoft.OpenApi.Hidi/Formatters/PowerShellFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private static string RemoveKeyTypeSegment(string operationId, IList<IOpenApiPar
161161

162162
private static void ResolveFunctionParameters(IList<IOpenApiParameter> parameters)
163163
{
164-
foreach (var parameter in parameters.OfType<OpenApiParameter>().Where(static p => p.Content?.Any() ?? false))
164+
foreach (var parameter in parameters.OfType<OpenApiParameter>().Where(static p => p.Content?.Count > 0))
165165
{
166166
// Replace content with a schema object of type array
167167
// for structured or collection-valued function parameters

src/Microsoft.OpenApi.Hidi/StatsVisitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public override void Visit(IOpenApiSchema schema)
2727

2828
public int HeaderCount { get; set; }
2929

30-
public override void Visit(IDictionary<string, IOpenApiHeader> headers)
30+
public override void Visit(Dictionary<string, IOpenApiHeader> headers)
3131
{
3232
HeaderCount++;
3333
}

src/Microsoft.OpenApi.Workbench/StatsVisitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public override void Visit(IOpenApiSchema schema)
2727

2828
public int HeaderCount { get; set; }
2929

30-
public override void Visit(IDictionary<string, IOpenApiHeader> headers)
30+
public override void Visit(Dictionary<string, IOpenApiHeader> headers)
3131
{
3232
HeaderCount++;
3333
}

src/Microsoft.OpenApi/Extensions/OpenApiServerExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static class OpenApiServerExtensions
2121
/// 1. A substitution has no valid value in both the supplied dictionary and the default
2222
/// 2. A substitution's value is not available in the enum provided
2323
/// </exception>
24-
public static string? ReplaceServerUrlVariables(this OpenApiServer server, IDictionary<string, string>? values = null)
24+
public static string? ReplaceServerUrlVariables(this OpenApiServer server, Dictionary<string, string>? values = null)
2525
{
2626
var parsedUrl = server.Url;
2727
if (server.Variables is not null && parsedUrl is not null)

src/Microsoft.OpenApi/Interfaces/IMetadataContainer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ public interface IMetadataContainer
1414
/// <summary>
1515
/// A collection of properties associated with the current OpenAPI element.
1616
/// </summary>
17-
IDictionary<string, object>? Metadata { get; set; }
17+
Dictionary<string, object>? Metadata { get; set; }
1818
}
1919
}

src/Microsoft.OpenApi/Interfaces/IOpenApiExtensible.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public interface IOpenApiExtensible : IOpenApiElement
1313
/// <summary>
1414
/// Specification extensions.
1515
/// </summary>
16-
IDictionary<string, IOpenApiExtension>? Extensions { get; set; }
16+
Dictionary<string, IOpenApiExtension>? Extensions { get; set; }
1717
}
1818
}

src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ public interface IOpenApiReadOnlyExtensible
1010
/// <summary>
1111
/// Specification extensions.
1212
/// </summary>
13-
IDictionary<string, IOpenApiExtension>? Extensions { get; }
13+
Dictionary<string, IOpenApiExtension>? Extensions { get; }
1414

1515
}

src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExte
5555
/// <summary>
5656
/// Examples of the media type.
5757
/// </summary>
58-
public IDictionary<string, IOpenApiExample>? Examples { get; }
58+
public Dictionary<string, IOpenApiExample>? Examples { get; }
5959

6060
/// <summary>
6161
/// A map containing the representations for the header.
6262
/// </summary>
63-
public IDictionary<string, OpenApiMediaType>? Content { get; }
63+
public Dictionary<string, OpenApiMediaType>? Content { get; }
6464

6565
}

src/Microsoft.OpenApi/Models/Interfaces/IOpenApiLink.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public interface IOpenApiLink : IOpenApiDescribedElement, IOpenApiReadOnlyExtens
2424
/// <summary>
2525
/// A map representing parameters to pass to an operation as specified with operationId or identified via operationRef.
2626
/// </summary>
27-
public IDictionary<string, RuntimeExpressionAnyWrapper>? Parameters { get; }
27+
public Dictionary<string, RuntimeExpressionAnyWrapper>? Parameters { get; }
2828

2929
/// <summary>
3030
/// A literal value or {expression} to use as a request body when calling the target operation.

0 commit comments

Comments
 (0)