Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Latest commit

 

History

History
24 lines (17 loc) · 691 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 691 Bytes

echo-swagger

This is a forked version of echo-swagger to be sure not get updated with breaking changes.

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

go get github.com/worldline-go/echo-swagger

Usage

Set client-id for swagger-ui for oauth2 authentication. Use our auth library to get client-id external.

// echoSwagger "github.com/worldline-go/echo-swagger"

// set default external client-id in swagger-ui
v1.GET("/swagger/*", echoSwagger.EchoWrapHandler(func(c *echoSwagger.Config) {
	c.OAuth = &echoSwagger.OAuthConfig{
		ClientId: authProvider.GetClientIDExternal(),
	}
}))