Skip to content

go-swagno/swagno-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

swagno-http

net/http & gorilla/mux middleware to serve Swagger Ui files and doc.json file which generated from Swagno

Usage

  1. Get Swagno
  2. Create your endpoint array. See: https://github.com/go-swagno/swagno/blob/master/README.md#getting-started
  3. Get swagno-http
go get github.com/go-swagno/swagno-http
  1. Import swagno-http to your handler
import "github.com/go-swagno/swagno-http/swagger"
  1. Be sure you created swagger instance and endpoints
  2. Create swagger handler
// net-http
m.Handle("/swagger/", swagger.SwaggerHandler(sw.GenerateDocs()))

// gorilla/mux
r.PathPrefix("/swagger").Handler(swagger.SwaggerHandler(sw.GenerateDocs()))
  1. Visit /swagger and /swagger/doc.json for confirmation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages