mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
- Introduced a new OpenAPI wrapper using Fizz for improved API documentation - Refactored base controller to support more flexible route handling - Added dynamic route registration with OpenAPI metadata - Implemented generic response types for consistent API responses - Updated router initialization to support OpenAPI documentation endpoint - Improved route and resource naming utilities - Migrated existing controllers to use new routing and response mechanisms
17 lines
325 B
Go
17 lines
325 B
Go
package controllers
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/wI2L/fizz/openapi"
|
|
)
|
|
|
|
func GetOpenAPI(c *gin.Context) {
|
|
info := &openapi.Info{
|
|
Title: "Crawlab API",
|
|
Description: "REST API for Crawlab",
|
|
Version: "0.7.0",
|
|
}
|
|
handleFunc := globalWrapper.GetFizz().OpenAPI(info, "json")
|
|
handleFunc(c)
|
|
}
|