OpenApiWriterExtensions.WriteRequiredCollection<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Write the required Open API object/element collection.
public static void WriteRequiredCollection<T> (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, System.Collections.Generic.IEnumerable<T> elements, Action<Microsoft.OpenApi.Writers.IOpenApiWriter,T> action) where T : Microsoft.OpenApi.Interfaces.IOpenApiElement;
static member WriteRequiredCollection : Microsoft.OpenApi.Writers.IOpenApiWriter * string * seq<'T (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)> * Action<Microsoft.OpenApi.Writers.IOpenApiWriter, 'T (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)> -> unit (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)
<Extension()>
Public Sub WriteRequiredCollection(Of T As IOpenApiElement) (writer As IOpenApiWriter, name As String, elements As IEnumerable(Of T), action As Action(Of IOpenApiWriter, T))
Type Parameters
- T
The Open API element type. IOpenApiElement
Parameters
- writer
- IOpenApiWriter
The Open API writer.
- name
- String
The property name.
- elements
- IEnumerable<T>
The collection values.
- action
- Action<IOpenApiWriter,T>
The collection element writer action.