Prerequisites:
type args struct {
Id []int64 `path:"id" validate:"dive,required" explode:"1"`
}
fizz.GET("/:id", []fizz.OperationOption{/*...*//}, tonic.Handler(func(ctx *gin.Context, args *args) error {
fmt.Println(args)
return nil
}, 200))
Then, when I make a request: curl "http://localhost:8080/1,2,3", I get error: binding error on field 'Id' of type 'args': strconv.ParseInt: parsing "1,2,3": invalid syntax.
Prerequisites:
Then, when I make a request:
curl "http://localhost:8080/1,2,3", I get error:binding error on field 'Id' of type 'args': strconv.ParseInt: parsing "1,2,3": invalid syntax.