Share via


OpenApiWriterExtensions.WriteOptionalMap Method

Definition

Overloads

WriteOptionalMap(IOpenApiWriter, String, IDictionary<String,String>, Action<IOpenApiWriter,String>)

Write the optional Open API element map (string to string mapping).

WriteOptionalMap<T>(IOpenApiWriter, String, IDictionary<String,T>, Action<IOpenApiWriter,String,T>)

Write the optional Open API element map.

WriteOptionalMap<T>(IOpenApiWriter, String, IDictionary<String,T>, Action<IOpenApiWriter,T>)

Write the optional Open API element map.

WriteOptionalMap(IOpenApiWriter, String, IDictionary<String,String>, Action<IOpenApiWriter,String>)

Write the optional Open API element map (string to string mapping).

public static void WriteOptionalMap (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary<string,string> elements, Action<Microsoft.OpenApi.Writers.IOpenApiWriter,string> action);
static member WriteOptionalMap : Microsoft.OpenApi.Writers.IOpenApiWriter * string * System.Collections.Generic.IDictionary<string, string> * Action<Microsoft.OpenApi.Writers.IOpenApiWriter, string> -> unit
<Extension()>
Public Sub WriteOptionalMap (writer As IOpenApiWriter, name As String, elements As IDictionary(Of String, String), action As Action(Of IOpenApiWriter, String))

Parameters

writer
IOpenApiWriter

The Open API writer.

name
String

The property name.

elements
IDictionary<String,String>

The map values.

action
Action<IOpenApiWriter,String>

The map element writer action.

Applies to

WriteOptionalMap<T>(IOpenApiWriter, String, IDictionary<String,T>, Action<IOpenApiWriter,String,T>)

Write the optional Open API element map.

public static void WriteOptionalMap<T> (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary<string,T> elements, Action<Microsoft.OpenApi.Writers.IOpenApiWriter,string,T> action) where T : Microsoft.OpenApi.Interfaces.IOpenApiElement;
static member WriteOptionalMap : Microsoft.OpenApi.Writers.IOpenApiWriter * string * System.Collections.Generic.IDictionary<string, 'T (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)> * Action<Microsoft.OpenApi.Writers.IOpenApiWriter, string, 'T (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)> -> unit (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)
<Extension()>
Public Sub WriteOptionalMap(Of T As IOpenApiElement) (writer As IOpenApiWriter, name As String, elements As IDictionary(Of String, T), action As Action(Of IOpenApiWriter, String, T))

Type Parameters

T

The Open API element type. IOpenApiElement

Parameters

writer
IOpenApiWriter

The Open API writer.

name
String

The property name.

elements
IDictionary<String,T>

The map values.

action
Action<IOpenApiWriter,String,T>

The map element writer action with writer, key, and value as input.

Applies to

WriteOptionalMap<T>(IOpenApiWriter, String, IDictionary<String,T>, Action<IOpenApiWriter,T>)

Write the optional Open API element map.

public static void WriteOptionalMap<T> (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary<string,T> elements, Action<Microsoft.OpenApi.Writers.IOpenApiWriter,T> action) where T : Microsoft.OpenApi.Interfaces.IOpenApiElement;
static member WriteOptionalMap : Microsoft.OpenApi.Writers.IOpenApiWriter * string * System.Collections.Generic.IDictionary<string, '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 WriteOptionalMap(Of T As IOpenApiElement) (writer As IOpenApiWriter, name As String, elements As IDictionary(Of String, 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
IDictionary<String,T>

The map values.

action
Action<IOpenApiWriter,T>

The map element writer action with writer and value as input.

Applies to