This commit is contained in:
@@ -6,10 +6,6 @@ import (
|
|||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
|
|
||||||
"gerald/internal/interfaces/rest/restapi/operations"
|
"gerald/internal/interfaces/rest/restapi/operations"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -21,37 +17,6 @@ func configureFlags(api *operations.GeraldAPI) {
|
|||||||
|
|
||||||
func configureAPI(api *operations.GeraldAPI) http.Handler {
|
func configureAPI(api *operations.GeraldAPI) http.Handler {
|
||||||
// configure the api here
|
// configure the api here
|
||||||
api.ServeError = errors.ServeError
|
|
||||||
|
|
||||||
// Set your custom logger if needed. Default one is log.Printf
|
|
||||||
// Expected interface func(string, ...interface{})
|
|
||||||
//
|
|
||||||
// Example:
|
|
||||||
// api.Logger = log.Printf
|
|
||||||
|
|
||||||
api.UseSwaggerUI()
|
|
||||||
// To continue using redoc as your UI, uncomment the following line
|
|
||||||
// api.UseRedoc()
|
|
||||||
|
|
||||||
api.JSONConsumer = runtime.JSONConsumer()
|
|
||||||
|
|
||||||
api.JSONProducer = runtime.JSONProducer()
|
|
||||||
|
|
||||||
if api.CreateFeedbackHandler == nil {
|
|
||||||
api.CreateFeedbackHandler = operations.CreateFeedbackHandlerFunc(func(params operations.CreateFeedbackParams) middleware.Responder {
|
|
||||||
return middleware.NotImplemented("operation operations.CreateFeedback has not yet been implemented")
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if api.GetFeedbacksHandler == nil {
|
|
||||||
api.GetFeedbacksHandler = operations.GetFeedbacksHandlerFunc(func(params operations.GetFeedbacksParams) middleware.Responder {
|
|
||||||
return middleware.NotImplemented("operation operations.GetFeedbacks has not yet been implemented")
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
api.PreServerShutdown = func() {}
|
|
||||||
|
|
||||||
api.ServerShutdown = func() {}
|
|
||||||
|
|
||||||
return setupGlobalMiddleware(api.Serve(setupMiddlewares))
|
return setupGlobalMiddleware(api.Serve(setupMiddlewares))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user