2024-09-19 14:10:16 +08:00
|
|
|
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
|
|
|
|
//
|
|
|
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
|
|
|
// If a copy of the MIT was not distributed with this file,
|
|
|
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
|
|
|
|
|
|
package ghttp
|
|
|
|
|
|
|
|
|
|
// SetSwaggerPath sets the SwaggerPath for server.
|
|
|
|
|
func (s *Server) SetSwaggerPath(path string) {
|
|
|
|
|
s.config.SwaggerPath = path
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SetSwaggerUITemplate sets the Swagger template for server.
|
|
|
|
|
func (s *Server) SetSwaggerUITemplate(swaggerUITemplate string) {
|
|
|
|
|
s.config.SwaggerUITemplate = swaggerUITemplate
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SetOpenApiPath sets the OpenApiPath for server.
|
2024-09-24 11:51:53 +08:00
|
|
|
// For example: SetOpenApiPath("/api.json")
|
2024-09-19 14:10:16 +08:00
|
|
|
func (s *Server) SetOpenApiPath(path string) {
|
|
|
|
|
s.config.OpenApiPath = path
|
|
|
|
|
}
|