Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/j178/swagger-ui

Swagger UI source code in go package, and will get auto updates.
https://github.com/j178/swagger-ui

Last synced: about 1 month ago
JSON representation

Swagger UI source code in go package, and will get auto updates.

Awesome Lists containing this project

README

        

# Swagger UI embedded in Go binary

This a golang package that embeds swagger-ui source, making it easy to serve swagger-ui from a golang application.

## Usage
```shell
go get github.com/j178/swagger-ui
```

```go
package main

import (
"net/http"
"github.com/j178/swagger-ui"
)

func main() {
http.Handle("/swagger/", http.StripPrefix("/swagger/", http.FileServer(swagger_ui.FS)))
http.ListenAndServe(":8000", nil)
}
```