ParsingContext.ParseFragment<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.
Initiates the parsing process of a fragment. Not thread safe and should only be called once on a parsing context
public T? ParseFragment<T>(System.Text.Json.Nodes.JsonNode jsonNode, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument openApiDocument) where T : Microsoft.OpenApi.IOpenApiElement;
member this.ParseFragment : System.Text.Json.Nodes.JsonNode * Microsoft.OpenApi.OpenApiSpecVersion * Microsoft.OpenApi.OpenApiDocument -> 'T (requires 'T :> Microsoft.OpenApi.IOpenApiElement)
Public Function ParseFragment(Of T As IOpenApiElement) (jsonNode As JsonNode, version As OpenApiSpecVersion, openApiDocument As OpenApiDocument) As T
Type Parameters
- T
Parameters
- jsonNode
- JsonNode
- version
- OpenApiSpecVersion
OpenAPI version of the fragment
- openApiDocument
- OpenApiDocument
The OpenApiDocument object to which the fragment belongs, used to lookup references.
Returns
An OpenApiDocument populated based on the passed yamlDocument