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, uriPrefix, dir 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 Dir = "./apidoc/"
View Source
var Doc *spec.Swagger
View Source
var UriPrefix = "/apidoc"
目录结构 ./api/mod/mod.swagger.json ./api/mod/mod.apidoc.md 请求路由 /apidoc /apidoc/swagger/mod/mod.swagger.json /apidoc/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.