mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-30 18:00:56 +01:00
chore: update dependencies and add OpenAPI support
- Added github.com/getkin/kin-openapi v0.130.0 to go.mod and updated go.sum for improved OpenAPI integration. - Introduced DefaultOpenAPIUrl constant in config.go for easier configuration of OpenAPI URL. - Implemented GetOpenAPIUrl function to retrieve the OpenAPI URL from configuration, enhancing flexibility in API documentation handling.
This commit is contained in:
@@ -36,6 +36,7 @@ const (
|
||||
DefaultNodeModulesPath = "/usr/lib/node_modules"
|
||||
DefaultGoPath = "/root/go"
|
||||
DefaultMcpServerBaseUrl = "http://localhost:9000/sse"
|
||||
DefaultOpenAPIUrl = "http://localhost:8000/openapi.json"
|
||||
)
|
||||
|
||||
func IsDev() bool {
|
||||
@@ -293,3 +294,10 @@ func GetMcpServerBaseUrl() string {
|
||||
}
|
||||
return DefaultMcpServerBaseUrl
|
||||
}
|
||||
|
||||
func GetOpenAPIUrl() string {
|
||||
if res := viper.GetString("openapi.url"); res != "" {
|
||||
return res
|
||||
}
|
||||
return DefaultOpenAPIUrl
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user