Swagger UI page returns no resource found asp.net framework 4.7.2

Viewed 45

I'm working Swashbuckle v5.6.0 to add swagger to my asp.net MVC project.

I add configuration like this to Global.asax:

var thisAssembly = typeof(SwaggerConfig).Assembly;
GlobalConfiguration.Configuration
    .EnableSwagger(c =>
    {   
        c.SingleApiVersion("v1", "Prj.OMS");
    })
    .EnableSwaggerUi();

And my API is like this:

public class ValuesController : ApiController
{
    // GET api/values
    [HttpGet]
    [Route("api/values/person")]
    public IEnumerable<string> Get()
    {
        return new string[] { "value1", "value2" };
    }

}

But I get cannot be found error when run it.

enter image description here

0 Answers
Related