public SchemaRegistryFactory(
     JsonSerializerSettings jsonSerializerSettings,
     SchemaRegistrySettings schemaRegistrySettings)
 {
     _jsonSerializerSettings = jsonSerializerSettings;
     _schemaRegistrySettings = schemaRegistrySettings;
 }
예제 #2
0
 public SchemaRegistry(
     JsonSerializerSettings jsonSerializerSettings,
     SchemaRegistrySettings settings = null)
 {
     _jsonSerializerSettings = jsonSerializerSettings;
     _jsonContractResolver   = _jsonSerializerSettings.ContractResolver ?? new DefaultContractResolver();
     _settings        = settings ?? new SchemaRegistrySettings();
     _schemaIdManager = new SchemaIdManager(_settings.SchemaIdSelector);
     Definitions      = new Dictionary <string, Schema>();
 }
예제 #3
0
        public SwaggerGenOptions()
        {
            _swaggerGeneratorSettings = new SwaggerGeneratorSettings();
            _schemaRegistrySettings   = new SchemaRegistrySettings();

            _xmlDocFactories            = new List <Func <XPathDocument> >();
            _operationFilterDescriptors = new List <FilterDescriptor <IOperationFilter> >();
            _documentFilterDescriptors  = new List <FilterDescriptor <IDocumentFilter> >();
            _schemaFilterDescriptors    = new List <FilterDescriptor <ISchemaFilter> >();

            // Enable Annotations
            OperationFilter <SwaggerAttributesOperationFilter>();
            OperationFilter <SwaggerResponseAttributeFilter>();
            SchemaFilter <SwaggerAttributesSchemaFilter>();
        }