mirror of
https://github.com/nsnail/IGeekFan.AspNetCore.Knife4jUI.git
synced 2025-08-03 01:47:59 +08:00
update package
This commit is contained in:
@ -26,6 +26,13 @@ namespace Basic.Controllers
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
[HttpPost("form-with-user")]
|
||||
public IActionResult PostFormUser([FromForm] FormUser FormUser)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("{name}")]
|
||||
[Produces("application/octet-stream", Type = typeof(FileResult))]
|
||||
public FileResult GetFile(string name)
|
||||
@ -47,4 +54,11 @@ namespace Basic.Controllers
|
||||
|
||||
public IFormFile File { get; set; }
|
||||
}
|
||||
|
||||
public class FormUser
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string User { get; set; }
|
||||
}
|
||||
}
|
@ -104,21 +104,21 @@ namespace Basic
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.RoutePrefix = "swagger"; // serve the UI at root
|
||||
c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");
|
||||
c.SwaggerEndpoint("/gp/api-docs", "<22><>¼ģ<C2BC><C4A3>");
|
||||
c.SwaggerEndpoint("/v1/swagger.json", "V1 Docs");
|
||||
c.SwaggerEndpoint("/gp/swagger.json", "<22><>¼ģ<C2BC><C4A3>");
|
||||
});
|
||||
app.UseKnife4UI(c =>
|
||||
{
|
||||
c.RoutePrefix = ""; // serve the UI at root
|
||||
c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");
|
||||
c.SwaggerEndpoint("/gp/api-docs", "<22><>¼ģ<C2BC><C4A3>");
|
||||
c.SwaggerEndpoint("/v1/swagger.json", "V1 Docs");
|
||||
c.SwaggerEndpoint("/gp/swagger.json", "<22><>¼ģ<C2BC><C4A3>");
|
||||
});
|
||||
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
endpoints.MapSwagger("{documentName}/api-docs");
|
||||
endpoints.MapSwagger("{documentName}/swagger.json");
|
||||
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user