예제 #1
0
 public JsonSchemaWriter(JsonWriter writer, JsonSchemaResolver resolver)
 {
     ValidationUtils.ArgumentNotNull(writer, nameof(writer));
     _writer   = writer;
     _resolver = resolver;
 }
예제 #2
0
 public JsonSchemaBuilder(JsonSchemaResolver resolver)
 {
     _stack           = new List <JsonSchema>();
     _documentSchemas = new Dictionary <string, JsonSchema>();
     _resolver        = resolver;
 }
예제 #3
0
 /// <summary>
 /// Generate a <see cref="JsonSchema"/> from the specified type.
 /// </summary>
 /// <param name="type">The type to generate a <see cref="JsonSchema"/> from.</param>
 /// <param name="resolver">The <see cref="JsonSchemaResolver"/> used to resolve schema references.</param>
 /// <returns>A <see cref="JsonSchema"/> generated from the specified type.</returns>
 public JsonSchema Generate(Type type, JsonSchemaResolver resolver)
 {
     return(Generate(type, resolver, false));
 }