static Json() { if (!string.IsNullOrWhiteSpace(JsonSchemaLicense.License)) { License.RegisterLicense(JsonSchemaLicense.License); } }
/// <summary> /// Initializes a new instance of the <see cref="SchemaGenerator" /> class. /// </summary> /// <param name="scope">The scope.</param> /// <param name="jsonSchemaLicense"></param> private SchemaGenerator(Scope scope, string jsonSchemaLicense) { License.RegisterLicense(jsonSchemaLicense); _scope = scope; _generator = new JSchemaGenerator { ContractResolver = new CamelCasePropertyNamesContractResolver(), SchemaReferenceHandling = SchemaReferenceHandling.Objects , SchemaIdGenerationHandling = SchemaIdGenerationHandling.FullTypeName }; if (_scope.Settings.StringEnum) { _generator.GenerationProviders.Add(new StringEnumGenerationProvider()); } }