github.com/gogf/gf/v2@v2.7.4/net/ghttp/ghttp_server_config_api.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/gogf/gf. 6 7 package ghttp 8 9 // SetSwaggerPath sets the SwaggerPath for server. 10 func (s *Server) SetSwaggerPath(path string) { 11 s.config.SwaggerPath = path 12 } 13 14 // SetSwaggerUITemplate sets the Swagger template for server. 15 func (s *Server) SetSwaggerUITemplate(swaggerUITemplate string) { 16 s.config.SwaggerUITemplate = swaggerUITemplate 17 } 18 19 // SetOpenApiPath sets the OpenApiPath for server. 20 // For example: SetOpenApiPath("/api.json") 21 func (s *Server) SetOpenApiPath(path string) { 22 s.config.OpenApiPath = path 23 }