示例#1
0
 public SwaggerGenerator(
     IApiDescriptionGroupCollectionProvider apiDescriptionsProvider,
     ISchemaRegistryFactory schemaRegistryFactory,
     SwaggerGeneratorSettings settings = null)
 {
     _apiDescriptionsProvider = apiDescriptionsProvider;
     _schemaRegistryFactory   = schemaRegistryFactory;
     _settings = settings ?? new SwaggerGeneratorSettings();
 }
示例#2
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>();
        }