func Handler(si ServerInterface) http.Handler {
	return HandlerFromMux(si, chi.NewRouter())
}
Handler creates http.Handler with routing matching OpenAPI spec.
package ports
import (
	"context"
	"fmt"
	"net/http"
	"github.com/deepmap/oapi-codegen/pkg/runtime"
	"github.com/go-chi/chi"
)
type ServerInterface interface {
	GetTrainings(w http.ResponseWriter, r *http.Request)
	CreateTraining(w http.ResponseWriter, r *http.Request)
	CancelTraining(w http.ResponseWriter, r *http.Request)
	ApproveRescheduleTraining(w http.ResponseWriter, r *http.Request)
	RejectRescheduleTraining(w http.ResponseWriter, r *http.Request)
	RequestRescheduleTraining(w http.ResponseWriter, r *http.Request)
	RescheduleTraining(w http.ResponseWriter, r *http.Request)
}
func GetTrainingsCtx(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()
		ctx = context.WithValue(ctx, "bearerAuth.Scopes", []string{""})
		next.ServeHTTP(w, r.WithContext(ctx))
	})
}
func CreateTrainingCtx(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()
		ctx = context.WithValue(ctx, "bearerAuth.Scopes", []string{""})
		next.ServeHTTP(w, r.WithContext(ctx))
	})
}
func CancelTrainingCtx(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()
		var err error
		var trainingUUID string
		err = runtime.BindStyledParameter("simple", false, "trainingUUID", chi.URLParam(r, "trainingUUID"), &trainingUUID)
		if err != nil {
			http.Error(w, fmt.Sprintf("Invalid format for parameter trainingUUID: %s", err), http.StatusBadRequest)
			return
		}
		ctx = context.WithValue(ctx, "trainingUUID", trainingUUID)
		ctx = context.WithValue(ctx, "bearerAuth.Scopes", []string{""})
		next.ServeHTTP(w, r.WithContext(ctx))
	})
}
func ApproveRescheduleTrainingCtx(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()
		var err error
		var trainingUUID string
		err = runtime.BindStyledParameter("simple", false, "trainingUUID", chi.URLParam(r, "trainingUUID"), &trainingUUID)
		if err != nil {
			http.Error(w, fmt.Sprintf("Invalid format for parameter trainingUUID: %s", err), http.StatusBadRequest)
			return
		}
		ctx = context.WithValue(ctx, "trainingUUID", trainingUUID)
		ctx = context.WithValue(ctx, "bearerAuth.Scopes", []string{""})
		next.ServeHTTP(w, r.WithContext(ctx))
	})
}
func RejectRescheduleTrainingCtx(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()
		var err error
		var trainingUUID string
		err = runtime.BindStyledParameter("simple", false, "trainingUUID", chi.URLParam(r, "trainingUUID"), &trainingUUID)
		if err != nil {
			http.Error(w, fmt.Sprintf("Invalid format for parameter trainingUUID: %s", err), http.StatusBadRequest)
			return
		}
		ctx = context.WithValue(ctx, "trainingUUID", trainingUUID)
		ctx = context.WithValue(ctx, "bearerAuth.Scopes", []string{""})
		next.ServeHTTP(w, r.WithContext(ctx))
	})
}
func RequestRescheduleTrainingCtx(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()
		var err error
		var trainingUUID string
		err = runtime.BindStyledParameter("simple", false, "trainingUUID", chi.URLParam(r, "trainingUUID"), &trainingUUID)
		if err != nil {
			http.Error(w, fmt.Sprintf("Invalid format for parameter trainingUUID: %s", err), http.StatusBadRequest)
			return
		}
		ctx = context.WithValue(ctx, "trainingUUID", trainingUUID)
		ctx = context.WithValue(ctx, "bearerAuth.Scopes", []string{""})
		next.ServeHTTP(w, r.WithContext(ctx))
	})
}
func RescheduleTrainingCtx(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()
		var err error
		var trainingUUID string
		err = runtime.BindStyledParameter("simple", false, "trainingUUID", chi.URLParam(r, "trainingUUID"), &trainingUUID)
		if err != nil {
			http.Error(w, fmt.Sprintf("Invalid format for parameter trainingUUID: %s", err), http.StatusBadRequest)
			return
		}
		ctx = context.WithValue(ctx, "trainingUUID", trainingUUID)
		ctx = context.WithValue(ctx, "bearerAuth.Scopes", []string{""})
		next.ServeHTTP(w, r.WithContext(ctx))
	})
}