Exemplo n.º 1
0
 public DefaultSchemaRegistryFactory(
     JsonSerializerSettings jsonSerializerSettings,
     SwaggerSchemaOptions options)
 {
     _jsonSerializerSettings = jsonSerializerSettings;
     _options = options;
 }
Exemplo 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>();
 }
Exemplo n.º 3
0
        private DefaultSchemaRegistry Subject(Action<SwaggerSchemaOptions> configureOptions = null)
        {
            var options = new SwaggerSchemaOptions();
            if (configureOptions != null) configureOptions(options);

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