/// <summary>Resolves a file reference.</summary>
 /// <param name="filePath">The file path.</param>
 /// <returns>The resolved JSON Schema.</returns>
 /// <exception cref="NotSupportedException">The System.IO.File API is not available on this platform.</exception>
 public virtual async Task <IJsonReference> ResolveFileReferenceAsync(string filePath)
 {
     return(await JsonSchema.FromFileAsync(filePath, schema => this).ConfigureAwait(false));
 }
Example #2
0
 /// <summary>Resolves a file reference.</summary>
 /// <param name="filePath">The file path.</param>
 /// <param name="cancellationToken">The cancellation token</param>
 /// <returns>The resolved JSON Schema.</returns>
 /// <exception cref="NotSupportedException">The System.IO.File API is not available on this platform.</exception>
 public virtual async Task <IJsonReference> ResolveFileReferenceAsync(string filePath, CancellationToken cancellationToken = default)
 {
     return(await JsonSchema.FromFileAsync(filePath, schema => this, cancellationToken).ConfigureAwait(false));
 }