OpenApiDocument.SerializeAs(OpenApiSpecVersion, IOpenApiWriter) 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.
Serialize OpenApiDocument to an Open API document using the specified version.
public void SerializeAs(Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.IOpenApiWriter writer);
member this.SerializeAs : Microsoft.OpenApi.OpenApiSpecVersion * Microsoft.OpenApi.IOpenApiWriter -> unit
Public Sub SerializeAs (version As OpenApiSpecVersion, writer As IOpenApiWriter)
Parameters
- version
- OpenApiSpecVersion
The Open API specification version to serialize the document as.
- writer
- IOpenApiWriter
The IOpenApiWriter to serialize the document to.
Exceptions
version is not a supported Open API specification version.