OpenApiSerializableExtensions.SerializeAsYaml 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.
Overloads
SerializeAsYaml<T>(T, OpenApiSpecVersion) |
Serializes the IOpenApiSerializable to the Open API document as a string in YAML format. |
SerializeAsYaml<T>(T, Stream, OpenApiSpecVersion) |
Serializes the IOpenApiSerializable to the Open API document (YAML) using the given stream and specification version. |
SerializeAsYaml<T>(T, OpenApiSpecVersion)
Serializes the IOpenApiSerializable to the Open API document as a string in YAML format.
public static string SerializeAsYaml<T> (this T element, Microsoft.OpenApi.OpenApiSpecVersion specVersion) where T : Microsoft.OpenApi.Interfaces.IOpenApiSerializable;
static member SerializeAsYaml : 'T * Microsoft.OpenApi.OpenApiSpecVersion -> string (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiSerializable)
<Extension()>
Public Function SerializeAsYaml(Of T As IOpenApiSerializable) (element As T, specVersion As OpenApiSpecVersion) As String
Type Parameters
- T
Parameters
- element
- T
The Open API element.
- specVersion
- OpenApiSpecVersion
The Open API specification version.
Returns
Applies to
SerializeAsYaml<T>(T, Stream, OpenApiSpecVersion)
Serializes the IOpenApiSerializable to the Open API document (YAML) using the given stream and specification version.
public static void SerializeAsYaml<T> (this T element, System.IO.Stream stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion) where T : Microsoft.OpenApi.Interfaces.IOpenApiSerializable;
static member SerializeAsYaml : 'T * System.IO.Stream * Microsoft.OpenApi.OpenApiSpecVersion -> unit (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiSerializable)
<Extension()>
Public Sub SerializeAsYaml(Of T As IOpenApiSerializable) (element As T, stream As Stream, specVersion As OpenApiSpecVersion)
Type Parameters
- T
Parameters
- element
- T
The Open API element.
- stream
- Stream
The output stream.
- specVersion
- OpenApiSpecVersion
The Open API specification version.