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
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(),
}
}))