Swashbuckle.aspnetcore: SwaggerDoc missing for net core 1.1.0

Created on 16 Apr 2017  路  2Comments  路  Source: domaindrivendev/Swashbuckle.AspNetCore

SwaggerDoc is not recognized.

http://imgur.com/a/05OYy

Most helpful comment

What works for me is something like:

    services.AddSwaggerGen(swagger =>
    {
        swagger.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" });
        swagger.IncludeXmlComments(Path.Combine(PlatformServices.Default.Application.ApplicationBasePath, "MyApi.xml"));
    });

All 2 comments

What works for me is something like:

    services.AddSwaggerGen(swagger =>
    {
        swagger.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" });
        swagger.IncludeXmlComments(Path.Combine(PlatformServices.Default.Application.ApplicationBasePath, "MyApi.xml"));
    });

I was using wrong version, correct version is Install-Package Swashbuckle.AspNetCore -Pre. I was using something else.

Was this page helpful?
0 / 5 - 0 ratings