All Projects → swaggo → Echo Swagger

swaggo / Echo Swagger

Licence: mit
echo middleware to automatically generate RESTful API documentation with Swagger 2.0.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Echo Swagger

Echo Logrus
echo-logrus is a middleware that provides logrus logger support for echo.
Stars: ✭ 27 (-91.4%)
Mutual labels:  echo, middleware
Echo
High performance, minimalist Go web framework
Stars: ✭ 21,297 (+6682.48%)
Mutual labels:  echo, middleware
Go Http Metrics
Go modular http middleware to measure HTTP requests independent of metrics backend (with Prometheus and OpenCensus as backend implementations) and http framework/library
Stars: ✭ 128 (-59.24%)
Mutual labels:  echo, middleware
Echo Web
Go web framework Echo example. 在线演示☞迁移ing❌
Stars: ✭ 409 (+30.25%)
Mutual labels:  echo, middleware
Http Swagger
Default net/http wrapper to automatically generate RESTful API documentation with Swagger 2.0.
Stars: ✭ 166 (-47.13%)
Mutual labels:  swagger2, middleware
Faraday Http Cache
a faraday middleware that respects HTTP cache
Stars: ✭ 276 (-12.1%)
Mutual labels:  middleware
Ring Defaults
A library to provide sensible Ring middleware defaults
Stars: ✭ 289 (-7.96%)
Mutual labels:  middleware
Echox
Echo cookbook and website
Stars: ✭ 275 (-12.42%)
Mutual labels:  echo
Secure headers
Manages application of security headers with many safe defaults
Stars: ✭ 2,942 (+836.94%)
Mutual labels:  middleware
Express Status Monitor
🚀 Realtime Monitoring solution for Node.js/Express.js apps, inspired by status.github.com, sponsored by https://dynobase.dev
Stars: ✭ 3,302 (+951.59%)
Mutual labels:  middleware
Muuntaja
Clojure library for fast http api format negotiation, encoding and decoding.
Stars: ✭ 304 (-3.18%)
Mutual labels:  middleware
Stuntman
Library for impersonating users during development leveraging ASP.NET Identity.
Stars: ✭ 285 (-9.24%)
Mutual labels:  middleware
Product Ei
An open source, a high-performance hybrid integration platform that allows developers quick integration with any application, data, or system.
Stars: ✭ 277 (-11.78%)
Mutual labels:  middleware
Ring Json
Ring middleware for handling JSON
Stars: ✭ 290 (-7.64%)
Mutual labels:  middleware
Netserver
A C++ High Performance Net Library
Stars: ✭ 271 (-13.69%)
Mutual labels:  echo
Think Awesome
A curated list of awesome things related to ThinkJS 3.x
Stars: ✭ 314 (+0%)
Mutual labels:  middleware
Shineframe
高性能超轻量级C++开发库及服务器编程框架
Stars: ✭ 274 (-12.74%)
Mutual labels:  echo
Openremote
100% open-source IoT Platform - Integrate your assets, create rules, and visualize your data
Stars: ✭ 254 (-19.11%)
Mutual labels:  middleware
Laravel Http2serverpush
A HTTP2 SeverPush Middleware for Laravel 5
Stars: ✭ 294 (-6.37%)
Mutual labels:  middleware
Yoyogo
🦄🌈 YoyoGo is a simple, light and fast , dependency injection based micro-service framework written in Go. Support Nacos ,Consoul ,Etcd ,Eureka ,kubernetes.
Stars: ✭ 277 (-11.78%)
Mutual labels:  middleware

echo-swagger

echo middleware to automatically generate RESTful API documentation with Swagger 2.0.

Travis branch Codecov branch Go Report Card

Usage

Start using it

  1. Add comments to your API source code, See Declarative Comments Format.
  2. Download Swag for Go by using:
$ go get github.com/swaggo/swag/cmd/swag
  1. Run the Swag in your Go project root folder which contains main.go file, Swag will parse comments and generate required files(docs folder and docs/doc.go).
$ swag init
  1. Download echo-swagger by using:
$ go get -u github.com/swaggo/echo-swagger

And import following in your code:

import "github.com/swaggo/echo-swagger" // echo-swagger middleware

Canonical example:

package main

import (
	"github.com/labstack/echo/v4"
	"github.com/swaggo/echo-swagger"

	_ "github.com/swaggo/echo-swagger/example/docs" // docs is generated by Swag CLI, you have to import it.
)

// @title Swagger Example API
// @version 1.0
// @description This is a sample server Petstore server.
// @termsOfService http://swagger.io/terms/

// @contact.name API Support
// @contact.url http://www.swagger.io/support
// @contact.email [email protected]

// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html

// @host petstore.swagger.io
// @BasePath /v2
func main() {
	e := echo.New()

	e.GET("/swagger/*", echoSwagger.WrapHandler)

	e.Logger.Fatal(e.Start(":1323"))
}

  1. Run it, and browser to http://localhost:1323/swagger/index.html, you can see Swagger 2.0 Api documents.

swagger_index.html

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].