Experimental feature: OAS Generator (#632)

This commit is contained in:
Igor Gov
2022-01-13 09:34:55 +02:00
committed by GitHub
parent 610b9efdb0
commit 8963630e9e
20 changed files with 26989 additions and 4 deletions

View File

@@ -0,0 +1,18 @@
package routes
import (
"mizuserver/pkg/controllers"
"mizuserver/pkg/middlewares"
"github.com/gin-gonic/gin"
)
// OASRoutes methods to access OAS spec
func OASRoutes(ginApp *gin.Engine) {
routeGroup := ginApp.Group("/oas")
routeGroup.Use(middlewares.RequiresAuth())
routeGroup.GET("/", controllers.GetOASServers) // list of servers in OAS map
routeGroup.GET("/all", controllers.GetOASAllSpecs) // list of servers in OAS map
routeGroup.GET("/:id", controllers.GetOASSpec) // get OAS spec for given server
}