func decodeCreateProductRequest(_ context.Context, r *stdhttp.Request) (interface{}, error) {
	req := dto.CreateProductRequest{}
	decoder := json.NewDecoder(r.Body)
	decoder.DisallowUnknownFields()
	err := decoder.Decode(&req)
	if err != nil {
		return nil, ce.ErrInvalidReqBody
	}
	vars := mux.Vars(r)
	mid := vars["mid"]
	req.MID, err = uuid.Parse(mid)
	if err != nil {
		return nil, &ce.ResourceNotFoundErr{Type: "merchant", ID: mid}
	}
	return req, err
}
// decodeCreateProductRequest is a transport/http.DecodeRequestFunc that decodes a
// JSON-encoded request from the HTTP request body.
decodeCreateProductRequest is a transport/http.DecodeRequestFunc that decodes a
JSON-encoded request from the HTTP request body.
// decodeCreateProductRequest is a transport / http . DecodeRequestFunc that decodes a // JSON - encoded request from the HTTP request body .
func decodeCreateProductRequest(_ context.Context, r *stdhttp.Request) (interface{}, error) {
	req := dto.CreateProductRequest{}
	decoder := json.NewDecoder(r.Body)
	decoder.DisallowUnknownFields()
	err := decoder.Decode(&req)
	if err != nil {
		return nil, ce.ErrInvalidReqBody
	}
	vars := mux.Vars(r)
	mid := vars["mid"]
	req.MID, err = uuid.Parse(mid)
	if err != nil {
		return nil, &ce.ResourceNotFoundErr{Type: "merchant", ID: mid}
	}
	return req, err
}
func decodeCreateProductRequest ( _ context . Context , r * stdhttp . Request ) ( interface { } , error ) { req := dto . CreateProductRequest { } decoder := json . NewDecoder ( r . Body ) decoder . DisallowUnknownFields ( ) err := decoder . Decode ( & req ) if err != nil { return nil , ce . ErrInvalidReqBody } vars := mux . Vars ( r ) mid := vars [ " " ] req . MID , err = uuid . Parse ( mid ) if err != nil { return nil , & ce . ResourceNotFoundErr { Type : " " , ID : mid } } return req , err }
decodeCreateProductRequest is a transport/http.DecodeRequestFunc that decodes a
JSON-encoded request from the HTTP request body.
decodeCreateProductRequest is a transport / http . DecodeRequestFunc that decodes a JSON - encoded request from the HTTP request body .