File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/Microsoft.OpenApi/Writers Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,25 @@ public static void WriteRequiredObject<T>(
180
180
}
181
181
}
182
182
183
+ /// <summary>
184
+ /// Write the optional of collection string.
185
+ /// </summary>
186
+ /// <param name="writer">The Open API writer.</param>
187
+ /// <param name="name">The property name.</param>
188
+ /// <param name="elements">The collection values.</param>
189
+ /// <param name="action">The collection string writer action.</param>
190
+ public static void WriteOptionalCollection (
191
+ this IOpenApiWriter writer ,
192
+ string name ,
193
+ IEnumerable < string > elements ,
194
+ Action < IOpenApiWriter , string > action )
195
+ {
196
+ if ( elements != null && elements . Any ( ) )
197
+ {
198
+ writer . WriteCollectionInternal ( name , elements , action ) ;
199
+ }
200
+ }
201
+
183
202
/// <summary>
184
203
/// Write the optional Open API object/element collection.
185
204
/// </summary>
You can’t perform that action at this time.
0 commit comments