func getValidatorsHandlerFn(cliCtx context.CLIContext, storeName string) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		restCtx := rest.NewRestContext(w, r).WithCodec(cliCtx.Codec)
		state := r.FormValue(state)
		paginationParams := pagination.ParsePaginationParamsFromFlags()
		params := types.NewListValidatorsParams(paginationParams, types.ValidatorState(state))
		restCtx.QueryList(fmt.Sprintf("custom/%s/validators", storeName), params)
	}
}
HTTP request handler to query list of validators.
package rest
import (
	"fmt"
	"net/http"
	"github.com/cosmos/cosmos-sdk/client/context"
	sdk "github.com/cosmos/cosmos-sdk/types"
	"github.com/zigbee-alliance/distributed-compliance-ledger/utils/pagination"
	"github.com/zigbee-alliance/distributed-compliance-ledger/utils/rest"
	"github.com/zigbee-alliance/distributed-compliance-ledger/x/validator/internal/types"
)