Add HTTP /v1 MVC, TCP send path, groups with server-side member-avatar collage, object-storage upload, and friends/favorites around the architecture-v3 layout. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
417 B
Go
20 lines
417 B
Go
package httpx
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func registerDocs(r *gin.Engine) {
|
|
r.GET("/openapi.yaml", func(c *gin.Context) {
|
|
c.Data(http.StatusOK, "application/yaml; charset=utf-8", openAPISpec)
|
|
})
|
|
r.GET("/docs", func(c *gin.Context) {
|
|
c.Data(http.StatusOK, "text/html; charset=utf-8", docsHTML)
|
|
})
|
|
r.GET("/docs/", func(c *gin.Context) {
|
|
c.Redirect(http.StatusFound, "/docs")
|
|
})
|
|
}
|