Share via


OpenApiElementExtensions.Validate(IOpenApiElement, ValidationRuleSet) Method

Definition

Validate element and all child elements

public static System.Collections.Generic.IEnumerable<Microsoft.OpenApi.Models.OpenApiError> Validate (this Microsoft.OpenApi.Interfaces.IOpenApiElement element, Microsoft.OpenApi.Validations.ValidationRuleSet ruleSet);
static member Validate : Microsoft.OpenApi.Interfaces.IOpenApiElement * Microsoft.OpenApi.Validations.ValidationRuleSet -> seq<Microsoft.OpenApi.Models.OpenApiError>
<Extension()>
Public Function Validate (element As IOpenApiElement, ruleSet As ValidationRuleSet) As IEnumerable(Of OpenApiError)

Parameters

element
IOpenApiElement

Element to validate

ruleSet
ValidationRuleSet

Optional set of rules to use for validation

Returns

An IEnumerable of errors. This function will never return null.

Applies to