public SwaggerController()
 {
     _apiDescriptions = GlobalConfiguration.Configuration.Services.GetApiExplorer().ApiDescriptions
         .Where(s => !s.ActionDescriptor.ControllerDescriptor.ShouldSwaggerIgnore());
     _docProvider =
         (XmlCommentDocumentationProvider) GlobalConfiguration.Configuration.Services.GetDocumentationProvider();
 }
Esempio n. 2
0
 public ApiFactory(string virtualPath, XmlCommentDocumentationProvider docProvider, ParameterFactory parameterFactory, ModelFactory modelFactory, ICollection<ApiDescription> apiDescriptions)
 {
     _apiDescriptions = apiDescriptions;
     _modelFactory = modelFactory;
     _parameterFactory = parameterFactory;
     _appVirtualPath = virtualPath.TrimEnd('/');
     _docProvider = docProvider;
 }
Esempio n. 3
0
        public ApiFactory()
        {
            _appVirtualPath = HttpRuntime.AppDomainAppVirtualPath.TrimEnd('/'); ;
            _apiDescriptions = GlobalConfiguration.Configuration.Services.GetApiExplorer().ApiDescriptions;
            _parameterFactory = new ParameterFactory();

            _docProvider = (XmlCommentDocumentationProvider)GlobalConfiguration.Configuration.Services.GetService((typeof(IDocumentationProvider)));
            _modelFactory = new ModelFactory(_docProvider);
        }
Esempio n. 4
0
 public ModelFactory(XmlCommentDocumentationProvider documentationProvider)
 {
     _docProvider = documentationProvider;
 }
Esempio n. 5
0
 public ModelFactory()
 {
     _docProvider = (XmlCommentDocumentationProvider)GlobalConfiguration.Configuration.Services.GetService((typeof(IDocumentationProvider)));
 }
 public ParameterFactory(XmlCommentDocumentationProvider docProvider)
 {
     _docProvider = docProvider;
 }