OpenApiWriterExtensions.WriteRequiredObject<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.
public static void WriteRequiredObject<T> (this Microsoft.OpenApi.Writers.IOpenApiWriter writer, string name, T value, Action<Microsoft.OpenApi.Writers.IOpenApiWriter,T> action) where T : Microsoft.OpenApi.Interfaces.IOpenApiElement;
static member WriteRequiredObject : Microsoft.OpenApi.Writers.IOpenApiWriter * string * 'T * Action<Microsoft.OpenApi.Writers.IOpenApiWriter, 'T (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)> -> unit (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiElement)
<Extension()>
Public Sub WriteRequiredObject(Of T As IOpenApiElement) (writer As IOpenApiWriter, name As String, value As 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.
- value
- T
The property value.
- action
- Action<IOpenApiWriter,T>
The proprety value writer action.