sync code
This commit is contained in:
@@ -6,7 +6,7 @@ using System.Text;
|
||||
namespace Blahblah.FlowerStory.Server.Controller;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[Route("apidoc")]
|
||||
[Route("")]
|
||||
public class SwaggerController : ControllerBase
|
||||
{
|
||||
private readonly SwaggerGenerator generator;
|
||||
@@ -18,7 +18,38 @@ public class SwaggerController : ControllerBase
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
[Route("get/{version}")]
|
||||
[Route("")]
|
||||
[Produces("text/html")]
|
||||
[HttpGet]
|
||||
public ActionResult Get()
|
||||
{
|
||||
return Content($@"<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Redoc</title>
|
||||
<!-- needed for adaptive design -->
|
||||
<meta charset=""utf-8""/>
|
||||
<meta name=""viewport"" content=""width=device-width, initial-scale=1"">
|
||||
|
||||
<!--
|
||||
Redoc doesn't change outer page styles
|
||||
-->
|
||||
<style>
|
||||
body {{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url=""/swagger/{Program.Version}/swagger.json""></redoc>
|
||||
<script src=""/js/redoc.standalone.js""> </script>
|
||||
</body>
|
||||
</html>", "text/html");
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
[Route("apidoc/{version}")]
|
||||
[Produces("text/html")]
|
||||
[HttpGet]
|
||||
[ResponseCache(NoStore = true, Location = ResponseCacheLocation.None)]
|
||||
|
Reference in New Issue
Block a user