public DefaultSchemaRegistryFactory(
     JsonSerializerSettings jsonSerializerSettings,
     SwaggerSchemaOptions options)
 {
     _jsonSerializerSettings = jsonSerializerSettings;
     _options = options;
 }
Esempio n. 2
0
 public DefaultSchemaRegistry(
     JsonSerializerSettings jsonSerializerSettings,
     SwaggerSchemaOptions options = null)
 {
     _jsonSerializerSettings = jsonSerializerSettings;
     _jsonContractResolver = _jsonSerializerSettings.ContractResolver ?? new DefaultContractResolver();
     _options = options ?? new SwaggerSchemaOptions();
     _referencedTypeMap = new Dictionary<string, Type>();
     Definitions = new Dictionary<string, Schema>();
 }
        private DefaultSchemaRegistry Subject(Action<SwaggerSchemaOptions> configureOptions = null)
        {
            var options = new SwaggerSchemaOptions();
            if (configureOptions != null) configureOptions(options);

            return new DefaultSchemaRegistry(new JsonSerializerSettings(), options);
        }