2

I've generated swagger using goswagger in golang application. My base url is [ Base URL: /{service-name}/api/v1 ] and health endpoint after click on try out option in swagger /{service-name}/api/v1/health but in actual it should be without version /{service-name}/api/health.

I've defined configuartion in main.go

// Schemes: https
// Host:
// BasePath: /command-provisioning-service/api/v1
// swagger:meta
package main
...
...
...

and in health.go
// Schemes: https
// Host:
// BasePath: /command-provisioning-service/api/
// swagger:route GET /health Health
// Return the health status
func registerHealthRoute(router *mux.Router) { ...
...
...
}

0 Answers0