问题
I am developing Web API service and hosting on Azure Service Fabric as Micro Service. I need to implement Swagger for the API definition and I could see SwaggerConfig.Register() method not calling while application is starting. So I could not access http://faricurl:8000/swagger.
So can you please point out how to integrate Swagger definition for Web API application.
Many Thanks, Thirumalai M
回答1:
As suggested in my comment install the core Swashbuckle NuGet package
install-package Swashbuckle.Core
Then in the Startup.cs of your WebApi project add
config.EnableSwagger(c => c.SingleApiVersion("v1", "A title for your API"))
.EnableSwaggerUi();
来源:https://stackoverflow.com/questions/40088573/swagger-for-azure-service-fabric-stateless-web-api-application