so I change ApiStartup.cs code to
// The default route templates for the Swagger docs and swagger - ui are "swagger/docs/{apiVersion}" and "swagger/ui/index#/{assetPath}" respectively.
app.UseSwagger();
app.UseSwaggerUI(options =>
{
//var currentAssembly = Assembly.GetAssembly(this.GetType());
//var currentAssemblyName = currentAssembly.GetName().Name;
//Needeed for removing the "Try It Out" button from the post and put methods.
//http://stackoverflow.com/questions/36772032/swagger-5-2-3-supportedsubmitmethods-removed/36780806#36780806
//options.InjectOnCompleteJavaScript($"{currentAssemblyName}.Scripts.swaggerPostPutTryItOutButtonsRemoval.js");
options.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
}
);
then app.UseSwagger is error ,so i Install-Package Swashbuckle.AspNetCore -Pre,the solution is ok,but the background api is disappear.
so my question is how can i configure the API list document in correct way?