Skip to content

Commit

Permalink
Return previously deleted method
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieKimani1 committed Nov 16, 2023
1 parent 076009c commit e8ecc1a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Microsoft.OpenApi/Writers/OpenApiWriterExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,25 @@ public static void WriteRequiredObject<T>(
}
}

/// <summary>
/// Write the optional of collection string.
/// </summary>
/// <param name="writer">The Open API writer.</param>
/// <param name="name">The property name.</param>
/// <param name="elements">The collection values.</param>
/// <param name="action">The collection string writer action.</param>
public static void WriteOptionalCollection(
this IOpenApiWriter writer,
string name,
IEnumerable<string> elements,
Action<IOpenApiWriter, string> action)
{
if (elements != null && elements.Any())
{
writer.WriteCollectionInternal(name, elements, action);
}
}

/// <summary>
/// Write the optional Open API object/element collection.
/// </summary>
Expand Down

0 comments on commit e8ecc1a

Please sign in to comment.