Documentation ¶
Index ¶
- Constants
- Variables
- func DefinitionsApi(definitions map[string]spec.Schema, v interface{})
- func DocList(w http.ResponseWriter, r *http.Request)
- func GetDoc(realPath, modName string) *spec.Swagger
- func Markdown(w http.ResponseWriter, r *http.Request)
- func NilDoc()
- func OpenApi(mux *http.ServeMux, filePath string)
- func Swagger(w http.ResponseWriter, r *http.Request)
- func WriteToFile(realPath, modName string)
Constants ¶
View Source
const MarkDownEXT = ".apidoc.md"
View Source
const SwaggerEXT = ".swagger.json"
View Source
const TypeMarkdown = "markdown"
View Source
const TypeSwagger = "swagger"
Variables ¶
View Source
var ApiDocDir = "./apidoc/"
View Source
var Doc *spec.Swagger
View Source
var UriPrefix = "/api-doc"
目录结构 ./api/mod/mod.swagger.json ./api/mod/mod.apidoc.md 请求路由 /api-doc /api-doc/swagger/mod/mod.swagger.json /api-doc/markdown/mod/mod.apidoc.md
Functions ¶
func DefinitionsApi ¶
func WriteToFile ¶
func WriteToFile(realPath, modName string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.