You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alex Wichmann edited this page Jun 11, 2025
·
1 revision
Validation Rules
Validation Rules can be added, to validate parts of the specification during reading, any errors/warnings will be pushed to the Diagnostics output of the reader.
as an example we could have the following validation rule for a License
varsettings=newAsyncApiReaderSettings();settings.RuleSet.Add(newValidationRule<AsyncApiLicense>((context,item)=>{context.Enter("name");if(item!=null&&item.Name!="MIT"){context.CreateError("license","License MUST be MIT");}context.Exit();}));