OpenApiElementExtensions.Validate(IOpenApiElement, ValidationRuleSet) 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.
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.