IOpenApiReader.ReadFragment<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.
Reads the MemoryStream and parses the fragment of an OpenAPI description into an Open API Element.
public T? ReadFragment<T>(System.IO.MemoryStream input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = default) where T : Microsoft.OpenApi.IOpenApiElement;
abstract member ReadFragment : System.IO.MemoryStream * Microsoft.OpenApi.OpenApiSpecVersion * Microsoft.OpenApi.OpenApiDocument * OpenApiDiagnostic * Microsoft.OpenApi.Reader.OpenApiReaderSettings -> 'T (requires 'T :> Microsoft.OpenApi.IOpenApiElement)
Public Function ReadFragment(Of T As IOpenApiElement) (input As MemoryStream, version As OpenApiSpecVersion, openApiDocument As OpenApiDocument, ByRef diagnostic As OpenApiDiagnostic, Optional settings As OpenApiReaderSettings = Nothing) As T
Type Parameters
- T
Parameters
- input
- MemoryStream
Memory stream containing OpenAPI description to parse.
- version
- OpenApiSpecVersion
Version of the OpenAPI specification that the fragment conforms to.
- openApiDocument
- OpenApiDocument
The OpenApiDocument object to which the fragment belongs, used to lookup references.
- diagnostic
- OpenApiDiagnostic
Returns diagnostic object containing errors detected during parsing.
- settings
- OpenApiReaderSettings
The OpenApiReader settings.
Returns
Instance of newly created IOpenApiElement.