diff --git a/examples/ex_2ch/oas_response_decoders_gen.go b/examples/ex_2ch/oas_response_decoders_gen.go index a749d8422..b6f5e99ba 100644 --- a/examples/ex_2ch/oas_response_decoders_gen.go +++ b/examples/ex_2ch/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeAPICaptcha2chcaptchaIDGetResponse(resp *http.Response) (res *Captcha, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Captcha if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -71,23 +77,28 @@ func decodeAPICaptchaAppIDPublicKeyGetResponse(resp *http.Response) (res *Captch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Captcha if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -107,23 +118,28 @@ func decodeAPICaptchaInvisibleRecaptchaIDGetResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Captcha if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -152,23 +168,28 @@ func decodeAPICaptchaRecaptchaIDGetResponse(resp *http.Response) (res *Captcha, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Captcha if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -197,23 +218,28 @@ func decodeAPIDislikeGetResponse(resp *http.Response) (res *Like, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Like if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -233,23 +259,28 @@ func decodeAPILikeGetResponse(resp *http.Response) (res *Like, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Like if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -269,23 +300,28 @@ func decodeAPIMobileV2AfterBoardThreadNumGetResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MobileThreadPostsAfter if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -305,23 +341,28 @@ func decodeAPIMobileV2BoardsGetResponse(resp *http.Response) (res Boards, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Boards if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -341,23 +382,28 @@ func decodeAPIMobileV2InfoBoardThreadGetResponse(resp *http.Response) (res *Mobi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MobileThreadLastInfo if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -377,23 +423,28 @@ func decodeAPIMobileV2PostBoardNumGetResponse(resp *http.Response) (res *MobileP } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MobilePost if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -413,23 +464,28 @@ func decodeUserPassloginPostResponse(resp *http.Response) (res *Passcode, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Passcode if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -449,23 +505,28 @@ func decodeUserPostingPostResponse(resp *http.Response) (res UserPostingPostOK, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UserPostingPostOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -485,23 +546,28 @@ func decodeUserReportPostResponse(resp *http.Response) (res *Report, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Report if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/examples/ex_ent/oas_request_decoders_gen.go b/examples/ex_ent/oas_request_decoders_gen.go index d3a689285..68fec4848 100644 --- a/examples/ex_ent/oas_request_decoders_gen.go +++ b/examples/ex_ent/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -59,12 +60,17 @@ func (s *Server) decodeCreatePetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -117,12 +123,17 @@ func (s *Server) decodeCreatePetCategoriesRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -175,12 +186,17 @@ func (s *Server) decodeCreatePetFriendsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -233,12 +249,17 @@ func (s *Server) decodeCreatePetOwnerRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -291,12 +312,17 @@ func (s *Server) decodeUpdatePetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: diff --git a/examples/ex_ent/oas_response_decoders_gen.go b/examples/ex_ent/oas_response_decoders_gen.go index 9595a77ce..d5ea60d06 100644 --- a/examples/ex_ent/oas_response_decoders_gen.go +++ b/examples/ex_ent/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeCreatePetResponse(resp *http.Response) (res CreatePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PetCreate if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53,23 +59,28 @@ func decodeCreatePetResponse(resp *http.Response) (res CreatePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -83,23 +94,28 @@ func decodeCreatePetResponse(resp *http.Response) (res CreatePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R409 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -113,23 +129,28 @@ func decodeCreatePetResponse(resp *http.Response) (res CreatePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -149,23 +170,28 @@ func decodeCreatePetCategoriesResponse(resp *http.Response) (res CreatePetCatego } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PetCategoriesCreate if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -179,23 +205,28 @@ func decodeCreatePetCategoriesResponse(resp *http.Response) (res CreatePetCatego } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -209,23 +240,28 @@ func decodeCreatePetCategoriesResponse(resp *http.Response) (res CreatePetCatego } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R409 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -239,23 +275,28 @@ func decodeCreatePetCategoriesResponse(resp *http.Response) (res CreatePetCatego } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -275,23 +316,28 @@ func decodeCreatePetFriendsResponse(resp *http.Response) (res CreatePetFriendsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PetFriendsCreate if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -305,23 +351,28 @@ func decodeCreatePetFriendsResponse(resp *http.Response) (res CreatePetFriendsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -335,23 +386,28 @@ func decodeCreatePetFriendsResponse(resp *http.Response) (res CreatePetFriendsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R409 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -365,23 +421,28 @@ func decodeCreatePetFriendsResponse(resp *http.Response) (res CreatePetFriendsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -401,23 +462,28 @@ func decodeCreatePetOwnerResponse(resp *http.Response) (res CreatePetOwnerRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PetOwnerCreate if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -431,23 +497,28 @@ func decodeCreatePetOwnerResponse(resp *http.Response) (res CreatePetOwnerRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -461,23 +532,28 @@ func decodeCreatePetOwnerResponse(resp *http.Response) (res CreatePetOwnerRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R409 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -491,23 +567,28 @@ func decodeCreatePetOwnerResponse(resp *http.Response) (res CreatePetOwnerRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -530,23 +611,28 @@ func decodeDeletePetResponse(resp *http.Response) (res DeletePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -560,23 +646,28 @@ func decodeDeletePetResponse(resp *http.Response) (res DeletePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R404 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -590,23 +681,28 @@ func decodeDeletePetResponse(resp *http.Response) (res DeletePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -629,23 +725,28 @@ func decodeDeletePetOwnerResponse(resp *http.Response) (res DeletePetOwnerRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -659,23 +760,28 @@ func decodeDeletePetOwnerResponse(resp *http.Response) (res DeletePetOwnerRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R404 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -689,23 +795,28 @@ func decodeDeletePetOwnerResponse(resp *http.Response) (res DeletePetOwnerRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -725,23 +836,28 @@ func decodeListPetResponse(resp *http.Response) (res ListPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ListPetOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -755,23 +871,28 @@ func decodeListPetResponse(resp *http.Response) (res ListPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -785,23 +906,28 @@ func decodeListPetResponse(resp *http.Response) (res ListPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R404 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -815,23 +941,28 @@ func decodeListPetResponse(resp *http.Response) (res ListPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -851,23 +982,28 @@ func decodeListPetCategoriesResponse(resp *http.Response) (res ListPetCategories } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ListPetCategoriesOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -881,23 +1017,28 @@ func decodeListPetCategoriesResponse(resp *http.Response) (res ListPetCategories } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -911,23 +1052,28 @@ func decodeListPetCategoriesResponse(resp *http.Response) (res ListPetCategories } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R404 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -941,23 +1087,28 @@ func decodeListPetCategoriesResponse(resp *http.Response) (res ListPetCategories } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -977,23 +1128,28 @@ func decodeListPetFriendsResponse(resp *http.Response) (res ListPetFriendsRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ListPetFriendsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1007,23 +1163,28 @@ func decodeListPetFriendsResponse(resp *http.Response) (res ListPetFriendsRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1037,23 +1198,28 @@ func decodeListPetFriendsResponse(resp *http.Response) (res ListPetFriendsRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R404 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1067,23 +1233,28 @@ func decodeListPetFriendsResponse(resp *http.Response) (res ListPetFriendsRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1103,23 +1274,28 @@ func decodeReadPetResponse(resp *http.Response) (res ReadPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PetRead if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1133,23 +1309,28 @@ func decodeReadPetResponse(resp *http.Response) (res ReadPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1163,23 +1344,28 @@ func decodeReadPetResponse(resp *http.Response) (res ReadPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R404 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1193,23 +1379,28 @@ func decodeReadPetResponse(resp *http.Response) (res ReadPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1229,23 +1420,28 @@ func decodeReadPetOwnerResponse(resp *http.Response) (res ReadPetOwnerRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PetOwnerRead if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1259,23 +1455,28 @@ func decodeReadPetOwnerResponse(resp *http.Response) (res ReadPetOwnerRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1289,23 +1490,28 @@ func decodeReadPetOwnerResponse(resp *http.Response) (res ReadPetOwnerRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R404 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1319,23 +1525,28 @@ func decodeReadPetOwnerResponse(resp *http.Response) (res ReadPetOwnerRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1355,23 +1566,28 @@ func decodeUpdatePetResponse(resp *http.Response) (res UpdatePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PetUpdate if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1385,23 +1601,28 @@ func decodeUpdatePetResponse(resp *http.Response) (res UpdatePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1415,23 +1636,28 @@ func decodeUpdatePetResponse(resp *http.Response) (res UpdatePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R404 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1445,23 +1671,28 @@ func decodeUpdatePetResponse(resp *http.Response) (res UpdatePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response R500 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/examples/ex_firecracker/oas_request_decoders_gen.go b/examples/ex_firecracker/oas_request_decoders_gen.go index e23924549..ecbc9b4e0 100644 --- a/examples/ex_firecracker/oas_request_decoders_gen.go +++ b/examples/ex_firecracker/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -59,12 +60,17 @@ func (s *Server) decodeCreateSnapshotRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -125,12 +131,17 @@ func (s *Server) decodeCreateSyncActionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -191,12 +202,17 @@ func (s *Server) decodeLoadSnapshotRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -249,12 +265,17 @@ func (s *Server) decodeMmdsConfigPutRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -313,12 +334,17 @@ func (s *Server) decodeMmdsPatchRequest(r *http.Request) ( return err } request = &elem + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -377,12 +403,17 @@ func (s *Server) decodeMmdsPutRequest(r *http.Request) ( return err } request = &elem + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -435,12 +466,17 @@ func (s *Server) decodePatchBalloonRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -493,12 +529,17 @@ func (s *Server) decodePatchBalloonStatsIntervalRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -551,12 +592,17 @@ func (s *Server) decodePatchGuestDriveByIDRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -617,12 +663,17 @@ func (s *Server) decodePatchGuestNetworkInterfaceByIDRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -687,12 +738,17 @@ func (s *Server) decodePatchMachineConfigurationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -760,12 +816,17 @@ func (s *Server) decodePatchVmRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -826,12 +887,17 @@ func (s *Server) decodePutBalloonRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -884,12 +950,17 @@ func (s *Server) decodePutGuestBootSourceRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -942,12 +1013,17 @@ func (s *Server) decodePutGuestDriveByIDRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1008,12 +1084,17 @@ func (s *Server) decodePutGuestNetworkInterfaceByIDRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1074,12 +1155,17 @@ func (s *Server) decodePutGuestVsockRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1140,12 +1226,17 @@ func (s *Server) decodePutLoggerRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1210,12 +1301,17 @@ func (s *Server) decodePutMachineConfigurationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -1283,12 +1379,17 @@ func (s *Server) decodePutMetricsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: diff --git a/examples/ex_firecracker/oas_response_decoders_gen.go b/examples/ex_firecracker/oas_response_decoders_gen.go index 76e825f7f..52808d5cd 100644 --- a/examples/ex_firecracker/oas_response_decoders_gen.go +++ b/examples/ex_firecracker/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -26,23 +27,28 @@ func decodeCreateSnapshotResponse(resp *http.Response) (res CreateSnapshotRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -56,23 +62,28 @@ func decodeCreateSnapshotResponse(resp *http.Response) (res CreateSnapshotRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -96,23 +107,28 @@ func decodeCreateSyncActionResponse(resp *http.Response) (res CreateSyncActionRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -126,23 +142,28 @@ func decodeCreateSyncActionResponse(resp *http.Response) (res CreateSyncActionRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -163,23 +184,28 @@ func decodeDescribeBalloonConfigResponse(resp *http.Response) (res DescribeBallo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Balloon if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -193,23 +219,28 @@ func decodeDescribeBalloonConfigResponse(resp *http.Response) (res DescribeBallo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -223,23 +254,28 @@ func decodeDescribeBalloonConfigResponse(resp *http.Response) (res DescribeBallo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -260,23 +296,28 @@ func decodeDescribeBalloonStatsResponse(resp *http.Response) (res DescribeBalloo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BalloonStats if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -290,23 +331,28 @@ func decodeDescribeBalloonStatsResponse(resp *http.Response) (res DescribeBalloo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -320,23 +366,28 @@ func decodeDescribeBalloonStatsResponse(resp *http.Response) (res DescribeBalloo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -357,23 +408,28 @@ func decodeDescribeInstanceResponse(resp *http.Response) (res DescribeInstanceRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response InstanceInfo if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -387,23 +443,28 @@ func decodeDescribeInstanceResponse(resp *http.Response) (res DescribeInstanceRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -424,23 +485,28 @@ func decodeGetExportVmConfigResponse(resp *http.Response) (res GetExportVmConfig } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response FullVmConfiguration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -454,23 +520,28 @@ func decodeGetExportVmConfigResponse(resp *http.Response) (res GetExportVmConfig } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -491,23 +562,28 @@ func decodeGetMachineConfigurationResponse(resp *http.Response) (res GetMachineC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MachineConfiguration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -521,23 +597,28 @@ func decodeGetMachineConfigurationResponse(resp *http.Response) (res GetMachineC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -561,23 +642,28 @@ func decodeLoadSnapshotResponse(resp *http.Response) (res LoadSnapshotRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -591,23 +677,28 @@ func decodeLoadSnapshotResponse(resp *http.Response) (res LoadSnapshotRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -631,23 +722,28 @@ func decodeMmdsConfigPutResponse(resp *http.Response) (res MmdsConfigPutRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -661,23 +757,28 @@ func decodeMmdsConfigPutResponse(resp *http.Response) (res MmdsConfigPutRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -698,23 +799,28 @@ func decodeMmdsGetResponse(resp *http.Response) (res MmdsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MmdsGetOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -728,23 +834,28 @@ func decodeMmdsGetResponse(resp *http.Response) (res MmdsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -758,23 +869,28 @@ func decodeMmdsGetResponse(resp *http.Response) (res MmdsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -798,23 +914,28 @@ func decodeMmdsPatchResponse(resp *http.Response) (res MmdsPatchRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -828,23 +949,28 @@ func decodeMmdsPatchResponse(resp *http.Response) (res MmdsPatchRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -868,23 +994,28 @@ func decodeMmdsPutResponse(resp *http.Response) (res MmdsPutRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -898,23 +1029,28 @@ func decodeMmdsPutResponse(resp *http.Response) (res MmdsPutRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -938,23 +1074,28 @@ func decodePatchBalloonResponse(resp *http.Response) (res PatchBalloonRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -968,23 +1109,28 @@ func decodePatchBalloonResponse(resp *http.Response) (res PatchBalloonRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1008,23 +1154,28 @@ func decodePatchBalloonStatsIntervalResponse(resp *http.Response) (res PatchBall } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1038,23 +1189,28 @@ func decodePatchBalloonStatsIntervalResponse(resp *http.Response) (res PatchBall } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1078,23 +1234,28 @@ func decodePatchGuestDriveByIDResponse(resp *http.Response) (res PatchGuestDrive } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1108,23 +1269,28 @@ func decodePatchGuestDriveByIDResponse(resp *http.Response) (res PatchGuestDrive } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1148,23 +1314,28 @@ func decodePatchGuestNetworkInterfaceByIDResponse(resp *http.Response) (res Patc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1178,23 +1349,28 @@ func decodePatchGuestNetworkInterfaceByIDResponse(resp *http.Response) (res Patc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1218,23 +1394,28 @@ func decodePatchMachineConfigurationResponse(resp *http.Response) (res PatchMach } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1248,23 +1429,28 @@ func decodePatchMachineConfigurationResponse(resp *http.Response) (res PatchMach } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1288,23 +1474,28 @@ func decodePatchVmResponse(resp *http.Response) (res PatchVmRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1318,23 +1509,28 @@ func decodePatchVmResponse(resp *http.Response) (res PatchVmRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1358,23 +1554,28 @@ func decodePutBalloonResponse(resp *http.Response) (res PutBalloonRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1388,23 +1589,28 @@ func decodePutBalloonResponse(resp *http.Response) (res PutBalloonRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1428,23 +1634,28 @@ func decodePutGuestBootSourceResponse(resp *http.Response) (res PutGuestBootSour } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1458,23 +1669,28 @@ func decodePutGuestBootSourceResponse(resp *http.Response) (res PutGuestBootSour } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1498,23 +1714,28 @@ func decodePutGuestDriveByIDResponse(resp *http.Response) (res PutGuestDriveByID } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1528,23 +1749,28 @@ func decodePutGuestDriveByIDResponse(resp *http.Response) (res PutGuestDriveByID } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1568,23 +1794,28 @@ func decodePutGuestNetworkInterfaceByIDResponse(resp *http.Response) (res PutGue } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1598,23 +1829,28 @@ func decodePutGuestNetworkInterfaceByIDResponse(resp *http.Response) (res PutGue } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1638,23 +1874,28 @@ func decodePutGuestVsockResponse(resp *http.Response) (res PutGuestVsockRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1668,23 +1909,28 @@ func decodePutGuestVsockResponse(resp *http.Response) (res PutGuestVsockRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1708,23 +1954,28 @@ func decodePutLoggerResponse(resp *http.Response) (res PutLoggerRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1738,23 +1989,28 @@ func decodePutLoggerResponse(resp *http.Response) (res PutLoggerRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1778,23 +2034,28 @@ func decodePutMachineConfigurationResponse(resp *http.Response) (res PutMachineC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1808,23 +2069,28 @@ func decodePutMachineConfigurationResponse(resp *http.Response) (res PutMachineC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1848,23 +2114,28 @@ func decodePutMetricsResponse(resp *http.Response) (res PutMetricsRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1878,23 +2149,28 @@ func decodePutMetricsResponse(resp *http.Response) (res PutMetricsRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/examples/ex_github/oas_request_decoders_gen.go b/examples/ex_github/oas_request_decoders_gen.go index 381c780aa..2d4904ae2 100644 --- a/examples/ex_github/oas_request_decoders_gen.go +++ b/examples/ex_github/oas_request_decoders_gen.go @@ -12,6 +12,7 @@ import ( "go.uber.org/multierr" ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -60,12 +61,17 @@ func (s *Server) decodeActionsCreateOrUpdateEnvironmentSecretRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -126,12 +132,17 @@ func (s *Server) decodeActionsCreateOrUpdateOrgSecretRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -192,12 +203,17 @@ func (s *Server) decodeActionsCreateOrUpdateRepoSecretRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -258,12 +274,17 @@ func (s *Server) decodeActionsCreateSelfHostedRunnerGroupForOrgRequest(r *http.R if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -324,12 +345,17 @@ func (s *Server) decodeActionsReviewPendingDeploymentsForRunRequest(r *http.Requ if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -394,12 +420,17 @@ func (s *Server) decodeActionsSetAllowedActionsOrganizationRequest(r *http.Reque if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -456,12 +487,17 @@ func (s *Server) decodeActionsSetAllowedActionsRepositoryRequest(r *http.Request if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -514,12 +550,17 @@ func (s *Server) decodeActionsSetGithubActionsPermissionsOrganizationRequest(r * if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -580,12 +621,17 @@ func (s *Server) decodeActionsSetGithubActionsPermissionsRepositoryRequest(r *ht if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -646,12 +692,17 @@ func (s *Server) decodeActionsSetRepoAccessToSelfHostedRunnerGroupInOrgRequest(r if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -712,12 +763,17 @@ func (s *Server) decodeActionsSetSelectedReposForOrgSecretRequest(r *http.Reques if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -778,12 +834,17 @@ func (s *Server) decodeActionsSetSelectedRepositoriesEnabledGithubActionsOrganiz if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -844,12 +905,17 @@ func (s *Server) decodeActionsSetSelfHostedRunnersInGroupForOrgRequest(r *http.R if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -910,12 +976,17 @@ func (s *Server) decodeActionsUpdateSelfHostedRunnerGroupForOrgRequest(r *http.R if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -980,12 +1051,17 @@ func (s *Server) decodeActivityMarkNotificationsAsReadRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1042,12 +1118,17 @@ func (s *Server) decodeActivityMarkRepoNotificationsAsReadRequest(r *http.Reques if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1104,12 +1185,17 @@ func (s *Server) decodeActivitySetRepoSubscriptionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1166,12 +1252,17 @@ func (s *Server) decodeActivitySetThreadSubscriptionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1224,12 +1315,17 @@ func (s *Server) decodeAppsCheckTokenRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1282,12 +1378,17 @@ func (s *Server) decodeAppsCreateContentAttachmentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1354,12 +1455,17 @@ func (s *Server) decodeAppsCreateFromManifestRequest(r *http.Request) ( return err } request = &elem + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1416,12 +1522,17 @@ func (s *Server) decodeAppsCreateInstallationAccessTokenRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -1489,12 +1600,17 @@ func (s *Server) decodeAppsDeleteAuthorizationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1547,12 +1663,17 @@ func (s *Server) decodeAppsDeleteTokenRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1605,12 +1726,17 @@ func (s *Server) decodeAppsResetTokenRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1663,12 +1789,17 @@ func (s *Server) decodeAppsScopeTokenRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1733,12 +1864,17 @@ func (s *Server) decodeAppsUpdateWebhookConfigForAppRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -1806,12 +1942,17 @@ func (s *Server) decodeChecksCreateSuiteRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1864,12 +2005,17 @@ func (s *Server) decodeChecksSetSuitesPreferencesRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1922,12 +2068,17 @@ func (s *Server) decodeCodeScanningUpdateAlertRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1988,12 +2139,17 @@ func (s *Server) decodeCodeScanningUploadSarifRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2054,12 +2210,17 @@ func (s *Server) decodeEnterpriseAdminCreateSelfHostedRunnerGroupForEnterpriseRe if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2120,12 +2281,17 @@ func (s *Server) decodeEnterpriseAdminProvisionAndInviteEnterpriseGroupRequest(r if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2186,12 +2352,17 @@ func (s *Server) decodeEnterpriseAdminProvisionAndInviteEnterpriseUserRequest(r if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2252,12 +2423,17 @@ func (s *Server) decodeEnterpriseAdminSetAllowedActionsEnterpriseRequest(r *http if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2310,12 +2486,17 @@ func (s *Server) decodeEnterpriseAdminSetGithubActionsPermissionsEnterpriseReque if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2376,12 +2557,17 @@ func (s *Server) decodeEnterpriseAdminSetInformationForProvisionedEnterpriseGrou if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2442,12 +2628,17 @@ func (s *Server) decodeEnterpriseAdminSetInformationForProvisionedEnterpriseUser if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2508,12 +2699,17 @@ func (s *Server) decodeEnterpriseAdminSetOrgAccessToSelfHostedRunnerGroupInEnter if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2574,12 +2770,17 @@ func (s *Server) decodeEnterpriseAdminSetSelectedOrganizationsEnabledGithubActio if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2640,12 +2841,17 @@ func (s *Server) decodeEnterpriseAdminSetSelfHostedRunnersInGroupForEnterpriseRe if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2706,12 +2912,17 @@ func (s *Server) decodeEnterpriseAdminUpdateAttributeForEnterpriseGroupRequest(r if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2772,12 +2983,17 @@ func (s *Server) decodeEnterpriseAdminUpdateAttributeForEnterpriseUserRequest(r if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2842,12 +3058,17 @@ func (s *Server) decodeEnterpriseAdminUpdateSelfHostedRunnerGroupForEnterpriseRe if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -2915,12 +3136,17 @@ func (s *Server) decodeGistsCreateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2981,12 +3207,17 @@ func (s *Server) decodeGistsCreateCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3047,12 +3278,17 @@ func (s *Server) decodeGistsUpdateCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3113,12 +3349,17 @@ func (s *Server) decodeGitCreateBlobRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -3171,12 +3412,17 @@ func (s *Server) decodeGitCreateCommitRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -3229,12 +3475,17 @@ func (s *Server) decodeGitCreateRefRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -3287,12 +3538,17 @@ func (s *Server) decodeGitCreateTagRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3353,12 +3609,17 @@ func (s *Server) decodeGitCreateTreeRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3419,12 +3680,17 @@ func (s *Server) decodeGitUpdateRefRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -3477,12 +3743,17 @@ func (s *Server) decodeInteractionsSetRestrictionsForAuthenticatedUserRequest(r if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3543,12 +3814,17 @@ func (s *Server) decodeInteractionsSetRestrictionsForOrgRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3609,12 +3885,17 @@ func (s *Server) decodeInteractionsSetRestrictionsForRepoRequest(r *http.Request if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3679,12 +3960,17 @@ func (s *Server) decodeIssuesAddAssigneesRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3737,12 +4023,17 @@ func (s *Server) decodeIssuesCreateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -3795,12 +4086,17 @@ func (s *Server) decodeIssuesCreateCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -3853,12 +4149,17 @@ func (s *Server) decodeIssuesCreateLabelRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -3911,12 +4212,17 @@ func (s *Server) decodeIssuesCreateMilestoneRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3981,12 +4287,17 @@ func (s *Server) decodeIssuesLockRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -4058,12 +4369,17 @@ func (s *Server) decodeIssuesRemoveAssigneesRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4120,12 +4436,17 @@ func (s *Server) decodeIssuesUpdateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -4193,12 +4514,17 @@ func (s *Server) decodeIssuesUpdateCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4255,12 +4581,17 @@ func (s *Server) decodeIssuesUpdateLabelRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4317,12 +4648,17 @@ func (s *Server) decodeIssuesUpdateMilestoneRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -4390,12 +4726,17 @@ func (s *Server) decodeMarkdownRenderRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4502,12 +4843,17 @@ func (s *Server) decodeMigrationsMapCommitAuthorRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4560,12 +4906,17 @@ func (s *Server) decodeMigrationsSetLfsPreferenceRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4626,12 +4977,17 @@ func (s *Server) decodeMigrationsStartForAuthenticatedUserRequest(r *http.Reques if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4692,12 +5048,17 @@ func (s *Server) decodeMigrationsStartForOrgRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4758,12 +5119,17 @@ func (s *Server) decodeMigrationsStartImportRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4828,12 +5194,17 @@ func (s *Server) decodeMigrationsUpdateImportRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4890,12 +5261,17 @@ func (s *Server) decodeOAuthAuthorizationsCreateAuthorizationRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -4963,12 +5339,17 @@ func (s *Server) decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppRequest( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -5029,12 +5410,17 @@ func (s *Server) decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppAndFinge if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -5099,12 +5485,17 @@ func (s *Server) decodeOAuthAuthorizationsUpdateAuthorizationRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -5176,12 +5567,17 @@ func (s *Server) decodeOrgsCreateInvitationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -5249,12 +5645,17 @@ func (s *Server) decodeOrgsCreateWebhookRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -5319,12 +5720,17 @@ func (s *Server) decodeOrgsSetMembershipForUserRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -5392,12 +5798,17 @@ func (s *Server) decodeOrgsUpdateMembershipForAuthenticatedUserRequest(r *http.R if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -5462,12 +5873,17 @@ func (s *Server) decodeOrgsUpdateWebhookRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -5539,12 +5955,17 @@ func (s *Server) decodeOrgsUpdateWebhookConfigForOrgRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -5616,12 +6037,17 @@ func (s *Server) decodeProjectsAddCollaboratorRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -5689,12 +6115,17 @@ func (s *Server) decodeProjectsCreateColumnRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -5747,12 +6178,17 @@ func (s *Server) decodeProjectsCreateForAuthenticatedUserRequest(r *http.Request if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -5805,12 +6241,17 @@ func (s *Server) decodeProjectsCreateForOrgRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -5863,12 +6304,17 @@ func (s *Server) decodeProjectsCreateForRepoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -5921,12 +6367,17 @@ func (s *Server) decodeProjectsMoveCardRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -5987,12 +6438,17 @@ func (s *Server) decodeProjectsMoveColumnRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -6057,12 +6513,17 @@ func (s *Server) decodeProjectsUpdateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -6134,12 +6595,17 @@ func (s *Server) decodeProjectsUpdateCardRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -6192,12 +6658,17 @@ func (s *Server) decodeProjectsUpdateColumnRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -6250,12 +6721,17 @@ func (s *Server) decodePullsCreateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -6308,12 +6784,17 @@ func (s *Server) decodePullsCreateReplyForReviewCommentRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -6370,12 +6851,17 @@ func (s *Server) decodePullsCreateReviewRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -6443,12 +6929,17 @@ func (s *Server) decodePullsCreateReviewCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -6509,12 +7000,17 @@ func (s *Server) decodePullsDismissReviewRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -6571,12 +7067,17 @@ func (s *Server) decodePullsMergeRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -6644,12 +7145,17 @@ func (s *Server) decodePullsRemoveRequestedReviewersRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -6710,12 +7216,17 @@ func (s *Server) decodePullsSubmitReviewRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -6780,12 +7291,17 @@ func (s *Server) decodePullsUpdateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -6857,12 +7373,17 @@ func (s *Server) decodePullsUpdateBranchRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -6915,12 +7436,17 @@ func (s *Server) decodePullsUpdateReviewRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -6973,12 +7499,17 @@ func (s *Server) decodePullsUpdateReviewCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -7031,12 +7562,17 @@ func (s *Server) decodeReactionsCreateForCommitCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -7097,12 +7633,17 @@ func (s *Server) decodeReactionsCreateForIssueRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -7163,12 +7704,17 @@ func (s *Server) decodeReactionsCreateForIssueCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -7229,12 +7775,17 @@ func (s *Server) decodeReactionsCreateForPullRequestReviewCommentRequest(r *http if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -7295,12 +7846,17 @@ func (s *Server) decodeReactionsCreateForReleaseRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -7361,12 +7917,17 @@ func (s *Server) decodeReactionsCreateForTeamDiscussionCommentInOrgRequest(r *ht if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -7427,12 +7988,17 @@ func (s *Server) decodeReactionsCreateForTeamDiscussionCommentLegacyRequest(r *h if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -7493,12 +8059,17 @@ func (s *Server) decodeReactionsCreateForTeamDiscussionInOrgRequest(r *http.Requ if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -7559,12 +8130,17 @@ func (s *Server) decodeReactionsCreateForTeamDiscussionLegacyRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -7629,12 +8205,17 @@ func (s *Server) decodeReposAddAppAccessRestrictionsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -7706,12 +8287,17 @@ func (s *Server) decodeReposAddCollaboratorRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -7783,12 +8369,17 @@ func (s *Server) decodeReposAddStatusCheckContextsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -7860,12 +8451,17 @@ func (s *Server) decodeReposAddTeamAccessRestrictionsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -7937,12 +8533,17 @@ func (s *Server) decodeReposAddUserAccessRestrictionsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -8010,12 +8611,17 @@ func (s *Server) decodeReposCreateAutolinkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -8068,12 +8674,17 @@ func (s *Server) decodeReposCreateCommitCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -8126,12 +8737,17 @@ func (s *Server) decodeReposCreateCommitStatusRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -8192,12 +8808,17 @@ func (s *Server) decodeReposCreateDeployKeyRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -8250,12 +8871,17 @@ func (s *Server) decodeReposCreateDeploymentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -8308,12 +8934,17 @@ func (s *Server) decodeReposCreateDeploymentStatusRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -8374,12 +9005,17 @@ func (s *Server) decodeReposCreateDispatchEventRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -8440,12 +9076,17 @@ func (s *Server) decodeReposCreateForAuthenticatedUserRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -8502,12 +9143,17 @@ func (s *Server) decodeReposCreateForkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -8560,12 +9206,17 @@ func (s *Server) decodeReposCreateInOrgRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -8626,12 +9277,17 @@ func (s *Server) decodeReposCreateOrUpdateFileContentsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -8684,12 +9340,17 @@ func (s *Server) decodeReposCreatePagesSiteRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Value.Validate(); err != nil { @@ -8750,12 +9411,17 @@ func (s *Server) decodeReposCreateReleaseRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -8808,12 +9474,17 @@ func (s *Server) decodeReposCreateUsingTemplateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -8870,12 +9541,17 @@ func (s *Server) decodeReposCreateWebhookRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -8943,12 +9619,17 @@ func (s *Server) decodeReposDeleteFileRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -9001,12 +9682,17 @@ func (s *Server) decodeReposMergeRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -9059,12 +9745,17 @@ func (s *Server) decodeReposMergeUpstreamRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -9121,12 +9812,17 @@ func (s *Server) decodeReposRemoveAppAccessRestrictionsRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -9198,12 +9894,17 @@ func (s *Server) decodeReposRemoveStatusCheckContextsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -9275,12 +9976,17 @@ func (s *Server) decodeReposRemoveTeamAccessRestrictionsRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -9352,12 +10058,17 @@ func (s *Server) decodeReposRemoveUserAccessRestrictionsRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -9429,12 +10140,17 @@ func (s *Server) decodeReposRenameBranchRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -9487,12 +10203,17 @@ func (s *Server) decodeReposReplaceAllTopicsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -9557,12 +10278,17 @@ func (s *Server) decodeReposSetAppAccessRestrictionsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -9634,12 +10360,17 @@ func (s *Server) decodeReposSetStatusCheckContextsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -9711,12 +10442,17 @@ func (s *Server) decodeReposSetTeamAccessRestrictionsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -9788,12 +10524,17 @@ func (s *Server) decodeReposSetUserAccessRestrictionsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -9861,12 +10602,17 @@ func (s *Server) decodeReposTransferRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -9923,12 +10669,17 @@ func (s *Server) decodeReposUpdateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -9996,12 +10747,17 @@ func (s *Server) decodeReposUpdateBranchProtectionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -10062,12 +10818,17 @@ func (s *Server) decodeReposUpdateCommitCommentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -10124,12 +10885,17 @@ func (s *Server) decodeReposUpdateInvitationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -10201,12 +10967,17 @@ func (s *Server) decodeReposUpdatePullRequestReviewProtectionRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -10263,12 +11034,17 @@ func (s *Server) decodeReposUpdateReleaseRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -10325,12 +11101,17 @@ func (s *Server) decodeReposUpdateReleaseAssetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -10387,12 +11168,17 @@ func (s *Server) decodeReposUpdateStatusCheckProtectionRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -10449,12 +11235,17 @@ func (s *Server) decodeReposUpdateWebhookRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -10526,12 +11317,17 @@ func (s *Server) decodeReposUpdateWebhookConfigForRepoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -10640,12 +11436,17 @@ func (s *Server) decodeSecretScanningUpdateAlertRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -10710,12 +11511,17 @@ func (s *Server) decodeTeamsAddOrUpdateMembershipForUserInOrgRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -10787,12 +11593,17 @@ func (s *Server) decodeTeamsAddOrUpdateMembershipForUserLegacyRequest(r *http.Re if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -10864,12 +11675,17 @@ func (s *Server) decodeTeamsAddOrUpdateProjectPermissionsInOrgRequest(r *http.Re if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -10941,12 +11757,17 @@ func (s *Server) decodeTeamsAddOrUpdateProjectPermissionsLegacyRequest(r *http.R if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -11018,12 +11839,17 @@ func (s *Server) decodeTeamsAddOrUpdateRepoPermissionsInOrgRequest(r *http.Reque if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -11095,12 +11921,17 @@ func (s *Server) decodeTeamsAddOrUpdateRepoPermissionsLegacyRequest(r *http.Requ if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -11168,12 +11999,17 @@ func (s *Server) decodeTeamsCreateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -11234,12 +12070,17 @@ func (s *Server) decodeTeamsCreateDiscussionCommentInOrgRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -11292,12 +12133,17 @@ func (s *Server) decodeTeamsCreateDiscussionCommentLegacyRequest(r *http.Request if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -11350,12 +12196,17 @@ func (s *Server) decodeTeamsCreateDiscussionInOrgRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -11408,12 +12259,17 @@ func (s *Server) decodeTeamsCreateDiscussionLegacyRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -11466,12 +12322,17 @@ func (s *Server) decodeTeamsCreateOrUpdateIdpGroupConnectionsInOrgRequest(r *htt if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -11524,12 +12385,17 @@ func (s *Server) decodeTeamsCreateOrUpdateIdpGroupConnectionsLegacyRequest(r *ht if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -11590,12 +12456,17 @@ func (s *Server) decodeTeamsUpdateDiscussionCommentInOrgRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -11648,12 +12519,17 @@ func (s *Server) decodeTeamsUpdateDiscussionCommentLegacyRequest(r *http.Request if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -11710,12 +12586,17 @@ func (s *Server) decodeTeamsUpdateDiscussionInOrgRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -11772,12 +12653,17 @@ func (s *Server) decodeTeamsUpdateDiscussionLegacyRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -11834,12 +12720,17 @@ func (s *Server) decodeTeamsUpdateInOrgRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -11907,12 +12798,17 @@ func (s *Server) decodeTeamsUpdateLegacyRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -11977,12 +12873,17 @@ func (s *Server) decodeUsersAddEmailForAuthenticatedRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -12050,12 +12951,17 @@ func (s *Server) decodeUsersCreateGpgKeyForAuthenticatedRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -12108,12 +13014,17 @@ func (s *Server) decodeUsersCreatePublicSSHKeyForAuthenticatedRequest(r *http.Re if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -12178,12 +13089,17 @@ func (s *Server) decodeUsersDeleteEmailForAuthenticatedRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -12251,12 +13167,17 @@ func (s *Server) decodeUsersSetPrimaryEmailVisibilityForAuthenticatedRequest(r * if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -12321,12 +13242,17 @@ func (s *Server) decodeUsersUpdateAuthenticatedRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: diff --git a/examples/ex_github/oas_response_decoders_gen.go b/examples/ex_github/oas_response_decoders_gen.go index 98c223b59..344a87371 100644 --- a/examples/ex_github/oas_response_decoders_gen.go +++ b/examples/ex_github/oas_response_decoders_gen.go @@ -12,6 +12,7 @@ import ( "github.com/go-faster/jx" "github.com/ogen-go/ogen/conv" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/uri" "github.com/ogen-go/ogen/validate" ) @@ -56,23 +57,28 @@ func decodeActionsApproveWorkflowRunResponse(resp *http.Response) (res ActionsAp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EmptyObject if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -86,23 +92,28 @@ func decodeActionsApproveWorkflowRunResponse(resp *http.Response) (res ActionsAp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsApproveWorkflowRunApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -116,23 +127,28 @@ func decodeActionsApproveWorkflowRunResponse(resp *http.Response) (res ActionsAp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsApproveWorkflowRunApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -152,23 +168,28 @@ func decodeActionsCancelWorkflowRunResponse(resp *http.Response) (res *ActionsCa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsCancelWorkflowRunAccepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -188,23 +209,28 @@ func decodeActionsCreateOrUpdateEnvironmentSecretResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EmptyObject if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -227,23 +253,28 @@ func decodeActionsCreateOrUpdateOrgSecretResponse(resp *http.Response) (res Acti } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EmptyObject if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -266,23 +297,28 @@ func decodeActionsCreateOrUpdateRepoSecretResponse(resp *http.Response) (res Act } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsCreateOrUpdateRepoSecretCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -305,23 +341,28 @@ func decodeActionsCreateRegistrationTokenForOrgResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AuthenticationToken if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -341,23 +382,28 @@ func decodeActionsCreateRegistrationTokenForRepoResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AuthenticationToken if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -377,23 +423,28 @@ func decodeActionsCreateRemoveTokenForOrgResponse(resp *http.Response) (res *Aut } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AuthenticationToken if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -413,23 +464,28 @@ func decodeActionsCreateRemoveTokenForRepoResponse(resp *http.Response) (res *Au } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AuthenticationToken if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -449,23 +505,28 @@ func decodeActionsCreateSelfHostedRunnerGroupForOrgResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RunnerGroupsOrg if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -722,23 +783,28 @@ func decodeActionsGetAllowedActionsOrganizationResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SelectedActions if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -758,23 +824,28 @@ func decodeActionsGetAllowedActionsRepositoryResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SelectedActions if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -794,23 +865,28 @@ func decodeActionsGetArtifactResponse(resp *http.Response) (res *Artifact, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Artifact if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -830,23 +906,28 @@ func decodeActionsGetEnvironmentPublicKeyResponse(resp *http.Response) (res *Act } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsPublicKey if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -866,23 +947,28 @@ func decodeActionsGetEnvironmentSecretResponse(resp *http.Response) (res *Action } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsSecret if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -902,23 +988,28 @@ func decodeActionsGetGithubActionsPermissionsOrganizationResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsOrganizationPermissions if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -938,23 +1029,28 @@ func decodeActionsGetGithubActionsPermissionsRepositoryResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsRepositoryPermissions if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -974,23 +1070,28 @@ func decodeActionsGetJobForWorkflowRunResponse(resp *http.Response) (res *Job, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Job if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1010,23 +1111,28 @@ func decodeActionsGetOrgPublicKeyResponse(resp *http.Response) (res *ActionsPubl } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsPublicKey if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1046,23 +1152,28 @@ func decodeActionsGetOrgSecretResponse(resp *http.Response) (res *OrganizationAc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrganizationActionsSecret if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1082,23 +1193,28 @@ func decodeActionsGetRepoPublicKeyResponse(resp *http.Response) (res *ActionsPub } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsPublicKey if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1118,23 +1234,28 @@ func decodeActionsGetRepoSecretResponse(resp *http.Response) (res *ActionsSecret } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsSecret if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1154,12 +1275,12 @@ func decodeActionsGetReviewsForRunResponse(resp *http.Response) (res []Environme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []EnvironmentApprovals if err := func() error { response = make([]EnvironmentApprovals, 0) @@ -1173,12 +1294,17 @@ func decodeActionsGetReviewsForRunResponse(resp *http.Response) (res []Environme }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -1198,23 +1324,28 @@ func decodeActionsGetSelfHostedRunnerForOrgResponse(resp *http.Response) (res *R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Runner if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1234,23 +1365,28 @@ func decodeActionsGetSelfHostedRunnerForRepoResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Runner if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1270,23 +1406,28 @@ func decodeActionsGetSelfHostedRunnerGroupForOrgResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RunnerGroupsOrg if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1306,23 +1447,28 @@ func decodeActionsGetWorkflowRunResponse(resp *http.Response) (res *WorkflowRun, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WorkflowRun if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1342,23 +1488,28 @@ func decodeActionsGetWorkflowRunUsageResponse(resp *http.Response) (res *Workflo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WorkflowRunUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1378,173 +1529,188 @@ func decodeActionsListArtifactsForRepoResponse(resp *http.Response) (res *Action } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListArtifactsForRepoOK if err := func() error { if err := response.Decode(d); err != nil { return err } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper ActionsListArtifactsForRepoOKHeaders - wrapper.Response = response - h := uri.NewHeaderDecoder(resp.Header) - // Parse "Link" header. - { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "Link", - Explode: false, - } - if err := func() error { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - var wrapperDotLinkVal string - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - wrapperDotLinkVal = c - return nil - }(); err != nil { - return err - } - wrapper.Link.SetTo(wrapperDotLinkVal) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "parse Link header") - } - } - return &wrapper, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeActionsListEnvironmentSecretsResponse(resp *http.Response) (res *ActionsListEnvironmentSecretsOKHeaders, err error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - - d := jx.DecodeBytes(b) - var response ActionsListEnvironmentSecretsOK - if err := func() error { - if err := response.Decode(d); err != nil { - return err + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper ActionsListEnvironmentSecretsOKHeaders - wrapper.Response = response - h := uri.NewHeaderDecoder(resp.Header) - // Parse "Link" header. - { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "Link", - Explode: false, - } - if err := func() error { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - var wrapperDotLinkVal string - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - wrapperDotLinkVal = c - return nil - }(); err != nil { - return err - } - wrapper.Link.SetTo(wrapperDotLinkVal) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "parse Link header") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, } - } - return &wrapper, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeActionsListJobsForWorkflowRunResponse(resp *http.Response) (res *ActionsListJobsForWorkflowRunOKHeaders, err error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { return res, err } - - d := jx.DecodeBytes(b) - var response ActionsListJobsForWorkflowRunOK - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper ActionsListJobsForWorkflowRunOKHeaders + var wrapper ActionsListArtifactsForRepoOKHeaders + wrapper.Response = response + h := uri.NewHeaderDecoder(resp.Header) + // Parse "Link" header. + { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "Link", + Explode: false, + } + if err := func() error { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + var wrapperDotLinkVal string + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + wrapperDotLinkVal = c + return nil + }(); err != nil { + return err + } + wrapper.Link.SetTo(wrapperDotLinkVal) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "parse Link header") + } + } + return &wrapper, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeActionsListEnvironmentSecretsResponse(resp *http.Response) (res *ActionsListEnvironmentSecretsOKHeaders, err error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response ActionsListEnvironmentSecretsOK + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + var wrapper ActionsListEnvironmentSecretsOKHeaders + wrapper.Response = response + h := uri.NewHeaderDecoder(resp.Header) + // Parse "Link" header. + { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "Link", + Explode: false, + } + if err := func() error { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + var wrapperDotLinkVal string + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + wrapperDotLinkVal = c + return nil + }(); err != nil { + return err + } + wrapper.Link.SetTo(wrapperDotLinkVal) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "parse Link header") + } + } + return &wrapper, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeActionsListJobsForWorkflowRunResponse(resp *http.Response) (res *ActionsListJobsForWorkflowRunOKHeaders, err error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response ActionsListJobsForWorkflowRunOK + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + var wrapper ActionsListJobsForWorkflowRunOKHeaders wrapper.Response = response h := uri.NewHeaderDecoder(resp.Header) // Parse "Link" header. @@ -1600,23 +1766,28 @@ func decodeActionsListOrgSecretsResponse(resp *http.Response) (res *ActionsListO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListOrgSecretsOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActionsListOrgSecretsOKHeaders wrapper.Response = response @@ -1674,23 +1845,28 @@ func decodeActionsListRepoAccessToSelfHostedRunnerGroupInOrgResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListRepoAccessToSelfHostedRunnerGroupInOrgOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1710,23 +1886,28 @@ func decodeActionsListRepoSecretsResponse(resp *http.Response) (res *ActionsList } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListRepoSecretsOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActionsListRepoSecretsOKHeaders wrapper.Response = response @@ -1784,23 +1965,28 @@ func decodeActionsListRepoWorkflowsResponse(resp *http.Response) (res *ActionsLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListRepoWorkflowsOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActionsListRepoWorkflowsOKHeaders wrapper.Response = response @@ -1858,12 +2044,12 @@ func decodeActionsListRunnerApplicationsForOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []RunnerApplication if err := func() error { response = make([]RunnerApplication, 0) @@ -1877,12 +2063,17 @@ func decodeActionsListRunnerApplicationsForOrgResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -1902,12 +2093,12 @@ func decodeActionsListRunnerApplicationsForRepoResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []RunnerApplication if err := func() error { response = make([]RunnerApplication, 0) @@ -1921,12 +2112,17 @@ func decodeActionsListRunnerApplicationsForRepoResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -1946,23 +2142,28 @@ func decodeActionsListSelectedReposForOrgSecretResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListSelectedReposForOrgSecretOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1982,23 +2183,28 @@ func decodeActionsListSelectedRepositoriesEnabledGithubActionsOrganizationRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListSelectedRepositoriesEnabledGithubActionsOrganizationOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2018,23 +2224,28 @@ func decodeActionsListSelfHostedRunnerGroupsForOrgResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListSelfHostedRunnerGroupsForOrgOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2054,23 +2265,28 @@ func decodeActionsListSelfHostedRunnersForOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListSelfHostedRunnersForOrgOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActionsListSelfHostedRunnersForOrgOKHeaders wrapper.Response = response @@ -2128,23 +2344,28 @@ func decodeActionsListSelfHostedRunnersForRepoResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListSelfHostedRunnersForRepoOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActionsListSelfHostedRunnersForRepoOKHeaders wrapper.Response = response @@ -2202,99 +2423,109 @@ func decodeActionsListSelfHostedRunnersInGroupForOrgResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListSelfHostedRunnersInGroupForOrgOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper ActionsListSelfHostedRunnersInGroupForOrgOKHeaders - wrapper.Response = response - h := uri.NewHeaderDecoder(resp.Header) - // Parse "Link" header. - { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "Link", - Explode: false, - } - if err := func() error { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - var wrapperDotLinkVal string - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - wrapperDotLinkVal = c - return nil - }(); err != nil { - return err - } - wrapper.Link.SetTo(wrapperDotLinkVal) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "parse Link header") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, } - } - return &wrapper, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeActionsListWorkflowRunArtifactsResponse(resp *http.Response) (res *ActionsListWorkflowRunArtifactsOKHeaders, err error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { return res, err } - - d := jx.DecodeBytes(b) - var response ActionsListWorkflowRunArtifactsOK - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper ActionsListWorkflowRunArtifactsOKHeaders + var wrapper ActionsListSelfHostedRunnersInGroupForOrgOKHeaders + wrapper.Response = response + h := uri.NewHeaderDecoder(resp.Header) + // Parse "Link" header. + { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "Link", + Explode: false, + } + if err := func() error { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + var wrapperDotLinkVal string + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + wrapperDotLinkVal = c + return nil + }(); err != nil { + return err + } + wrapper.Link.SetTo(wrapperDotLinkVal) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "parse Link header") + } + } + return &wrapper, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeActionsListWorkflowRunArtifactsResponse(resp *http.Response) (res *ActionsListWorkflowRunArtifactsOKHeaders, err error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response ActionsListWorkflowRunArtifactsOK + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + var wrapper ActionsListWorkflowRunArtifactsOKHeaders wrapper.Response = response h := uri.NewHeaderDecoder(resp.Header) // Parse "Link" header. @@ -2350,23 +2581,28 @@ func decodeActionsListWorkflowRunsForRepoResponse(resp *http.Response) (res *Act } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsListWorkflowRunsForRepoOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActionsListWorkflowRunsForRepoOKHeaders wrapper.Response = response @@ -2424,23 +2660,28 @@ func decodeActionsReRunWorkflowResponse(resp *http.Response) (res *ActionsReRunW } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsReRunWorkflowCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2490,23 +2731,28 @@ func decodeActionsRetryWorkflowResponse(resp *http.Response) (res *ActionsRetryW } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsRetryWorkflowCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2526,12 +2772,12 @@ func decodeActionsReviewPendingDeploymentsForRunResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Deployment if err := func() error { response = make([]Deployment, 0) @@ -2545,12 +2791,17 @@ func decodeActionsReviewPendingDeploymentsForRunResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -2642,23 +2893,28 @@ func decodeActionsUpdateSelfHostedRunnerGroupForOrgResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RunnerGroupsOrg if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2684,23 +2940,28 @@ func decodeActivityCheckRepoIsStarredByAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityCheckRepoIsStarredByAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2714,23 +2975,28 @@ func decodeActivityCheckRepoIsStarredByAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityCheckRepoIsStarredByAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2744,23 +3010,28 @@ func decodeActivityCheckRepoIsStarredByAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityCheckRepoIsStarredByAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2795,23 +3066,28 @@ func decodeActivityDeleteThreadSubscriptionResponse(resp *http.Response) (res Ac } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityDeleteThreadSubscriptionApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2825,23 +3101,28 @@ func decodeActivityDeleteThreadSubscriptionResponse(resp *http.Response) (res Ac } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityDeleteThreadSubscriptionApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2861,23 +3142,28 @@ func decodeActivityGetFeedsResponse(resp *http.Response) (res *Feed, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Feed if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2897,23 +3183,28 @@ func decodeActivityGetRepoSubscriptionResponse(resp *http.Response) (res Activit } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RepositorySubscription if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2927,23 +3218,28 @@ func decodeActivityGetRepoSubscriptionResponse(resp *http.Response) (res Activit } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2966,23 +3262,28 @@ func decodeActivityGetThreadResponse(resp *http.Response) (res ActivityGetThread } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Thread if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2999,23 +3300,28 @@ func decodeActivityGetThreadResponse(resp *http.Response) (res ActivityGetThread } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityGetThreadApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3029,23 +3335,28 @@ func decodeActivityGetThreadResponse(resp *http.Response) (res ActivityGetThread } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityGetThreadApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3065,23 +3376,28 @@ func decodeActivityGetThreadSubscriptionForAuthenticatedUserResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ThreadSubscription if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3098,23 +3414,28 @@ func decodeActivityGetThreadSubscriptionForAuthenticatedUserResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityGetThreadSubscriptionForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3128,23 +3449,28 @@ func decodeActivityGetThreadSubscriptionForAuthenticatedUserResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityGetThreadSubscriptionForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3164,12 +3490,12 @@ func decodeActivityListEventsForAuthenticatedUserResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Event if err := func() error { response = make([]Event, 0) @@ -3183,12 +3509,17 @@ func decodeActivityListEventsForAuthenticatedUserResponse(resp *http.Response) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -3208,12 +3539,12 @@ func decodeActivityListNotificationsForAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Thread if err := func() error { response = make([]Thread, 0) @@ -3227,12 +3558,17 @@ func decodeActivityListNotificationsForAuthenticatedUserResponse(resp *http.Resp }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActivityListNotificationsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -3287,23 +3623,28 @@ func decodeActivityListNotificationsForAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListNotificationsForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3317,23 +3658,28 @@ func decodeActivityListNotificationsForAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListNotificationsForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3347,23 +3693,28 @@ func decodeActivityListNotificationsForAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3383,12 +3734,12 @@ func decodeActivityListOrgEventsForAuthenticatedUserResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Event if err := func() error { response = make([]Event, 0) @@ -3402,12 +3753,17 @@ func decodeActivityListOrgEventsForAuthenticatedUserResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -3427,23 +3783,28 @@ func decodeActivityListPublicEventsResponse(resp *http.Response) (res ActivityLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListPublicEventsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3460,23 +3821,28 @@ func decodeActivityListPublicEventsResponse(resp *http.Response) (res ActivityLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3490,23 +3856,28 @@ func decodeActivityListPublicEventsResponse(resp *http.Response) (res ActivityLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3526,23 +3897,28 @@ func decodeActivityListPublicEventsForRepoNetworkResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListPublicEventsForRepoNetworkOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3556,23 +3932,28 @@ func decodeActivityListPublicEventsForRepoNetworkResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListPublicEventsForRepoNetworkApplicationJSONMovedPermanently if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3589,23 +3970,28 @@ func decodeActivityListPublicEventsForRepoNetworkResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListPublicEventsForRepoNetworkApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3619,23 +4005,28 @@ func decodeActivityListPublicEventsForRepoNetworkResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListPublicEventsForRepoNetworkApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3655,12 +4046,12 @@ func decodeActivityListPublicEventsForUserResponse(resp *http.Response) (res []E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Event if err := func() error { response = make([]Event, 0) @@ -3674,12 +4065,17 @@ func decodeActivityListPublicEventsForUserResponse(resp *http.Response) (res []E }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -3699,12 +4095,12 @@ func decodeActivityListPublicOrgEventsResponse(resp *http.Response) (res []Event } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Event if err := func() error { response = make([]Event, 0) @@ -3718,12 +4114,17 @@ func decodeActivityListPublicOrgEventsResponse(resp *http.Response) (res []Event }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -3743,12 +4144,12 @@ func decodeActivityListReceivedEventsForUserResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Event if err := func() error { response = make([]Event, 0) @@ -3762,12 +4163,17 @@ func decodeActivityListReceivedEventsForUserResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -3787,12 +4193,12 @@ func decodeActivityListReceivedPublicEventsForUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Event if err := func() error { response = make([]Event, 0) @@ -3806,12 +4212,17 @@ func decodeActivityListReceivedPublicEventsForUserResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -3831,12 +4242,12 @@ func decodeActivityListRepoEventsResponse(resp *http.Response) (res []Event, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Event if err := func() error { response = make([]Event, 0) @@ -3850,12 +4261,17 @@ func decodeActivityListRepoEventsResponse(resp *http.Response) (res []Event, err }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -3875,12 +4291,12 @@ func decodeActivityListRepoNotificationsForAuthenticatedUserResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Thread if err := func() error { response = make([]Thread, 0) @@ -3894,12 +4310,17 @@ func decodeActivityListRepoNotificationsForAuthenticatedUserResponse(resp *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActivityListRepoNotificationsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -3957,12 +4378,12 @@ func decodeActivityListReposStarredByAuthenticatedUserResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Repository if err := func() error { response = make([]Repository, 0) @@ -3976,12 +4397,17 @@ func decodeActivityListReposStarredByAuthenticatedUserResponse(resp *http.Respon }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActivityListReposStarredByAuthenticatedUserOKHeaders wrapper.Response = response @@ -4036,23 +4462,28 @@ func decodeActivityListReposStarredByAuthenticatedUserResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListReposStarredByAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4066,23 +4497,28 @@ func decodeActivityListReposStarredByAuthenticatedUserResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListReposStarredByAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4102,12 +4538,12 @@ func decodeActivityListReposWatchedByUserResponse(resp *http.Response) (res *Act } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -4121,12 +4557,17 @@ func decodeActivityListReposWatchedByUserResponse(resp *http.Response) (res *Act }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActivityListReposWatchedByUserOKHeaders wrapper.Response = response @@ -4184,12 +4625,12 @@ func decodeActivityListWatchedReposForAuthenticatedUserResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -4203,12 +4644,17 @@ func decodeActivityListWatchedReposForAuthenticatedUserResponse(resp *http.Respo }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActivityListWatchedReposForAuthenticatedUserOKHeaders wrapper.Response = response @@ -4263,23 +4709,28 @@ func decodeActivityListWatchedReposForAuthenticatedUserResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListWatchedReposForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4293,23 +4744,28 @@ func decodeActivityListWatchedReposForAuthenticatedUserResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityListWatchedReposForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4329,12 +4785,12 @@ func decodeActivityListWatchersForRepoResponse(resp *http.Response) (res *Activi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -4348,12 +4804,17 @@ func decodeActivityListWatchersForRepoResponse(resp *http.Response) (res *Activi }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ActivityListWatchersForRepoOKHeaders wrapper.Response = response @@ -4411,23 +4872,28 @@ func decodeActivityMarkNotificationsAsReadResponse(resp *http.Response) (res Act } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityMarkNotificationsAsReadAccepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4447,23 +4913,28 @@ func decodeActivityMarkNotificationsAsReadResponse(resp *http.Response) (res Act } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityMarkNotificationsAsReadApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4477,23 +4948,28 @@ func decodeActivityMarkNotificationsAsReadResponse(resp *http.Response) (res Act } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityMarkNotificationsAsReadApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4513,23 +4989,28 @@ func decodeActivityMarkRepoNotificationsAsReadResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityMarkRepoNotificationsAsReadAccepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4558,23 +5039,28 @@ func decodeActivityMarkThreadAsReadResponse(resp *http.Response) (res ActivityMa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4594,23 +5080,28 @@ func decodeActivitySetRepoSubscriptionResponse(resp *http.Response) (res *Reposi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RepositorySubscription if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4630,23 +5121,28 @@ func decodeActivitySetThreadSubscriptionResponse(resp *http.Response) (res Activ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ThreadSubscription if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4663,23 +5159,28 @@ func decodeActivitySetThreadSubscriptionResponse(resp *http.Response) (res Activ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivitySetThreadSubscriptionApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4693,23 +5194,28 @@ func decodeActivitySetThreadSubscriptionResponse(resp *http.Response) (res Activ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivitySetThreadSubscriptionApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4735,23 +5241,28 @@ func decodeActivityStarRepoForAuthenticatedUserResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityStarRepoForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4765,23 +5276,28 @@ func decodeActivityStarRepoForAuthenticatedUserResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityStarRepoForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4795,23 +5311,28 @@ func decodeActivityStarRepoForAuthenticatedUserResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityStarRepoForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4837,23 +5358,28 @@ func decodeActivityUnstarRepoForAuthenticatedUserResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityUnstarRepoForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4867,23 +5393,28 @@ func decodeActivityUnstarRepoForAuthenticatedUserResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityUnstarRepoForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4897,23 +5428,28 @@ func decodeActivityUnstarRepoForAuthenticatedUserResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActivityUnstarRepoForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4939,23 +5475,28 @@ func decodeAppsAddRepoToInstallationResponse(resp *http.Response) (res AppsAddRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsAddRepoToInstallationApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4969,23 +5510,28 @@ func decodeAppsAddRepoToInstallationResponse(resp *http.Response) (res AppsAddRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsAddRepoToInstallationApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5005,23 +5551,28 @@ func decodeAppsCheckTokenResponse(resp *http.Response) (res AppsCheckTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5035,23 +5586,28 @@ func decodeAppsCheckTokenResponse(resp *http.Response) (res AppsCheckTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5065,23 +5621,28 @@ func decodeAppsCheckTokenResponse(resp *http.Response) (res AppsCheckTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5101,23 +5662,28 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ContentReferenceAttachment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5134,23 +5700,28 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsCreateContentAttachmentApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5164,23 +5735,28 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsCreateContentAttachmentApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5194,23 +5770,28 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsCreateContentAttachmentApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5224,23 +5805,28 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5254,23 +5840,28 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5290,23 +5881,28 @@ func decodeAppsCreateFromManifestResponse(resp *http.Response) (res AppsCreateFr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsCreateFromManifestCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5320,23 +5916,28 @@ func decodeAppsCreateFromManifestResponse(resp *http.Response) (res AppsCreateFr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5350,23 +5951,28 @@ func decodeAppsCreateFromManifestResponse(resp *http.Response) (res AppsCreateFr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5386,23 +5992,28 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response InstallationToken if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5416,23 +6027,28 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsCreateInstallationAccessTokenApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5446,23 +6062,28 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsCreateInstallationAccessTokenApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5476,23 +6097,28 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsCreateInstallationAccessTokenApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5506,23 +6132,28 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5536,23 +6167,28 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5575,23 +6211,28 @@ func decodeAppsDeleteAuthorizationResponse(resp *http.Response) (res AppsDeleteA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5614,23 +6255,28 @@ func decodeAppsDeleteInstallationResponse(resp *http.Response) (res AppsDeleteIn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5653,23 +6299,28 @@ func decodeAppsDeleteTokenResponse(resp *http.Response) (res AppsDeleteTokenRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5689,23 +6340,28 @@ func decodeAppsGetAuthenticatedResponse(resp *http.Response) (res *Integration, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Integration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5725,23 +6381,28 @@ func decodeAppsGetBySlugResponse(resp *http.Response) (res AppsGetBySlugRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Integration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5755,23 +6416,28 @@ func decodeAppsGetBySlugResponse(resp *http.Response) (res AppsGetBySlugRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsGetBySlugApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5785,23 +6451,28 @@ func decodeAppsGetBySlugResponse(resp *http.Response) (res AppsGetBySlugRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsGetBySlugApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5815,23 +6486,28 @@ func decodeAppsGetBySlugResponse(resp *http.Response) (res AppsGetBySlugRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5851,23 +6527,28 @@ func decodeAppsGetSubscriptionPlanForAccountResponse(resp *http.Response) (res A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MarketplacePurchase if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5881,23 +6562,28 @@ func decodeAppsGetSubscriptionPlanForAccountResponse(resp *http.Response) (res A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsGetSubscriptionPlanForAccountApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5911,23 +6597,28 @@ func decodeAppsGetSubscriptionPlanForAccountResponse(resp *http.Response) (res A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsGetSubscriptionPlanForAccountApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5947,23 +6638,28 @@ func decodeAppsGetSubscriptionPlanForAccountStubbedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MarketplacePurchase if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5977,23 +6673,28 @@ func decodeAppsGetSubscriptionPlanForAccountStubbedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6016,23 +6717,28 @@ func decodeAppsGetWebhookConfigForAppResponse(resp *http.Response) (res *Webhook } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WebhookConfig if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6052,23 +6758,28 @@ func decodeAppsGetWebhookDeliveryResponse(resp *http.Response) (res AppsGetWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response HookDelivery if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6082,23 +6793,28 @@ func decodeAppsGetWebhookDeliveryResponse(resp *http.Response) (res AppsGetWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6112,23 +6828,28 @@ func decodeAppsGetWebhookDeliveryResponse(resp *http.Response) (res AppsGetWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6148,12 +6869,12 @@ func decodeAppsListAccountsForPlanResponse(resp *http.Response) (res AppsListAcc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MarketplacePurchase if err := func() error { response = make([]MarketplacePurchase, 0) @@ -6167,12 +6888,17 @@ func decodeAppsListAccountsForPlanResponse(resp *http.Response) (res AppsListAcc }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AppsListAccountsForPlanOKHeaders wrapper.Response = response @@ -6224,23 +6950,28 @@ func decodeAppsListAccountsForPlanResponse(resp *http.Response) (res AppsListAcc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListAccountsForPlanApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6254,23 +6985,28 @@ func decodeAppsListAccountsForPlanResponse(resp *http.Response) (res AppsListAcc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListAccountsForPlanApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6284,23 +7020,28 @@ func decodeAppsListAccountsForPlanResponse(resp *http.Response) (res AppsListAcc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6320,12 +7061,12 @@ func decodeAppsListAccountsForPlanStubbedResponse(resp *http.Response) (res Apps } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MarketplacePurchase if err := func() error { response = make([]MarketplacePurchase, 0) @@ -6339,12 +7080,17 @@ func decodeAppsListAccountsForPlanStubbedResponse(resp *http.Response) (res Apps }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AppsListAccountsForPlanStubbedOKHeaders wrapper.Response = response @@ -6396,23 +7142,28 @@ func decodeAppsListAccountsForPlanStubbedResponse(resp *http.Response) (res Apps } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6432,23 +7183,28 @@ func decodeAppsListInstallationReposForAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListInstallationReposForAuthenticatedUserOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AppsListInstallationReposForAuthenticatedUserOKHeaders wrapper.Response = response @@ -6503,23 +7259,28 @@ func decodeAppsListInstallationReposForAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListInstallationReposForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6533,23 +7294,28 @@ func decodeAppsListInstallationReposForAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListInstallationReposForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6569,12 +7335,12 @@ func decodeAppsListPlansResponse(resp *http.Response) (res AppsListPlansRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MarketplaceListingPlan if err := func() error { response = make([]MarketplaceListingPlan, 0) @@ -6588,12 +7354,17 @@ func decodeAppsListPlansResponse(resp *http.Response) (res AppsListPlansRes, err }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AppsListPlansOKHeaders wrapper.Response = response @@ -6645,23 +7416,28 @@ func decodeAppsListPlansResponse(resp *http.Response) (res AppsListPlansRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListPlansApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6675,23 +7451,28 @@ func decodeAppsListPlansResponse(resp *http.Response) (res AppsListPlansRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListPlansApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6711,12 +7492,12 @@ func decodeAppsListPlansStubbedResponse(resp *http.Response) (res AppsListPlansS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MarketplaceListingPlan if err := func() error { response = make([]MarketplaceListingPlan, 0) @@ -6730,12 +7511,17 @@ func decodeAppsListPlansStubbedResponse(resp *http.Response) (res AppsListPlansS }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AppsListPlansStubbedOKHeaders wrapper.Response = response @@ -6787,23 +7573,28 @@ func decodeAppsListPlansStubbedResponse(resp *http.Response) (res AppsListPlansS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6823,23 +7614,28 @@ func decodeAppsListReposAccessibleToInstallationResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListReposAccessibleToInstallationOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AppsListReposAccessibleToInstallationOKHeaders wrapper.Response = response @@ -6894,23 +7690,28 @@ func decodeAppsListReposAccessibleToInstallationResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListReposAccessibleToInstallationApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6924,23 +7725,28 @@ func decodeAppsListReposAccessibleToInstallationResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListReposAccessibleToInstallationApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6960,12 +7766,12 @@ func decodeAppsListSubscriptionsForAuthenticatedUserResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []UserMarketplacePurchase if err := func() error { response = make([]UserMarketplacePurchase, 0) @@ -6979,12 +7785,17 @@ func decodeAppsListSubscriptionsForAuthenticatedUserResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AppsListSubscriptionsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -7039,23 +7850,28 @@ func decodeAppsListSubscriptionsForAuthenticatedUserResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListSubscriptionsForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7069,23 +7885,28 @@ func decodeAppsListSubscriptionsForAuthenticatedUserResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListSubscriptionsForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7105,12 +7926,12 @@ func decodeAppsListSubscriptionsForAuthenticatedUserStubbedResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []UserMarketplacePurchase if err := func() error { response = make([]UserMarketplacePurchase, 0) @@ -7124,12 +7945,17 @@ func decodeAppsListSubscriptionsForAuthenticatedUserStubbedResponse(resp *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AppsListSubscriptionsForAuthenticatedUserStubbedOKHeaders wrapper.Response = response @@ -7184,23 +8010,28 @@ func decodeAppsListSubscriptionsForAuthenticatedUserStubbedResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7220,23 +8051,28 @@ func decodeAppsListWebhookDeliveriesResponse(resp *http.Response) (res AppsListW } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsListWebhookDeliveriesOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7250,23 +8086,28 @@ func decodeAppsListWebhookDeliveriesResponse(resp *http.Response) (res AppsListW } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7280,23 +8121,28 @@ func decodeAppsListWebhookDeliveriesResponse(resp *http.Response) (res AppsListW } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7316,23 +8162,28 @@ func decodeAppsRedeliverWebhookDeliveryResponse(resp *http.Response) (res AppsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Accepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7346,23 +8197,28 @@ func decodeAppsRedeliverWebhookDeliveryResponse(resp *http.Response) (res AppsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7376,23 +8232,28 @@ func decodeAppsRedeliverWebhookDeliveryResponse(resp *http.Response) (res AppsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7418,23 +8279,28 @@ func decodeAppsRemoveRepoFromInstallationResponse(resp *http.Response) (res Apps } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsRemoveRepoFromInstallationApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7448,23 +8314,28 @@ func decodeAppsRemoveRepoFromInstallationResponse(resp *http.Response) (res Apps } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsRemoveRepoFromInstallationApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7484,23 +8355,28 @@ func decodeAppsResetTokenResponse(resp *http.Response) (res AppsResetTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7514,23 +8390,28 @@ func decodeAppsResetTokenResponse(resp *http.Response) (res AppsResetTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7559,23 +8440,28 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7589,23 +8475,28 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsScopeTokenApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7619,23 +8510,28 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsScopeTokenApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7649,23 +8545,28 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AppsScopeTokenApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7679,23 +8580,28 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7718,23 +8624,28 @@ func decodeAppsSuspendInstallationResponse(resp *http.Response) (res AppsSuspend } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7757,23 +8668,28 @@ func decodeAppsUnsuspendInstallationResponse(resp *http.Response) (res AppsUnsus } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7793,23 +8709,28 @@ func decodeAppsUpdateWebhookConfigForAppResponse(resp *http.Response) (res *Webh } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WebhookConfig if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7829,23 +8750,28 @@ func decodeBillingGetGithubActionsBillingGheResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsBillingUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7865,23 +8791,28 @@ func decodeBillingGetGithubActionsBillingOrgResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsBillingUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7901,23 +8832,28 @@ func decodeBillingGetGithubActionsBillingUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsBillingUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7937,23 +8873,28 @@ func decodeBillingGetGithubPackagesBillingGheResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesBillingUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7973,23 +8914,28 @@ func decodeBillingGetGithubPackagesBillingOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesBillingUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8009,23 +8955,28 @@ func decodeBillingGetGithubPackagesBillingUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesBillingUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8045,23 +8996,28 @@ func decodeBillingGetSharedStorageBillingGheResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CombinedBillingUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8081,23 +9037,28 @@ func decodeBillingGetSharedStorageBillingOrgResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CombinedBillingUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8117,23 +9078,28 @@ func decodeBillingGetSharedStorageBillingUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CombinedBillingUsage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8153,23 +9119,28 @@ func decodeChecksCreateSuiteResponse(resp *http.Response) (res ChecksCreateSuite } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ChecksCreateSuiteApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8183,23 +9154,28 @@ func decodeChecksCreateSuiteResponse(resp *http.Response) (res ChecksCreateSuite } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ChecksCreateSuiteApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8219,23 +9195,28 @@ func decodeChecksGetResponse(resp *http.Response) (res *CheckRun, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CheckRun if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8255,23 +9236,28 @@ func decodeChecksGetSuiteResponse(resp *http.Response) (res *CheckSuite, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CheckSuite if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8291,12 +9277,12 @@ func decodeChecksListAnnotationsResponse(resp *http.Response) (res *ChecksListAn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []CheckAnnotation if err := func() error { response = make([]CheckAnnotation, 0) @@ -8310,12 +9296,17 @@ func decodeChecksListAnnotationsResponse(resp *http.Response) (res *ChecksListAn }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ChecksListAnnotationsOKHeaders wrapper.Response = response @@ -8373,23 +9364,28 @@ func decodeChecksListForRefResponse(resp *http.Response) (res *ChecksListForRefO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ChecksListForRefOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ChecksListForRefOKHeaders wrapper.Response = response @@ -8447,23 +9443,28 @@ func decodeChecksListForSuiteResponse(resp *http.Response) (res *ChecksListForSu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ChecksListForSuiteOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ChecksListForSuiteOKHeaders wrapper.Response = response @@ -8521,23 +9522,28 @@ func decodeChecksListSuitesForRefResponse(resp *http.Response) (res *ChecksListS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ChecksListSuitesForRefOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ChecksListSuitesForRefOKHeaders wrapper.Response = response @@ -8595,23 +9601,28 @@ func decodeChecksRerequestSuiteResponse(resp *http.Response) (res *ChecksRereque } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ChecksRerequestSuiteCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8631,23 +9642,28 @@ func decodeChecksSetSuitesPreferencesResponse(resp *http.Response) (res *CheckSu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CheckSuitePreference if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8667,23 +9683,28 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningAnalysisDeletion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8697,23 +9718,28 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningDeleteAnalysisApplicationJSONBadRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8727,23 +9753,28 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningDeleteAnalysisApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8757,23 +9788,28 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningDeleteAnalysisApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8787,23 +9823,28 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8823,23 +9864,28 @@ func decodeCodeScanningGetAlertResponse(resp *http.Response) (res CodeScanningGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningAlert if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8853,23 +9899,28 @@ func decodeCodeScanningGetAlertResponse(resp *http.Response) (res CodeScanningGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningGetAlertApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8883,23 +9934,28 @@ func decodeCodeScanningGetAlertResponse(resp *http.Response) (res CodeScanningGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningGetAlertApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8913,23 +9969,28 @@ func decodeCodeScanningGetAlertResponse(resp *http.Response) (res CodeScanningGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8949,23 +10010,28 @@ func decodeCodeScanningGetAnalysisResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningAnalysis if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil case ct == "application/json+sarif": @@ -8988,23 +10054,28 @@ func decodeCodeScanningGetAnalysisResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningGetAnalysisApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9018,23 +10089,28 @@ func decodeCodeScanningGetAnalysisResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningGetAnalysisApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9048,23 +10124,28 @@ func decodeCodeScanningGetAnalysisResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9084,23 +10165,28 @@ func decodeCodeScanningGetSarifResponse(resp *http.Response) (res CodeScanningGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningSarifsStatus if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9114,23 +10200,28 @@ func decodeCodeScanningGetSarifResponse(resp *http.Response) (res CodeScanningGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9147,23 +10238,28 @@ func decodeCodeScanningGetSarifResponse(resp *http.Response) (res CodeScanningGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9183,23 +10279,28 @@ func decodeCodeScanningListAlertInstancesResponse(resp *http.Response) (res Code } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningListAlertInstancesOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9213,23 +10314,28 @@ func decodeCodeScanningListAlertInstancesResponse(resp *http.Response) (res Code } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningListAlertInstancesApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9243,23 +10349,28 @@ func decodeCodeScanningListAlertInstancesResponse(resp *http.Response) (res Code } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningListAlertInstancesApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9273,23 +10384,28 @@ func decodeCodeScanningListAlertInstancesResponse(resp *http.Response) (res Code } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9309,23 +10425,28 @@ func decodeCodeScanningListAlertsForRepoResponse(resp *http.Response) (res CodeS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningListAlertsForRepoOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9339,23 +10460,28 @@ func decodeCodeScanningListAlertsForRepoResponse(resp *http.Response) (res CodeS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningListAlertsForRepoApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9369,23 +10495,28 @@ func decodeCodeScanningListAlertsForRepoResponse(resp *http.Response) (res CodeS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningListAlertsForRepoApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9399,23 +10530,28 @@ func decodeCodeScanningListAlertsForRepoResponse(resp *http.Response) (res CodeS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9435,23 +10571,28 @@ func decodeCodeScanningListRecentAnalysesResponse(resp *http.Response) (res Code } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningListRecentAnalysesOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9465,23 +10606,28 @@ func decodeCodeScanningListRecentAnalysesResponse(resp *http.Response) (res Code } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningListRecentAnalysesApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9495,23 +10641,28 @@ func decodeCodeScanningListRecentAnalysesResponse(resp *http.Response) (res Code } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningListRecentAnalysesApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9525,23 +10676,28 @@ func decodeCodeScanningListRecentAnalysesResponse(resp *http.Response) (res Code } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9561,23 +10717,28 @@ func decodeCodeScanningUpdateAlertResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningAlert if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9591,23 +10752,28 @@ func decodeCodeScanningUpdateAlertResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningUpdateAlertApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9621,23 +10787,28 @@ func decodeCodeScanningUpdateAlertResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningUpdateAlertApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9651,23 +10822,28 @@ func decodeCodeScanningUpdateAlertResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9687,23 +10863,28 @@ func decodeCodeScanningUploadSarifResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningSarifsReceipt if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9720,23 +10901,28 @@ func decodeCodeScanningUploadSarifResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningUploadSarifApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9750,23 +10936,28 @@ func decodeCodeScanningUploadSarifResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeScanningUploadSarifApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9783,23 +10974,28 @@ func decodeCodeScanningUploadSarifResponse(resp *http.Response) (res CodeScannin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9819,23 +11015,28 @@ func decodeCodesOfConductGetAllCodesOfConductResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodesOfConductGetAllCodesOfConductOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9858,23 +11059,28 @@ func decodeCodesOfConductGetConductCodeResponse(resp *http.Response) (res CodesO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CodeOfConduct if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9891,23 +11097,28 @@ func decodeCodesOfConductGetConductCodeResponse(resp *http.Response) (res CodesO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9927,23 +11138,28 @@ func decodeEmojisGetResponse(resp *http.Response) (res EmojisGetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EmojisGetOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9984,23 +11200,28 @@ func decodeEnterpriseAdminCreateRegistrationTokenForEnterpriseResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AuthenticationToken if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10020,23 +11241,28 @@ func decodeEnterpriseAdminCreateRemoveTokenForEnterpriseResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response AuthenticationToken if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10056,23 +11282,28 @@ func decodeEnterpriseAdminCreateSelfHostedRunnerGroupForEnterpriseResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RunnerGroupsEnterprise if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10146,23 +11377,28 @@ func decodeEnterpriseAdminGetAllowedActionsEnterpriseResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SelectedActions if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10182,12 +11418,12 @@ func decodeEnterpriseAdminGetAuditLogResponse(resp *http.Response) (res []AuditL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []AuditLogEvent if err := func() error { response = make([]AuditLogEvent, 0) @@ -10201,12 +11437,17 @@ func decodeEnterpriseAdminGetAuditLogResponse(resp *http.Response) (res []AuditL }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -10226,23 +11467,28 @@ func decodeEnterpriseAdminGetGithubActionsPermissionsEnterpriseResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ActionsEnterprisePermissions if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10262,23 +11508,28 @@ func decodeEnterpriseAdminGetProvisioningInformationForEnterpriseGroupResponse(r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimEnterpriseGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10298,23 +11549,28 @@ func decodeEnterpriseAdminGetProvisioningInformationForEnterpriseUserResponse(re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimEnterpriseUser if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10334,23 +11590,28 @@ func decodeEnterpriseAdminGetSelfHostedRunnerForEnterpriseResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Runner if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10370,23 +11631,28 @@ func decodeEnterpriseAdminGetSelfHostedRunnerGroupForEnterpriseResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RunnerGroupsEnterprise if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10406,23 +11672,28 @@ func decodeEnterpriseAdminListOrgAccessToSelfHostedRunnerGroupInEnterpriseRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EnterpriseAdminListOrgAccessToSelfHostedRunnerGroupInEnterpriseOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10442,23 +11713,28 @@ func decodeEnterpriseAdminListProvisionedGroupsEnterpriseResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimGroupListEnterprise if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10478,23 +11754,28 @@ func decodeEnterpriseAdminListProvisionedIdentitiesEnterpriseResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimUserListEnterprise if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10514,12 +11795,12 @@ func decodeEnterpriseAdminListRunnerApplicationsForEnterpriseResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []RunnerApplication if err := func() error { response = make([]RunnerApplication, 0) @@ -10533,12 +11814,17 @@ func decodeEnterpriseAdminListRunnerApplicationsForEnterpriseResponse(resp *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -10558,23 +11844,28 @@ func decodeEnterpriseAdminListSelectedOrganizationsEnabledGithubActionsEnterpris } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EnterpriseAdminListSelectedOrganizationsEnabledGithubActionsEnterpriseOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10594,23 +11885,28 @@ func decodeEnterpriseAdminListSelfHostedRunnerGroupsForEnterpriseResponse(resp * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EnterpriseAdminListSelfHostedRunnerGroupsForEnterpriseOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10630,23 +11926,28 @@ func decodeEnterpriseAdminListSelfHostedRunnersForEnterpriseResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EnterpriseAdminListSelfHostedRunnersForEnterpriseOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper EnterpriseAdminListSelfHostedRunnersForEnterpriseOKHeaders wrapper.Response = response @@ -10704,23 +12005,28 @@ func decodeEnterpriseAdminListSelfHostedRunnersInGroupForEnterpriseResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EnterpriseAdminListSelfHostedRunnersInGroupForEnterpriseOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper EnterpriseAdminListSelfHostedRunnersInGroupForEnterpriseOKHeaders wrapper.Response = response @@ -10778,23 +12084,28 @@ func decodeEnterpriseAdminProvisionAndInviteEnterpriseGroupResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimEnterpriseGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10814,23 +12125,28 @@ func decodeEnterpriseAdminProvisionAndInviteEnterpriseUserResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimEnterpriseUser if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10886,23 +12202,28 @@ func decodeEnterpriseAdminSetInformationForProvisionedEnterpriseGroupResponse(re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimEnterpriseGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10922,23 +12243,28 @@ func decodeEnterpriseAdminSetInformationForProvisionedEnterpriseUserResponse(res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimEnterpriseUser if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10985,23 +12311,28 @@ func decodeEnterpriseAdminUpdateAttributeForEnterpriseGroupResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimEnterpriseGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11021,23 +12352,28 @@ func decodeEnterpriseAdminUpdateAttributeForEnterpriseUserResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimEnterpriseUser if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11057,23 +12393,28 @@ func decodeEnterpriseAdminUpdateSelfHostedRunnerGroupForEnterpriseResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RunnerGroupsEnterprise if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11099,23 +12440,28 @@ func decodeGistsCheckIsStarredResponse(resp *http.Response) (res GistsCheckIsSta } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11129,23 +12475,28 @@ func decodeGistsCheckIsStarredResponse(resp *http.Response) (res GistsCheckIsSta } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsCheckIsStarredNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11165,23 +12516,28 @@ func decodeGistsCreateResponse(resp *http.Response) (res GistsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GistSimpleHeaders wrapper.Response = response @@ -11236,23 +12592,28 @@ func decodeGistsCreateResponse(resp *http.Response) (res GistsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsCreateApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11266,23 +12627,28 @@ func decodeGistsCreateResponse(resp *http.Response) (res GistsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsCreateApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11296,23 +12662,28 @@ func decodeGistsCreateResponse(resp *http.Response) (res GistsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11332,23 +12703,28 @@ func decodeGistsCreateCommentResponse(resp *http.Response) (res GistsCreateComme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GistCommentHeaders wrapper.Response = response @@ -11403,23 +12779,28 @@ func decodeGistsCreateCommentResponse(resp *http.Response) (res GistsCreateComme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsCreateCommentApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11433,23 +12814,28 @@ func decodeGistsCreateCommentResponse(resp *http.Response) (res GistsCreateComme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsCreateCommentApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11475,23 +12861,28 @@ func decodeGistsDeleteResponse(resp *http.Response) (res GistsDeleteRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsDeleteApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11505,23 +12896,28 @@ func decodeGistsDeleteResponse(resp *http.Response) (res GistsDeleteRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsDeleteApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11547,23 +12943,28 @@ func decodeGistsDeleteCommentResponse(resp *http.Response) (res GistsDeleteComme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsDeleteCommentApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11577,23 +12978,28 @@ func decodeGistsDeleteCommentResponse(resp *http.Response) (res GistsDeleteComme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsDeleteCommentApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11613,23 +13019,28 @@ func decodeGistsForkResponse(resp *http.Response) (res GistsForkRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BaseGist if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper BaseGistHeaders wrapper.Response = response @@ -11684,23 +13095,28 @@ func decodeGistsForkResponse(resp *http.Response) (res GistsForkRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsForkApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11714,23 +13130,28 @@ func decodeGistsForkResponse(resp *http.Response) (res GistsForkRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsForkApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11744,23 +13165,28 @@ func decodeGistsForkResponse(resp *http.Response) (res GistsForkRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11780,23 +13206,28 @@ func decodeGistsGetResponse(resp *http.Response) (res GistsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11813,23 +13244,28 @@ func decodeGistsGetResponse(resp *http.Response) (res GistsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ForbiddenGist if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11843,23 +13279,28 @@ func decodeGistsGetResponse(resp *http.Response) (res GistsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11879,23 +13320,28 @@ func decodeGistsGetCommentResponse(resp *http.Response) (res GistsGetCommentRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11912,23 +13358,28 @@ func decodeGistsGetCommentResponse(resp *http.Response) (res GistsGetCommentRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ForbiddenGist if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11942,23 +13393,28 @@ func decodeGistsGetCommentResponse(resp *http.Response) (res GistsGetCommentRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11978,23 +13434,28 @@ func decodeGistsGetRevisionResponse(resp *http.Response) (res GistsGetRevisionRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12008,23 +13469,28 @@ func decodeGistsGetRevisionResponse(resp *http.Response) (res GistsGetRevisionRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsGetRevisionApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12038,23 +13504,28 @@ func decodeGistsGetRevisionResponse(resp *http.Response) (res GistsGetRevisionRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsGetRevisionApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12068,23 +13539,28 @@ func decodeGistsGetRevisionResponse(resp *http.Response) (res GistsGetRevisionRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12104,12 +13580,12 @@ func decodeGistsListResponse(resp *http.Response) (res GistsListRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []BaseGist if err := func() error { response = make([]BaseGist, 0) @@ -12123,12 +13599,17 @@ func decodeGistsListResponse(resp *http.Response) (res GistsListRes, err error) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GistsListOKHeaders wrapper.Response = response @@ -12183,23 +13664,28 @@ func decodeGistsListResponse(resp *http.Response) (res GistsListRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12219,12 +13705,12 @@ func decodeGistsListCommentsResponse(resp *http.Response) (res GistsListComments } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []GistComment if err := func() error { response = make([]GistComment, 0) @@ -12238,12 +13724,17 @@ func decodeGistsListCommentsResponse(resp *http.Response) (res GistsListComments }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GistsListCommentsOKHeaders wrapper.Response = response @@ -12298,23 +13789,28 @@ func decodeGistsListCommentsResponse(resp *http.Response) (res GistsListComments } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsListCommentsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12328,23 +13824,28 @@ func decodeGistsListCommentsResponse(resp *http.Response) (res GistsListComments } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsListCommentsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12364,12 +13865,12 @@ func decodeGistsListCommitsResponse(resp *http.Response) (res GistsListCommitsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []GistCommit if err := func() error { response = make([]GistCommit, 0) @@ -12383,12 +13884,17 @@ func decodeGistsListCommitsResponse(resp *http.Response) (res GistsListCommitsRe }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GistsListCommitsOKHeaders wrapper.Response = response @@ -12443,23 +13949,28 @@ func decodeGistsListCommitsResponse(resp *http.Response) (res GistsListCommitsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsListCommitsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12473,23 +13984,28 @@ func decodeGistsListCommitsResponse(resp *http.Response) (res GistsListCommitsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsListCommitsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12509,12 +14025,12 @@ func decodeGistsListForUserResponse(resp *http.Response) (res GistsListForUserRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []BaseGist if err := func() error { response = make([]BaseGist, 0) @@ -12528,12 +14044,17 @@ func decodeGistsListForUserResponse(resp *http.Response) (res GistsListForUserRe }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GistsListForUserOKHeaders wrapper.Response = response @@ -12585,23 +14106,28 @@ func decodeGistsListForUserResponse(resp *http.Response) (res GistsListForUserRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12621,12 +14147,12 @@ func decodeGistsListForksResponse(resp *http.Response) (res GistsListForksRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []GistSimple if err := func() error { response = make([]GistSimple, 0) @@ -12640,12 +14166,17 @@ func decodeGistsListForksResponse(resp *http.Response) (res GistsListForksRes, e }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GistsListForksOKHeaders wrapper.Response = response @@ -12700,23 +14231,28 @@ func decodeGistsListForksResponse(resp *http.Response) (res GistsListForksRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsListForksApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12730,23 +14266,28 @@ func decodeGistsListForksResponse(resp *http.Response) (res GistsListForksRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsListForksApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12766,12 +14307,12 @@ func decodeGistsListPublicResponse(resp *http.Response) (res GistsListPublicRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []BaseGist if err := func() error { response = make([]BaseGist, 0) @@ -12785,12 +14326,17 @@ func decodeGistsListPublicResponse(resp *http.Response) (res GistsListPublicRes, }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GistsListPublicOKHeaders wrapper.Response = response @@ -12845,23 +14391,28 @@ func decodeGistsListPublicResponse(resp *http.Response) (res GistsListPublicRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12875,23 +14426,28 @@ func decodeGistsListPublicResponse(resp *http.Response) (res GistsListPublicRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12911,12 +14467,12 @@ func decodeGistsListStarredResponse(resp *http.Response) (res GistsListStarredRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []BaseGist if err := func() error { response = make([]BaseGist, 0) @@ -12930,12 +14486,17 @@ func decodeGistsListStarredResponse(resp *http.Response) (res GistsListStarredRe }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GistsListStarredOKHeaders wrapper.Response = response @@ -12990,23 +14551,28 @@ func decodeGistsListStarredResponse(resp *http.Response) (res GistsListStarredRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsListStarredApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13020,23 +14586,28 @@ func decodeGistsListStarredResponse(resp *http.Response) (res GistsListStarredRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsListStarredApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13062,23 +14633,28 @@ func decodeGistsStarResponse(resp *http.Response) (res GistsStarRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsStarApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13092,23 +14668,28 @@ func decodeGistsStarResponse(resp *http.Response) (res GistsStarRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsStarApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13134,23 +14715,28 @@ func decodeGistsUnstarResponse(resp *http.Response) (res GistsUnstarRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsUnstarApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13164,23 +14750,28 @@ func decodeGistsUnstarResponse(resp *http.Response) (res GistsUnstarRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistsUnstarApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13200,23 +14791,28 @@ func decodeGistsUpdateCommentResponse(resp *http.Response) (res GistsUpdateComme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GistComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13230,23 +14826,28 @@ func decodeGistsUpdateCommentResponse(resp *http.Response) (res GistsUpdateComme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13266,23 +14867,28 @@ func decodeGitCreateBlobResponse(resp *http.Response) (res GitCreateBlobRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ShortBlob if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ShortBlobHeaders wrapper.Response = response @@ -13334,23 +14940,28 @@ func decodeGitCreateBlobResponse(resp *http.Response) (res GitCreateBlobRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitCreateBlobApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13364,23 +14975,28 @@ func decodeGitCreateBlobResponse(resp *http.Response) (res GitCreateBlobRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitCreateBlobApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13394,158 +15010,29 @@ func decodeGitCreateBlobResponse(resp *http.Response) (res GitCreateBlobRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitCreateBlobApplicationJSONConflict if err := func() error { if err := response.Decode(d); err != nil { return err } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 422: - // Code 422. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - - d := jx.DecodeBytes(b) - var response ValidationError - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeGitCreateCommitResponse(resp *http.Response) (res GitCreateCommitRes, err error) { - switch resp.StatusCode { - case 201: - // Code 201. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - - d := jx.DecodeBytes(b) - var response GitCommit - if err := func() error { - if err := response.Decode(d); err != nil { - return err + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper GitCommitHeaders - wrapper.Response = response - h := uri.NewHeaderDecoder(resp.Header) - // Parse "Location" header. - { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "Location", - Explode: false, - } - if err := func() error { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - var wrapperDotLocationVal string - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - wrapperDotLocationVal = c - return nil - }(); err != nil { - return err - } - wrapper.Location.SetTo(wrapperDotLocationVal) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "parse Location header") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, } - } - return &wrapper, nil - default: - return res, validate.InvalidContentType(ct) - } - case 404: - // Code 404. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { return res, err } - - d := jx.DecodeBytes(b) - var response BasicError - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } return &response, nil default: return res, validate.InvalidContentType(ct) @@ -13558,23 +15045,177 @@ func decodeGitCreateCommitResponse(resp *http.Response) (res GitCreateCommitRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeGitCreateCommitResponse(resp *http.Response) (res GitCreateCommitRes, err error) { + switch resp.StatusCode { + case 201: + // Code 201. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response GitCommit + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + var wrapper GitCommitHeaders + wrapper.Response = response + h := uri.NewHeaderDecoder(resp.Header) + // Parse "Location" header. + { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "Location", + Explode: false, + } + if err := func() error { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + var wrapperDotLocationVal string + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + wrapperDotLocationVal = c + return nil + }(); err != nil { + return err + } + wrapper.Location.SetTo(wrapperDotLocationVal) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "parse Location header") + } + } + return &wrapper, nil + default: + return res, validate.InvalidContentType(ct) + } + case 404: + // Code 404. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response BasicError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 422: + // Code 422. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + + d := jx.DecodeBytes(buf) + var response ValidationError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13594,23 +15235,28 @@ func decodeGitCreateRefResponse(resp *http.Response) (res GitCreateRefRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitRef if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GitRefHeaders wrapper.Response = response @@ -13662,23 +15308,28 @@ func decodeGitCreateRefResponse(resp *http.Response) (res GitCreateRefRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13698,23 +15349,28 @@ func decodeGitCreateTagResponse(resp *http.Response) (res GitCreateTagRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitTag if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GitTagHeaders wrapper.Response = response @@ -13766,23 +15422,28 @@ func decodeGitCreateTagResponse(resp *http.Response) (res GitCreateTagRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13802,23 +15463,28 @@ func decodeGitCreateTreeResponse(resp *http.Response) (res GitCreateTreeRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitTree if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GitTreeHeaders wrapper.Response = response @@ -13870,23 +15536,28 @@ func decodeGitCreateTreeResponse(resp *http.Response) (res GitCreateTreeRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitCreateTreeApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13900,23 +15571,28 @@ func decodeGitCreateTreeResponse(resp *http.Response) (res GitCreateTreeRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitCreateTreeApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13930,23 +15606,28 @@ func decodeGitCreateTreeResponse(resp *http.Response) (res GitCreateTreeRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13969,23 +15650,28 @@ func decodeGitDeleteRefResponse(resp *http.Response) (res GitDeleteRefRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14005,23 +15691,28 @@ func decodeGitGetBlobResponse(resp *http.Response) (res GitGetBlobRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Blob if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14035,23 +15726,28 @@ func decodeGitGetBlobResponse(resp *http.Response) (res GitGetBlobRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitGetBlobApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14065,23 +15761,28 @@ func decodeGitGetBlobResponse(resp *http.Response) (res GitGetBlobRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitGetBlobApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14095,23 +15796,28 @@ func decodeGitGetBlobResponse(resp *http.Response) (res GitGetBlobRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14131,23 +15837,28 @@ func decodeGitGetCommitResponse(resp *http.Response) (res GitGetCommitRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitCommit if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14161,23 +15872,28 @@ func decodeGitGetCommitResponse(resp *http.Response) (res GitGetCommitRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14197,23 +15913,28 @@ func decodeGitGetRefResponse(resp *http.Response) (res GitGetRefRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitRef if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14227,23 +15948,28 @@ func decodeGitGetRefResponse(resp *http.Response) (res GitGetRefRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14263,23 +15989,28 @@ func decodeGitGetTagResponse(resp *http.Response) (res GitGetTagRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitTag if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14293,23 +16024,28 @@ func decodeGitGetTagResponse(resp *http.Response) (res GitGetTagRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14329,23 +16065,28 @@ func decodeGitGetTreeResponse(resp *http.Response) (res GitGetTreeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitTree if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14359,23 +16100,28 @@ func decodeGitGetTreeResponse(resp *http.Response) (res GitGetTreeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14389,23 +16135,28 @@ func decodeGitGetTreeResponse(resp *http.Response) (res GitGetTreeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14425,12 +16176,12 @@ func decodeGitListMatchingRefsResponse(resp *http.Response) (res *GitListMatchin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []GitRef if err := func() error { response = make([]GitRef, 0) @@ -14444,12 +16195,17 @@ func decodeGitListMatchingRefsResponse(resp *http.Response) (res *GitListMatchin }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GitListMatchingRefsOKHeaders wrapper.Response = response @@ -14507,23 +16263,28 @@ func decodeGitUpdateRefResponse(resp *http.Response) (res GitUpdateRefRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitRef if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14537,23 +16298,28 @@ func decodeGitUpdateRefResponse(resp *http.Response) (res GitUpdateRefRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14573,23 +16339,28 @@ func decodeGitignoreGetAllTemplatesResponse(resp *http.Response) (res GitignoreG } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitignoreGetAllTemplatesOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14612,23 +16383,28 @@ func decodeGitignoreGetTemplateResponse(resp *http.Response) (res GitignoreGetTe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GitignoreTemplate if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14681,23 +16457,28 @@ func decodeInteractionsSetRestrictionsForAuthenticatedUserResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response InteractionLimitResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14711,23 +16492,28 @@ func decodeInteractionsSetRestrictionsForAuthenticatedUserResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14747,23 +16533,28 @@ func decodeInteractionsSetRestrictionsForOrgResponse(resp *http.Response) (res I } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response InteractionLimitResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14777,23 +16568,28 @@ func decodeInteractionsSetRestrictionsForOrgResponse(resp *http.Response) (res I } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14813,23 +16609,28 @@ func decodeInteractionsSetRestrictionsForRepoResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response InteractionLimitResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14852,23 +16653,28 @@ func decodeIssuesAddAssigneesResponse(resp *http.Response) (res *IssueSimple, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssueSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14891,23 +16697,28 @@ func decodeIssuesCheckUserCanBeAssignedResponse(resp *http.Response) (res Issues } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14927,23 +16738,28 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Issue if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssueHeaders wrapper.Response = response @@ -14995,23 +16811,28 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesCreateApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15025,23 +16846,28 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesCreateApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15055,23 +16881,28 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesCreateApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15085,23 +16916,28 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15115,23 +16951,28 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15151,23 +16992,28 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssueComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssueCommentHeaders wrapper.Response = response @@ -15219,23 +17065,28 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesCreateCommentApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15249,23 +17100,28 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesCreateCommentApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15279,23 +17135,28 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesCreateCommentApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15309,23 +17170,28 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15345,23 +17211,28 @@ func decodeIssuesCreateLabelResponse(resp *http.Response) (res IssuesCreateLabel } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Label if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper LabelHeaders wrapper.Response = response @@ -15413,23 +17284,28 @@ func decodeIssuesCreateLabelResponse(resp *http.Response) (res IssuesCreateLabel } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15443,23 +17319,28 @@ func decodeIssuesCreateLabelResponse(resp *http.Response) (res IssuesCreateLabel } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15479,23 +17360,28 @@ func decodeIssuesCreateMilestoneResponse(resp *http.Response) (res IssuesCreateM } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Milestone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper MilestoneHeaders wrapper.Response = response @@ -15547,23 +17433,28 @@ func decodeIssuesCreateMilestoneResponse(resp *http.Response) (res IssuesCreateM } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15577,23 +17468,28 @@ func decodeIssuesCreateMilestoneResponse(resp *http.Response) (res IssuesCreateM } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15634,23 +17530,28 @@ func decodeIssuesDeleteMilestoneResponse(resp *http.Response) (res IssuesDeleteM } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15670,23 +17571,28 @@ func decodeIssuesGetResponse(resp *http.Response) (res IssuesGetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Issue if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15700,23 +17606,28 @@ func decodeIssuesGetResponse(resp *http.Response) (res IssuesGetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesGetApplicationJSONMovedPermanently if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15733,23 +17644,28 @@ func decodeIssuesGetResponse(resp *http.Response) (res IssuesGetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesGetApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15763,23 +17679,28 @@ func decodeIssuesGetResponse(resp *http.Response) (res IssuesGetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesGetApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15799,23 +17720,28 @@ func decodeIssuesGetCommentResponse(resp *http.Response) (res IssuesGetCommentRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssueComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15829,23 +17755,28 @@ func decodeIssuesGetCommentResponse(resp *http.Response) (res IssuesGetCommentRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15865,23 +17796,28 @@ func decodeIssuesGetEventResponse(resp *http.Response) (res IssuesGetEventRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssueEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15895,23 +17831,28 @@ func decodeIssuesGetEventResponse(resp *http.Response) (res IssuesGetEventRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesGetEventApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15925,23 +17866,28 @@ func decodeIssuesGetEventResponse(resp *http.Response) (res IssuesGetEventRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesGetEventApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15955,23 +17901,28 @@ func decodeIssuesGetEventResponse(resp *http.Response) (res IssuesGetEventRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesGetEventApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15991,23 +17942,28 @@ func decodeIssuesGetLabelResponse(resp *http.Response) (res IssuesGetLabelRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Label if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16021,23 +17977,28 @@ func decodeIssuesGetLabelResponse(resp *http.Response) (res IssuesGetLabelRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16057,23 +18018,28 @@ func decodeIssuesGetMilestoneResponse(resp *http.Response) (res IssuesGetMilesto } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Milestone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16087,23 +18053,28 @@ func decodeIssuesGetMilestoneResponse(resp *http.Response) (res IssuesGetMilesto } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16123,12 +18094,12 @@ func decodeIssuesListResponse(resp *http.Response) (res IssuesListRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Issue if err := func() error { response = make([]Issue, 0) @@ -16142,12 +18113,17 @@ func decodeIssuesListResponse(resp *http.Response) (res IssuesListRes, err error }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListOKHeaders wrapper.Response = response @@ -16202,23 +18178,28 @@ func decodeIssuesListResponse(resp *http.Response) (res IssuesListRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16232,23 +18213,28 @@ func decodeIssuesListResponse(resp *http.Response) (res IssuesListRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16268,12 +18254,12 @@ func decodeIssuesListAssigneesResponse(resp *http.Response) (res IssuesListAssig } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -16287,12 +18273,17 @@ func decodeIssuesListAssigneesResponse(resp *http.Response) (res IssuesListAssig }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListAssigneesOKHeaders wrapper.Response = response @@ -16344,23 +18335,28 @@ func decodeIssuesListAssigneesResponse(resp *http.Response) (res IssuesListAssig } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16380,12 +18376,12 @@ func decodeIssuesListCommentsResponse(resp *http.Response) (res IssuesListCommen } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []IssueComment if err := func() error { response = make([]IssueComment, 0) @@ -16399,12 +18395,17 @@ func decodeIssuesListCommentsResponse(resp *http.Response) (res IssuesListCommen }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListCommentsOKHeaders wrapper.Response = response @@ -16456,23 +18457,28 @@ func decodeIssuesListCommentsResponse(resp *http.Response) (res IssuesListCommen } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesListCommentsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16486,23 +18492,28 @@ func decodeIssuesListCommentsResponse(resp *http.Response) (res IssuesListCommen } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesListCommentsApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16522,12 +18533,12 @@ func decodeIssuesListCommentsForRepoResponse(resp *http.Response) (res IssuesLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []IssueComment if err := func() error { response = make([]IssueComment, 0) @@ -16541,12 +18552,17 @@ func decodeIssuesListCommentsForRepoResponse(resp *http.Response) (res IssuesLis }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListCommentsForRepoOKHeaders wrapper.Response = response @@ -16598,23 +18614,28 @@ func decodeIssuesListCommentsForRepoResponse(resp *http.Response) (res IssuesLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16628,23 +18649,28 @@ func decodeIssuesListCommentsForRepoResponse(resp *http.Response) (res IssuesLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16664,12 +18690,12 @@ func decodeIssuesListEventsForRepoResponse(resp *http.Response) (res IssuesListE } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []IssueEvent if err := func() error { response = make([]IssueEvent, 0) @@ -16683,12 +18709,17 @@ func decodeIssuesListEventsForRepoResponse(resp *http.Response) (res IssuesListE }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListEventsForRepoOKHeaders wrapper.Response = response @@ -16740,23 +18771,28 @@ func decodeIssuesListEventsForRepoResponse(resp *http.Response) (res IssuesListE } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16776,12 +18812,12 @@ func decodeIssuesListForAuthenticatedUserResponse(resp *http.Response) (res Issu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Issue if err := func() error { response = make([]Issue, 0) @@ -16795,12 +18831,17 @@ func decodeIssuesListForAuthenticatedUserResponse(resp *http.Response) (res Issu }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListForAuthenticatedUserOKHeaders wrapper.Response = response @@ -16855,23 +18896,28 @@ func decodeIssuesListForAuthenticatedUserResponse(resp *http.Response) (res Issu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16891,12 +18937,12 @@ func decodeIssuesListForOrgResponse(resp *http.Response) (res IssuesListForOrgRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Issue if err := func() error { response = make([]Issue, 0) @@ -16910,12 +18956,17 @@ func decodeIssuesListForOrgResponse(resp *http.Response) (res IssuesListForOrgRe }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListForOrgOKHeaders wrapper.Response = response @@ -16967,23 +19018,28 @@ func decodeIssuesListForOrgResponse(resp *http.Response) (res IssuesListForOrgRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17003,12 +19059,12 @@ func decodeIssuesListForRepoResponse(resp *http.Response) (res IssuesListForRepo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []IssueSimple if err := func() error { response = make([]IssueSimple, 0) @@ -17022,12 +19078,17 @@ func decodeIssuesListForRepoResponse(resp *http.Response) (res IssuesListForRepo }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListForRepoOKHeaders wrapper.Response = response @@ -17079,23 +19140,28 @@ func decodeIssuesListForRepoResponse(resp *http.Response) (res IssuesListForRepo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesListForRepoApplicationJSONMovedPermanently if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17109,23 +19175,28 @@ func decodeIssuesListForRepoResponse(resp *http.Response) (res IssuesListForRepo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesListForRepoApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17139,23 +19210,28 @@ func decodeIssuesListForRepoResponse(resp *http.Response) (res IssuesListForRepo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17175,12 +19251,12 @@ func decodeIssuesListLabelsForMilestoneResponse(resp *http.Response) (res *Issue } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Label if err := func() error { response = make([]Label, 0) @@ -17194,12 +19270,17 @@ func decodeIssuesListLabelsForMilestoneResponse(resp *http.Response) (res *Issue }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListLabelsForMilestoneOKHeaders wrapper.Response = response @@ -17257,12 +19338,12 @@ func decodeIssuesListLabelsForRepoResponse(resp *http.Response) (res IssuesListL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Label if err := func() error { response = make([]Label, 0) @@ -17276,12 +19357,17 @@ func decodeIssuesListLabelsForRepoResponse(resp *http.Response) (res IssuesListL }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListLabelsForRepoOKHeaders wrapper.Response = response @@ -17333,23 +19419,28 @@ func decodeIssuesListLabelsForRepoResponse(resp *http.Response) (res IssuesListL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17369,12 +19460,12 @@ func decodeIssuesListLabelsOnIssueResponse(resp *http.Response) (res IssuesListL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Label if err := func() error { response = make([]Label, 0) @@ -17388,12 +19479,17 @@ func decodeIssuesListLabelsOnIssueResponse(resp *http.Response) (res IssuesListL }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListLabelsOnIssueOKHeaders wrapper.Response = response @@ -17445,23 +19541,28 @@ func decodeIssuesListLabelsOnIssueResponse(resp *http.Response) (res IssuesListL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17481,12 +19582,12 @@ func decodeIssuesListMilestonesResponse(resp *http.Response) (res IssuesListMile } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Milestone if err := func() error { response = make([]Milestone, 0) @@ -17500,12 +19601,17 @@ func decodeIssuesListMilestonesResponse(resp *http.Response) (res IssuesListMile }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper IssuesListMilestonesOKHeaders wrapper.Response = response @@ -17557,23 +19663,28 @@ func decodeIssuesListMilestonesResponse(resp *http.Response) (res IssuesListMile } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17596,23 +19707,28 @@ func decodeIssuesLockResponse(resp *http.Response) (res IssuesLockRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesLockApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17626,23 +19742,28 @@ func decodeIssuesLockResponse(resp *http.Response) (res IssuesLockRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesLockApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17656,23 +19777,28 @@ func decodeIssuesLockResponse(resp *http.Response) (res IssuesLockRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesLockApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17686,23 +19812,28 @@ func decodeIssuesLockResponse(resp *http.Response) (res IssuesLockRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17725,23 +19856,28 @@ func decodeIssuesRemoveAllLabelsResponse(resp *http.Response) (res IssuesRemoveA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17761,23 +19897,28 @@ func decodeIssuesRemoveAssigneesResponse(resp *http.Response) (res *IssueSimple, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssueSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17797,23 +19938,28 @@ func decodeIssuesRemoveLabelResponse(resp *http.Response) (res IssuesRemoveLabel } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesRemoveLabelOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17827,23 +19973,28 @@ func decodeIssuesRemoveLabelResponse(resp *http.Response) (res IssuesRemoveLabel } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesRemoveLabelApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17857,23 +20008,28 @@ func decodeIssuesRemoveLabelResponse(resp *http.Response) (res IssuesRemoveLabel } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesRemoveLabelApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17896,23 +20052,28 @@ func decodeIssuesUnlockResponse(resp *http.Response) (res IssuesUnlockRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesUnlockApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17926,23 +20087,28 @@ func decodeIssuesUnlockResponse(resp *http.Response) (res IssuesUnlockRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesUnlockApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17962,23 +20128,28 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Issue if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17992,23 +20163,28 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesUpdateApplicationJSONMovedPermanently if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18022,23 +20198,28 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesUpdateApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18052,23 +20233,28 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesUpdateApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18082,23 +20268,28 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssuesUpdateApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18112,23 +20303,28 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18142,23 +20338,28 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18178,23 +20379,28 @@ func decodeIssuesUpdateCommentResponse(resp *http.Response) (res IssuesUpdateCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IssueComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18208,23 +20414,28 @@ func decodeIssuesUpdateCommentResponse(resp *http.Response) (res IssuesUpdateCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18244,23 +20455,28 @@ func decodeIssuesUpdateLabelResponse(resp *http.Response) (res *Label, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Label if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18280,23 +20496,28 @@ func decodeIssuesUpdateMilestoneResponse(resp *http.Response) (res *Milestone, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Milestone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18316,23 +20537,28 @@ func decodeLicensesGetResponse(resp *http.Response) (res LicensesGetRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response License if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18349,23 +20575,28 @@ func decodeLicensesGetResponse(resp *http.Response) (res LicensesGetRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response LicensesGetApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18379,23 +20610,28 @@ func decodeLicensesGetResponse(resp *http.Response) (res LicensesGetRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response LicensesGetApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18415,23 +20651,28 @@ func decodeLicensesGetAllCommonlyUsedResponse(resp *http.Response) (res Licenses } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response LicensesGetAllCommonlyUsedOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18454,23 +20695,28 @@ func decodeLicensesGetForRepoResponse(resp *http.Response) (res *LicenseContent, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response LicenseContent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18657,23 +20903,28 @@ func decodeMetaGetResponse(resp *http.Response) (res MetaGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response APIOverview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18746,23 +20997,28 @@ func decodeMetaRootResponse(resp *http.Response) (res *MetaRootOK, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MetaRootOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18797,23 +21053,28 @@ func decodeMigrationsDeleteArchiveForAuthenticatedUserResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsDeleteArchiveForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18827,23 +21088,28 @@ func decodeMigrationsDeleteArchiveForAuthenticatedUserResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsDeleteArchiveForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18857,23 +21123,28 @@ func decodeMigrationsDeleteArchiveForAuthenticatedUserResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsDeleteArchiveForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18896,23 +21167,28 @@ func decodeMigrationsDeleteArchiveForOrgResponse(resp *http.Response) (res Migra } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18935,23 +21211,28 @@ func decodeMigrationsDownloadArchiveForOrgResponse(resp *http.Response) (res Mig } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18977,23 +21258,28 @@ func decodeMigrationsGetArchiveForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsGetArchiveForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19007,23 +21293,28 @@ func decodeMigrationsGetArchiveForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsGetArchiveForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19043,23 +21334,28 @@ func decodeMigrationsGetCommitAuthorsResponse(resp *http.Response) (res Migratio } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsGetCommitAuthorsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19073,23 +21369,28 @@ func decodeMigrationsGetCommitAuthorsResponse(resp *http.Response) (res Migratio } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19109,23 +21410,28 @@ func decodeMigrationsGetImportStatusResponse(resp *http.Response) (res Migration } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Import if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19139,23 +21445,28 @@ func decodeMigrationsGetImportStatusResponse(resp *http.Response) (res Migration } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19175,12 +21486,12 @@ func decodeMigrationsGetLargeFilesResponse(resp *http.Response) (res []PorterLar } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []PorterLargeFile if err := func() error { response = make([]PorterLargeFile, 0) @@ -19194,12 +21505,17 @@ func decodeMigrationsGetLargeFilesResponse(resp *http.Response) (res []PorterLar }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19219,23 +21535,28 @@ func decodeMigrationsGetStatusForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Migration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19252,23 +21573,28 @@ func decodeMigrationsGetStatusForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsGetStatusForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19282,23 +21608,28 @@ func decodeMigrationsGetStatusForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsGetStatusForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19312,23 +21643,28 @@ func decodeMigrationsGetStatusForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsGetStatusForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19348,23 +21684,28 @@ func decodeMigrationsGetStatusForOrgResponse(resp *http.Response) (res Migration } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Migration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19378,23 +21719,28 @@ func decodeMigrationsGetStatusForOrgResponse(resp *http.Response) (res Migration } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19414,12 +21760,12 @@ func decodeMigrationsListForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Migration if err := func() error { response = make([]Migration, 0) @@ -19433,12 +21779,17 @@ func decodeMigrationsListForAuthenticatedUserResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper MigrationsListForAuthenticatedUserOKHeaders wrapper.Response = response @@ -19493,23 +21844,28 @@ func decodeMigrationsListForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsListForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19523,23 +21879,28 @@ func decodeMigrationsListForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsListForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19559,12 +21920,12 @@ func decodeMigrationsListForOrgResponse(resp *http.Response) (res *MigrationsLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Migration if err := func() error { response = make([]Migration, 0) @@ -19578,12 +21939,17 @@ func decodeMigrationsListForOrgResponse(resp *http.Response) (res *MigrationsLis }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper MigrationsListForOrgOKHeaders wrapper.Response = response @@ -19641,12 +22007,12 @@ func decodeMigrationsListReposForOrgResponse(resp *http.Response) (res Migration } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -19660,12 +22026,17 @@ func decodeMigrationsListReposForOrgResponse(resp *http.Response) (res Migration }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper MigrationsListReposForOrgOKHeaders wrapper.Response = response @@ -19717,23 +22088,28 @@ func decodeMigrationsListReposForOrgResponse(resp *http.Response) (res Migration } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19753,12 +22129,12 @@ func decodeMigrationsListReposForUserResponse(resp *http.Response) (res Migratio } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -19772,12 +22148,17 @@ func decodeMigrationsListReposForUserResponse(resp *http.Response) (res Migratio }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper MigrationsListReposForUserOKHeaders wrapper.Response = response @@ -19829,23 +22210,28 @@ func decodeMigrationsListReposForUserResponse(resp *http.Response) (res Migratio } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19865,23 +22251,28 @@ func decodeMigrationsMapCommitAuthorResponse(resp *http.Response) (res Migration } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PorterAuthor if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19895,23 +22286,28 @@ func decodeMigrationsMapCommitAuthorResponse(resp *http.Response) (res Migration } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19925,23 +22321,28 @@ func decodeMigrationsMapCommitAuthorResponse(resp *http.Response) (res Migration } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19961,23 +22362,28 @@ func decodeMigrationsSetLfsPreferenceResponse(resp *http.Response) (res Migratio } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Import if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -19991,23 +22397,28 @@ func decodeMigrationsSetLfsPreferenceResponse(resp *http.Response) (res Migratio } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20027,23 +22438,28 @@ func decodeMigrationsStartForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Migration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20060,23 +22476,28 @@ func decodeMigrationsStartForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsStartForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20090,23 +22511,28 @@ func decodeMigrationsStartForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsStartForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20120,23 +22546,28 @@ func decodeMigrationsStartForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20156,23 +22587,28 @@ func decodeMigrationsStartForOrgResponse(resp *http.Response) (res MigrationsSta } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Migration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20186,23 +22622,28 @@ func decodeMigrationsStartForOrgResponse(resp *http.Response) (res MigrationsSta } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20216,23 +22657,28 @@ func decodeMigrationsStartForOrgResponse(resp *http.Response) (res MigrationsSta } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20252,23 +22698,28 @@ func decodeMigrationsStartImportResponse(resp *http.Response) (res MigrationsSta } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Import if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ImportHeaders wrapper.Response = response @@ -20320,23 +22771,28 @@ func decodeMigrationsStartImportResponse(resp *http.Response) (res MigrationsSta } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20350,23 +22806,28 @@ func decodeMigrationsStartImportResponse(resp *http.Response) (res MigrationsSta } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20392,23 +22853,28 @@ func decodeMigrationsUnlockRepoForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsUnlockRepoForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20422,23 +22888,28 @@ func decodeMigrationsUnlockRepoForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsUnlockRepoForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20452,23 +22923,28 @@ func decodeMigrationsUnlockRepoForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MigrationsUnlockRepoForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20491,23 +22967,28 @@ func decodeMigrationsUnlockRepoForOrgResponse(resp *http.Response) (res Migratio } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20527,23 +23008,28 @@ func decodeMigrationsUpdateImportResponse(resp *http.Response) (res *Import, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Import if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20563,23 +23049,28 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AuthorizationHeaders wrapper.Response = response @@ -20634,23 +23125,28 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsCreateAuthorizationApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20664,23 +23160,28 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsCreateAuthorizationApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20694,23 +23195,28 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsCreateAuthorizationApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20724,23 +23230,28 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20766,23 +23277,28 @@ func decodeOAuthAuthorizationsDeleteAuthorizationResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsDeleteAuthorizationApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20796,23 +23312,28 @@ func decodeOAuthAuthorizationsDeleteAuthorizationResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsDeleteAuthorizationApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20838,23 +23359,28 @@ func decodeOAuthAuthorizationsDeleteGrantResponse(resp *http.Response) (res OAut } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsDeleteGrantApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20868,23 +23394,28 @@ func decodeOAuthAuthorizationsDeleteGrantResponse(resp *http.Response) (res OAut } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsDeleteGrantApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20904,23 +23435,28 @@ func decodeOAuthAuthorizationsGetAuthorizationResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20937,23 +23473,28 @@ func decodeOAuthAuthorizationsGetAuthorizationResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsGetAuthorizationApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -20967,23 +23508,28 @@ func decodeOAuthAuthorizationsGetAuthorizationResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsGetAuthorizationApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21003,23 +23549,28 @@ func decodeOAuthAuthorizationsGetGrantResponse(resp *http.Response) (res OAuthAu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ApplicationGrant if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21036,23 +23587,28 @@ func decodeOAuthAuthorizationsGetGrantResponse(resp *http.Response) (res OAuthAu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsGetGrantApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21066,23 +23622,28 @@ func decodeOAuthAuthorizationsGetGrantResponse(resp *http.Response) (res OAuthAu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsGetGrantApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21102,23 +23663,28 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OAuthAuthorizationsGetOrCreateAuthorizationForAppApplicationJSONOK wrapper.Response = response @@ -21170,23 +23736,28 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OAuthAuthorizationsGetOrCreateAuthorizationForAppApplicationJSONCreated wrapper.Response = response @@ -21241,23 +23812,28 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsGetOrCreateAuthorizationForAppApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21271,23 +23847,28 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsGetOrCreateAuthorizationForAppApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21301,23 +23882,28 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21337,23 +23923,28 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintApplicationJSONOK wrapper.Response = response @@ -21405,23 +23996,28 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintApplicationJSONCreated wrapper.Response = response @@ -21473,23 +24069,28 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21509,12 +24110,12 @@ func decodeOAuthAuthorizationsListAuthorizationsResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Authorization if err := func() error { response = make([]Authorization, 0) @@ -21528,12 +24129,17 @@ func decodeOAuthAuthorizationsListAuthorizationsResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OAuthAuthorizationsListAuthorizationsOKHeaders wrapper.Response = response @@ -21588,23 +24194,28 @@ func decodeOAuthAuthorizationsListAuthorizationsResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsListAuthorizationsApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21618,23 +24229,28 @@ func decodeOAuthAuthorizationsListAuthorizationsResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsListAuthorizationsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21648,23 +24264,28 @@ func decodeOAuthAuthorizationsListAuthorizationsResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsListAuthorizationsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21684,12 +24305,12 @@ func decodeOAuthAuthorizationsListGrantsResponse(resp *http.Response) (res OAuth } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []ApplicationGrant if err := func() error { response = make([]ApplicationGrant, 0) @@ -21703,12 +24324,17 @@ func decodeOAuthAuthorizationsListGrantsResponse(resp *http.Response) (res OAuth }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OAuthAuthorizationsListGrantsOKHeaders wrapper.Response = response @@ -21763,23 +24389,28 @@ func decodeOAuthAuthorizationsListGrantsResponse(resp *http.Response) (res OAuth } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsListGrantsApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21793,23 +24424,28 @@ func decodeOAuthAuthorizationsListGrantsResponse(resp *http.Response) (res OAuth } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsListGrantsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21823,23 +24459,28 @@ func decodeOAuthAuthorizationsListGrantsResponse(resp *http.Response) (res OAuth } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OAuthAuthorizationsListGrantsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21859,23 +24500,28 @@ func decodeOAuthAuthorizationsUpdateAuthorizationResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Authorization if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21889,23 +24535,28 @@ func decodeOAuthAuthorizationsUpdateAuthorizationResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21928,23 +24579,28 @@ func decodeOrgsBlockUserResponse(resp *http.Response) (res OrgsBlockUserRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21967,23 +24623,28 @@ func decodeOrgsCancelInvitationResponse(resp *http.Response) (res OrgsCancelInvi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -21997,23 +24658,28 @@ func decodeOrgsCancelInvitationResponse(resp *http.Response) (res OrgsCancelInvi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22036,23 +24702,28 @@ func decodeOrgsCheckBlockedUserResponse(resp *http.Response) (res OrgsCheckBlock } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22136,23 +24807,28 @@ func decodeOrgsConvertMemberToOutsideCollaboratorResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsConvertMemberToOutsideCollaboratorAccepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22172,23 +24848,28 @@ func decodeOrgsConvertMemberToOutsideCollaboratorResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22208,23 +24889,28 @@ func decodeOrgsCreateInvitationResponse(resp *http.Response) (res OrgsCreateInvi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrganizationInvitation if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22238,23 +24924,28 @@ func decodeOrgsCreateInvitationResponse(resp *http.Response) (res OrgsCreateInvi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22268,23 +24959,28 @@ func decodeOrgsCreateInvitationResponse(resp *http.Response) (res OrgsCreateInvi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22304,23 +25000,28 @@ func decodeOrgsCreateWebhookResponse(resp *http.Response) (res OrgsCreateWebhook } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgHook if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgHookHeaders wrapper.Response = response @@ -22372,23 +25073,28 @@ func decodeOrgsCreateWebhookResponse(resp *http.Response) (res OrgsCreateWebhook } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22402,23 +25108,28 @@ func decodeOrgsCreateWebhookResponse(resp *http.Response) (res OrgsCreateWebhook } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22441,23 +25152,28 @@ func decodeOrgsDeleteWebhookResponse(resp *http.Response) (res OrgsDeleteWebhook } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22477,23 +25193,28 @@ func decodeOrgsGetResponse(resp *http.Response) (res OrgsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrganizationFull if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22507,23 +25228,28 @@ func decodeOrgsGetResponse(resp *http.Response) (res OrgsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22543,12 +25269,12 @@ func decodeOrgsGetAuditLogResponse(resp *http.Response) (res []AuditLogEvent, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []AuditLogEvent if err := func() error { response = make([]AuditLogEvent, 0) @@ -22562,12 +25288,17 @@ func decodeOrgsGetAuditLogResponse(resp *http.Response) (res []AuditLogEvent, er }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22587,23 +25318,28 @@ func decodeOrgsGetMembershipForAuthenticatedUserResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgMembership if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22617,23 +25353,28 @@ func decodeOrgsGetMembershipForAuthenticatedUserResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsGetMembershipForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22647,23 +25388,28 @@ func decodeOrgsGetMembershipForAuthenticatedUserResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsGetMembershipForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22683,23 +25429,28 @@ func decodeOrgsGetMembershipForUserResponse(resp *http.Response) (res OrgsGetMem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgMembership if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22713,23 +25464,28 @@ func decodeOrgsGetMembershipForUserResponse(resp *http.Response) (res OrgsGetMem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsGetMembershipForUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22743,23 +25499,28 @@ func decodeOrgsGetMembershipForUserResponse(resp *http.Response) (res OrgsGetMem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsGetMembershipForUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22779,23 +25540,28 @@ func decodeOrgsGetWebhookResponse(resp *http.Response) (res OrgsGetWebhookRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgHook if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22809,23 +25575,28 @@ func decodeOrgsGetWebhookResponse(resp *http.Response) (res OrgsGetWebhookRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22845,23 +25616,28 @@ func decodeOrgsGetWebhookConfigForOrgResponse(resp *http.Response) (res *Webhook } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WebhookConfig if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22881,23 +25657,28 @@ func decodeOrgsGetWebhookDeliveryResponse(resp *http.Response) (res OrgsGetWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response HookDelivery if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22911,23 +25692,28 @@ func decodeOrgsGetWebhookDeliveryResponse(resp *http.Response) (res OrgsGetWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22941,23 +25727,28 @@ func decodeOrgsGetWebhookDeliveryResponse(resp *http.Response) (res OrgsGetWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -22977,12 +25768,12 @@ func decodeOrgsListResponse(resp *http.Response) (res OrgsListRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrganizationSimple if err := func() error { response = make([]OrganizationSimple, 0) @@ -22996,12 +25787,17 @@ func decodeOrgsListResponse(resp *http.Response) (res OrgsListRes, err error) { }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListOKHeaders wrapper.Response = response @@ -23062,23 +25858,28 @@ func decodeOrgsListBlockedUsersResponse(resp *http.Response) (res OrgsListBlocke } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsListBlockedUsersOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23092,23 +25893,28 @@ func decodeOrgsListBlockedUsersResponse(resp *http.Response) (res OrgsListBlocke } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23128,12 +25934,12 @@ func decodeOrgsListFailedInvitationsResponse(resp *http.Response) (res OrgsListF } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrganizationInvitation if err := func() error { response = make([]OrganizationInvitation, 0) @@ -23147,12 +25953,17 @@ func decodeOrgsListFailedInvitationsResponse(resp *http.Response) (res OrgsListF }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListFailedInvitationsOKHeaders wrapper.Response = response @@ -23204,23 +26015,28 @@ func decodeOrgsListFailedInvitationsResponse(resp *http.Response) (res OrgsListF } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23240,12 +26056,12 @@ func decodeOrgsListForAuthenticatedUserResponse(resp *http.Response) (res OrgsLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrganizationSimple if err := func() error { response = make([]OrganizationSimple, 0) @@ -23259,12 +26075,17 @@ func decodeOrgsListForAuthenticatedUserResponse(resp *http.Response) (res OrgsLi }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListForAuthenticatedUserOKHeaders wrapper.Response = response @@ -23319,23 +26140,28 @@ func decodeOrgsListForAuthenticatedUserResponse(resp *http.Response) (res OrgsLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsListForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23349,23 +26175,28 @@ func decodeOrgsListForAuthenticatedUserResponse(resp *http.Response) (res OrgsLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsListForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23385,12 +26216,12 @@ func decodeOrgsListForUserResponse(resp *http.Response) (res *OrgsListForUserOKH } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrganizationSimple if err := func() error { response = make([]OrganizationSimple, 0) @@ -23404,12 +26235,17 @@ func decodeOrgsListForUserResponse(resp *http.Response) (res *OrgsListForUserOKH }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListForUserOKHeaders wrapper.Response = response @@ -23467,12 +26303,12 @@ func decodeOrgsListInvitationTeamsResponse(resp *http.Response) (res OrgsListInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Team if err := func() error { response = make([]Team, 0) @@ -23486,12 +26322,17 @@ func decodeOrgsListInvitationTeamsResponse(resp *http.Response) (res OrgsListInv }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListInvitationTeamsOKHeaders wrapper.Response = response @@ -23543,23 +26384,28 @@ func decodeOrgsListInvitationTeamsResponse(resp *http.Response) (res OrgsListInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23579,12 +26425,12 @@ func decodeOrgsListMembersResponse(resp *http.Response) (res OrgsListMembersRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -23598,12 +26444,17 @@ func decodeOrgsListMembersResponse(resp *http.Response) (res OrgsListMembersRes, }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListMembersOKHeaders wrapper.Response = response @@ -23695,23 +26546,28 @@ func decodeOrgsListMembersResponse(resp *http.Response) (res OrgsListMembersRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23731,12 +26587,12 @@ func decodeOrgsListMembershipsForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrgMembership if err := func() error { response = make([]OrgMembership, 0) @@ -23750,12 +26606,17 @@ func decodeOrgsListMembershipsForAuthenticatedUserResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListMembershipsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -23810,23 +26671,28 @@ func decodeOrgsListMembershipsForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsListMembershipsForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23840,23 +26706,28 @@ func decodeOrgsListMembershipsForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsListMembershipsForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23870,23 +26741,28 @@ func decodeOrgsListMembershipsForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -23906,12 +26782,12 @@ func decodeOrgsListOutsideCollaboratorsResponse(resp *http.Response) (res *OrgsL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -23925,12 +26801,17 @@ func decodeOrgsListOutsideCollaboratorsResponse(resp *http.Response) (res *OrgsL }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListOutsideCollaboratorsOKHeaders wrapper.Response = response @@ -23988,12 +26869,12 @@ func decodeOrgsListPendingInvitationsResponse(resp *http.Response) (res OrgsList } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrganizationInvitation if err := func() error { response = make([]OrganizationInvitation, 0) @@ -24007,12 +26888,17 @@ func decodeOrgsListPendingInvitationsResponse(resp *http.Response) (res OrgsList }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListPendingInvitationsOKHeaders wrapper.Response = response @@ -24064,23 +26950,28 @@ func decodeOrgsListPendingInvitationsResponse(resp *http.Response) (res OrgsList } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24100,12 +26991,12 @@ func decodeOrgsListPublicMembersResponse(resp *http.Response) (res *OrgsListPubl } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -24119,12 +27010,17 @@ func decodeOrgsListPublicMembersResponse(resp *http.Response) (res *OrgsListPubl }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListPublicMembersOKHeaders wrapper.Response = response @@ -24182,12 +27078,12 @@ func decodeOrgsListSamlSSOAuthorizationsResponse(resp *http.Response) (res []Cre } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []CredentialAuthorization if err := func() error { response = make([]CredentialAuthorization, 0) @@ -24201,12 +27097,17 @@ func decodeOrgsListSamlSSOAuthorizationsResponse(resp *http.Response) (res []Cre }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24226,23 +27127,28 @@ func decodeOrgsListWebhookDeliveriesResponse(resp *http.Response) (res OrgsListW } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsListWebhookDeliveriesOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24256,23 +27162,28 @@ func decodeOrgsListWebhookDeliveriesResponse(resp *http.Response) (res OrgsListW } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24286,23 +27197,28 @@ func decodeOrgsListWebhookDeliveriesResponse(resp *http.Response) (res OrgsListW } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24322,12 +27238,12 @@ func decodeOrgsListWebhooksResponse(resp *http.Response) (res OrgsListWebhooksRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrgHook if err := func() error { response = make([]OrgHook, 0) @@ -24341,12 +27257,17 @@ func decodeOrgsListWebhooksResponse(resp *http.Response) (res OrgsListWebhooksRe }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper OrgsListWebhooksOKHeaders wrapper.Response = response @@ -24398,23 +27319,28 @@ func decodeOrgsListWebhooksResponse(resp *http.Response) (res OrgsListWebhooksRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24437,23 +27363,28 @@ func decodeOrgsPingWebhookResponse(resp *http.Response) (res OrgsPingWebhookRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24473,23 +27404,28 @@ func decodeOrgsRedeliverWebhookDeliveryResponse(resp *http.Response) (res OrgsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Accepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24503,23 +27439,28 @@ func decodeOrgsRedeliverWebhookDeliveryResponse(resp *http.Response) (res OrgsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24533,23 +27474,28 @@ func decodeOrgsRedeliverWebhookDeliveryResponse(resp *http.Response) (res OrgsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24572,23 +27518,28 @@ func decodeOrgsRemoveMemberResponse(resp *http.Response) (res OrgsRemoveMemberRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24611,23 +27562,28 @@ func decodeOrgsRemoveMembershipForUserResponse(resp *http.Response) (res OrgsRem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsRemoveMembershipForUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24641,23 +27597,28 @@ func decodeOrgsRemoveMembershipForUserResponse(resp *http.Response) (res OrgsRem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsRemoveMembershipForUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24680,23 +27641,28 @@ func decodeOrgsRemoveOutsideCollaboratorResponse(resp *http.Response) (res OrgsR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsRemoveOutsideCollaboratorUnprocessableEntity if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24728,23 +27694,28 @@ func decodeOrgsRemoveSamlSSOAuthorizationResponse(resp *http.Response) (res Orgs } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24764,23 +27735,28 @@ func decodeOrgsSetMembershipForUserResponse(resp *http.Response) (res OrgsSetMem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgMembership if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24794,23 +27770,28 @@ func decodeOrgsSetMembershipForUserResponse(resp *http.Response) (res OrgsSetMem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24824,23 +27805,28 @@ func decodeOrgsSetMembershipForUserResponse(resp *http.Response) (res OrgsSetMem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24863,23 +27849,28 @@ func decodeOrgsSetPublicMembershipForAuthenticatedUserResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24908,23 +27899,28 @@ func decodeOrgsUpdateMembershipForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgMembership if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24938,23 +27934,28 @@ func decodeOrgsUpdateMembershipForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsUpdateMembershipForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24968,23 +27969,28 @@ func decodeOrgsUpdateMembershipForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgsUpdateMembershipForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -24998,23 +28004,28 @@ func decodeOrgsUpdateMembershipForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25034,23 +28045,28 @@ func decodeOrgsUpdateWebhookResponse(resp *http.Response) (res OrgsUpdateWebhook } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrgHook if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25064,23 +28080,28 @@ func decodeOrgsUpdateWebhookResponse(resp *http.Response) (res OrgsUpdateWebhook } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25094,23 +28115,28 @@ func decodeOrgsUpdateWebhookResponse(resp *http.Response) (res OrgsUpdateWebhook } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25130,23 +28156,28 @@ func decodeOrgsUpdateWebhookConfigForOrgResponse(resp *http.Response) (res *Webh } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WebhookConfig if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25169,23 +28200,28 @@ func decodePackagesDeletePackageForAuthenticatedUserResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25199,23 +28235,28 @@ func decodePackagesDeletePackageForAuthenticatedUserResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25229,23 +28270,28 @@ func decodePackagesDeletePackageForAuthenticatedUserResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25268,23 +28314,28 @@ func decodePackagesDeletePackageForOrgResponse(resp *http.Response) (res Package } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageForOrgApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25298,23 +28349,28 @@ func decodePackagesDeletePackageForOrgResponse(resp *http.Response) (res Package } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageForOrgApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25328,23 +28384,28 @@ func decodePackagesDeletePackageForOrgResponse(resp *http.Response) (res Package } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageForOrgApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25367,23 +28428,28 @@ func decodePackagesDeletePackageForUserResponse(resp *http.Response) (res Packag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageForUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25397,23 +28463,28 @@ func decodePackagesDeletePackageForUserResponse(resp *http.Response) (res Packag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageForUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25427,23 +28498,28 @@ func decodePackagesDeletePackageForUserResponse(resp *http.Response) (res Packag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageForUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25466,23 +28542,28 @@ func decodePackagesDeletePackageVersionForAuthenticatedUserResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageVersionForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25496,23 +28577,28 @@ func decodePackagesDeletePackageVersionForAuthenticatedUserResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageVersionForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25526,23 +28612,28 @@ func decodePackagesDeletePackageVersionForAuthenticatedUserResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageVersionForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25565,23 +28656,28 @@ func decodePackagesDeletePackageVersionForOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageVersionForOrgApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25595,23 +28691,28 @@ func decodePackagesDeletePackageVersionForOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageVersionForOrgApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25625,23 +28726,28 @@ func decodePackagesDeletePackageVersionForOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageVersionForOrgApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25664,23 +28770,28 @@ func decodePackagesDeletePackageVersionForUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageVersionForUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25694,23 +28805,28 @@ func decodePackagesDeletePackageVersionForUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageVersionForUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25724,23 +28840,28 @@ func decodePackagesDeletePackageVersionForUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesDeletePackageVersionForUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25760,23 +28881,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25790,23 +28916,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25820,23 +28951,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25850,23 +28986,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25886,23 +29027,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByOrgResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByOrgOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25916,23 +29062,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByOrgResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByOrgApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25946,23 +29097,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByOrgResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByOrgApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -25976,23 +29132,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByOrgResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByOrgApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26012,23 +29173,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByUserResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByUserOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26042,23 +29208,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByUserResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26072,23 +29243,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByUserResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26102,23 +29278,28 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByUserResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesGetAllPackageVersionsForPackageOwnedByUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26138,23 +29319,28 @@ func decodePackagesGetPackageForAuthenticatedUserResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Package if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26174,23 +29360,28 @@ func decodePackagesGetPackageForOrganizationResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Package if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26210,23 +29401,28 @@ func decodePackagesGetPackageForUserResponse(resp *http.Response) (res *Package, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Package if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26246,23 +29442,28 @@ func decodePackagesGetPackageVersionForAuthenticatedUserResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackageVersion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26282,23 +29483,28 @@ func decodePackagesGetPackageVersionForOrganizationResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackageVersion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26318,23 +29524,28 @@ func decodePackagesGetPackageVersionForUserResponse(resp *http.Response) (res *P } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackageVersion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26354,12 +29565,12 @@ func decodePackagesListPackagesForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Package if err := func() error { response = make([]Package, 0) @@ -26373,12 +29584,17 @@ func decodePackagesListPackagesForAuthenticatedUserResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26398,23 +29614,28 @@ func decodePackagesListPackagesForOrganizationResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesListPackagesForOrganizationOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26428,23 +29649,28 @@ func decodePackagesListPackagesForOrganizationResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesListPackagesForOrganizationApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26458,23 +29684,28 @@ func decodePackagesListPackagesForOrganizationResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesListPackagesForOrganizationApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26494,23 +29725,28 @@ func decodePackagesListPackagesForUserResponse(resp *http.Response) (res Package } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesListPackagesForUserOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26524,23 +29760,28 @@ func decodePackagesListPackagesForUserResponse(resp *http.Response) (res Package } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesListPackagesForUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26554,23 +29795,28 @@ func decodePackagesListPackagesForUserResponse(resp *http.Response) (res Package } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesListPackagesForUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26593,23 +29839,28 @@ func decodePackagesRestorePackageForAuthenticatedUserResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26623,23 +29874,28 @@ func decodePackagesRestorePackageForAuthenticatedUserResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26653,23 +29909,28 @@ func decodePackagesRestorePackageForAuthenticatedUserResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26692,23 +29953,28 @@ func decodePackagesRestorePackageForOrgResponse(resp *http.Response) (res Packag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageForOrgApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26722,23 +29988,28 @@ func decodePackagesRestorePackageForOrgResponse(resp *http.Response) (res Packag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageForOrgApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26752,23 +30023,28 @@ func decodePackagesRestorePackageForOrgResponse(resp *http.Response) (res Packag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageForOrgApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26791,23 +30067,28 @@ func decodePackagesRestorePackageForUserResponse(resp *http.Response) (res Packa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageForUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26821,23 +30102,28 @@ func decodePackagesRestorePackageForUserResponse(resp *http.Response) (res Packa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageForUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26851,23 +30137,28 @@ func decodePackagesRestorePackageForUserResponse(resp *http.Response) (res Packa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageForUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26890,23 +30181,28 @@ func decodePackagesRestorePackageVersionForAuthenticatedUserResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageVersionForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26920,23 +30216,28 @@ func decodePackagesRestorePackageVersionForAuthenticatedUserResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageVersionForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26950,23 +30251,28 @@ func decodePackagesRestorePackageVersionForAuthenticatedUserResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageVersionForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -26989,23 +30295,28 @@ func decodePackagesRestorePackageVersionForOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageVersionForOrgApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27019,23 +30330,28 @@ func decodePackagesRestorePackageVersionForOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageVersionForOrgApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27049,23 +30365,28 @@ func decodePackagesRestorePackageVersionForOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageVersionForOrgApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27088,23 +30409,28 @@ func decodePackagesRestorePackageVersionForUserResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageVersionForUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27118,23 +30444,28 @@ func decodePackagesRestorePackageVersionForUserResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageVersionForUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27148,23 +30479,28 @@ func decodePackagesRestorePackageVersionForUserResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PackagesRestorePackageVersionForUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27190,23 +30526,28 @@ func decodeProjectsAddCollaboratorResponse(resp *http.Response) (res ProjectsAdd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsAddCollaboratorApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27220,23 +30561,28 @@ func decodeProjectsAddCollaboratorResponse(resp *http.Response) (res ProjectsAdd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsAddCollaboratorApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27250,23 +30596,28 @@ func decodeProjectsAddCollaboratorResponse(resp *http.Response) (res ProjectsAdd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsAddCollaboratorApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27280,23 +30631,28 @@ func decodeProjectsAddCollaboratorResponse(resp *http.Response) (res ProjectsAdd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27316,23 +30672,28 @@ func decodeProjectsCreateColumnResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectColumn if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27349,23 +30710,28 @@ func decodeProjectsCreateColumnResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateColumnApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27379,23 +30745,28 @@ func decodeProjectsCreateColumnResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateColumnApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27409,23 +30780,28 @@ func decodeProjectsCreateColumnResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27445,23 +30821,28 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Project if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27478,23 +30859,28 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27508,23 +30894,28 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27538,23 +30929,28 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27568,23 +30964,28 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27604,23 +31005,28 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Project if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27634,23 +31040,28 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForOrgApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27664,23 +31075,28 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForOrgApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27694,23 +31110,28 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForOrgApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27724,23 +31145,28 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForOrgApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27754,23 +31180,28 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27790,23 +31221,28 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Project if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27820,23 +31256,28 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForRepoApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27850,23 +31291,28 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForRepoApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27880,23 +31326,28 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForRepoApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27910,23 +31361,28 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsCreateForRepoApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27940,23 +31396,28 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -27982,23 +31443,28 @@ func decodeProjectsDeleteResponse(resp *http.Response) (res ProjectsDeleteRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsDeleteApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28012,23 +31478,28 @@ func decodeProjectsDeleteResponse(resp *http.Response) (res ProjectsDeleteRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsDeleteForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28042,23 +31513,28 @@ func decodeProjectsDeleteResponse(resp *http.Response) (res ProjectsDeleteRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsDeleteApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28072,23 +31548,28 @@ func decodeProjectsDeleteResponse(resp *http.Response) (res ProjectsDeleteRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsDeleteApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28114,23 +31595,28 @@ func decodeProjectsDeleteCardResponse(resp *http.Response) (res ProjectsDeleteCa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsDeleteCardApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28144,23 +31630,28 @@ func decodeProjectsDeleteCardResponse(resp *http.Response) (res ProjectsDeleteCa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsDeleteCardForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28174,23 +31665,28 @@ func decodeProjectsDeleteCardResponse(resp *http.Response) (res ProjectsDeleteCa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsDeleteCardApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28216,23 +31712,28 @@ func decodeProjectsDeleteColumnResponse(resp *http.Response) (res ProjectsDelete } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsDeleteColumnApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28246,23 +31747,28 @@ func decodeProjectsDeleteColumnResponse(resp *http.Response) (res ProjectsDelete } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsDeleteColumnApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28282,23 +31788,28 @@ func decodeProjectsGetResponse(resp *http.Response) (res ProjectsGetRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Project if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28315,23 +31826,28 @@ func decodeProjectsGetResponse(resp *http.Response) (res ProjectsGetRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28345,23 +31861,28 @@ func decodeProjectsGetResponse(resp *http.Response) (res ProjectsGetRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28381,23 +31902,28 @@ func decodeProjectsGetCardResponse(resp *http.Response) (res ProjectsGetCardRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectCard if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28414,23 +31940,28 @@ func decodeProjectsGetCardResponse(resp *http.Response) (res ProjectsGetCardRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetCardApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28444,23 +31975,28 @@ func decodeProjectsGetCardResponse(resp *http.Response) (res ProjectsGetCardRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetCardApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28474,23 +32010,28 @@ func decodeProjectsGetCardResponse(resp *http.Response) (res ProjectsGetCardRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetCardApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28510,23 +32051,28 @@ func decodeProjectsGetColumnResponse(resp *http.Response) (res ProjectsGetColumn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectColumn if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28543,23 +32089,28 @@ func decodeProjectsGetColumnResponse(resp *http.Response) (res ProjectsGetColumn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetColumnApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28573,23 +32124,28 @@ func decodeProjectsGetColumnResponse(resp *http.Response) (res ProjectsGetColumn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetColumnApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28603,23 +32159,28 @@ func decodeProjectsGetColumnResponse(resp *http.Response) (res ProjectsGetColumn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetColumnApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28639,23 +32200,28 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RepositoryCollaboratorPermission if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28672,23 +32238,28 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetPermissionForUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28702,23 +32273,28 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetPermissionForUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28732,23 +32308,28 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsGetPermissionForUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28762,23 +32343,28 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28798,12 +32384,12 @@ func decodeProjectsListCardsResponse(resp *http.Response) (res ProjectsListCards } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []ProjectCard if err := func() error { response = make([]ProjectCard, 0) @@ -28817,12 +32403,17 @@ func decodeProjectsListCardsResponse(resp *http.Response) (res ProjectsListCards }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ProjectsListCardsOKHeaders wrapper.Response = response @@ -28877,23 +32468,28 @@ func decodeProjectsListCardsResponse(resp *http.Response) (res ProjectsListCards } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListCardsApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28907,23 +32503,28 @@ func decodeProjectsListCardsResponse(resp *http.Response) (res ProjectsListCards } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListCardsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -28943,12 +32544,12 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -28962,12 +32563,17 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ProjectsListCollaboratorsOKHeaders wrapper.Response = response @@ -29022,23 +32628,28 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListCollaboratorsApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29052,23 +32663,28 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListCollaboratorsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29082,23 +32698,28 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListCollaboratorsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29112,23 +32733,28 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29148,12 +32774,12 @@ func decodeProjectsListColumnsResponse(resp *http.Response) (res ProjectsListCol } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []ProjectColumn if err := func() error { response = make([]ProjectColumn, 0) @@ -29167,12 +32793,17 @@ func decodeProjectsListColumnsResponse(resp *http.Response) (res ProjectsListCol }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ProjectsListColumnsOKHeaders wrapper.Response = response @@ -29227,23 +32858,28 @@ func decodeProjectsListColumnsResponse(resp *http.Response) (res ProjectsListCol } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListColumnsApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29257,23 +32893,28 @@ func decodeProjectsListColumnsResponse(resp *http.Response) (res ProjectsListCol } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListColumnsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29293,12 +32934,12 @@ func decodeProjectsListForOrgResponse(resp *http.Response) (res ProjectsListForO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Project if err := func() error { response = make([]Project, 0) @@ -29312,12 +32953,17 @@ func decodeProjectsListForOrgResponse(resp *http.Response) (res ProjectsListForO }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ProjectsListForOrgOKHeaders wrapper.Response = response @@ -29369,23 +33015,28 @@ func decodeProjectsListForOrgResponse(resp *http.Response) (res ProjectsListForO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29405,12 +33056,12 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Project if err := func() error { response = make([]Project, 0) @@ -29424,12 +33075,17 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ProjectsListForRepoOKHeaders wrapper.Response = response @@ -29481,23 +33137,28 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListForRepoApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29511,23 +33172,28 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListForRepoApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29541,23 +33207,28 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListForRepoApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29571,23 +33242,28 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsListForRepoApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29601,23 +33277,28 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29637,12 +33318,12 @@ func decodeProjectsListForUserResponse(resp *http.Response) (res ProjectsListFor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Project if err := func() error { response = make([]Project, 0) @@ -29656,12 +33337,17 @@ func decodeProjectsListForUserResponse(resp *http.Response) (res ProjectsListFor }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ProjectsListForUserOKHeaders wrapper.Response = response @@ -29713,23 +33399,28 @@ func decodeProjectsListForUserResponse(resp *http.Response) (res ProjectsListFor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29749,23 +33440,28 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsMoveCardCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29782,23 +33478,28 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29812,23 +33513,28 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsMoveCardForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29842,23 +33548,28 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29872,23 +33583,28 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsMoveCardServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29908,23 +33624,28 @@ func decodeProjectsMoveColumnResponse(resp *http.Response) (res ProjectsMoveColu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsMoveColumnCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29941,23 +33662,28 @@ func decodeProjectsMoveColumnResponse(resp *http.Response) (res ProjectsMoveColu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsMoveColumnApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -29971,23 +33697,28 @@ func decodeProjectsMoveColumnResponse(resp *http.Response) (res ProjectsMoveColu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsMoveColumnApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30001,23 +33732,28 @@ func decodeProjectsMoveColumnResponse(resp *http.Response) (res ProjectsMoveColu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30043,23 +33779,28 @@ func decodeProjectsRemoveCollaboratorResponse(resp *http.Response) (res Projects } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsRemoveCollaboratorApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30073,23 +33814,28 @@ func decodeProjectsRemoveCollaboratorResponse(resp *http.Response) (res Projects } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsRemoveCollaboratorApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30103,23 +33849,28 @@ func decodeProjectsRemoveCollaboratorResponse(resp *http.Response) (res Projects } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsRemoveCollaboratorApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30133,23 +33884,28 @@ func decodeProjectsRemoveCollaboratorResponse(resp *http.Response) (res Projects } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30169,23 +33925,28 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Project if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30202,23 +33963,28 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsUpdateApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30232,23 +33998,28 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsUpdateForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30265,23 +34036,28 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsUpdateApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30295,23 +34071,28 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30331,23 +34112,28 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectCard if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30364,23 +34150,28 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsUpdateCardApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30394,23 +34185,28 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsUpdateCardApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30424,23 +34220,28 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsUpdateCardApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30454,23 +34255,28 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30490,23 +34296,28 @@ func decodeProjectsUpdateColumnResponse(resp *http.Response) (res ProjectsUpdate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectColumn if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30523,23 +34334,28 @@ func decodeProjectsUpdateColumnResponse(resp *http.Response) (res ProjectsUpdate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsUpdateColumnApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30553,23 +34369,28 @@ func decodeProjectsUpdateColumnResponse(resp *http.Response) (res ProjectsUpdate } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProjectsUpdateColumnApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30601,23 +34422,28 @@ func decodePullsCreateResponse(resp *http.Response) (res PullsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PullRequestHeaders wrapper.Response = response @@ -30669,23 +34495,28 @@ func decodePullsCreateResponse(resp *http.Response) (res PullsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30699,23 +34530,28 @@ func decodePullsCreateResponse(resp *http.Response) (res PullsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30735,23 +34571,28 @@ func decodePullsCreateReplyForReviewCommentResponse(resp *http.Response) (res Pu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReviewComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PullRequestReviewCommentHeaders wrapper.Response = response @@ -30803,23 +34644,28 @@ func decodePullsCreateReplyForReviewCommentResponse(resp *http.Response) (res Pu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30839,23 +34685,28 @@ func decodePullsCreateReviewResponse(resp *http.Response) (res PullsCreateReview } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30869,23 +34720,28 @@ func decodePullsCreateReviewResponse(resp *http.Response) (res PullsCreateReview } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30899,23 +34755,28 @@ func decodePullsCreateReviewResponse(resp *http.Response) (res PullsCreateReview } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -30935,23 +34796,28 @@ func decodePullsCreateReviewCommentResponse(resp *http.Response) (res PullsCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReviewComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PullRequestReviewCommentHeaders wrapper.Response = response @@ -31003,23 +34869,28 @@ func decodePullsCreateReviewCommentResponse(resp *http.Response) (res PullsCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31033,23 +34904,28 @@ func decodePullsCreateReviewCommentResponse(resp *http.Response) (res PullsCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31069,23 +34945,28 @@ func decodePullsDeletePendingReviewResponse(resp *http.Response) (res PullsDelet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31099,23 +34980,28 @@ func decodePullsDeletePendingReviewResponse(resp *http.Response) (res PullsDelet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31129,23 +35015,28 @@ func decodePullsDeletePendingReviewResponse(resp *http.Response) (res PullsDelet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31168,23 +35059,28 @@ func decodePullsDeleteReviewCommentResponse(resp *http.Response) (res PullsDelet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31204,23 +35100,28 @@ func decodePullsDismissReviewResponse(resp *http.Response) (res PullsDismissRevi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31234,23 +35135,28 @@ func decodePullsDismissReviewResponse(resp *http.Response) (res PullsDismissRevi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31264,23 +35170,28 @@ func decodePullsDismissReviewResponse(resp *http.Response) (res PullsDismissRevi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31300,23 +35211,28 @@ func decodePullsGetResponse(resp *http.Response) (res PullsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31333,23 +35249,28 @@ func decodePullsGetResponse(resp *http.Response) (res PullsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullsGetApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31363,23 +35284,28 @@ func decodePullsGetResponse(resp *http.Response) (res PullsGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullsGetApplicationJSONInternalServerError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31399,23 +35325,28 @@ func decodePullsGetReviewResponse(resp *http.Response) (res PullsGetReviewRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31429,23 +35360,28 @@ func decodePullsGetReviewResponse(resp *http.Response) (res PullsGetReviewRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31465,23 +35401,28 @@ func decodePullsGetReviewCommentResponse(resp *http.Response) (res PullsGetRevie } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReviewComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31495,23 +35436,28 @@ func decodePullsGetReviewCommentResponse(resp *http.Response) (res PullsGetRevie } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31531,12 +35477,12 @@ func decodePullsListResponse(resp *http.Response) (res PullsListRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []PullRequestSimple if err := func() error { response = make([]PullRequestSimple, 0) @@ -31550,129 +35496,144 @@ func decodePullsListResponse(resp *http.Response) (res PullsListRes, err error) }); err != nil { return err } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper PullsListOKHeaders - wrapper.Response = response - h := uri.NewHeaderDecoder(resp.Header) - // Parse "Link" header. - { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "Link", - Explode: false, - } - if err := func() error { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - var wrapperDotLinkVal string - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - wrapperDotLinkVal = c - return nil - }(); err != nil { - return err - } - wrapper.Link.SetTo(wrapperDotLinkVal) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "parse Link header") - } - } - return &wrapper, nil - default: - return res, validate.InvalidContentType(ct) - } - case 304: - // Code 304. - return &NotModified{}, nil - case 422: - // Code 422. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - - d := jx.DecodeBytes(b) - var response ValidationError - if err := func() error { - if err := response.Decode(d); err != nil { - return err + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodePullsListCommentsForReviewResponse(resp *http.Response) (res PullsListCommentsForReviewRes, err error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - - d := jx.DecodeBytes(b) - var response []ReviewComment - if err := func() error { - response = make([]ReviewComment, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem ReviewComment - if err := elem.Decode(d); err != nil { - return err - } - response = append(response, elem) - return nil - }); err != nil { - return err + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + return res, err } - var wrapper PullsListCommentsForReviewOKHeaders + var wrapper PullsListOKHeaders + wrapper.Response = response + h := uri.NewHeaderDecoder(resp.Header) + // Parse "Link" header. + { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "Link", + Explode: false, + } + if err := func() error { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + var wrapperDotLinkVal string + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + wrapperDotLinkVal = c + return nil + }(); err != nil { + return err + } + wrapper.Link.SetTo(wrapperDotLinkVal) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "parse Link header") + } + } + return &wrapper, nil + default: + return res, validate.InvalidContentType(ct) + } + case 304: + // Code 304. + return &NotModified{}, nil + case 422: + // Code 422. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response ValidationError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodePullsListCommentsForReviewResponse(resp *http.Response) (res PullsListCommentsForReviewRes, err error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response []ReviewComment + if err := func() error { + response = make([]ReviewComment, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem ReviewComment + if err := elem.Decode(d); err != nil { + return err + } + response = append(response, elem) + return nil + }); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + var wrapper PullsListCommentsForReviewOKHeaders wrapper.Response = response h := uri.NewHeaderDecoder(resp.Header) // Parse "Link" header. @@ -31722,23 +35683,28 @@ func decodePullsListCommentsForReviewResponse(resp *http.Response) (res PullsLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31758,12 +35724,12 @@ func decodePullsListCommitsResponse(resp *http.Response) (res *PullsListCommitsO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Commit if err := func() error { response = make([]Commit, 0) @@ -31777,12 +35743,17 @@ func decodePullsListCommitsResponse(resp *http.Response) (res *PullsListCommitsO }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PullsListCommitsOKHeaders wrapper.Response = response @@ -31840,12 +35811,12 @@ func decodePullsListFilesResponse(resp *http.Response) (res PullsListFilesRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []DiffEntry if err := func() error { response = make([]DiffEntry, 0) @@ -31859,12 +35830,17 @@ func decodePullsListFilesResponse(resp *http.Response) (res PullsListFilesRes, e }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PullsListFilesOKHeaders wrapper.Response = response @@ -31916,23 +35892,28 @@ func decodePullsListFilesResponse(resp *http.Response) (res PullsListFilesRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31946,23 +35927,28 @@ func decodePullsListFilesResponse(resp *http.Response) (res PullsListFilesRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -31982,23 +35968,28 @@ func decodePullsListRequestedReviewersResponse(resp *http.Response) (res *PullRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReviewRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PullRequestReviewRequestHeaders wrapper.Response = response @@ -32056,12 +36047,12 @@ func decodePullsListReviewCommentsResponse(resp *http.Response) (res *PullsListR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []PullRequestReviewComment if err := func() error { response = make([]PullRequestReviewComment, 0) @@ -32075,12 +36066,17 @@ func decodePullsListReviewCommentsResponse(resp *http.Response) (res *PullsListR }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PullsListReviewCommentsOKHeaders wrapper.Response = response @@ -32138,12 +36134,12 @@ func decodePullsListReviewCommentsForRepoResponse(resp *http.Response) (res *Pul } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []PullRequestReviewComment if err := func() error { response = make([]PullRequestReviewComment, 0) @@ -32157,12 +36153,17 @@ func decodePullsListReviewCommentsForRepoResponse(resp *http.Response) (res *Pul }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PullsListReviewCommentsForRepoOKHeaders wrapper.Response = response @@ -32220,12 +36221,12 @@ func decodePullsListReviewsResponse(resp *http.Response) (res *PullsListReviewsO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []PullRequestReview if err := func() error { response = make([]PullRequestReview, 0) @@ -32239,12 +36240,17 @@ func decodePullsListReviewsResponse(resp *http.Response) (res *PullsListReviewsO }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PullsListReviewsOKHeaders wrapper.Response = response @@ -32302,23 +36308,28 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestMergeResult if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32332,23 +36343,28 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullsMergeApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32362,23 +36378,28 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullsMergeApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32392,23 +36413,28 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullsMergeMethodNotAllowed if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32422,23 +36448,28 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullsMergeConflict if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32452,23 +36483,28 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32488,23 +36524,28 @@ func decodePullsRemoveRequestedReviewersResponse(resp *http.Response) (res Pulls } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32518,23 +36559,28 @@ func decodePullsRemoveRequestedReviewersResponse(resp *http.Response) (res Pulls } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32554,23 +36600,28 @@ func decodePullsSubmitReviewResponse(resp *http.Response) (res PullsSubmitReview } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32584,23 +36635,28 @@ func decodePullsSubmitReviewResponse(resp *http.Response) (res PullsSubmitReview } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullsSubmitReviewApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32614,23 +36670,28 @@ func decodePullsSubmitReviewResponse(resp *http.Response) (res PullsSubmitReview } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullsSubmitReviewApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32644,23 +36705,28 @@ func decodePullsSubmitReviewResponse(resp *http.Response) (res PullsSubmitReview } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32680,23 +36746,28 @@ func decodePullsUpdateResponse(resp *http.Response) (res PullsUpdateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32710,23 +36781,28 @@ func decodePullsUpdateResponse(resp *http.Response) (res PullsUpdateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32740,23 +36816,28 @@ func decodePullsUpdateResponse(resp *http.Response) (res PullsUpdateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32776,23 +36857,28 @@ func decodePullsUpdateBranchResponse(resp *http.Response) (res PullsUpdateBranch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullsUpdateBranchAccepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32806,23 +36892,28 @@ func decodePullsUpdateBranchResponse(resp *http.Response) (res PullsUpdateBranch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32836,23 +36927,28 @@ func decodePullsUpdateBranchResponse(resp *http.Response) (res PullsUpdateBranch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32872,23 +36968,28 @@ func decodePullsUpdateReviewResponse(resp *http.Response) (res PullsUpdateReview } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32902,23 +37003,28 @@ func decodePullsUpdateReviewResponse(resp *http.Response) (res PullsUpdateReview } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32938,23 +37044,28 @@ func decodePullsUpdateReviewCommentResponse(resp *http.Response) (res *PullReque } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PullRequestReviewComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -32974,23 +37085,28 @@ func decodeRateLimitGetResponse(resp *http.Response) (res RateLimitGetRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RateLimitOverview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper RateLimitOverviewHeaders wrapper.Response = response @@ -33115,23 +37231,28 @@ func decodeRateLimitGetResponse(resp *http.Response) (res RateLimitGetRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33151,23 +37272,28 @@ func decodeReactionsCreateForCommitCommentResponse(resp *http.Response) (res Rea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForCommitCommentApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33181,23 +37307,28 @@ func decodeReactionsCreateForCommitCommentResponse(resp *http.Response) (res Rea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForCommitCommentApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33211,23 +37342,28 @@ func decodeReactionsCreateForCommitCommentResponse(resp *http.Response) (res Rea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33241,23 +37377,28 @@ func decodeReactionsCreateForCommitCommentResponse(resp *http.Response) (res Rea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33277,23 +37418,28 @@ func decodeReactionsCreateForIssueResponse(resp *http.Response) (res ReactionsCr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForIssueApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33307,23 +37453,28 @@ func decodeReactionsCreateForIssueResponse(resp *http.Response) (res ReactionsCr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForIssueApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33337,23 +37488,28 @@ func decodeReactionsCreateForIssueResponse(resp *http.Response) (res ReactionsCr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33367,23 +37523,28 @@ func decodeReactionsCreateForIssueResponse(resp *http.Response) (res ReactionsCr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33403,23 +37564,28 @@ func decodeReactionsCreateForIssueCommentResponse(resp *http.Response) (res Reac } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForIssueCommentApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33433,23 +37599,28 @@ func decodeReactionsCreateForIssueCommentResponse(resp *http.Response) (res Reac } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForIssueCommentApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33463,23 +37634,28 @@ func decodeReactionsCreateForIssueCommentResponse(resp *http.Response) (res Reac } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33493,23 +37669,28 @@ func decodeReactionsCreateForIssueCommentResponse(resp *http.Response) (res Reac } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33529,23 +37710,28 @@ func decodeReactionsCreateForPullRequestReviewCommentResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForPullRequestReviewCommentApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33559,23 +37745,28 @@ func decodeReactionsCreateForPullRequestReviewCommentResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForPullRequestReviewCommentApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33589,23 +37780,28 @@ func decodeReactionsCreateForPullRequestReviewCommentResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33619,23 +37815,28 @@ func decodeReactionsCreateForPullRequestReviewCommentResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33655,23 +37856,28 @@ func decodeReactionsCreateForReleaseResponse(resp *http.Response) (res Reactions } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForReleaseApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33685,23 +37891,28 @@ func decodeReactionsCreateForReleaseResponse(resp *http.Response) (res Reactions } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForReleaseApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33715,23 +37926,28 @@ func decodeReactionsCreateForReleaseResponse(resp *http.Response) (res Reactions } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33745,23 +37961,28 @@ func decodeReactionsCreateForReleaseResponse(resp *http.Response) (res Reactions } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33781,23 +38002,28 @@ func decodeReactionsCreateForTeamDiscussionCommentInOrgResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForTeamDiscussionCommentInOrgApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33811,23 +38037,28 @@ func decodeReactionsCreateForTeamDiscussionCommentInOrgResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForTeamDiscussionCommentInOrgApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33847,23 +38078,28 @@ func decodeReactionsCreateForTeamDiscussionCommentLegacyResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Reaction if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33883,23 +38119,28 @@ func decodeReactionsCreateForTeamDiscussionInOrgResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForTeamDiscussionInOrgApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33913,23 +38154,28 @@ func decodeReactionsCreateForTeamDiscussionInOrgResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsCreateForTeamDiscussionInOrgApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -33949,23 +38195,28 @@ func decodeReactionsCreateForTeamDiscussionLegacyResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Reaction if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34045,23 +38296,28 @@ func decodeReactionsDeleteLegacyResponse(resp *http.Response) (res ReactionsDele } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsDeleteLegacyApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34075,23 +38331,28 @@ func decodeReactionsDeleteLegacyResponse(resp *http.Response) (res ReactionsDele } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsDeleteLegacyApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34105,23 +38366,28 @@ func decodeReactionsDeleteLegacyResponse(resp *http.Response) (res ReactionsDele } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsDeleteLegacyApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34135,23 +38401,28 @@ func decodeReactionsDeleteLegacyResponse(resp *http.Response) (res ReactionsDele } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34171,12 +38442,12 @@ func decodeReactionsListForCommitCommentResponse(resp *http.Response) (res React } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Reaction if err := func() error { response = make([]Reaction, 0) @@ -34190,12 +38461,17 @@ func decodeReactionsListForCommitCommentResponse(resp *http.Response) (res React }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReactionsListForCommitCommentOKHeaders wrapper.Response = response @@ -34247,23 +38523,28 @@ func decodeReactionsListForCommitCommentResponse(resp *http.Response) (res React } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34277,23 +38558,28 @@ func decodeReactionsListForCommitCommentResponse(resp *http.Response) (res React } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34313,12 +38599,12 @@ func decodeReactionsListForIssueResponse(resp *http.Response) (res ReactionsList } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Reaction if err := func() error { response = make([]Reaction, 0) @@ -34332,12 +38618,17 @@ func decodeReactionsListForIssueResponse(resp *http.Response) (res ReactionsList }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReactionsListForIssueOKHeaders wrapper.Response = response @@ -34389,23 +38680,28 @@ func decodeReactionsListForIssueResponse(resp *http.Response) (res ReactionsList } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsListForIssueApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34419,23 +38715,28 @@ func decodeReactionsListForIssueResponse(resp *http.Response) (res ReactionsList } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReactionsListForIssueApplicationJSONGone if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34449,23 +38750,28 @@ func decodeReactionsListForIssueResponse(resp *http.Response) (res ReactionsList } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34485,12 +38791,12 @@ func decodeReactionsListForIssueCommentResponse(resp *http.Response) (res Reacti } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Reaction if err := func() error { response = make([]Reaction, 0) @@ -34504,12 +38810,17 @@ func decodeReactionsListForIssueCommentResponse(resp *http.Response) (res Reacti }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReactionsListForIssueCommentOKHeaders wrapper.Response = response @@ -34561,166 +38872,29 @@ func decodeReactionsListForIssueCommentResponse(resp *http.Response) (res Reacti } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 415: - // Code 415. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - - d := jx.DecodeBytes(b) - var response PreviewHeaderMissing - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeReactionsListForPullRequestReviewCommentResponse(resp *http.Response) (res ReactionsListForPullRequestReviewCommentRes, err error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - - d := jx.DecodeBytes(b) - var response []Reaction - if err := func() error { - response = make([]Reaction, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem Reaction - if err := elem.Decode(d); err != nil { - return err - } - response = append(response, elem) - return nil - }); err != nil { - return err + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper ReactionsListForPullRequestReviewCommentOKHeaders - wrapper.Response = response - h := uri.NewHeaderDecoder(resp.Header) - // Parse "Link" header. - { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "Link", - Explode: false, - } - if err := func() error { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - var wrapperDotLinkVal string - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - wrapperDotLinkVal = c - return nil - }(); err != nil { - return err - } - wrapper.Link.SetTo(wrapperDotLinkVal) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "parse Link header") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, } - } - return &wrapper, nil - default: - return res, validate.InvalidContentType(ct) - } - case 404: - // Code 404. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { return res, err } - - d := jx.DecodeBytes(b) - var response BasicError - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } return &response, nil default: return res, validate.InvalidContentType(ct) @@ -34733,23 +38907,185 @@ func decodeReactionsListForPullRequestReviewCommentResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeReactionsListForPullRequestReviewCommentResponse(resp *http.Response) (res ReactionsListForPullRequestReviewCommentRes, err error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response []Reaction + if err := func() error { + response = make([]Reaction, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem Reaction + if err := elem.Decode(d); err != nil { + return err + } + response = append(response, elem) + return nil + }); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + var wrapper ReactionsListForPullRequestReviewCommentOKHeaders + wrapper.Response = response + h := uri.NewHeaderDecoder(resp.Header) + // Parse "Link" header. + { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "Link", + Explode: false, + } + if err := func() error { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + var wrapperDotLinkVal string + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + wrapperDotLinkVal = c + return nil + }(); err != nil { + return err + } + wrapper.Link.SetTo(wrapperDotLinkVal) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "parse Link header") + } } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + return &wrapper, nil + default: + return res, validate.InvalidContentType(ct) + } + case 404: + // Code 404. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response BasicError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 415: + // Code 415. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response PreviewHeaderMissing + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -34769,12 +39105,12 @@ func decodeReactionsListForTeamDiscussionCommentInOrgResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Reaction if err := func() error { response = make([]Reaction, 0) @@ -34788,12 +39124,17 @@ func decodeReactionsListForTeamDiscussionCommentInOrgResponse(resp *http.Respons }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReactionsListForTeamDiscussionCommentInOrgOKHeaders wrapper.Response = response @@ -34851,12 +39192,12 @@ func decodeReactionsListForTeamDiscussionCommentLegacyResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Reaction if err := func() error { response = make([]Reaction, 0) @@ -34870,12 +39211,17 @@ func decodeReactionsListForTeamDiscussionCommentLegacyResponse(resp *http.Respon }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReactionsListForTeamDiscussionCommentLegacyOKHeaders wrapper.Response = response @@ -34933,12 +39279,12 @@ func decodeReactionsListForTeamDiscussionInOrgResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Reaction if err := func() error { response = make([]Reaction, 0) @@ -34952,12 +39298,17 @@ func decodeReactionsListForTeamDiscussionInOrgResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReactionsListForTeamDiscussionInOrgOKHeaders wrapper.Response = response @@ -35015,12 +39366,12 @@ func decodeReactionsListForTeamDiscussionLegacyResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Reaction if err := func() error { response = make([]Reaction, 0) @@ -35034,12 +39385,17 @@ func decodeReactionsListForTeamDiscussionLegacyResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReactionsListForTeamDiscussionLegacyOKHeaders wrapper.Response = response @@ -35103,23 +39459,28 @@ func decodeReposAcceptInvitationResponse(resp *http.Response) (res ReposAcceptIn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposAcceptInvitationApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35133,23 +39494,28 @@ func decodeReposAcceptInvitationResponse(resp *http.Response) (res ReposAcceptIn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposAcceptInvitationApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35163,23 +39529,28 @@ func decodeReposAcceptInvitationResponse(resp *http.Response) (res ReposAcceptIn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposAcceptInvitationApplicationJSONConflict if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35199,23 +39570,28 @@ func decodeReposAddAppAccessRestrictionsResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposAddAppAccessRestrictionsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35229,23 +39605,28 @@ func decodeReposAddAppAccessRestrictionsResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35265,23 +39646,28 @@ func decodeReposAddCollaboratorResponse(resp *http.Response) (res ReposAddCollab } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RepositoryInvitation if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35298,23 +39684,28 @@ func decodeReposAddCollaboratorResponse(resp *http.Response) (res ReposAddCollab } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35328,23 +39719,28 @@ func decodeReposAddCollaboratorResponse(resp *http.Response) (res ReposAddCollab } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35364,23 +39760,28 @@ func decodeReposAddStatusCheckContextsResponse(resp *http.Response) (res ReposAd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposAddStatusCheckContextsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35394,23 +39795,28 @@ func decodeReposAddStatusCheckContextsResponse(resp *http.Response) (res ReposAd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposAddStatusCheckContextsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35424,23 +39830,28 @@ func decodeReposAddStatusCheckContextsResponse(resp *http.Response) (res ReposAd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposAddStatusCheckContextsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35454,23 +39865,28 @@ func decodeReposAddStatusCheckContextsResponse(resp *http.Response) (res ReposAd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35490,23 +39906,28 @@ func decodeReposAddTeamAccessRestrictionsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposAddTeamAccessRestrictionsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35520,23 +39941,28 @@ func decodeReposAddTeamAccessRestrictionsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35556,23 +39982,28 @@ func decodeReposAddUserAccessRestrictionsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposAddUserAccessRestrictionsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35586,23 +40017,28 @@ func decodeReposAddUserAccessRestrictionsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35646,23 +40082,28 @@ func decodeReposCompareCommitsResponse(resp *http.Response) (res ReposCompareCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CommitComparison if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35676,23 +40117,28 @@ func decodeReposCompareCommitsResponse(resp *http.Response) (res ReposCompareCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCompareCommitsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35706,23 +40152,28 @@ func decodeReposCompareCommitsResponse(resp *http.Response) (res ReposCompareCom } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCompareCommitsApplicationJSONInternalServerError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35742,23 +40193,28 @@ func decodeReposCreateAutolinkResponse(resp *http.Response) (res ReposCreateAuto } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Autolink if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper AutolinkHeaders wrapper.Response = response @@ -35810,23 +40266,28 @@ func decodeReposCreateAutolinkResponse(resp *http.Response) (res ReposCreateAuto } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35846,23 +40307,28 @@ func decodeReposCreateCommitCommentResponse(resp *http.Response) (res ReposCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CommitComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper CommitCommentHeaders wrapper.Response = response @@ -35914,23 +40380,28 @@ func decodeReposCreateCommitCommentResponse(resp *http.Response) (res ReposCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35944,23 +40415,28 @@ func decodeReposCreateCommitCommentResponse(resp *http.Response) (res ReposCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -35980,23 +40456,28 @@ func decodeReposCreateCommitSignatureProtectionResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProtectedBranchAdminEnforced if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36010,23 +40491,28 @@ func decodeReposCreateCommitSignatureProtectionResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36046,23 +40532,28 @@ func decodeReposCreateCommitStatusResponse(resp *http.Response) (res *StatusHead } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Status if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper StatusHeaders wrapper.Response = response @@ -36120,23 +40611,28 @@ func decodeReposCreateDeployKeyResponse(resp *http.Response) (res ReposCreateDep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response DeployKey if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper DeployKeyHeaders wrapper.Response = response @@ -36188,23 +40684,28 @@ func decodeReposCreateDeployKeyResponse(resp *http.Response) (res ReposCreateDep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36224,23 +40725,28 @@ func decodeReposCreateDeploymentResponse(resp *http.Response) (res ReposCreateDe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Deployment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36254,23 +40760,28 @@ func decodeReposCreateDeploymentResponse(resp *http.Response) (res ReposCreateDe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateDeploymentAccepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36287,23 +40798,28 @@ func decodeReposCreateDeploymentResponse(resp *http.Response) (res ReposCreateDe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36323,23 +40839,28 @@ func decodeReposCreateDeploymentStatusResponse(resp *http.Response) (res ReposCr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response DeploymentStatus if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper DeploymentStatusHeaders wrapper.Response = response @@ -36391,23 +40912,28 @@ func decodeReposCreateDeploymentStatusResponse(resp *http.Response) (res ReposCr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36430,23 +40956,28 @@ func decodeReposCreateDispatchEventResponse(resp *http.Response) (res ReposCreat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36466,23 +40997,28 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Repository if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper RepositoryHeaders wrapper.Response = response @@ -36537,23 +41073,28 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateForAuthenticatedUserApplicationJSONBadRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36567,23 +41108,28 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36597,23 +41143,28 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36627,23 +41178,28 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36657,23 +41213,28 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36693,23 +41254,28 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response FullRepository if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36723,23 +41289,28 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateForkApplicationJSONBadRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36753,23 +41324,28 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateForkApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36783,23 +41359,28 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateForkApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36813,23 +41394,28 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36849,23 +41435,28 @@ func decodeReposCreateInOrgResponse(resp *http.Response) (res ReposCreateInOrgRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Repository if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper RepositoryHeaders wrapper.Response = response @@ -36917,23 +41508,28 @@ func decodeReposCreateInOrgResponse(resp *http.Response) (res ReposCreateInOrgRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36947,23 +41543,28 @@ func decodeReposCreateInOrgResponse(resp *http.Response) (res ReposCreateInOrgRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -36983,23 +41584,28 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateOrUpdateFileContentsApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37013,23 +41619,28 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateOrUpdateFileContentsApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37043,23 +41654,28 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateOrUpdateFileContentsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37073,23 +41689,28 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateOrUpdateFileContentsApplicationJSONConflict if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37103,23 +41724,28 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37139,23 +41765,28 @@ func decodeReposCreatePagesSiteResponse(resp *http.Response) (res ReposCreatePag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Page if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37169,23 +41800,28 @@ func decodeReposCreatePagesSiteResponse(resp *http.Response) (res ReposCreatePag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37199,23 +41835,28 @@ func decodeReposCreatePagesSiteResponse(resp *http.Response) (res ReposCreatePag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37229,23 +41870,28 @@ func decodeReposCreatePagesSiteResponse(resp *http.Response) (res ReposCreatePag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37265,23 +41911,28 @@ func decodeReposCreateReleaseResponse(resp *http.Response) (res ReposCreateRelea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Release if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReleaseHeaders wrapper.Response = response @@ -37333,23 +41984,28 @@ func decodeReposCreateReleaseResponse(resp *http.Response) (res ReposCreateRelea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37363,23 +42019,28 @@ func decodeReposCreateReleaseResponse(resp *http.Response) (res ReposCreateRelea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37399,23 +42060,28 @@ func decodeReposCreateUsingTemplateResponse(resp *http.Response) (res *Repositor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Repository if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper RepositoryHeaders wrapper.Response = response @@ -37473,23 +42139,28 @@ func decodeReposCreateWebhookResponse(resp *http.Response) (res ReposCreateWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Hook if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper HookHeaders wrapper.Response = response @@ -37541,23 +42212,28 @@ func decodeReposCreateWebhookResponse(resp *http.Response) (res ReposCreateWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateWebhookApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37571,23 +42247,28 @@ func decodeReposCreateWebhookResponse(resp *http.Response) (res ReposCreateWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposCreateWebhookApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37601,23 +42282,28 @@ func decodeReposCreateWebhookResponse(resp *http.Response) (res ReposCreateWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37643,23 +42329,28 @@ func decodeReposDeclineInvitationResponse(resp *http.Response) (res ReposDecline } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposDeclineInvitationApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37673,23 +42364,28 @@ func decodeReposDeclineInvitationResponse(resp *http.Response) (res ReposDecline } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposDeclineInvitationApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37703,23 +42399,28 @@ func decodeReposDeclineInvitationResponse(resp *http.Response) (res ReposDecline } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposDeclineInvitationApplicationJSONConflict if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37742,23 +42443,28 @@ func decodeReposDeleteResponse(resp *http.Response) (res ReposDeleteRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposDeleteApplicationJSONTemporaryRedirect if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37772,23 +42478,28 @@ func decodeReposDeleteResponse(resp *http.Response) (res ReposDeleteRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposDeleteForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37802,23 +42513,28 @@ func decodeReposDeleteResponse(resp *http.Response) (res ReposDeleteRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposDeleteApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37850,23 +42566,28 @@ func decodeReposDeleteAdminBranchProtectionResponse(resp *http.Response) (res Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37898,23 +42619,28 @@ func decodeReposDeleteAutolinkResponse(resp *http.Response) (res ReposDeleteAuto } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37937,23 +42663,28 @@ func decodeReposDeleteBranchProtectionResponse(resp *http.Response) (res ReposDe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -37976,23 +42707,28 @@ func decodeReposDeleteCommitCommentResponse(resp *http.Response) (res ReposDelet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38015,23 +42751,28 @@ func decodeReposDeleteCommitSignatureProtectionResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38063,23 +42804,28 @@ func decodeReposDeleteDeploymentResponse(resp *http.Response) (res ReposDeleteDe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38093,23 +42839,28 @@ func decodeReposDeleteDeploymentResponse(resp *http.Response) (res ReposDeleteDe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38129,23 +42880,28 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response FileCommit if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38159,23 +42915,28 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposDeleteFileApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38189,23 +42950,28 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposDeleteFileApplicationJSONConflict if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38219,23 +42985,28 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38249,23 +43020,28 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38297,23 +43073,28 @@ func decodeReposDeletePagesSiteResponse(resp *http.Response) (res ReposDeletePag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38327,23 +43108,28 @@ func decodeReposDeletePagesSiteResponse(resp *http.Response) (res ReposDeletePag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38357,23 +43143,28 @@ func decodeReposDeletePagesSiteResponse(resp *http.Response) (res ReposDeletePag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38396,23 +43187,28 @@ func decodeReposDeletePullRequestReviewProtectionResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38453,23 +43249,28 @@ func decodeReposDeleteWebhookResponse(resp *http.Response) (res ReposDeleteWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38617,23 +43418,28 @@ func decodeReposEnableLfsForRepoResponse(resp *http.Response) (res ReposEnableLf } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Accepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38665,23 +43471,28 @@ func decodeReposGetResponse(resp *http.Response) (res ReposGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response FullRepository if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38695,23 +43506,28 @@ func decodeReposGetResponse(resp *http.Response) (res ReposGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetApplicationJSONMovedPermanently if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38725,23 +43541,28 @@ func decodeReposGetResponse(resp *http.Response) (res ReposGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38755,23 +43576,28 @@ func decodeReposGetResponse(resp *http.Response) (res ReposGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38791,23 +43617,28 @@ func decodeReposGetAccessRestrictionsResponse(resp *http.Response) (res ReposGet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BranchRestrictionPolicy if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38821,23 +43652,28 @@ func decodeReposGetAccessRestrictionsResponse(resp *http.Response) (res ReposGet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38857,23 +43693,28 @@ func decodeReposGetAdminBranchProtectionResponse(resp *http.Response) (res *Prot } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProtectedBranchAdminEnforced if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38893,23 +43734,28 @@ func decodeReposGetAllStatusCheckContextsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetAllStatusCheckContextsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38923,23 +43769,28 @@ func decodeReposGetAllStatusCheckContextsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38959,23 +43810,28 @@ func decodeReposGetAllTopicsResponse(resp *http.Response) (res ReposGetAllTopics } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Topic if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -38989,23 +43845,28 @@ func decodeReposGetAllTopicsResponse(resp *http.Response) (res ReposGetAllTopics } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39019,23 +43880,28 @@ func decodeReposGetAllTopicsResponse(resp *http.Response) (res ReposGetAllTopics } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39055,23 +43921,28 @@ func decodeReposGetAppsWithAccessToProtectedBranchResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetAppsWithAccessToProtectedBranchOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39085,23 +43956,28 @@ func decodeReposGetAppsWithAccessToProtectedBranchResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39121,23 +43997,28 @@ func decodeReposGetAutolinkResponse(resp *http.Response) (res ReposGetAutolinkRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Autolink if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39151,23 +44032,28 @@ func decodeReposGetAutolinkResponse(resp *http.Response) (res ReposGetAutolinkRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39187,23 +44073,28 @@ func decodeReposGetBranchResponse(resp *http.Response) (res ReposGetBranchRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BranchWithProtection if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39217,23 +44108,28 @@ func decodeReposGetBranchResponse(resp *http.Response) (res ReposGetBranchRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetBranchApplicationJSONMovedPermanently if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39247,23 +44143,28 @@ func decodeReposGetBranchResponse(resp *http.Response) (res ReposGetBranchRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetBranchApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39277,23 +44178,28 @@ func decodeReposGetBranchResponse(resp *http.Response) (res ReposGetBranchRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39313,23 +44219,28 @@ func decodeReposGetBranchProtectionResponse(resp *http.Response) (res ReposGetBr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BranchProtection if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39343,23 +44254,28 @@ func decodeReposGetBranchProtectionResponse(resp *http.Response) (res ReposGetBr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39379,23 +44295,28 @@ func decodeReposGetClonesResponse(resp *http.Response) (res ReposGetClonesRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CloneTraffic if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39409,23 +44330,28 @@ func decodeReposGetClonesResponse(resp *http.Response) (res ReposGetClonesRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39445,23 +44371,28 @@ func decodeReposGetCodeFrequencyStatsResponse(resp *http.Response) (res ReposGet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetCodeFrequencyStatsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39475,23 +44406,28 @@ func decodeReposGetCodeFrequencyStatsResponse(resp *http.Response) (res ReposGet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Accepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39514,23 +44450,28 @@ func decodeReposGetCollaboratorPermissionLevelResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RepositoryCollaboratorPermission if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39544,23 +44485,28 @@ func decodeReposGetCollaboratorPermissionLevelResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39580,23 +44526,28 @@ func decodeReposGetCombinedStatusForRefResponse(resp *http.Response) (res ReposG } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CombinedCommitStatus if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39610,23 +44561,28 @@ func decodeReposGetCombinedStatusForRefResponse(resp *http.Response) (res ReposG } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39646,23 +44602,28 @@ func decodeReposGetCommitResponse(resp *http.Response) (res ReposGetCommitRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Commit if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39676,23 +44637,28 @@ func decodeReposGetCommitResponse(resp *http.Response) (res ReposGetCommitRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetCommitApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39706,23 +44672,28 @@ func decodeReposGetCommitResponse(resp *http.Response) (res ReposGetCommitRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39736,23 +44707,28 @@ func decodeReposGetCommitResponse(resp *http.Response) (res ReposGetCommitRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetCommitApplicationJSONInternalServerError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39772,23 +44748,28 @@ func decodeReposGetCommitActivityStatsResponse(resp *http.Response) (res ReposGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetCommitActivityStatsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39802,23 +44783,28 @@ func decodeReposGetCommitActivityStatsResponse(resp *http.Response) (res ReposGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Accepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39841,23 +44827,28 @@ func decodeReposGetCommitCommentResponse(resp *http.Response) (res ReposGetCommi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CommitComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39871,23 +44862,28 @@ func decodeReposGetCommitCommentResponse(resp *http.Response) (res ReposGetCommi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39907,23 +44903,28 @@ func decodeReposGetCommitSignatureProtectionResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProtectedBranchAdminEnforced if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39937,23 +44938,28 @@ func decodeReposGetCommitSignatureProtectionResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -39973,23 +44979,28 @@ func decodeReposGetCommunityProfileMetricsResponse(resp *http.Response) (res *Co } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CommunityProfile if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40009,23 +45020,28 @@ func decodeReposGetContributorsStatsResponse(resp *http.Response) (res ReposGetC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetContributorsStatsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40039,23 +45055,28 @@ func decodeReposGetContributorsStatsResponse(resp *http.Response) (res ReposGetC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Accepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40078,23 +45099,28 @@ func decodeReposGetDeployKeyResponse(resp *http.Response) (res ReposGetDeployKey } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response DeployKey if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40108,23 +45134,28 @@ func decodeReposGetDeployKeyResponse(resp *http.Response) (res ReposGetDeployKey } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40144,23 +45175,28 @@ func decodeReposGetDeploymentResponse(resp *http.Response) (res ReposGetDeployme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Deployment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40174,23 +45210,28 @@ func decodeReposGetDeploymentResponse(resp *http.Response) (res ReposGetDeployme } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40210,23 +45251,28 @@ func decodeReposGetDeploymentStatusResponse(resp *http.Response) (res ReposGetDe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response DeploymentStatus if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40240,23 +45286,28 @@ func decodeReposGetDeploymentStatusResponse(resp *http.Response) (res ReposGetDe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40270,23 +45321,28 @@ func decodeReposGetDeploymentStatusResponse(resp *http.Response) (res ReposGetDe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40306,23 +45362,28 @@ func decodeReposGetLatestPagesBuildResponse(resp *http.Response) (res *PageBuild } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PageBuild if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40342,23 +45403,28 @@ func decodeReposGetLatestReleaseResponse(resp *http.Response) (res *Release, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Release if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40378,23 +45444,28 @@ func decodeReposGetPagesResponse(resp *http.Response) (res ReposGetPagesRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Page if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40408,23 +45479,28 @@ func decodeReposGetPagesResponse(resp *http.Response) (res ReposGetPagesRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40444,23 +45520,28 @@ func decodeReposGetPagesBuildResponse(resp *http.Response) (res *PageBuild, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PageBuild if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40480,23 +45561,28 @@ func decodeReposGetPagesHealthCheckResponse(resp *http.Response) (res ReposGetPa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PagesHealthCheck if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40510,23 +45596,28 @@ func decodeReposGetPagesHealthCheckResponse(resp *http.Response) (res ReposGetPa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response EmptyObject if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40543,23 +45634,28 @@ func decodeReposGetPagesHealthCheckResponse(resp *http.Response) (res ReposGetPa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40582,23 +45678,28 @@ func decodeReposGetParticipationStatsResponse(resp *http.Response) (res ReposGet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ParticipationStats if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40612,23 +45713,28 @@ func decodeReposGetParticipationStatsResponse(resp *http.Response) (res ReposGet } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40648,23 +45754,28 @@ func decodeReposGetPullRequestReviewProtectionResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProtectedBranchPullRequestReview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40684,23 +45795,28 @@ func decodeReposGetPunchCardStatsResponse(resp *http.Response) (res ReposGetPunc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetPunchCardStatsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40723,23 +45839,28 @@ func decodeReposGetReadmeResponse(resp *http.Response) (res ReposGetReadmeRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ContentFile if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40753,23 +45874,28 @@ func decodeReposGetReadmeResponse(resp *http.Response) (res ReposGetReadmeRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40783,23 +45909,28 @@ func decodeReposGetReadmeResponse(resp *http.Response) (res ReposGetReadmeRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40819,23 +45950,28 @@ func decodeReposGetReadmeInDirectoryResponse(resp *http.Response) (res ReposGetR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ContentFile if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40849,23 +45985,28 @@ func decodeReposGetReadmeInDirectoryResponse(resp *http.Response) (res ReposGetR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40879,23 +46020,28 @@ func decodeReposGetReadmeInDirectoryResponse(resp *http.Response) (res ReposGetR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40915,23 +46061,28 @@ func decodeReposGetReleaseResponse(resp *http.Response) (res ReposGetReleaseRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Release if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40945,23 +46096,28 @@ func decodeReposGetReleaseResponse(resp *http.Response) (res ReposGetReleaseRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -40981,23 +46137,28 @@ func decodeReposGetReleaseAssetResponse(resp *http.Response) (res ReposGetReleas } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReleaseAsset if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41014,23 +46175,28 @@ func decodeReposGetReleaseAssetResponse(resp *http.Response) (res ReposGetReleas } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41044,23 +46210,28 @@ func decodeReposGetReleaseAssetResponse(resp *http.Response) (res ReposGetReleas } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41080,23 +46251,28 @@ func decodeReposGetReleaseByTagResponse(resp *http.Response) (res ReposGetReleas } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Release if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41110,23 +46286,28 @@ func decodeReposGetReleaseByTagResponse(resp *http.Response) (res ReposGetReleas } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41146,23 +46327,28 @@ func decodeReposGetStatusChecksProtectionResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response StatusCheckPolicy if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41176,23 +46362,28 @@ func decodeReposGetStatusChecksProtectionResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41212,23 +46403,28 @@ func decodeReposGetTeamsWithAccessToProtectedBranchResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetTeamsWithAccessToProtectedBranchOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41242,23 +46438,28 @@ func decodeReposGetTeamsWithAccessToProtectedBranchResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41278,23 +46479,28 @@ func decodeReposGetTopPathsResponse(resp *http.Response) (res ReposGetTopPathsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetTopPathsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41308,23 +46514,28 @@ func decodeReposGetTopPathsResponse(resp *http.Response) (res ReposGetTopPathsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41344,23 +46555,28 @@ func decodeReposGetTopReferrersResponse(resp *http.Response) (res ReposGetTopRef } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetTopReferrersOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41374,23 +46590,28 @@ func decodeReposGetTopReferrersResponse(resp *http.Response) (res ReposGetTopRef } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41410,23 +46631,28 @@ func decodeReposGetUsersWithAccessToProtectedBranchResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposGetUsersWithAccessToProtectedBranchOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41440,23 +46666,28 @@ func decodeReposGetUsersWithAccessToProtectedBranchResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41476,23 +46707,28 @@ func decodeReposGetViewsResponse(resp *http.Response) (res ReposGetViewsRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ViewTraffic if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41506,23 +46742,28 @@ func decodeReposGetViewsResponse(resp *http.Response) (res ReposGetViewsRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41542,23 +46783,28 @@ func decodeReposGetWebhookResponse(resp *http.Response) (res ReposGetWebhookRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Hook if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41572,23 +46818,28 @@ func decodeReposGetWebhookResponse(resp *http.Response) (res ReposGetWebhookRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41608,23 +46859,28 @@ func decodeReposGetWebhookConfigForRepoResponse(resp *http.Response) (res *Webho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WebhookConfig if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41644,23 +46900,28 @@ func decodeReposGetWebhookDeliveryResponse(resp *http.Response) (res ReposGetWeb } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response HookDelivery if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41674,23 +46935,28 @@ func decodeReposGetWebhookDeliveryResponse(resp *http.Response) (res ReposGetWeb } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41704,23 +46970,28 @@ func decodeReposGetWebhookDeliveryResponse(resp *http.Response) (res ReposGetWeb } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41740,12 +47011,12 @@ func decodeReposListAutolinksResponse(resp *http.Response) (res []Autolink, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Autolink if err := func() error { response = make([]Autolink, 0) @@ -41759,12 +47030,17 @@ func decodeReposListAutolinksResponse(resp *http.Response) (res []Autolink, err }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -41784,12 +47060,12 @@ func decodeReposListBranchesResponse(resp *http.Response) (res ReposListBranches } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []ShortBranch if err := func() error { response = make([]ShortBranch, 0) @@ -41803,12 +47079,17 @@ func decodeReposListBranchesResponse(resp *http.Response) (res ReposListBranches }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListBranchesOKHeaders wrapper.Response = response @@ -41860,23 +47141,28 @@ func decodeReposListBranchesResponse(resp *http.Response) (res ReposListBranches } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41896,23 +47182,28 @@ func decodeReposListBranchesForHeadCommitResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListBranchesForHeadCommitOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41926,23 +47217,28 @@ func decodeReposListBranchesForHeadCommitResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -41962,12 +47258,12 @@ func decodeReposListCollaboratorsResponse(resp *http.Response) (res ReposListCol } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Collaborator if err := func() error { response = make([]Collaborator, 0) @@ -41981,12 +47277,17 @@ func decodeReposListCollaboratorsResponse(resp *http.Response) (res ReposListCol }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListCollaboratorsOKHeaders wrapper.Response = response @@ -42038,23 +47339,28 @@ func decodeReposListCollaboratorsResponse(resp *http.Response) (res ReposListCol } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -42074,12 +47380,12 @@ func decodeReposListCommentsForCommitResponse(resp *http.Response) (res *ReposLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []CommitComment if err := func() error { response = make([]CommitComment, 0) @@ -42093,12 +47399,17 @@ func decodeReposListCommentsForCommitResponse(resp *http.Response) (res *ReposLi }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListCommentsForCommitOKHeaders wrapper.Response = response @@ -42156,12 +47467,12 @@ func decodeReposListCommitCommentsForRepoResponse(resp *http.Response) (res *Rep } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []CommitComment if err := func() error { response = make([]CommitComment, 0) @@ -42175,12 +47486,17 @@ func decodeReposListCommitCommentsForRepoResponse(resp *http.Response) (res *Rep }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListCommitCommentsForRepoOKHeaders wrapper.Response = response @@ -42238,12 +47554,12 @@ func decodeReposListCommitStatusesForRefResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Status if err := func() error { response = make([]Status, 0) @@ -42257,12 +47573,17 @@ func decodeReposListCommitStatusesForRefResponse(resp *http.Response) (res Repos }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListCommitStatusesForRefOKHeaders wrapper.Response = response @@ -42314,23 +47635,28 @@ func decodeReposListCommitStatusesForRefResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -42350,12 +47676,12 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Commit if err := func() error { response = make([]Commit, 0) @@ -42369,12 +47695,17 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListCommitsOKHeaders wrapper.Response = response @@ -42426,23 +47757,28 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListCommitsApplicationJSONBadRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -42456,23 +47792,28 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListCommitsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -42486,23 +47827,28 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListCommitsApplicationJSONConflict if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -42516,23 +47862,28 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListCommitsApplicationJSONInternalServerError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -42552,12 +47903,12 @@ func decodeReposListContributorsResponse(resp *http.Response) (res ReposListCont } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Contributor if err := func() error { response = make([]Contributor, 0) @@ -42571,12 +47922,17 @@ func decodeReposListContributorsResponse(resp *http.Response) (res ReposListCont }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListContributorsOKHeaders wrapper.Response = response @@ -42631,23 +47987,28 @@ func decodeReposListContributorsResponse(resp *http.Response) (res ReposListCont } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListContributorsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -42661,23 +48022,28 @@ func decodeReposListContributorsResponse(resp *http.Response) (res ReposListCont } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListContributorsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -42697,12 +48063,12 @@ func decodeReposListDeployKeysResponse(resp *http.Response) (res *ReposListDeplo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []DeployKey if err := func() error { response = make([]DeployKey, 0) @@ -42716,96 +48082,106 @@ func decodeReposListDeployKeysResponse(resp *http.Response) (res *ReposListDeplo }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper ReposListDeployKeysOKHeaders - wrapper.Response = response - h := uri.NewHeaderDecoder(resp.Header) - // Parse "Link" header. - { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "Link", - Explode: false, + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, } - if err := func() error { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - var wrapperDotLinkVal string - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - wrapperDotLinkVal = c - return nil - }(); err != nil { - return err - } - wrapper.Link.SetTo(wrapperDotLinkVal) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "parse Link header") - } - } - return &wrapper, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeReposListDeploymentStatusesResponse(resp *http.Response) (res ReposListDeploymentStatusesRes, err error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - b, err := io.ReadAll(resp.Body) - if err != nil { return res, err } - - d := jx.DecodeBytes(b) - var response []DeploymentStatus - if err := func() error { - response = make([]DeploymentStatus, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem DeploymentStatus - if err := elem.Decode(d); err != nil { - return err - } - response = append(response, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") - } - var wrapper ReposListDeploymentStatusesOKHeaders + var wrapper ReposListDeployKeysOKHeaders + wrapper.Response = response + h := uri.NewHeaderDecoder(resp.Header) + // Parse "Link" header. + { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "Link", + Explode: false, + } + if err := func() error { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + var wrapperDotLinkVal string + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + wrapperDotLinkVal = c + return nil + }(); err != nil { + return err + } + wrapper.Link.SetTo(wrapperDotLinkVal) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "parse Link header") + } + } + return &wrapper, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeReposListDeploymentStatusesResponse(resp *http.Response) (res ReposListDeploymentStatusesRes, err error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + + d := jx.DecodeBytes(buf) + var response []DeploymentStatus + if err := func() error { + response = make([]DeploymentStatus, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem DeploymentStatus + if err := elem.Decode(d); err != nil { + return err + } + response = append(response, elem) + return nil + }); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + var wrapper ReposListDeploymentStatusesOKHeaders wrapper.Response = response h := uri.NewHeaderDecoder(resp.Header) // Parse "Link" header. @@ -42855,23 +48231,28 @@ func decodeReposListDeploymentStatusesResponse(resp *http.Response) (res ReposLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -42891,12 +48272,12 @@ func decodeReposListDeploymentsResponse(resp *http.Response) (res *ReposListDepl } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Deployment if err := func() error { response = make([]Deployment, 0) @@ -42910,12 +48291,17 @@ func decodeReposListDeploymentsResponse(resp *http.Response) (res *ReposListDepl }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListDeploymentsOKHeaders wrapper.Response = response @@ -42973,23 +48359,28 @@ func decodeReposListForAuthenticatedUserResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListForAuthenticatedUserOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -43006,23 +48397,28 @@ func decodeReposListForAuthenticatedUserResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -43036,23 +48432,28 @@ func decodeReposListForAuthenticatedUserResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -43066,23 +48467,28 @@ func decodeReposListForAuthenticatedUserResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -43102,12 +48508,12 @@ func decodeReposListForOrgResponse(resp *http.Response) (res *ReposListForOrgOKH } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -43121,12 +48527,17 @@ func decodeReposListForOrgResponse(resp *http.Response) (res *ReposListForOrgOKH }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListForOrgOKHeaders wrapper.Response = response @@ -43184,12 +48595,12 @@ func decodeReposListForUserResponse(resp *http.Response) (res *ReposListForUserO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -43203,12 +48614,17 @@ func decodeReposListForUserResponse(resp *http.Response) (res *ReposListForUserO }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListForUserOKHeaders wrapper.Response = response @@ -43266,12 +48682,12 @@ func decodeReposListForksResponse(resp *http.Response) (res ReposListForksRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -43285,12 +48701,17 @@ func decodeReposListForksResponse(resp *http.Response) (res ReposListForksRes, e }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListForksOKHeaders wrapper.Response = response @@ -43342,23 +48763,28 @@ func decodeReposListForksResponse(resp *http.Response) (res ReposListForksRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -43378,12 +48804,12 @@ func decodeReposListInvitationsResponse(resp *http.Response) (res *ReposListInvi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []RepositoryInvitation if err := func() error { response = make([]RepositoryInvitation, 0) @@ -43397,12 +48823,17 @@ func decodeReposListInvitationsResponse(resp *http.Response) (res *ReposListInvi }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListInvitationsOKHeaders wrapper.Response = response @@ -43460,12 +48891,12 @@ func decodeReposListInvitationsForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []RepositoryInvitation if err := func() error { response = make([]RepositoryInvitation, 0) @@ -43479,12 +48910,17 @@ func decodeReposListInvitationsForAuthenticatedUserResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListInvitationsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -43539,23 +48975,28 @@ func decodeReposListInvitationsForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListInvitationsForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -43569,23 +49010,28 @@ func decodeReposListInvitationsForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListInvitationsForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -43599,23 +49045,28 @@ func decodeReposListInvitationsForAuthenticatedUserResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListInvitationsForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -43635,23 +49086,28 @@ func decodeReposListLanguagesResponse(resp *http.Response) (res Language, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Language if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -43671,12 +49127,12 @@ func decodeReposListPagesBuildsResponse(resp *http.Response) (res *ReposListPage } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []PageBuild if err := func() error { response = make([]PageBuild, 0) @@ -43690,12 +49146,17 @@ func decodeReposListPagesBuildsResponse(resp *http.Response) (res *ReposListPage }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListPagesBuildsOKHeaders wrapper.Response = response @@ -43753,12 +49214,12 @@ func decodeReposListPublicResponse(resp *http.Response) (res ReposListPublicRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -43772,12 +49233,17 @@ func decodeReposListPublicResponse(resp *http.Response) (res ReposListPublicRes, }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListPublicOKHeaders wrapper.Response = response @@ -43832,23 +49298,28 @@ func decodeReposListPublicResponse(resp *http.Response) (res ReposListPublicRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -43868,12 +49339,12 @@ func decodeReposListPullRequestsAssociatedWithCommitResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []PullRequestSimple if err := func() error { response = make([]PullRequestSimple, 0) @@ -43887,12 +49358,17 @@ func decodeReposListPullRequestsAssociatedWithCommitResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListPullRequestsAssociatedWithCommitOKHeaders wrapper.Response = response @@ -43950,12 +49426,12 @@ func decodeReposListReleaseAssetsResponse(resp *http.Response) (res *ReposListRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []ReleaseAsset if err := func() error { response = make([]ReleaseAsset, 0) @@ -43969,12 +49445,17 @@ func decodeReposListReleaseAssetsResponse(resp *http.Response) (res *ReposListRe }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListReleaseAssetsOKHeaders wrapper.Response = response @@ -44032,12 +49513,12 @@ func decodeReposListReleasesResponse(resp *http.Response) (res ReposListReleases } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Release if err := func() error { response = make([]Release, 0) @@ -44051,12 +49532,17 @@ func decodeReposListReleasesResponse(resp *http.Response) (res ReposListReleases }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListReleasesOKHeaders wrapper.Response = response @@ -44108,23 +49594,28 @@ func decodeReposListReleasesResponse(resp *http.Response) (res ReposListReleases } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44144,12 +49635,12 @@ func decodeReposListTagsResponse(resp *http.Response) (res *ReposListTagsOKHeade } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Tag if err := func() error { response = make([]Tag, 0) @@ -44163,12 +49654,17 @@ func decodeReposListTagsResponse(resp *http.Response) (res *ReposListTagsOKHeade }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListTagsOKHeaders wrapper.Response = response @@ -44226,12 +49722,12 @@ func decodeReposListTeamsResponse(resp *http.Response) (res *ReposListTeamsOKHea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Team if err := func() error { response = make([]Team, 0) @@ -44245,12 +49741,17 @@ func decodeReposListTeamsResponse(resp *http.Response) (res *ReposListTeamsOKHea }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListTeamsOKHeaders wrapper.Response = response @@ -44308,23 +49809,28 @@ func decodeReposListWebhookDeliveriesResponse(resp *http.Response) (res ReposLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposListWebhookDeliveriesOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44338,23 +49844,28 @@ func decodeReposListWebhookDeliveriesResponse(resp *http.Response) (res ReposLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44368,23 +49879,28 @@ func decodeReposListWebhookDeliveriesResponse(resp *http.Response) (res ReposLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44404,12 +49920,12 @@ func decodeReposListWebhooksResponse(resp *http.Response) (res ReposListWebhooks } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Hook if err := func() error { response = make([]Hook, 0) @@ -44423,12 +49939,17 @@ func decodeReposListWebhooksResponse(resp *http.Response) (res ReposListWebhooks }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper ReposListWebhooksOKHeaders wrapper.Response = response @@ -44480,23 +50001,28 @@ func decodeReposListWebhooksResponse(resp *http.Response) (res ReposListWebhooks } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44516,23 +50042,28 @@ func decodeReposMergeResponse(resp *http.Response) (res ReposMergeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Commit if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44549,23 +50080,28 @@ func decodeReposMergeResponse(resp *http.Response) (res ReposMergeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44585,23 +50121,28 @@ func decodeReposMergeResponse(resp *http.Response) (res ReposMergeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44621,23 +50162,28 @@ func decodeReposMergeUpstreamResponse(resp *http.Response) (res ReposMergeUpstre } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MergedUpstream if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44666,23 +50212,28 @@ func decodeReposPingWebhookResponse(resp *http.Response) (res ReposPingWebhookRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44702,23 +50253,28 @@ func decodeReposRedeliverWebhookDeliveryResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Accepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44732,23 +50288,28 @@ func decodeReposRedeliverWebhookDeliveryResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44762,23 +50323,28 @@ func decodeReposRedeliverWebhookDeliveryResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44798,23 +50364,28 @@ func decodeReposRemoveAppAccessRestrictionsResponse(resp *http.Response) (res Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposRemoveAppAccessRestrictionsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44828,23 +50399,28 @@ func decodeReposRemoveAppAccessRestrictionsResponse(resp *http.Response) (res Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44873,23 +50449,28 @@ func decodeReposRemoveStatusCheckContextsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposRemoveStatusCheckContextsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44903,23 +50484,28 @@ func decodeReposRemoveStatusCheckContextsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44933,23 +50519,28 @@ func decodeReposRemoveStatusCheckContextsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -44978,23 +50569,28 @@ func decodeReposRemoveTeamAccessRestrictionsResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposRemoveTeamAccessRestrictionsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45008,23 +50604,28 @@ func decodeReposRemoveTeamAccessRestrictionsResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45044,23 +50645,28 @@ func decodeReposRemoveUserAccessRestrictionsResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposRemoveUserAccessRestrictionsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45074,23 +50680,28 @@ func decodeReposRemoveUserAccessRestrictionsResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45110,23 +50721,28 @@ func decodeReposRenameBranchResponse(resp *http.Response) (res ReposRenameBranch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BranchWithProtection if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45140,23 +50756,28 @@ func decodeReposRenameBranchResponse(resp *http.Response) (res ReposRenameBranch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposRenameBranchApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45170,23 +50791,28 @@ func decodeReposRenameBranchResponse(resp *http.Response) (res ReposRenameBranch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposRenameBranchApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45200,23 +50826,28 @@ func decodeReposRenameBranchResponse(resp *http.Response) (res ReposRenameBranch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45236,23 +50867,28 @@ func decodeReposReplaceAllTopicsResponse(resp *http.Response) (res ReposReplaceA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Topic if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45266,23 +50902,28 @@ func decodeReposReplaceAllTopicsResponse(resp *http.Response) (res ReposReplaceA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45296,23 +50937,28 @@ func decodeReposReplaceAllTopicsResponse(resp *http.Response) (res ReposReplaceA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45326,23 +50972,28 @@ func decodeReposReplaceAllTopicsResponse(resp *http.Response) (res ReposReplaceA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45362,23 +51013,28 @@ func decodeReposRequestPagesBuildResponse(resp *http.Response) (res *PageBuildSt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PageBuildStatus if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45398,23 +51054,28 @@ func decodeReposSetAdminBranchProtectionResponse(resp *http.Response) (res *Prot } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProtectedBranchAdminEnforced if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45434,23 +51095,28 @@ func decodeReposSetAppAccessRestrictionsResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposSetAppAccessRestrictionsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45464,23 +51130,28 @@ func decodeReposSetAppAccessRestrictionsResponse(resp *http.Response) (res Repos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45500,23 +51171,28 @@ func decodeReposSetStatusCheckContextsResponse(resp *http.Response) (res ReposSe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposSetStatusCheckContextsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45530,23 +51206,28 @@ func decodeReposSetStatusCheckContextsResponse(resp *http.Response) (res ReposSe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45560,23 +51241,28 @@ func decodeReposSetStatusCheckContextsResponse(resp *http.Response) (res ReposSe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45596,23 +51282,28 @@ func decodeReposSetTeamAccessRestrictionsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposSetTeamAccessRestrictionsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45626,23 +51317,28 @@ func decodeReposSetTeamAccessRestrictionsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45662,23 +51358,28 @@ func decodeReposSetUserAccessRestrictionsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposSetUserAccessRestrictionsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45692,23 +51393,28 @@ func decodeReposSetUserAccessRestrictionsResponse(resp *http.Response) (res Repo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45731,23 +51437,28 @@ func decodeReposTestPushWebhookResponse(resp *http.Response) (res ReposTestPushW } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45767,23 +51478,28 @@ func decodeReposTransferResponse(resp *http.Response) (res *MinimalRepository, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MinimalRepository if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45803,23 +51519,28 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response FullRepository if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45833,23 +51554,28 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposUpdateApplicationJSONTemporaryRedirect if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45863,23 +51589,28 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposUpdateApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45893,23 +51624,28 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposUpdateApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45923,23 +51659,28 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45959,23 +51700,28 @@ func decodeReposUpdateBranchProtectionResponse(resp *http.Response) (res ReposUp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProtectedBranch if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -45989,23 +51735,28 @@ func decodeReposUpdateBranchProtectionResponse(resp *http.Response) (res ReposUp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposUpdateBranchProtectionApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46019,23 +51770,28 @@ func decodeReposUpdateBranchProtectionResponse(resp *http.Response) (res ReposUp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReposUpdateBranchProtectionApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46049,23 +51805,28 @@ func decodeReposUpdateBranchProtectionResponse(resp *http.Response) (res ReposUp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationErrorSimple if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46085,23 +51846,28 @@ func decodeReposUpdateCommitCommentResponse(resp *http.Response) (res ReposUpdat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CommitComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46115,23 +51881,28 @@ func decodeReposUpdateCommitCommentResponse(resp *http.Response) (res ReposUpdat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46151,23 +51922,28 @@ func decodeReposUpdateInvitationResponse(resp *http.Response) (res *RepositoryIn } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RepositoryInvitation if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46187,23 +51963,28 @@ func decodeReposUpdatePullRequestReviewProtectionResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProtectedBranchPullRequestReview if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46217,23 +51998,28 @@ func decodeReposUpdatePullRequestReviewProtectionResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46253,23 +52039,28 @@ func decodeReposUpdateReleaseResponse(resp *http.Response) (res ReposUpdateRelea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Release if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46283,23 +52074,28 @@ func decodeReposUpdateReleaseResponse(resp *http.Response) (res ReposUpdateRelea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46319,23 +52115,28 @@ func decodeReposUpdateReleaseAssetResponse(resp *http.Response) (res *ReleaseAss } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReleaseAsset if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46355,23 +52156,28 @@ func decodeReposUpdateStatusCheckProtectionResponse(resp *http.Response) (res Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response StatusCheckPolicy if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46385,23 +52191,28 @@ func decodeReposUpdateStatusCheckProtectionResponse(resp *http.Response) (res Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46415,23 +52226,28 @@ func decodeReposUpdateStatusCheckProtectionResponse(resp *http.Response) (res Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46451,23 +52267,28 @@ func decodeReposUpdateWebhookResponse(resp *http.Response) (res ReposUpdateWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Hook if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46481,23 +52302,28 @@ func decodeReposUpdateWebhookResponse(resp *http.Response) (res ReposUpdateWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46511,23 +52337,28 @@ func decodeReposUpdateWebhookResponse(resp *http.Response) (res ReposUpdateWebho } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46547,23 +52378,28 @@ func decodeReposUpdateWebhookConfigForRepoResponse(resp *http.Response) (res *We } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WebhookConfig if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46583,23 +52419,28 @@ func decodeReposUploadReleaseAssetResponse(resp *http.Response) (res *ReleaseAss } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReleaseAsset if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46625,23 +52466,28 @@ func decodeScimDeleteUserFromOrgResponse(resp *http.Response) (res ScimDeleteUse } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimDeleteUserFromOrgApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46655,23 +52501,28 @@ func decodeScimDeleteUserFromOrgResponse(resp *http.Response) (res ScimDeleteUse } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ScimDeleteUserFromOrgApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46691,23 +52542,28 @@ func decodeSearchCodeResponse(resp *http.Response) (res SearchCodeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchCodeOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46724,23 +52580,28 @@ func decodeSearchCodeResponse(resp *http.Response) (res SearchCodeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46754,23 +52615,28 @@ func decodeSearchCodeResponse(resp *http.Response) (res SearchCodeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46784,23 +52650,28 @@ func decodeSearchCodeResponse(resp *http.Response) (res SearchCodeRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46820,23 +52691,28 @@ func decodeSearchCommitsResponse(resp *http.Response) (res SearchCommitsRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchCommitsOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46853,23 +52729,28 @@ func decodeSearchCommitsResponse(resp *http.Response) (res SearchCommitsRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46889,23 +52770,28 @@ func decodeSearchIssuesAndPullRequestsResponse(resp *http.Response) (res SearchI } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchIssuesAndPullRequestsOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46922,23 +52808,28 @@ func decodeSearchIssuesAndPullRequestsResponse(resp *http.Response) (res SearchI } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46952,23 +52843,28 @@ func decodeSearchIssuesAndPullRequestsResponse(resp *http.Response) (res SearchI } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -46982,23 +52878,28 @@ func decodeSearchIssuesAndPullRequestsResponse(resp *http.Response) (res SearchI } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47018,23 +52919,28 @@ func decodeSearchLabelsResponse(resp *http.Response) (res SearchLabelsRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchLabelsOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47051,23 +52957,28 @@ func decodeSearchLabelsResponse(resp *http.Response) (res SearchLabelsRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchLabelsApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47081,23 +52992,28 @@ func decodeSearchLabelsResponse(resp *http.Response) (res SearchLabelsRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchLabelsApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47111,23 +53027,28 @@ func decodeSearchLabelsResponse(resp *http.Response) (res SearchLabelsRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47147,23 +53068,28 @@ func decodeSearchReposResponse(resp *http.Response) (res SearchReposRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchReposOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47180,23 +53106,28 @@ func decodeSearchReposResponse(resp *http.Response) (res SearchReposRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47210,23 +53141,28 @@ func decodeSearchReposResponse(resp *http.Response) (res SearchReposRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47246,23 +53182,28 @@ func decodeSearchTopicsResponse(resp *http.Response) (res SearchTopicsRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchTopicsOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47279,23 +53220,28 @@ func decodeSearchTopicsResponse(resp *http.Response) (res SearchTopicsRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47315,23 +53261,28 @@ func decodeSearchUsersResponse(resp *http.Response) (res SearchUsersRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchUsersOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47348,23 +53299,28 @@ func decodeSearchUsersResponse(resp *http.Response) (res SearchUsersRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47378,23 +53334,28 @@ func decodeSearchUsersResponse(resp *http.Response) (res SearchUsersRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47414,23 +53375,28 @@ func decodeSecretScanningGetAlertResponse(resp *http.Response) (res SecretScanni } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SecretScanningAlert if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47447,23 +53413,28 @@ func decodeSecretScanningGetAlertResponse(resp *http.Response) (res SecretScanni } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47483,12 +53454,12 @@ func decodeSecretScanningListAlertsForOrgResponse(resp *http.Response) (res Secr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrganizationSecretScanningAlert if err := func() error { response = make([]OrganizationSecretScanningAlert, 0) @@ -47502,12 +53473,17 @@ func decodeSecretScanningListAlertsForOrgResponse(resp *http.Response) (res Secr }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper SecretScanningListAlertsForOrgOKHeaders wrapper.Response = response @@ -47559,23 +53535,28 @@ func decodeSecretScanningListAlertsForOrgResponse(resp *http.Response) (res Secr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47589,23 +53570,28 @@ func decodeSecretScanningListAlertsForOrgResponse(resp *http.Response) (res Secr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47625,23 +53611,28 @@ func decodeSecretScanningListAlertsForRepoResponse(resp *http.Response) (res Sec } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SecretScanningListAlertsForRepoOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47658,23 +53649,28 @@ func decodeSecretScanningListAlertsForRepoResponse(resp *http.Response) (res Sec } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47694,23 +53690,28 @@ func decodeSecretScanningUpdateAlertResponse(resp *http.Response) (res SecretSca } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SecretScanningAlert if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47730,23 +53731,28 @@ func decodeSecretScanningUpdateAlertResponse(resp *http.Response) (res SecretSca } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ServiceUnavailable if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47769,23 +53775,28 @@ func decodeTeamsAddMemberLegacyResponse(resp *http.Response) (res TeamsAddMember } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47811,23 +53822,28 @@ func decodeTeamsAddOrUpdateMembershipForUserInOrgResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamMembership if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47853,23 +53869,28 @@ func decodeTeamsAddOrUpdateMembershipForUserLegacyResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamMembership if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47886,23 +53907,28 @@ func decodeTeamsAddOrUpdateMembershipForUserLegacyResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47928,23 +53954,28 @@ func decodeTeamsAddOrUpdateProjectPermissionsInOrgResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsAddOrUpdateProjectPermissionsInOrgForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47967,23 +53998,28 @@ func decodeTeamsAddOrUpdateProjectPermissionsLegacyResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsAddOrUpdateProjectPermissionsLegacyForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -47997,23 +54033,28 @@ func decodeTeamsAddOrUpdateProjectPermissionsLegacyResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48027,23 +54068,28 @@ func decodeTeamsAddOrUpdateProjectPermissionsLegacyResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48075,23 +54121,28 @@ func decodeTeamsAddOrUpdateRepoPermissionsLegacyResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48105,23 +54156,28 @@ func decodeTeamsAddOrUpdateRepoPermissionsLegacyResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48141,23 +54197,28 @@ func decodeTeamsCheckPermissionsForProjectInOrgResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamProject if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48180,23 +54241,28 @@ func decodeTeamsCheckPermissionsForProjectLegacyResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamProject if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48219,23 +54285,28 @@ func decodeTeamsCheckPermissionsForRepoInOrgResponse(resp *http.Response) (res T } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamRepository if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48261,23 +54332,28 @@ func decodeTeamsCheckPermissionsForRepoLegacyResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamRepository if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48303,23 +54379,28 @@ func decodeTeamsCreateResponse(resp *http.Response) (res TeamsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamFull if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48333,23 +54414,28 @@ func decodeTeamsCreateResponse(resp *http.Response) (res TeamsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48363,23 +54449,28 @@ func decodeTeamsCreateResponse(resp *http.Response) (res TeamsCreateRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48399,23 +54490,28 @@ func decodeTeamsCreateDiscussionCommentInOrgResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussionComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48435,23 +54531,28 @@ func decodeTeamsCreateDiscussionCommentLegacyResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussionComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48471,23 +54572,28 @@ func decodeTeamsCreateDiscussionInOrgResponse(resp *http.Response) (res *TeamDis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48507,23 +54613,28 @@ func decodeTeamsCreateDiscussionLegacyResponse(resp *http.Response) (res *TeamDi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48543,23 +54654,28 @@ func decodeTeamsCreateOrUpdateIdpGroupConnectionsInOrgResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GroupMapping if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48579,23 +54695,28 @@ func decodeTeamsCreateOrUpdateIdpGroupConnectionsLegacyResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GroupMapping if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48609,23 +54730,28 @@ func decodeTeamsCreateOrUpdateIdpGroupConnectionsLegacyResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48639,23 +54765,28 @@ func decodeTeamsCreateOrUpdateIdpGroupConnectionsLegacyResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48723,23 +54854,28 @@ func decodeTeamsDeleteLegacyResponse(resp *http.Response) (res TeamsDeleteLegacy } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48753,23 +54889,28 @@ func decodeTeamsDeleteLegacyResponse(resp *http.Response) (res TeamsDeleteLegacy } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48789,23 +54930,28 @@ func decodeTeamsGetByNameResponse(resp *http.Response) (res TeamsGetByNameRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamFull if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48819,23 +54965,28 @@ func decodeTeamsGetByNameResponse(resp *http.Response) (res TeamsGetByNameRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48855,23 +55006,28 @@ func decodeTeamsGetDiscussionCommentInOrgResponse(resp *http.Response) (res *Tea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussionComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48891,23 +55047,28 @@ func decodeTeamsGetDiscussionCommentLegacyResponse(resp *http.Response) (res *Te } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussionComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48927,23 +55088,28 @@ func decodeTeamsGetDiscussionInOrgResponse(resp *http.Response) (res *TeamDiscus } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48963,23 +55129,28 @@ func decodeTeamsGetDiscussionLegacyResponse(resp *http.Response) (res *TeamDiscu } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -48999,23 +55170,28 @@ func decodeTeamsGetLegacyResponse(resp *http.Response) (res TeamsGetLegacyRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamFull if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49029,23 +55205,28 @@ func decodeTeamsGetLegacyResponse(resp *http.Response) (res TeamsGetLegacyRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49077,23 +55258,28 @@ func decodeTeamsGetMembershipForUserInOrgResponse(resp *http.Response) (res Team } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamMembership if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49116,23 +55302,28 @@ func decodeTeamsGetMembershipForUserLegacyResponse(resp *http.Response) (res Tea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamMembership if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49146,23 +55337,28 @@ func decodeTeamsGetMembershipForUserLegacyResponse(resp *http.Response) (res Tea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49182,12 +55378,12 @@ func decodeTeamsListResponse(resp *http.Response) (res TeamsListRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Team if err := func() error { response = make([]Team, 0) @@ -49201,12 +55397,17 @@ func decodeTeamsListResponse(resp *http.Response) (res TeamsListRes, err error) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListOKHeaders wrapper.Response = response @@ -49258,23 +55459,28 @@ func decodeTeamsListResponse(resp *http.Response) (res TeamsListRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49294,12 +55500,12 @@ func decodeTeamsListChildInOrgResponse(resp *http.Response) (res *TeamsListChild } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Team if err := func() error { response = make([]Team, 0) @@ -49313,12 +55519,17 @@ func decodeTeamsListChildInOrgResponse(resp *http.Response) (res *TeamsListChild }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListChildInOrgOKHeaders wrapper.Response = response @@ -49376,12 +55587,12 @@ func decodeTeamsListChildLegacyResponse(resp *http.Response) (res TeamsListChild } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Team if err := func() error { response = make([]Team, 0) @@ -49395,12 +55606,17 @@ func decodeTeamsListChildLegacyResponse(resp *http.Response) (res TeamsListChild }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListChildLegacyOKHeaders wrapper.Response = response @@ -49452,23 +55668,28 @@ func decodeTeamsListChildLegacyResponse(resp *http.Response) (res TeamsListChild } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsListChildLegacyApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49482,23 +55703,28 @@ func decodeTeamsListChildLegacyResponse(resp *http.Response) (res TeamsListChild } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsListChildLegacyApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49512,23 +55738,28 @@ func decodeTeamsListChildLegacyResponse(resp *http.Response) (res TeamsListChild } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49548,12 +55779,12 @@ func decodeTeamsListDiscussionCommentsInOrgResponse(resp *http.Response) (res *T } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []TeamDiscussionComment if err := func() error { response = make([]TeamDiscussionComment, 0) @@ -49567,12 +55798,17 @@ func decodeTeamsListDiscussionCommentsInOrgResponse(resp *http.Response) (res *T }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListDiscussionCommentsInOrgOKHeaders wrapper.Response = response @@ -49630,12 +55866,12 @@ func decodeTeamsListDiscussionCommentsLegacyResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []TeamDiscussionComment if err := func() error { response = make([]TeamDiscussionComment, 0) @@ -49649,12 +55885,17 @@ func decodeTeamsListDiscussionCommentsLegacyResponse(resp *http.Response) (res * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListDiscussionCommentsLegacyOKHeaders wrapper.Response = response @@ -49712,12 +55953,12 @@ func decodeTeamsListDiscussionsInOrgResponse(resp *http.Response) (res *TeamsLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []TeamDiscussion if err := func() error { response = make([]TeamDiscussion, 0) @@ -49731,12 +55972,17 @@ func decodeTeamsListDiscussionsInOrgResponse(resp *http.Response) (res *TeamsLis }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListDiscussionsInOrgOKHeaders wrapper.Response = response @@ -49794,12 +56040,12 @@ func decodeTeamsListDiscussionsLegacyResponse(resp *http.Response) (res *TeamsLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []TeamDiscussion if err := func() error { response = make([]TeamDiscussion, 0) @@ -49813,12 +56059,17 @@ func decodeTeamsListDiscussionsLegacyResponse(resp *http.Response) (res *TeamsLi }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListDiscussionsLegacyOKHeaders wrapper.Response = response @@ -49876,12 +56127,12 @@ func decodeTeamsListForAuthenticatedUserResponse(resp *http.Response) (res Teams } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []TeamFull if err := func() error { response = make([]TeamFull, 0) @@ -49895,12 +56146,17 @@ func decodeTeamsListForAuthenticatedUserResponse(resp *http.Response) (res Teams }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListForAuthenticatedUserOKHeaders wrapper.Response = response @@ -49955,23 +56211,28 @@ func decodeTeamsListForAuthenticatedUserResponse(resp *http.Response) (res Teams } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsListForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -49985,23 +56246,28 @@ func decodeTeamsListForAuthenticatedUserResponse(resp *http.Response) (res Teams } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsListForAuthenticatedUserApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -50021,23 +56287,28 @@ func decodeTeamsListIdpGroupsForLegacyResponse(resp *http.Response) (res TeamsLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GroupMapping if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -50051,23 +56322,28 @@ func decodeTeamsListIdpGroupsForLegacyResponse(resp *http.Response) (res TeamsLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsListIdpGroupsForLegacyApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -50081,23 +56357,28 @@ func decodeTeamsListIdpGroupsForLegacyResponse(resp *http.Response) (res TeamsLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsListIdpGroupsForLegacyApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -50117,23 +56398,28 @@ func decodeTeamsListIdpGroupsForOrgResponse(resp *http.Response) (res *GroupMapp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GroupMapping if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper GroupMappingHeaders wrapper.Response = response @@ -50191,23 +56477,28 @@ func decodeTeamsListIdpGroupsInOrgResponse(resp *http.Response) (res *GroupMappi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GroupMapping if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -50227,12 +56518,12 @@ func decodeTeamsListMembersInOrgResponse(resp *http.Response) (res *TeamsListMem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -50246,12 +56537,17 @@ func decodeTeamsListMembersInOrgResponse(resp *http.Response) (res *TeamsListMem }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListMembersInOrgOKHeaders wrapper.Response = response @@ -50309,12 +56605,12 @@ func decodeTeamsListMembersLegacyResponse(resp *http.Response) (res TeamsListMem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -50328,12 +56624,17 @@ func decodeTeamsListMembersLegacyResponse(resp *http.Response) (res TeamsListMem }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListMembersLegacyOKHeaders wrapper.Response = response @@ -50385,23 +56686,28 @@ func decodeTeamsListMembersLegacyResponse(resp *http.Response) (res TeamsListMem } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -50421,12 +56727,12 @@ func decodeTeamsListPendingInvitationsInOrgResponse(resp *http.Response) (res *T } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrganizationInvitation if err := func() error { response = make([]OrganizationInvitation, 0) @@ -50440,12 +56746,17 @@ func decodeTeamsListPendingInvitationsInOrgResponse(resp *http.Response) (res *T }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListPendingInvitationsInOrgOKHeaders wrapper.Response = response @@ -50503,12 +56814,12 @@ func decodeTeamsListPendingInvitationsLegacyResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []OrganizationInvitation if err := func() error { response = make([]OrganizationInvitation, 0) @@ -50522,12 +56833,17 @@ func decodeTeamsListPendingInvitationsLegacyResponse(resp *http.Response) (res * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListPendingInvitationsLegacyOKHeaders wrapper.Response = response @@ -50585,12 +56901,12 @@ func decodeTeamsListProjectsInOrgResponse(resp *http.Response) (res *TeamsListPr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []TeamProject if err := func() error { response = make([]TeamProject, 0) @@ -50604,12 +56920,17 @@ func decodeTeamsListProjectsInOrgResponse(resp *http.Response) (res *TeamsListPr }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListProjectsInOrgOKHeaders wrapper.Response = response @@ -50667,12 +56988,12 @@ func decodeTeamsListProjectsLegacyResponse(resp *http.Response) (res TeamsListPr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []TeamProject if err := func() error { response = make([]TeamProject, 0) @@ -50686,12 +57007,17 @@ func decodeTeamsListProjectsLegacyResponse(resp *http.Response) (res TeamsListPr }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListProjectsLegacyOKHeaders wrapper.Response = response @@ -50743,23 +57069,28 @@ func decodeTeamsListProjectsLegacyResponse(resp *http.Response) (res TeamsListPr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -50779,12 +57110,12 @@ func decodeTeamsListReposInOrgResponse(resp *http.Response) (res *TeamsListRepos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -50798,12 +57129,17 @@ func decodeTeamsListReposInOrgResponse(resp *http.Response) (res *TeamsListRepos }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListReposInOrgOKHeaders wrapper.Response = response @@ -50861,12 +57197,12 @@ func decodeTeamsListReposLegacyResponse(resp *http.Response) (res TeamsListRepos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []MinimalRepository if err := func() error { response = make([]MinimalRepository, 0) @@ -50880,12 +57216,17 @@ func decodeTeamsListReposLegacyResponse(resp *http.Response) (res TeamsListRepos }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper TeamsListReposLegacyOKHeaders wrapper.Response = response @@ -50937,23 +57278,28 @@ func decodeTeamsListReposLegacyResponse(resp *http.Response) (res TeamsListRepos } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51021,23 +57367,28 @@ func decodeTeamsRemoveProjectLegacyResponse(resp *http.Response) (res TeamsRemov } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51051,23 +57402,28 @@ func decodeTeamsRemoveProjectLegacyResponse(resp *http.Response) (res TeamsRemov } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51081,23 +57437,28 @@ func decodeTeamsRemoveProjectLegacyResponse(resp *http.Response) (res TeamsRemov } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51135,23 +57496,28 @@ func decodeTeamsUpdateDiscussionCommentInOrgResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussionComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51171,23 +57537,28 @@ func decodeTeamsUpdateDiscussionCommentLegacyResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussionComment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51207,23 +57578,28 @@ func decodeTeamsUpdateDiscussionInOrgResponse(resp *http.Response) (res *TeamDis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51243,23 +57619,28 @@ func decodeTeamsUpdateDiscussionLegacyResponse(resp *http.Response) (res *TeamDi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamDiscussion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51279,23 +57660,28 @@ func decodeTeamsUpdateInOrgResponse(resp *http.Response) (res *TeamFull, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamFull if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51315,23 +57701,28 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsUpdateLegacyApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51345,23 +57736,28 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsUpdateLegacyApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51375,23 +57771,28 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsUpdateLegacyApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51405,23 +57806,28 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TeamsUpdateLegacyApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51435,23 +57841,28 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51471,23 +57882,28 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersAddEmailForAuthenticatedCreatedApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51504,23 +57920,28 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersAddEmailForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51534,23 +57955,28 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersAddEmailForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51564,23 +57990,28 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersAddEmailForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51594,23 +58025,28 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51636,23 +58072,28 @@ func decodeUsersBlockResponse(resp *http.Response) (res UsersBlockRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersBlockApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51666,23 +58107,28 @@ func decodeUsersBlockResponse(resp *http.Response) (res UsersBlockRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersBlockApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51696,23 +58142,28 @@ func decodeUsersBlockResponse(resp *http.Response) (res UsersBlockRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersBlockApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51726,23 +58177,28 @@ func decodeUsersBlockResponse(resp *http.Response) (res UsersBlockRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51768,23 +58224,28 @@ func decodeUsersCheckBlockedResponse(resp *http.Response) (res UsersCheckBlocked } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCheckBlockedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51798,23 +58259,28 @@ func decodeUsersCheckBlockedResponse(resp *http.Response) (res UsersCheckBlocked } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCheckBlockedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51828,23 +58294,28 @@ func decodeUsersCheckBlockedResponse(resp *http.Response) (res UsersCheckBlocked } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCheckBlockedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51882,23 +58353,28 @@ func decodeUsersCheckPersonIsFollowedByAuthenticatedResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCheckPersonIsFollowedByAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51912,23 +58388,28 @@ func decodeUsersCheckPersonIsFollowedByAuthenticatedResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCheckPersonIsFollowedByAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51942,23 +58423,28 @@ func decodeUsersCheckPersonIsFollowedByAuthenticatedResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCheckPersonIsFollowedByAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -51978,23 +58464,28 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GpgKey if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52011,23 +58502,28 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCreateGpgKeyForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52041,23 +58537,28 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCreateGpgKeyForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52071,23 +58572,28 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCreateGpgKeyForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52101,23 +58607,28 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52137,23 +58648,28 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Key if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52170,23 +58686,28 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCreatePublicSSHKeyForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52200,23 +58721,28 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCreatePublicSSHKeyForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52230,23 +58756,28 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersCreatePublicSSHKeyForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52260,23 +58791,28 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52302,23 +58838,28 @@ func decodeUsersDeleteEmailForAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersDeleteEmailForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52332,23 +58873,28 @@ func decodeUsersDeleteEmailForAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersDeleteEmailForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52362,23 +58908,28 @@ func decodeUsersDeleteEmailForAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersDeleteEmailForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52392,23 +58943,28 @@ func decodeUsersDeleteEmailForAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52434,23 +58990,28 @@ func decodeUsersDeleteGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersDeleteGpgKeyForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52464,23 +59025,28 @@ func decodeUsersDeleteGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersDeleteGpgKeyForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52494,23 +59060,28 @@ func decodeUsersDeleteGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersDeleteGpgKeyForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52524,23 +59095,28 @@ func decodeUsersDeleteGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52566,23 +59142,28 @@ func decodeUsersDeletePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersDeletePublicSSHKeyForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52596,23 +59177,28 @@ func decodeUsersDeletePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersDeletePublicSSHKeyForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52626,23 +59212,28 @@ func decodeUsersDeletePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersDeletePublicSSHKeyForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52668,23 +59259,28 @@ func decodeUsersFollowResponse(resp *http.Response) (res UsersFollowRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersFollowApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52698,23 +59294,28 @@ func decodeUsersFollowResponse(resp *http.Response) (res UsersFollowRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersFollowApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52728,23 +59329,28 @@ func decodeUsersFollowResponse(resp *http.Response) (res UsersFollowRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersFollowApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52764,23 +59370,28 @@ func decodeUsersGetAuthenticatedResponse(resp *http.Response) (res UsersGetAuthe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetAuthenticatedOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52797,23 +59408,28 @@ func decodeUsersGetAuthenticatedResponse(resp *http.Response) (res UsersGetAuthe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52827,23 +59443,28 @@ func decodeUsersGetAuthenticatedResponse(resp *http.Response) (res UsersGetAuthe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52863,23 +59484,28 @@ func decodeUsersGetByUsernameResponse(resp *http.Response) (res UsersGetByUserna } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetByUsernameOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52893,23 +59519,28 @@ func decodeUsersGetByUsernameResponse(resp *http.Response) (res UsersGetByUserna } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Accepted if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52923,23 +59554,28 @@ func decodeUsersGetByUsernameResponse(resp *http.Response) (res UsersGetByUserna } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52959,23 +59595,28 @@ func decodeUsersGetContextForUserResponse(resp *http.Response) (res UsersGetCont } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Hovercard if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -52989,23 +59630,28 @@ func decodeUsersGetContextForUserResponse(resp *http.Response) (res UsersGetCont } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response BasicError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53019,23 +59665,28 @@ func decodeUsersGetContextForUserResponse(resp *http.Response) (res UsersGetCont } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53055,23 +59706,28 @@ func decodeUsersGetGpgKeyForAuthenticatedResponse(resp *http.Response) (res User } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GpgKey if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53088,23 +59744,28 @@ func decodeUsersGetGpgKeyForAuthenticatedResponse(resp *http.Response) (res User } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetGpgKeyForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53118,23 +59779,28 @@ func decodeUsersGetGpgKeyForAuthenticatedResponse(resp *http.Response) (res User } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetGpgKeyForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53148,23 +59814,28 @@ func decodeUsersGetGpgKeyForAuthenticatedResponse(resp *http.Response) (res User } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetGpgKeyForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53184,23 +59855,28 @@ func decodeUsersGetPublicSSHKeyForAuthenticatedResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Key if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53217,23 +59893,28 @@ func decodeUsersGetPublicSSHKeyForAuthenticatedResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetPublicSSHKeyForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53247,23 +59928,28 @@ func decodeUsersGetPublicSSHKeyForAuthenticatedResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetPublicSSHKeyForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53277,23 +59963,28 @@ func decodeUsersGetPublicSSHKeyForAuthenticatedResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersGetPublicSSHKeyForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53313,12 +60004,12 @@ func decodeUsersListResponse(resp *http.Response) (res UsersListRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -53332,12 +60023,17 @@ func decodeUsersListResponse(resp *http.Response) (res UsersListRes, err error) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListOKHeaders wrapper.Response = response @@ -53398,23 +60094,28 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListBlockedByAuthenticatedOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53431,23 +60132,28 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListBlockedByAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53461,23 +60167,28 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListBlockedByAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53491,23 +60202,28 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListBlockedByAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53521,23 +60237,28 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PreviewHeaderMissing if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53557,12 +60278,12 @@ func decodeUsersListEmailsForAuthenticatedResponse(resp *http.Response) (res Use } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Email if err := func() error { response = make([]Email, 0) @@ -53576,12 +60297,17 @@ func decodeUsersListEmailsForAuthenticatedResponse(resp *http.Response) (res Use }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListEmailsForAuthenticatedOKHeaders wrapper.Response = response @@ -53636,23 +60362,28 @@ func decodeUsersListEmailsForAuthenticatedResponse(resp *http.Response) (res Use } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListEmailsForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53666,23 +60397,28 @@ func decodeUsersListEmailsForAuthenticatedResponse(resp *http.Response) (res Use } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListEmailsForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53696,23 +60432,28 @@ func decodeUsersListEmailsForAuthenticatedResponse(resp *http.Response) (res Use } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListEmailsForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53732,12 +60473,12 @@ func decodeUsersListFollowedByAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -53751,12 +60492,17 @@ func decodeUsersListFollowedByAuthenticatedResponse(resp *http.Response) (res Us }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListFollowedByAuthenticatedOKHeaders wrapper.Response = response @@ -53811,23 +60557,28 @@ func decodeUsersListFollowedByAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListFollowedByAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53841,23 +60592,28 @@ func decodeUsersListFollowedByAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListFollowedByAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53877,12 +60633,12 @@ func decodeUsersListFollowersForAuthenticatedUserResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -53896,12 +60652,17 @@ func decodeUsersListFollowersForAuthenticatedUserResponse(resp *http.Response) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListFollowersForAuthenticatedUserOKHeaders wrapper.Response = response @@ -53956,23 +60717,28 @@ func decodeUsersListFollowersForAuthenticatedUserResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListFollowersForAuthenticatedUserApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53986,23 +60752,28 @@ func decodeUsersListFollowersForAuthenticatedUserResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListFollowersForAuthenticatedUserApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54022,12 +60793,12 @@ func decodeUsersListFollowersForUserResponse(resp *http.Response) (res *UsersLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -54041,12 +60812,17 @@ func decodeUsersListFollowersForUserResponse(resp *http.Response) (res *UsersLis }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListFollowersForUserOKHeaders wrapper.Response = response @@ -54104,12 +60880,12 @@ func decodeUsersListFollowingForUserResponse(resp *http.Response) (res *UsersLis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []SimpleUser if err := func() error { response = make([]SimpleUser, 0) @@ -54123,12 +60899,17 @@ func decodeUsersListFollowingForUserResponse(resp *http.Response) (res *UsersLis }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListFollowingForUserOKHeaders wrapper.Response = response @@ -54186,12 +60967,12 @@ func decodeUsersListGpgKeysForAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []GpgKey if err := func() error { response = make([]GpgKey, 0) @@ -54205,12 +60986,17 @@ func decodeUsersListGpgKeysForAuthenticatedResponse(resp *http.Response) (res Us }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListGpgKeysForAuthenticatedOKHeaders wrapper.Response = response @@ -54265,23 +61051,28 @@ func decodeUsersListGpgKeysForAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListGpgKeysForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54295,23 +61086,28 @@ func decodeUsersListGpgKeysForAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListGpgKeysForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54325,23 +61121,28 @@ func decodeUsersListGpgKeysForAuthenticatedResponse(resp *http.Response) (res Us } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListGpgKeysForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54361,12 +61162,12 @@ func decodeUsersListGpgKeysForUserResponse(resp *http.Response) (res *UsersListG } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []GpgKey if err := func() error { response = make([]GpgKey, 0) @@ -54380,12 +61181,17 @@ func decodeUsersListGpgKeysForUserResponse(resp *http.Response) (res *UsersListG }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListGpgKeysForUserOKHeaders wrapper.Response = response @@ -54443,12 +61249,12 @@ func decodeUsersListPublicEmailsForAuthenticatedResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Email if err := func() error { response = make([]Email, 0) @@ -54462,12 +61268,17 @@ func decodeUsersListPublicEmailsForAuthenticatedResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListPublicEmailsForAuthenticatedOKHeaders wrapper.Response = response @@ -54522,23 +61333,28 @@ func decodeUsersListPublicEmailsForAuthenticatedResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListPublicEmailsForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54552,23 +61368,28 @@ func decodeUsersListPublicEmailsForAuthenticatedResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListPublicEmailsForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54582,23 +61403,28 @@ func decodeUsersListPublicEmailsForAuthenticatedResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListPublicEmailsForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54618,12 +61444,12 @@ func decodeUsersListPublicKeysForUserResponse(resp *http.Response) (res *UsersLi } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []KeySimple if err := func() error { response = make([]KeySimple, 0) @@ -54637,12 +61463,17 @@ func decodeUsersListPublicKeysForUserResponse(resp *http.Response) (res *UsersLi }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListPublicKeysForUserOKHeaders wrapper.Response = response @@ -54700,12 +61531,12 @@ func decodeUsersListPublicSSHKeysForAuthenticatedResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []Key if err := func() error { response = make([]Key, 0) @@ -54719,12 +61550,17 @@ func decodeUsersListPublicSSHKeysForAuthenticatedResponse(resp *http.Response) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper UsersListPublicSSHKeysForAuthenticatedOKHeaders wrapper.Response = response @@ -54779,23 +61615,28 @@ func decodeUsersListPublicSSHKeysForAuthenticatedResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListPublicSSHKeysForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54809,23 +61650,28 @@ func decodeUsersListPublicSSHKeysForAuthenticatedResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListPublicSSHKeysForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54839,23 +61685,28 @@ func decodeUsersListPublicSSHKeysForAuthenticatedResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersListPublicSSHKeysForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54875,23 +61726,28 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersSetPrimaryEmailVisibilityForAuthenticatedOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54908,23 +61764,28 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersSetPrimaryEmailVisibilityForAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54938,23 +61799,28 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersSetPrimaryEmailVisibilityForAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54968,23 +61834,28 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersSetPrimaryEmailVisibilityForAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54998,23 +61869,28 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55040,23 +61916,28 @@ func decodeUsersUnblockResponse(resp *http.Response) (res UsersUnblockRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersUnblockApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55070,23 +61951,28 @@ func decodeUsersUnblockResponse(resp *http.Response) (res UsersUnblockRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersUnblockApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55100,23 +61986,28 @@ func decodeUsersUnblockResponse(resp *http.Response) (res UsersUnblockRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersUnblockApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55142,23 +62033,28 @@ func decodeUsersUnfollowResponse(resp *http.Response) (res UsersUnfollowRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersUnfollowApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55172,23 +62068,28 @@ func decodeUsersUnfollowResponse(resp *http.Response) (res UsersUnfollowRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersUnfollowApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55202,23 +62103,28 @@ func decodeUsersUnfollowResponse(resp *http.Response) (res UsersUnfollowRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersUnfollowApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55238,23 +62144,28 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PrivateUser if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55271,23 +62182,28 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersUpdateAuthenticatedApplicationJSONUnauthorized if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55301,23 +62217,28 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersUpdateAuthenticatedApplicationJSONForbidden if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55331,23 +62252,28 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UsersUpdateAuthenticatedApplicationJSONNotFound if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -55361,23 +62287,28 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ValidationError if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/examples/ex_gotd/oas_request_decoders_gen.go b/examples/ex_gotd/oas_request_decoders_gen.go index 01b98b067..7b97755b9 100644 --- a/examples/ex_gotd/oas_request_decoders_gen.go +++ b/examples/ex_gotd/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -59,12 +60,17 @@ func (s *Server) decodeAddStickerToSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -125,12 +131,17 @@ func (s *Server) decodeAnswerCallbackQueryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -191,12 +202,17 @@ func (s *Server) decodeAnswerInlineQueryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -257,12 +273,17 @@ func (s *Server) decodeAnswerPreCheckoutQueryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -315,12 +336,17 @@ func (s *Server) decodeAnswerShippingQueryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -381,12 +407,17 @@ func (s *Server) decodeAnswerWebAppQueryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -447,12 +478,17 @@ func (s *Server) decodeApproveChatJoinRequestRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -505,12 +541,17 @@ func (s *Server) decodeBanChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -563,12 +604,17 @@ func (s *Server) decodeBanChatSenderChatRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -621,12 +667,17 @@ func (s *Server) decodeCopyMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -687,12 +738,17 @@ func (s *Server) decodeCreateChatInviteLinkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -753,12 +809,17 @@ func (s *Server) decodeCreateNewStickerSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -819,12 +880,17 @@ func (s *Server) decodeDeclineChatJoinRequestRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -877,12 +943,17 @@ func (s *Server) decodeDeleteChatPhotoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -935,12 +1006,17 @@ func (s *Server) decodeDeleteChatStickerSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -993,12 +1069,17 @@ func (s *Server) decodeDeleteMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1055,12 +1136,17 @@ func (s *Server) decodeDeleteMyCommandsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1113,12 +1199,17 @@ func (s *Server) decodeDeleteStickerFromSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1175,12 +1266,17 @@ func (s *Server) decodeDeleteWebhookRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1233,12 +1329,17 @@ func (s *Server) decodeEditChatInviteLinkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1299,12 +1400,17 @@ func (s *Server) decodeEditMessageCaptionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1365,12 +1471,17 @@ func (s *Server) decodeEditMessageLiveLocationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1431,12 +1542,17 @@ func (s *Server) decodeEditMessageMediaRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1497,12 +1613,17 @@ func (s *Server) decodeEditMessageReplyMarkupRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1563,12 +1684,17 @@ func (s *Server) decodeEditMessageTextRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1629,12 +1755,17 @@ func (s *Server) decodeExportChatInviteLinkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1687,12 +1818,17 @@ func (s *Server) decodeForwardMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1745,12 +1881,17 @@ func (s *Server) decodeGetChatRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1803,12 +1944,17 @@ func (s *Server) decodeGetChatAdministratorsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1861,12 +2007,17 @@ func (s *Server) decodeGetChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1919,12 +2070,17 @@ func (s *Server) decodeGetChatMemberCountRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1981,12 +2137,17 @@ func (s *Server) decodeGetChatMenuButtonRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2039,12 +2200,17 @@ func (s *Server) decodeGetFileRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2097,12 +2263,17 @@ func (s *Server) decodeGetGameHighScoresRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2159,12 +2330,17 @@ func (s *Server) decodeGetMyCommandsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2221,12 +2397,17 @@ func (s *Server) decodeGetMyDefaultAdministratorRightsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2279,12 +2460,17 @@ func (s *Server) decodeGetStickerSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2341,12 +2527,17 @@ func (s *Server) decodeGetUpdatesRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -2414,12 +2605,17 @@ func (s *Server) decodeGetUserProfilePhotosRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2480,12 +2676,17 @@ func (s *Server) decodeLeaveChatRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2538,12 +2739,17 @@ func (s *Server) decodePinChatMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2596,12 +2802,17 @@ func (s *Server) decodePromoteChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2654,12 +2865,17 @@ func (s *Server) decodeRestrictChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2712,12 +2928,17 @@ func (s *Server) decodeRevokeChatInviteLinkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2770,12 +2991,17 @@ func (s *Server) decodeSendAnimationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2836,12 +3062,17 @@ func (s *Server) decodeSendAudioRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2902,12 +3133,17 @@ func (s *Server) decodeSendChatActionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2960,12 +3196,17 @@ func (s *Server) decodeSendContactRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3026,12 +3267,17 @@ func (s *Server) decodeSendDiceRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3092,12 +3338,17 @@ func (s *Server) decodeSendDocumentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3158,12 +3409,17 @@ func (s *Server) decodeSendGameRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3224,12 +3480,17 @@ func (s *Server) decodeSendInvoiceRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3290,12 +3551,17 @@ func (s *Server) decodeSendLocationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3356,12 +3622,17 @@ func (s *Server) decodeSendMediaGroupRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3422,12 +3693,17 @@ func (s *Server) decodeSendMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3488,12 +3764,17 @@ func (s *Server) decodeSendPhotoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3554,12 +3835,17 @@ func (s *Server) decodeSendPollRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3620,12 +3906,17 @@ func (s *Server) decodeSendStickerRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3686,12 +3977,17 @@ func (s *Server) decodeSendVenueRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3752,12 +4048,17 @@ func (s *Server) decodeSendVideoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3818,12 +4119,17 @@ func (s *Server) decodeSendVideoNoteRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3884,12 +4190,17 @@ func (s *Server) decodeSendVoiceRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3950,12 +4261,17 @@ func (s *Server) decodeSetChatAdministratorCustomTitleRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4016,12 +4332,17 @@ func (s *Server) decodeSetChatDescriptionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4086,12 +4407,17 @@ func (s *Server) decodeSetChatMenuButtonRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4144,12 +4470,17 @@ func (s *Server) decodeSetChatPermissionsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4202,12 +4533,17 @@ func (s *Server) decodeSetChatPhotoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4260,12 +4596,17 @@ func (s *Server) decodeSetChatStickerSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4318,12 +4659,17 @@ func (s *Server) decodeSetChatTitleRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4384,12 +4730,17 @@ func (s *Server) decodeSetGameScoreRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4442,12 +4793,17 @@ func (s *Server) decodeSetMyCommandsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4512,12 +4868,17 @@ func (s *Server) decodeSetMyDefaultAdministratorRightsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4570,12 +4931,17 @@ func (s *Server) decodeSetPassportDataErrorsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4636,12 +5002,17 @@ func (s *Server) decodeSetStickerPositionInSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4694,12 +5065,17 @@ func (s *Server) decodeSetStickerSetThumbRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4752,12 +5128,17 @@ func (s *Server) decodeSetWebhookRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4810,12 +5191,17 @@ func (s *Server) decodeStopMessageLiveLocationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4876,12 +5262,17 @@ func (s *Server) decodeStopPollRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4942,12 +5333,17 @@ func (s *Server) decodeUnbanChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -5000,12 +5396,17 @@ func (s *Server) decodeUnbanChatSenderChatRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -5058,12 +5459,17 @@ func (s *Server) decodeUnpinAllChatMessagesRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -5116,12 +5522,17 @@ func (s *Server) decodeUnpinChatMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -5174,12 +5585,17 @@ func (s *Server) decodeUploadStickerFileRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: diff --git a/examples/ex_gotd/oas_response_decoders_gen.go b/examples/ex_gotd/oas_response_decoders_gen.go index 84a45e8c1..36b0ac8d8 100644 --- a/examples/ex_gotd/oas_response_decoders_gen.go +++ b/examples/ex_gotd/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeAddStickerToSetResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54,23 +60,28 @@ func decodeAddStickerToSetResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -96,23 +107,28 @@ func decodeAnswerCallbackQueryResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -127,23 +143,28 @@ func decodeAnswerCallbackQueryResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -169,23 +190,28 @@ func decodeAnswerInlineQueryResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -200,23 +226,28 @@ func decodeAnswerInlineQueryResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -242,23 +273,28 @@ func decodeAnswerPreCheckoutQueryResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -273,23 +309,28 @@ func decodeAnswerPreCheckoutQueryResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -315,23 +356,28 @@ func decodeAnswerShippingQueryResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -346,23 +392,28 @@ func decodeAnswerShippingQueryResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -388,23 +439,28 @@ func decodeAnswerWebAppQueryResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -419,23 +475,28 @@ func decodeAnswerWebAppQueryResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -461,23 +522,28 @@ func decodeApproveChatJoinRequestResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -492,23 +558,28 @@ func decodeApproveChatJoinRequestResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -534,23 +605,28 @@ func decodeBanChatMemberResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -565,23 +641,28 @@ func decodeBanChatMemberResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -607,23 +688,28 @@ func decodeBanChatSenderChatResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -638,23 +724,28 @@ func decodeBanChatSenderChatResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -680,23 +771,28 @@ func decodeCloseResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -711,23 +807,28 @@ func decodeCloseResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -753,23 +854,28 @@ func decodeCopyMessageResponse(resp *http.Response) (res *ResultMessageId, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessageId if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -784,23 +890,28 @@ func decodeCopyMessageResponse(resp *http.Response) (res *ResultMessageId, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -826,23 +937,28 @@ func decodeCreateChatInviteLinkResponse(resp *http.Response) (res *ResultChatInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChatInviteLink if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -857,23 +973,28 @@ func decodeCreateChatInviteLinkResponse(resp *http.Response) (res *ResultChatInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -899,23 +1020,28 @@ func decodeCreateNewStickerSetResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -930,23 +1056,28 @@ func decodeCreateNewStickerSetResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -972,23 +1103,28 @@ func decodeDeclineChatJoinRequestResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1003,23 +1139,28 @@ func decodeDeclineChatJoinRequestResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1045,23 +1186,28 @@ func decodeDeleteChatPhotoResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1076,23 +1222,28 @@ func decodeDeleteChatPhotoResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1118,23 +1269,28 @@ func decodeDeleteChatStickerSetResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1149,23 +1305,28 @@ func decodeDeleteChatStickerSetResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1191,23 +1352,28 @@ func decodeDeleteMessageResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1222,23 +1388,28 @@ func decodeDeleteMessageResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1264,23 +1435,28 @@ func decodeDeleteMyCommandsResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1295,23 +1471,28 @@ func decodeDeleteMyCommandsResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1337,23 +1518,28 @@ func decodeDeleteStickerFromSetResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1368,23 +1554,28 @@ func decodeDeleteStickerFromSetResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1410,23 +1601,28 @@ func decodeDeleteWebhookResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1441,23 +1637,28 @@ func decodeDeleteWebhookResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1483,23 +1684,28 @@ func decodeEditChatInviteLinkResponse(resp *http.Response) (res *ResultChatInvit } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChatInviteLink if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1514,23 +1720,28 @@ func decodeEditChatInviteLinkResponse(resp *http.Response) (res *ResultChatInvit } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1556,23 +1767,28 @@ func decodeEditMessageCaptionResponse(resp *http.Response) (res *ResultMessageOr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessageOrBoolean if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1587,23 +1803,28 @@ func decodeEditMessageCaptionResponse(resp *http.Response) (res *ResultMessageOr } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1629,23 +1850,28 @@ func decodeEditMessageLiveLocationResponse(resp *http.Response) (res *ResultMess } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessageOrBoolean if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1660,23 +1886,28 @@ func decodeEditMessageLiveLocationResponse(resp *http.Response) (res *ResultMess } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1702,23 +1933,28 @@ func decodeEditMessageMediaResponse(resp *http.Response) (res *ResultMessageOrBo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessageOrBoolean if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1733,23 +1969,28 @@ func decodeEditMessageMediaResponse(resp *http.Response) (res *ResultMessageOrBo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1775,23 +2016,28 @@ func decodeEditMessageReplyMarkupResponse(resp *http.Response) (res *ResultMessa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessageOrBoolean if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1806,23 +2052,28 @@ func decodeEditMessageReplyMarkupResponse(resp *http.Response) (res *ResultMessa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1848,23 +2099,28 @@ func decodeEditMessageTextResponse(resp *http.Response) (res *ResultMessageOrBoo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessageOrBoolean if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1879,23 +2135,28 @@ func decodeEditMessageTextResponse(resp *http.Response) (res *ResultMessageOrBoo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1921,23 +2182,28 @@ func decodeExportChatInviteLinkResponse(resp *http.Response) (res *ResultString, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultString if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1952,23 +2218,28 @@ func decodeExportChatInviteLinkResponse(resp *http.Response) (res *ResultString, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1994,23 +2265,28 @@ func decodeForwardMessageResponse(resp *http.Response) (res *ResultMessage, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2025,23 +2301,28 @@ func decodeForwardMessageResponse(resp *http.Response) (res *ResultMessage, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2067,23 +2348,28 @@ func decodeGetChatResponse(resp *http.Response) (res *ResultChat, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChat if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2098,23 +2384,28 @@ func decodeGetChatResponse(resp *http.Response) (res *ResultChat, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2140,23 +2431,28 @@ func decodeGetChatAdministratorsResponse(resp *http.Response) (res *ResultArrayO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfChatMember if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2171,23 +2467,28 @@ func decodeGetChatAdministratorsResponse(resp *http.Response) (res *ResultArrayO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2213,23 +2514,28 @@ func decodeGetChatMemberResponse(resp *http.Response) (res *ResultChatMember, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChatMember if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2244,23 +2550,28 @@ func decodeGetChatMemberResponse(resp *http.Response) (res *ResultChatMember, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2286,23 +2597,28 @@ func decodeGetChatMemberCountResponse(resp *http.Response) (res *ResultInt, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultInt if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2317,23 +2633,28 @@ func decodeGetChatMemberCountResponse(resp *http.Response) (res *ResultInt, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2359,23 +2680,28 @@ func decodeGetChatMenuButtonResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2390,23 +2716,28 @@ func decodeGetChatMenuButtonResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2432,23 +2763,28 @@ func decodeGetFileResponse(resp *http.Response) (res *ResultFile, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultFile if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2463,23 +2799,28 @@ func decodeGetFileResponse(resp *http.Response) (res *ResultFile, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2505,23 +2846,28 @@ func decodeGetGameHighScoresResponse(resp *http.Response) (res *ResultArrayOfGam } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfGameHighScore if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2536,23 +2882,28 @@ func decodeGetGameHighScoresResponse(resp *http.Response) (res *ResultArrayOfGam } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2578,23 +2929,28 @@ func decodeGetMeResponse(resp *http.Response) (res *ResultUser, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultUser if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2609,23 +2965,28 @@ func decodeGetMeResponse(resp *http.Response) (res *ResultUser, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2651,23 +3012,28 @@ func decodeGetMyCommandsResponse(resp *http.Response) (res *ResultArrayOfBotComm } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfBotCommand if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2682,23 +3048,28 @@ func decodeGetMyCommandsResponse(resp *http.Response) (res *ResultArrayOfBotComm } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2724,23 +3095,28 @@ func decodeGetMyDefaultAdministratorRightsResponse(resp *http.Response) (res *Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2755,23 +3131,28 @@ func decodeGetMyDefaultAdministratorRightsResponse(resp *http.Response) (res *Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2797,23 +3178,28 @@ func decodeGetStickerSetResponse(resp *http.Response) (res *ResultStickerSet, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultStickerSet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2828,23 +3214,28 @@ func decodeGetStickerSetResponse(resp *http.Response) (res *ResultStickerSet, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2870,23 +3261,28 @@ func decodeGetUpdatesResponse(resp *http.Response) (res *ResultArrayOfUpdate, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfUpdate if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2901,23 +3297,28 @@ func decodeGetUpdatesResponse(resp *http.Response) (res *ResultArrayOfUpdate, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2943,23 +3344,28 @@ func decodeGetUserProfilePhotosResponse(resp *http.Response) (res *ResultUserPro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultUserProfilePhotos if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2974,23 +3380,28 @@ func decodeGetUserProfilePhotosResponse(resp *http.Response) (res *ResultUserPro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3016,23 +3427,28 @@ func decodeGetWebhookInfoResponse(resp *http.Response) (res *ResultWebhookInfo, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultWebhookInfo if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3047,23 +3463,28 @@ func decodeGetWebhookInfoResponse(resp *http.Response) (res *ResultWebhookInfo, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3089,23 +3510,28 @@ func decodeLeaveChatResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3120,23 +3546,28 @@ func decodeLeaveChatResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3162,23 +3593,28 @@ func decodeLogOutResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3193,23 +3629,28 @@ func decodeLogOutResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3235,23 +3676,28 @@ func decodePinChatMessageResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3266,23 +3712,28 @@ func decodePinChatMessageResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3308,23 +3759,28 @@ func decodePromoteChatMemberResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3339,23 +3795,28 @@ func decodePromoteChatMemberResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3381,23 +3842,28 @@ func decodeRestrictChatMemberResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3412,23 +3878,28 @@ func decodeRestrictChatMemberResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3454,23 +3925,28 @@ func decodeRevokeChatInviteLinkResponse(resp *http.Response) (res *ResultChatInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChatInviteLink if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3485,23 +3961,28 @@ func decodeRevokeChatInviteLinkResponse(resp *http.Response) (res *ResultChatInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3527,23 +4008,28 @@ func decodeSendAnimationResponse(resp *http.Response) (res *ResultMessage, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3558,23 +4044,28 @@ func decodeSendAnimationResponse(resp *http.Response) (res *ResultMessage, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3600,23 +4091,28 @@ func decodeSendAudioResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3631,23 +4127,28 @@ func decodeSendAudioResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3673,23 +4174,28 @@ func decodeSendChatActionResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3704,23 +4210,28 @@ func decodeSendChatActionResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3746,23 +4257,28 @@ func decodeSendContactResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3777,23 +4293,28 @@ func decodeSendContactResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3819,23 +4340,28 @@ func decodeSendDiceResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3850,23 +4376,28 @@ func decodeSendDiceResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3892,23 +4423,28 @@ func decodeSendDocumentResponse(resp *http.Response) (res *ResultMessage, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3923,23 +4459,28 @@ func decodeSendDocumentResponse(resp *http.Response) (res *ResultMessage, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3965,23 +4506,28 @@ func decodeSendGameResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3996,23 +4542,28 @@ func decodeSendGameResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4038,23 +4589,28 @@ func decodeSendInvoiceResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4069,23 +4625,28 @@ func decodeSendInvoiceResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4111,23 +4672,28 @@ func decodeSendLocationResponse(resp *http.Response) (res *ResultMessage, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4142,23 +4708,28 @@ func decodeSendLocationResponse(resp *http.Response) (res *ResultMessage, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4184,23 +4755,28 @@ func decodeSendMediaGroupResponse(resp *http.Response) (res *ResultArrayOfMessag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4215,23 +4791,28 @@ func decodeSendMediaGroupResponse(resp *http.Response) (res *ResultArrayOfMessag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4257,23 +4838,28 @@ func decodeSendMessageResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4288,23 +4874,28 @@ func decodeSendMessageResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4330,23 +4921,28 @@ func decodeSendPhotoResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4361,23 +4957,28 @@ func decodeSendPhotoResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4403,23 +5004,28 @@ func decodeSendPollResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4434,23 +5040,28 @@ func decodeSendPollResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4476,23 +5087,28 @@ func decodeSendStickerResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4507,23 +5123,28 @@ func decodeSendStickerResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4549,23 +5170,28 @@ func decodeSendVenueResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4580,23 +5206,28 @@ func decodeSendVenueResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4622,23 +5253,28 @@ func decodeSendVideoResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4653,23 +5289,28 @@ func decodeSendVideoResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4695,23 +5336,28 @@ func decodeSendVideoNoteResponse(resp *http.Response) (res *ResultMessage, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4726,23 +5372,28 @@ func decodeSendVideoNoteResponse(resp *http.Response) (res *ResultMessage, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4768,23 +5419,28 @@ func decodeSendVoiceResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4799,23 +5455,28 @@ func decodeSendVoiceResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4841,23 +5502,28 @@ func decodeSetChatAdministratorCustomTitleResponse(resp *http.Response) (res *Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4872,23 +5538,28 @@ func decodeSetChatAdministratorCustomTitleResponse(resp *http.Response) (res *Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4914,23 +5585,28 @@ func decodeSetChatDescriptionResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4945,23 +5621,28 @@ func decodeSetChatDescriptionResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4987,23 +5668,28 @@ func decodeSetChatMenuButtonResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5018,23 +5704,28 @@ func decodeSetChatMenuButtonResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5060,23 +5751,28 @@ func decodeSetChatPermissionsResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5091,23 +5787,28 @@ func decodeSetChatPermissionsResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5133,23 +5834,28 @@ func decodeSetChatPhotoResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5164,23 +5870,28 @@ func decodeSetChatPhotoResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5206,23 +5917,28 @@ func decodeSetChatStickerSetResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5237,23 +5953,28 @@ func decodeSetChatStickerSetResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5279,23 +6000,28 @@ func decodeSetChatTitleResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5310,23 +6036,28 @@ func decodeSetChatTitleResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5352,23 +6083,28 @@ func decodeSetGameScoreResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5383,23 +6119,28 @@ func decodeSetGameScoreResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5425,23 +6166,28 @@ func decodeSetMyCommandsResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5456,23 +6202,28 @@ func decodeSetMyCommandsResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5498,23 +6249,28 @@ func decodeSetMyDefaultAdministratorRightsResponse(resp *http.Response) (res *Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5529,23 +6285,28 @@ func decodeSetMyDefaultAdministratorRightsResponse(resp *http.Response) (res *Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5571,23 +6332,28 @@ func decodeSetPassportDataErrorsResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5602,23 +6368,28 @@ func decodeSetPassportDataErrorsResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5644,23 +6415,28 @@ func decodeSetStickerPositionInSetResponse(resp *http.Response) (res *Result, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5675,23 +6451,28 @@ func decodeSetStickerPositionInSetResponse(resp *http.Response) (res *Result, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5717,23 +6498,28 @@ func decodeSetStickerSetThumbResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5748,23 +6534,28 @@ func decodeSetStickerSetThumbResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5790,23 +6581,28 @@ func decodeSetWebhookResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5821,23 +6617,28 @@ func decodeSetWebhookResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5863,23 +6664,28 @@ func decodeStopMessageLiveLocationResponse(resp *http.Response) (res *ResultMess } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessageOrBoolean if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5894,23 +6700,28 @@ func decodeStopMessageLiveLocationResponse(resp *http.Response) (res *ResultMess } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5936,23 +6747,28 @@ func decodeStopPollResponse(resp *http.Response) (res *ResultPoll, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultPoll if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5967,23 +6783,28 @@ func decodeStopPollResponse(resp *http.Response) (res *ResultPoll, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -6009,23 +6830,28 @@ func decodeUnbanChatMemberResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6040,23 +6866,28 @@ func decodeUnbanChatMemberResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -6082,23 +6913,28 @@ func decodeUnbanChatSenderChatResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6113,23 +6949,28 @@ func decodeUnbanChatSenderChatResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -6155,23 +6996,28 @@ func decodeUnpinAllChatMessagesResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6186,23 +7032,28 @@ func decodeUnpinAllChatMessagesResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -6228,23 +7079,28 @@ func decodeUnpinChatMessageResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6259,23 +7115,28 @@ func decodeUnpinChatMessageResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -6301,23 +7162,28 @@ func decodeUploadStickerFileResponse(resp *http.Response) (res *ResultFile, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultFile if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6332,23 +7198,28 @@ func decodeUploadStickerFileResponse(resp *http.Response) (res *ResultFile, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/examples/ex_k8s/oas_response_decoders_gen.go b/examples/ex_k8s/oas_response_decoders_gen.go index 7761b73cc..1f82bd10d 100644 --- a/examples/ex_k8s/oas_response_decoders_gen.go +++ b/examples/ex_k8s/oas_response_decoders_gen.go @@ -12,6 +12,7 @@ import ( "github.com/go-faster/jx" ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -1369,23 +1370,28 @@ func decodeGetAPIVersionsResponse(resp *http.Response) (res GetAPIVersionsRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroupList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1408,23 +1414,28 @@ func decodeGetAdmissionregistrationAPIGroupResponse(resp *http.Response) (res Ge } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1447,23 +1458,28 @@ func decodeGetAdmissionregistrationV1APIResourcesResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1486,23 +1502,28 @@ func decodeGetApiextensionsAPIGroupResponse(resp *http.Response) (res GetApiexte } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1525,23 +1546,28 @@ func decodeGetApiextensionsV1APIResourcesResponse(resp *http.Response) (res GetA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1564,23 +1590,28 @@ func decodeGetApiregistrationAPIGroupResponse(resp *http.Response) (res GetApire } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1603,23 +1634,28 @@ func decodeGetApiregistrationV1APIResourcesResponse(resp *http.Response) (res Ge } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1642,23 +1678,28 @@ func decodeGetAppsAPIGroupResponse(resp *http.Response) (res GetAppsAPIGroupRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1681,23 +1722,28 @@ func decodeGetAppsV1APIResourcesResponse(resp *http.Response) (res GetAppsV1APIR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1720,23 +1766,28 @@ func decodeGetAuthenticationAPIGroupResponse(resp *http.Response) (res GetAuthen } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1759,23 +1810,28 @@ func decodeGetAuthenticationV1APIResourcesResponse(resp *http.Response) (res Get } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1798,23 +1854,28 @@ func decodeGetAuthorizationAPIGroupResponse(resp *http.Response) (res GetAuthori } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1837,23 +1898,28 @@ func decodeGetAuthorizationV1APIResourcesResponse(resp *http.Response) (res GetA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1876,23 +1942,28 @@ func decodeGetAutoscalingAPIGroupResponse(resp *http.Response) (res GetAutoscali } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1915,23 +1986,28 @@ func decodeGetAutoscalingV1APIResourcesResponse(resp *http.Response) (res GetAut } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1954,23 +2030,28 @@ func decodeGetAutoscalingV2beta1APIResourcesResponse(resp *http.Response) (res G } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1993,23 +2074,28 @@ func decodeGetAutoscalingV2beta2APIResourcesResponse(resp *http.Response) (res G } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2032,23 +2118,28 @@ func decodeGetBatchAPIGroupResponse(resp *http.Response) (res GetBatchAPIGroupRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2071,23 +2162,28 @@ func decodeGetBatchV1APIResourcesResponse(resp *http.Response) (res GetBatchV1AP } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2110,23 +2206,28 @@ func decodeGetBatchV1beta1APIResourcesResponse(resp *http.Response) (res GetBatc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2149,23 +2250,28 @@ func decodeGetCertificatesAPIGroupResponse(resp *http.Response) (res GetCertific } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2188,23 +2294,28 @@ func decodeGetCertificatesV1APIResourcesResponse(resp *http.Response) (res GetCe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2227,23 +2338,28 @@ func decodeGetCodeVersionResponse(resp *http.Response) (res GetCodeVersionRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgVersionInfo if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2266,23 +2382,28 @@ func decodeGetCoordinationAPIGroupResponse(resp *http.Response) (res GetCoordina } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2305,23 +2426,28 @@ func decodeGetCoordinationV1APIResourcesResponse(resp *http.Response) (res GetCo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2344,23 +2470,28 @@ func decodeGetCoreAPIVersionsResponse(resp *http.Response) (res GetCoreAPIVersio } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIVersions if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2383,23 +2514,28 @@ func decodeGetCoreV1APIResourcesResponse(resp *http.Response) (res GetCoreV1APIR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2422,23 +2558,28 @@ func decodeGetDiscoveryAPIGroupResponse(resp *http.Response) (res GetDiscoveryAP } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2461,23 +2602,28 @@ func decodeGetDiscoveryV1APIResourcesResponse(resp *http.Response) (res GetDisco } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2500,23 +2646,28 @@ func decodeGetDiscoveryV1beta1APIResourcesResponse(resp *http.Response) (res Get } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2539,23 +2690,28 @@ func decodeGetEventsAPIGroupResponse(resp *http.Response) (res GetEventsAPIGroup } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2578,23 +2734,28 @@ func decodeGetEventsV1APIResourcesResponse(resp *http.Response) (res GetEventsV1 } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2617,23 +2778,28 @@ func decodeGetEventsV1beta1APIResourcesResponse(resp *http.Response) (res GetEve } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2656,23 +2822,28 @@ func decodeGetFlowcontrolApiserverAPIGroupResponse(resp *http.Response) (res Get } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2695,23 +2866,28 @@ func decodeGetFlowcontrolApiserverV1beta1APIResourcesResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2734,23 +2910,28 @@ func decodeGetFlowcontrolApiserverV1beta2APIResourcesResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2773,23 +2954,28 @@ func decodeGetInternalApiserverAPIGroupResponse(resp *http.Response) (res GetInt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2812,23 +2998,28 @@ func decodeGetInternalApiserverV1alpha1APIResourcesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2851,23 +3042,28 @@ func decodeGetNetworkingAPIGroupResponse(resp *http.Response) (res GetNetworking } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2890,23 +3086,28 @@ func decodeGetNetworkingV1APIResourcesResponse(resp *http.Response) (res GetNetw } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2929,23 +3130,28 @@ func decodeGetNodeAPIGroupResponse(resp *http.Response) (res GetNodeAPIGroupRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2968,23 +3174,28 @@ func decodeGetNodeV1APIResourcesResponse(resp *http.Response) (res GetNodeV1APIR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3007,23 +3218,28 @@ func decodeGetNodeV1alpha1APIResourcesResponse(resp *http.Response) (res GetNode } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3046,23 +3262,28 @@ func decodeGetNodeV1beta1APIResourcesResponse(resp *http.Response) (res GetNodeV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3085,23 +3306,28 @@ func decodeGetPolicyAPIGroupResponse(resp *http.Response) (res GetPolicyAPIGroup } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3124,23 +3350,28 @@ func decodeGetPolicyV1APIResourcesResponse(resp *http.Response) (res GetPolicyV1 } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3163,23 +3394,28 @@ func decodeGetPolicyV1beta1APIResourcesResponse(resp *http.Response) (res GetPol } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3202,23 +3438,28 @@ func decodeGetRbacAuthorizationAPIGroupResponse(resp *http.Response) (res GetRba } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3241,23 +3482,28 @@ func decodeGetRbacAuthorizationV1APIResourcesResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3280,23 +3526,28 @@ func decodeGetSchedulingAPIGroupResponse(resp *http.Response) (res GetScheduling } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3319,23 +3570,28 @@ func decodeGetSchedulingV1APIResourcesResponse(resp *http.Response) (res GetSche } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3358,23 +3614,28 @@ func decodeGetServiceAccountIssuerOpenIDConfigurationResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response GetServiceAccountIssuerOpenIDConfigurationOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3425,23 +3686,28 @@ func decodeGetStorageAPIGroupResponse(resp *http.Response) (res GetStorageAPIGro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIGroup if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3464,23 +3730,28 @@ func decodeGetStorageV1APIResourcesResponse(resp *http.Response) (res GetStorage } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3503,23 +3774,28 @@ func decodeGetStorageV1alpha1APIResourcesResponse(resp *http.Response) (res GetS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3542,23 +3818,28 @@ func decodeGetStorageV1beta1APIResourcesResponse(resp *http.Response) (res GetSt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1APIResourceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3581,23 +3862,28 @@ func decodeListAdmissionregistrationV1MutatingWebhookConfigurationResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAdmissionregistrationV1MutatingWebhookConfigurationList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3620,23 +3906,28 @@ func decodeListAdmissionregistrationV1ValidatingWebhookConfigurationResponse(res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAdmissionregistrationV1ValidatingWebhookConfigurationList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3659,23 +3950,28 @@ func decodeListApiextensionsV1CustomResourceDefinitionResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApiextensionsApiserverPkgApisApiextensionsV1CustomResourceDefinitionList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3698,23 +3994,28 @@ func decodeListApiregistrationV1APIServiceResponse(resp *http.Response) (res Lis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sKubeAggregatorPkgApisApiregistrationV1APIServiceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3737,23 +4038,28 @@ func decodeListAppsV1ControllerRevisionForAllNamespacesResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1ControllerRevisionList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3776,23 +4082,28 @@ func decodeListAppsV1DaemonSetForAllNamespacesResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1DaemonSetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3815,23 +4126,28 @@ func decodeListAppsV1DeploymentForAllNamespacesResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1DeploymentList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3854,23 +4170,28 @@ func decodeListAppsV1NamespacedControllerRevisionResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1ControllerRevisionList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3893,23 +4214,28 @@ func decodeListAppsV1NamespacedDaemonSetResponse(resp *http.Response) (res ListA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1DaemonSetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3932,23 +4258,28 @@ func decodeListAppsV1NamespacedDeploymentResponse(resp *http.Response) (res List } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1DeploymentList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3971,23 +4302,28 @@ func decodeListAppsV1NamespacedReplicaSetResponse(resp *http.Response) (res List } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1ReplicaSetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4010,23 +4346,28 @@ func decodeListAppsV1NamespacedStatefulSetResponse(resp *http.Response) (res Lis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1StatefulSetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4049,23 +4390,28 @@ func decodeListAppsV1ReplicaSetForAllNamespacesResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1ReplicaSetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4088,23 +4434,28 @@ func decodeListAppsV1StatefulSetForAllNamespacesResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1StatefulSetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4127,23 +4478,28 @@ func decodeListAutoscalingV1HorizontalPodAutoscalerForAllNamespacesResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV1HorizontalPodAutoscalerList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4166,23 +4522,28 @@ func decodeListAutoscalingV1NamespacedHorizontalPodAutoscalerResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV1HorizontalPodAutoscalerList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4205,23 +4566,28 @@ func decodeListAutoscalingV2beta1HorizontalPodAutoscalerForAllNamespacesResponse } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV2beta1HorizontalPodAutoscalerList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4244,23 +4610,28 @@ func decodeListAutoscalingV2beta1NamespacedHorizontalPodAutoscalerResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV2beta1HorizontalPodAutoscalerList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4283,23 +4654,28 @@ func decodeListAutoscalingV2beta2HorizontalPodAutoscalerForAllNamespacesResponse } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV2beta2HorizontalPodAutoscalerList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4322,23 +4698,28 @@ func decodeListAutoscalingV2beta2NamespacedHorizontalPodAutoscalerResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV2beta2HorizontalPodAutoscalerList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4361,23 +4742,28 @@ func decodeListBatchV1CronJobForAllNamespacesResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1CronJobList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4400,23 +4786,28 @@ func decodeListBatchV1JobForAllNamespacesResponse(resp *http.Response) (res List } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1JobList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4439,23 +4830,28 @@ func decodeListBatchV1NamespacedCronJobResponse(resp *http.Response) (res ListBa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1CronJobList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4478,23 +4874,28 @@ func decodeListBatchV1NamespacedJobResponse(resp *http.Response) (res ListBatchV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1JobList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4517,23 +4918,28 @@ func decodeListBatchV1beta1CronJobForAllNamespacesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1beta1CronJobList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4556,23 +4962,28 @@ func decodeListBatchV1beta1NamespacedCronJobResponse(resp *http.Response) (res L } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1beta1CronJobList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4595,23 +5006,28 @@ func decodeListCertificatesV1CertificateSigningRequestResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICertificatesV1CertificateSigningRequestList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4634,23 +5050,28 @@ func decodeListCoordinationV1LeaseForAllNamespacesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoordinationV1LeaseList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4673,23 +5094,28 @@ func decodeListCoordinationV1NamespacedLeaseResponse(resp *http.Response) (res L } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoordinationV1LeaseList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4712,23 +5138,28 @@ func decodeListCoreV1ComponentStatusResponse(resp *http.Response) (res ListCoreV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ComponentStatusList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4751,23 +5182,28 @@ func decodeListCoreV1ConfigMapForAllNamespacesResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ConfigMapList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4790,23 +5226,28 @@ func decodeListCoreV1EndpointsForAllNamespacesResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1EndpointsList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4829,23 +5270,28 @@ func decodeListCoreV1EventForAllNamespacesResponse(resp *http.Response) (res Lis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1EventList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4868,23 +5314,28 @@ func decodeListCoreV1LimitRangeForAllNamespacesResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1LimitRangeList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4907,23 +5358,28 @@ func decodeListCoreV1NamespaceResponse(resp *http.Response) (res ListCoreV1Names } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1NamespaceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4946,23 +5402,28 @@ func decodeListCoreV1NamespacedConfigMapResponse(resp *http.Response) (res ListC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ConfigMapList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4985,23 +5446,28 @@ func decodeListCoreV1NamespacedEndpointsResponse(resp *http.Response) (res ListC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1EndpointsList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5024,23 +5490,28 @@ func decodeListCoreV1NamespacedEventResponse(resp *http.Response) (res ListCoreV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1EventList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5063,23 +5534,28 @@ func decodeListCoreV1NamespacedLimitRangeResponse(resp *http.Response) (res List } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1LimitRangeList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5102,23 +5578,28 @@ func decodeListCoreV1NamespacedPersistentVolumeClaimResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PersistentVolumeClaimList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5141,23 +5622,28 @@ func decodeListCoreV1NamespacedPodResponse(resp *http.Response) (res ListCoreV1N } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PodList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5180,23 +5666,28 @@ func decodeListCoreV1NamespacedPodTemplateResponse(resp *http.Response) (res Lis } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PodTemplateList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5219,23 +5710,28 @@ func decodeListCoreV1NamespacedReplicationControllerResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ReplicationControllerList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5258,23 +5754,28 @@ func decodeListCoreV1NamespacedResourceQuotaResponse(resp *http.Response) (res L } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ResourceQuotaList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5297,23 +5798,28 @@ func decodeListCoreV1NamespacedSecretResponse(resp *http.Response) (res ListCore } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1SecretList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5336,23 +5842,28 @@ func decodeListCoreV1NamespacedServiceResponse(resp *http.Response) (res ListCor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ServiceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5375,23 +5886,28 @@ func decodeListCoreV1NamespacedServiceAccountResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ServiceAccountList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5414,23 +5930,28 @@ func decodeListCoreV1NodeResponse(resp *http.Response) (res ListCoreV1NodeRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1NodeList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5453,23 +5974,28 @@ func decodeListCoreV1PersistentVolumeResponse(resp *http.Response) (res ListCore } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PersistentVolumeList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5492,23 +6018,28 @@ func decodeListCoreV1PersistentVolumeClaimForAllNamespacesResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PersistentVolumeClaimList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5531,23 +6062,28 @@ func decodeListCoreV1PodForAllNamespacesResponse(resp *http.Response) (res ListC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PodList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5570,23 +6106,28 @@ func decodeListCoreV1PodTemplateForAllNamespacesResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PodTemplateList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5609,23 +6150,28 @@ func decodeListCoreV1ReplicationControllerForAllNamespacesResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ReplicationControllerList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5648,23 +6194,28 @@ func decodeListCoreV1ResourceQuotaForAllNamespacesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ResourceQuotaList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5687,23 +6238,28 @@ func decodeListCoreV1SecretForAllNamespacesResponse(resp *http.Response) (res Li } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1SecretList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5726,23 +6282,28 @@ func decodeListCoreV1ServiceAccountForAllNamespacesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ServiceAccountList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5765,23 +6326,28 @@ func decodeListCoreV1ServiceForAllNamespacesResponse(resp *http.Response) (res L } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ServiceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5804,23 +6370,28 @@ func decodeListDiscoveryV1EndpointSliceForAllNamespacesResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIDiscoveryV1EndpointSliceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5843,23 +6414,28 @@ func decodeListDiscoveryV1NamespacedEndpointSliceResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIDiscoveryV1EndpointSliceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5882,23 +6458,28 @@ func decodeListDiscoveryV1beta1EndpointSliceForAllNamespacesResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIDiscoveryV1beta1EndpointSliceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5921,23 +6502,28 @@ func decodeListDiscoveryV1beta1NamespacedEndpointSliceResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIDiscoveryV1beta1EndpointSliceList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5960,23 +6546,28 @@ func decodeListEventsV1EventForAllNamespacesResponse(resp *http.Response) (res L } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIEventsV1EventList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5999,23 +6590,28 @@ func decodeListEventsV1NamespacedEventResponse(resp *http.Response) (res ListEve } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIEventsV1EventList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6038,23 +6634,28 @@ func decodeListEventsV1beta1EventForAllNamespacesResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIEventsV1beta1EventList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6077,23 +6678,28 @@ func decodeListEventsV1beta1NamespacedEventResponse(resp *http.Response) (res Li } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIEventsV1beta1EventList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6116,23 +6722,28 @@ func decodeListFlowcontrolApiserverV1beta1FlowSchemaResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta1FlowSchemaList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6155,23 +6766,28 @@ func decodeListFlowcontrolApiserverV1beta1PriorityLevelConfigurationResponse(res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta1PriorityLevelConfigurationList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6194,23 +6810,28 @@ func decodeListFlowcontrolApiserverV1beta2FlowSchemaResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta2FlowSchemaList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6233,23 +6854,28 @@ func decodeListFlowcontrolApiserverV1beta2PriorityLevelConfigurationResponse(res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta2PriorityLevelConfigurationList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6272,23 +6898,28 @@ func decodeListInternalApiserverV1alpha1StorageVersionResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIApiserverinternalV1alpha1StorageVersionList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6311,23 +6942,28 @@ func decodeListNetworkingV1IngressClassResponse(resp *http.Response) (res ListNe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINetworkingV1IngressClassList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6350,23 +6986,28 @@ func decodeListNetworkingV1IngressForAllNamespacesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINetworkingV1IngressList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6389,23 +7030,28 @@ func decodeListNetworkingV1NamespacedIngressResponse(resp *http.Response) (res L } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINetworkingV1IngressList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6428,23 +7074,28 @@ func decodeListNetworkingV1NamespacedNetworkPolicyResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINetworkingV1NetworkPolicyList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6467,23 +7118,28 @@ func decodeListNetworkingV1NetworkPolicyForAllNamespacesResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINetworkingV1NetworkPolicyList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6506,23 +7162,28 @@ func decodeListNodeV1RuntimeClassResponse(resp *http.Response) (res ListNodeV1Ru } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINodeV1RuntimeClassList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6545,23 +7206,28 @@ func decodeListNodeV1alpha1RuntimeClassResponse(resp *http.Response) (res ListNo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINodeV1alpha1RuntimeClassList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6584,23 +7250,28 @@ func decodeListNodeV1beta1RuntimeClassResponse(resp *http.Response) (res ListNod } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINodeV1beta1RuntimeClassList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6623,23 +7294,28 @@ func decodeListPolicyV1NamespacedPodDisruptionBudgetResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1PodDisruptionBudgetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6662,23 +7338,28 @@ func decodeListPolicyV1PodDisruptionBudgetForAllNamespacesResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1PodDisruptionBudgetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6701,23 +7382,28 @@ func decodeListPolicyV1beta1NamespacedPodDisruptionBudgetResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1beta1PodDisruptionBudgetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6740,23 +7426,28 @@ func decodeListPolicyV1beta1PodDisruptionBudgetForAllNamespacesResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1beta1PodDisruptionBudgetList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6779,23 +7470,28 @@ func decodeListPolicyV1beta1PodSecurityPolicyResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1beta1PodSecurityPolicyList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6818,23 +7514,28 @@ func decodeListRbacAuthorizationV1ClusterRoleResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1ClusterRoleList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6857,23 +7558,28 @@ func decodeListRbacAuthorizationV1ClusterRoleBindingResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1ClusterRoleBindingList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6896,23 +7602,28 @@ func decodeListRbacAuthorizationV1NamespacedRoleResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1RoleList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6935,23 +7646,28 @@ func decodeListRbacAuthorizationV1NamespacedRoleBindingResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1RoleBindingList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6974,23 +7690,28 @@ func decodeListRbacAuthorizationV1RoleBindingForAllNamespacesResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1RoleBindingList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7013,23 +7734,28 @@ func decodeListRbacAuthorizationV1RoleForAllNamespacesResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1RoleList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7052,23 +7778,28 @@ func decodeListSchedulingV1PriorityClassResponse(resp *http.Response) (res ListS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPISchedulingV1PriorityClassList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7091,23 +7822,28 @@ func decodeListStorageV1CSIDriverResponse(resp *http.Response) (res ListStorageV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1CSIDriverList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7130,23 +7866,28 @@ func decodeListStorageV1CSINodeResponse(resp *http.Response) (res ListStorageV1C } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1CSINodeList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7169,23 +7910,28 @@ func decodeListStorageV1StorageClassResponse(resp *http.Response) (res ListStora } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1StorageClassList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7208,23 +7954,28 @@ func decodeListStorageV1VolumeAttachmentResponse(resp *http.Response) (res ListS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1VolumeAttachmentList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7247,23 +7998,28 @@ func decodeListStorageV1alpha1CSIStorageCapacityForAllNamespacesResponse(resp *h } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1alpha1CSIStorageCapacityList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7286,23 +8042,28 @@ func decodeListStorageV1alpha1NamespacedCSIStorageCapacityResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1alpha1CSIStorageCapacityList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7325,23 +8086,28 @@ func decodeListStorageV1beta1CSIStorageCapacityForAllNamespacesResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1beta1CSIStorageCapacityList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7364,23 +8130,28 @@ func decodeListStorageV1beta1NamespacedCSIStorageCapacityResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1beta1CSIStorageCapacityList if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7421,23 +8192,28 @@ func decodeReadAdmissionregistrationV1MutatingWebhookConfigurationResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAdmissionregistrationV1MutatingWebhookConfiguration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7460,23 +8236,28 @@ func decodeReadAdmissionregistrationV1ValidatingWebhookConfigurationResponse(res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAdmissionregistrationV1ValidatingWebhookConfiguration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7499,23 +8280,28 @@ func decodeReadApiextensionsV1CustomResourceDefinitionResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApiextensionsApiserverPkgApisApiextensionsV1CustomResourceDefinition if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7538,23 +8324,28 @@ func decodeReadApiextensionsV1CustomResourceDefinitionStatusResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApiextensionsApiserverPkgApisApiextensionsV1CustomResourceDefinition if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7577,23 +8368,28 @@ func decodeReadApiregistrationV1APIServiceResponse(resp *http.Response) (res Rea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sKubeAggregatorPkgApisApiregistrationV1APIService if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7616,23 +8412,28 @@ func decodeReadApiregistrationV1APIServiceStatusResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sKubeAggregatorPkgApisApiregistrationV1APIService if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7655,23 +8456,28 @@ func decodeReadAppsV1NamespacedControllerRevisionResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1ControllerRevision if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7694,23 +8500,28 @@ func decodeReadAppsV1NamespacedDaemonSetResponse(resp *http.Response) (res ReadA } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1DaemonSet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7733,23 +8544,28 @@ func decodeReadAppsV1NamespacedDaemonSetStatusResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1DaemonSet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7772,23 +8588,28 @@ func decodeReadAppsV1NamespacedDeploymentResponse(resp *http.Response) (res Read } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1Deployment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7811,23 +8632,28 @@ func decodeReadAppsV1NamespacedDeploymentScaleResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV1Scale if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7850,23 +8676,28 @@ func decodeReadAppsV1NamespacedDeploymentStatusResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1Deployment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7889,23 +8720,28 @@ func decodeReadAppsV1NamespacedReplicaSetResponse(resp *http.Response) (res Read } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1ReplicaSet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7928,23 +8764,28 @@ func decodeReadAppsV1NamespacedReplicaSetScaleResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV1Scale if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7967,23 +8808,28 @@ func decodeReadAppsV1NamespacedReplicaSetStatusResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1ReplicaSet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8006,23 +8852,28 @@ func decodeReadAppsV1NamespacedStatefulSetResponse(resp *http.Response) (res Rea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1StatefulSet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8045,23 +8896,28 @@ func decodeReadAppsV1NamespacedStatefulSetScaleResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV1Scale if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8084,23 +8940,28 @@ func decodeReadAppsV1NamespacedStatefulSetStatusResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAppsV1StatefulSet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8123,23 +8984,28 @@ func decodeReadAutoscalingV1NamespacedHorizontalPodAutoscalerResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV1HorizontalPodAutoscaler if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8162,23 +9028,28 @@ func decodeReadAutoscalingV1NamespacedHorizontalPodAutoscalerStatusResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV1HorizontalPodAutoscaler if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8201,23 +9072,28 @@ func decodeReadAutoscalingV2beta1NamespacedHorizontalPodAutoscalerResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV2beta1HorizontalPodAutoscaler if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8240,23 +9116,28 @@ func decodeReadAutoscalingV2beta1NamespacedHorizontalPodAutoscalerStatusResponse } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV2beta1HorizontalPodAutoscaler if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8279,23 +9160,28 @@ func decodeReadAutoscalingV2beta2NamespacedHorizontalPodAutoscalerResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV2beta2HorizontalPodAutoscaler if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8318,23 +9204,28 @@ func decodeReadAutoscalingV2beta2NamespacedHorizontalPodAutoscalerStatusResponse } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV2beta2HorizontalPodAutoscaler if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8357,23 +9248,28 @@ func decodeReadBatchV1NamespacedCronJobResponse(resp *http.Response) (res ReadBa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1CronJob if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8396,23 +9292,28 @@ func decodeReadBatchV1NamespacedCronJobStatusResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1CronJob if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8435,23 +9336,28 @@ func decodeReadBatchV1NamespacedJobResponse(resp *http.Response) (res ReadBatchV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1Job if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8474,23 +9380,28 @@ func decodeReadBatchV1NamespacedJobStatusResponse(resp *http.Response) (res Read } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1Job if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8513,23 +9424,28 @@ func decodeReadBatchV1beta1NamespacedCronJobResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1beta1CronJob if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8552,23 +9468,28 @@ func decodeReadBatchV1beta1NamespacedCronJobStatusResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIBatchV1beta1CronJob if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8591,23 +9512,28 @@ func decodeReadCertificatesV1CertificateSigningRequestResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICertificatesV1CertificateSigningRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8630,23 +9556,28 @@ func decodeReadCertificatesV1CertificateSigningRequestApprovalResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICertificatesV1CertificateSigningRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8669,23 +9600,28 @@ func decodeReadCertificatesV1CertificateSigningRequestStatusResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICertificatesV1CertificateSigningRequest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8708,23 +9644,28 @@ func decodeReadCoordinationV1NamespacedLeaseResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoordinationV1Lease if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8747,23 +9688,28 @@ func decodeReadCoreV1ComponentStatusResponse(resp *http.Response) (res ReadCoreV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ComponentStatus if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8786,23 +9732,28 @@ func decodeReadCoreV1NamespaceResponse(resp *http.Response) (res ReadCoreV1Names } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Namespace if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8825,23 +9776,28 @@ func decodeReadCoreV1NamespaceStatusResponse(resp *http.Response) (res ReadCoreV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Namespace if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8864,23 +9820,28 @@ func decodeReadCoreV1NamespacedConfigMapResponse(resp *http.Response) (res ReadC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ConfigMap if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8903,23 +9864,28 @@ func decodeReadCoreV1NamespacedEndpointsResponse(resp *http.Response) (res ReadC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Endpoints if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8942,23 +9908,28 @@ func decodeReadCoreV1NamespacedEventResponse(resp *http.Response) (res ReadCoreV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Event if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8981,23 +9952,28 @@ func decodeReadCoreV1NamespacedLimitRangeResponse(resp *http.Response) (res Read } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1LimitRange if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9020,23 +9996,28 @@ func decodeReadCoreV1NamespacedPersistentVolumeClaimResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PersistentVolumeClaim if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9059,23 +10040,28 @@ func decodeReadCoreV1NamespacedPersistentVolumeClaimStatusResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PersistentVolumeClaim if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9098,23 +10084,28 @@ func decodeReadCoreV1NamespacedPodResponse(resp *http.Response) (res ReadCoreV1N } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Pod if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9137,23 +10128,28 @@ func decodeReadCoreV1NamespacedPodEphemeralcontainersResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Pod if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9176,23 +10172,28 @@ func decodeReadCoreV1NamespacedPodLogResponse(resp *http.Response) (res ReadCore } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ReadCoreV1NamespacedPodLogOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil case ct == "application/vnd.kubernetes.protobuf": @@ -9242,23 +10243,28 @@ func decodeReadCoreV1NamespacedPodStatusResponse(resp *http.Response) (res ReadC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Pod if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9281,23 +10287,28 @@ func decodeReadCoreV1NamespacedPodTemplateResponse(resp *http.Response) (res Rea } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PodTemplate if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9320,23 +10331,28 @@ func decodeReadCoreV1NamespacedReplicationControllerResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ReplicationController if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9359,23 +10375,28 @@ func decodeReadCoreV1NamespacedReplicationControllerScaleResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIAutoscalingV1Scale if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9398,23 +10419,28 @@ func decodeReadCoreV1NamespacedReplicationControllerStatusResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ReplicationController if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9437,23 +10463,28 @@ func decodeReadCoreV1NamespacedResourceQuotaResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ResourceQuota if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9476,23 +10507,28 @@ func decodeReadCoreV1NamespacedResourceQuotaStatusResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ResourceQuota if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9515,23 +10551,28 @@ func decodeReadCoreV1NamespacedSecretResponse(resp *http.Response) (res ReadCore } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Secret if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9554,23 +10595,28 @@ func decodeReadCoreV1NamespacedServiceResponse(resp *http.Response) (res ReadCor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Service if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9593,23 +10639,28 @@ func decodeReadCoreV1NamespacedServiceAccountResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1ServiceAccount if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9632,23 +10683,28 @@ func decodeReadCoreV1NamespacedServiceStatusResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Service if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9671,23 +10727,28 @@ func decodeReadCoreV1NodeResponse(resp *http.Response) (res ReadCoreV1NodeRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Node if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9710,23 +10771,28 @@ func decodeReadCoreV1NodeStatusResponse(resp *http.Response) (res ReadCoreV1Node } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1Node if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9749,23 +10815,28 @@ func decodeReadCoreV1PersistentVolumeResponse(resp *http.Response) (res ReadCore } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PersistentVolume if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9788,23 +10859,28 @@ func decodeReadCoreV1PersistentVolumeStatusResponse(resp *http.Response) (res Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPICoreV1PersistentVolume if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9827,23 +10903,28 @@ func decodeReadDiscoveryV1NamespacedEndpointSliceResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIDiscoveryV1EndpointSlice if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9866,23 +10947,28 @@ func decodeReadDiscoveryV1beta1NamespacedEndpointSliceResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIDiscoveryV1beta1EndpointSlice if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9905,23 +10991,28 @@ func decodeReadEventsV1NamespacedEventResponse(resp *http.Response) (res ReadEve } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIEventsV1Event if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9944,23 +11035,28 @@ func decodeReadEventsV1beta1NamespacedEventResponse(resp *http.Response) (res Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIEventsV1beta1Event if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9983,23 +11079,28 @@ func decodeReadFlowcontrolApiserverV1beta1FlowSchemaResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta1FlowSchema if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10022,23 +11123,28 @@ func decodeReadFlowcontrolApiserverV1beta1FlowSchemaStatusResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta1FlowSchema if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10061,23 +11167,28 @@ func decodeReadFlowcontrolApiserverV1beta1PriorityLevelConfigurationResponse(res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta1PriorityLevelConfiguration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10100,23 +11211,28 @@ func decodeReadFlowcontrolApiserverV1beta1PriorityLevelConfigurationStatusRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta1PriorityLevelConfiguration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10139,23 +11255,28 @@ func decodeReadFlowcontrolApiserverV1beta2FlowSchemaResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta2FlowSchema if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10178,23 +11299,28 @@ func decodeReadFlowcontrolApiserverV1beta2FlowSchemaStatusResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta2FlowSchema if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10217,23 +11343,28 @@ func decodeReadFlowcontrolApiserverV1beta2PriorityLevelConfigurationResponse(res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta2PriorityLevelConfiguration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10256,23 +11387,28 @@ func decodeReadFlowcontrolApiserverV1beta2PriorityLevelConfigurationStatusRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIFlowcontrolV1beta2PriorityLevelConfiguration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10295,23 +11431,28 @@ func decodeReadInternalApiserverV1alpha1StorageVersionResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIApiserverinternalV1alpha1StorageVersion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10334,23 +11475,28 @@ func decodeReadInternalApiserverV1alpha1StorageVersionStatusResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIApiserverinternalV1alpha1StorageVersion if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10373,23 +11519,28 @@ func decodeReadNetworkingV1IngressClassResponse(resp *http.Response) (res ReadNe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINetworkingV1IngressClass if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10412,23 +11563,28 @@ func decodeReadNetworkingV1NamespacedIngressResponse(resp *http.Response) (res R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINetworkingV1Ingress if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10451,23 +11607,28 @@ func decodeReadNetworkingV1NamespacedIngressStatusResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINetworkingV1Ingress if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10490,23 +11651,28 @@ func decodeReadNetworkingV1NamespacedNetworkPolicyResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINetworkingV1NetworkPolicy if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10529,23 +11695,28 @@ func decodeReadNodeV1RuntimeClassResponse(resp *http.Response) (res ReadNodeV1Ru } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINodeV1RuntimeClass if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10568,23 +11739,28 @@ func decodeReadNodeV1alpha1RuntimeClassResponse(resp *http.Response) (res ReadNo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINodeV1alpha1RuntimeClass if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10607,23 +11783,28 @@ func decodeReadNodeV1beta1RuntimeClassResponse(resp *http.Response) (res ReadNod } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPINodeV1beta1RuntimeClass if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10646,23 +11827,28 @@ func decodeReadPolicyV1NamespacedPodDisruptionBudgetResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1PodDisruptionBudget if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10685,23 +11871,28 @@ func decodeReadPolicyV1NamespacedPodDisruptionBudgetStatusResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1PodDisruptionBudget if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10724,23 +11915,28 @@ func decodeReadPolicyV1beta1NamespacedPodDisruptionBudgetResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1beta1PodDisruptionBudget if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10763,23 +11959,28 @@ func decodeReadPolicyV1beta1NamespacedPodDisruptionBudgetStatusResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1beta1PodDisruptionBudget if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10802,23 +12003,28 @@ func decodeReadPolicyV1beta1PodSecurityPolicyResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIPolicyV1beta1PodSecurityPolicy if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10841,23 +12047,28 @@ func decodeReadRbacAuthorizationV1ClusterRoleResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1ClusterRole if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10880,23 +12091,28 @@ func decodeReadRbacAuthorizationV1ClusterRoleBindingResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1ClusterRoleBinding if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10919,23 +12135,28 @@ func decodeReadRbacAuthorizationV1NamespacedRoleResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1Role if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10958,23 +12179,28 @@ func decodeReadRbacAuthorizationV1NamespacedRoleBindingResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIRbacV1RoleBinding if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10997,23 +12223,28 @@ func decodeReadSchedulingV1PriorityClassResponse(resp *http.Response) (res ReadS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPISchedulingV1PriorityClass if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11036,23 +12267,28 @@ func decodeReadStorageV1CSIDriverResponse(resp *http.Response) (res ReadStorageV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1CSIDriver if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11075,23 +12311,28 @@ func decodeReadStorageV1CSINodeResponse(resp *http.Response) (res ReadStorageV1C } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1CSINode if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11114,23 +12355,28 @@ func decodeReadStorageV1StorageClassResponse(resp *http.Response) (res ReadStora } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1StorageClass if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11153,23 +12399,28 @@ func decodeReadStorageV1VolumeAttachmentResponse(resp *http.Response) (res ReadS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1VolumeAttachment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11192,23 +12443,28 @@ func decodeReadStorageV1VolumeAttachmentStatusResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1VolumeAttachment if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11231,23 +12487,28 @@ func decodeReadStorageV1alpha1NamespacedCSIStorageCapacityResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1alpha1CSIStorageCapacity if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11270,23 +12531,28 @@ func decodeReadStorageV1beta1NamespacedCSIStorageCapacityResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sAPIStorageV1beta1CSIStorageCapacity if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11309,23 +12575,28 @@ func decodeWatchAdmissionregistrationV1MutatingWebhookConfigurationResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11348,23 +12619,28 @@ func decodeWatchAdmissionregistrationV1MutatingWebhookConfigurationListResponse( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11387,23 +12663,28 @@ func decodeWatchAdmissionregistrationV1ValidatingWebhookConfigurationResponse(re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11426,23 +12707,28 @@ func decodeWatchAdmissionregistrationV1ValidatingWebhookConfigurationListRespons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11465,23 +12751,28 @@ func decodeWatchApiextensionsV1CustomResourceDefinitionResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11504,23 +12795,28 @@ func decodeWatchApiextensionsV1CustomResourceDefinitionListResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11543,23 +12839,28 @@ func decodeWatchApiregistrationV1APIServiceResponse(resp *http.Response) (res Wa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11582,23 +12883,28 @@ func decodeWatchApiregistrationV1APIServiceListResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11621,23 +12927,28 @@ func decodeWatchAppsV1ControllerRevisionListForAllNamespacesResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11660,23 +12971,28 @@ func decodeWatchAppsV1DaemonSetListForAllNamespacesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11699,23 +13015,28 @@ func decodeWatchAppsV1DeploymentListForAllNamespacesResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11738,23 +13059,28 @@ func decodeWatchAppsV1NamespacedControllerRevisionResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11777,23 +13103,28 @@ func decodeWatchAppsV1NamespacedControllerRevisionListResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11816,23 +13147,28 @@ func decodeWatchAppsV1NamespacedDaemonSetResponse(resp *http.Response) (res Watc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11855,23 +13191,28 @@ func decodeWatchAppsV1NamespacedDaemonSetListResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11894,23 +13235,28 @@ func decodeWatchAppsV1NamespacedDeploymentResponse(resp *http.Response) (res Wat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11933,23 +13279,28 @@ func decodeWatchAppsV1NamespacedDeploymentListResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11972,23 +13323,28 @@ func decodeWatchAppsV1NamespacedReplicaSetResponse(resp *http.Response) (res Wat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12011,23 +13367,28 @@ func decodeWatchAppsV1NamespacedReplicaSetListResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12050,23 +13411,28 @@ func decodeWatchAppsV1NamespacedStatefulSetResponse(resp *http.Response) (res Wa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12089,23 +13455,28 @@ func decodeWatchAppsV1NamespacedStatefulSetListResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12128,23 +13499,28 @@ func decodeWatchAppsV1ReplicaSetListForAllNamespacesResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12167,23 +13543,28 @@ func decodeWatchAppsV1StatefulSetListForAllNamespacesResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12206,23 +13587,28 @@ func decodeWatchAutoscalingV1HorizontalPodAutoscalerListForAllNamespacesResponse } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12245,23 +13631,28 @@ func decodeWatchAutoscalingV1NamespacedHorizontalPodAutoscalerResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12284,23 +13675,28 @@ func decodeWatchAutoscalingV1NamespacedHorizontalPodAutoscalerListResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12323,23 +13719,28 @@ func decodeWatchAutoscalingV2beta1HorizontalPodAutoscalerListForAllNamespacesRes } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12362,23 +13763,28 @@ func decodeWatchAutoscalingV2beta1NamespacedHorizontalPodAutoscalerResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12401,23 +13807,28 @@ func decodeWatchAutoscalingV2beta1NamespacedHorizontalPodAutoscalerListResponse( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12440,23 +13851,28 @@ func decodeWatchAutoscalingV2beta2HorizontalPodAutoscalerListForAllNamespacesRes } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12479,23 +13895,28 @@ func decodeWatchAutoscalingV2beta2NamespacedHorizontalPodAutoscalerResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12518,23 +13939,28 @@ func decodeWatchAutoscalingV2beta2NamespacedHorizontalPodAutoscalerListResponse( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12557,23 +13983,28 @@ func decodeWatchBatchV1CronJobListForAllNamespacesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12596,23 +14027,28 @@ func decodeWatchBatchV1JobListForAllNamespacesResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12635,23 +14071,28 @@ func decodeWatchBatchV1NamespacedCronJobResponse(resp *http.Response) (res Watch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12674,23 +14115,28 @@ func decodeWatchBatchV1NamespacedCronJobListResponse(resp *http.Response) (res W } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12713,23 +14159,28 @@ func decodeWatchBatchV1NamespacedJobResponse(resp *http.Response) (res WatchBatc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12752,23 +14203,28 @@ func decodeWatchBatchV1NamespacedJobListResponse(resp *http.Response) (res Watch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12791,23 +14247,28 @@ func decodeWatchBatchV1beta1CronJobListForAllNamespacesResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12830,23 +14291,28 @@ func decodeWatchBatchV1beta1NamespacedCronJobResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12869,23 +14335,28 @@ func decodeWatchBatchV1beta1NamespacedCronJobListResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12908,23 +14379,28 @@ func decodeWatchCertificatesV1CertificateSigningRequestResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12947,23 +14423,28 @@ func decodeWatchCertificatesV1CertificateSigningRequestListResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12986,23 +14467,28 @@ func decodeWatchCoordinationV1LeaseListForAllNamespacesResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13025,23 +14511,28 @@ func decodeWatchCoordinationV1NamespacedLeaseResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13064,23 +14555,28 @@ func decodeWatchCoordinationV1NamespacedLeaseListResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13103,23 +14599,28 @@ func decodeWatchCoreV1ConfigMapListForAllNamespacesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13142,23 +14643,28 @@ func decodeWatchCoreV1EndpointsListForAllNamespacesResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13181,23 +14687,28 @@ func decodeWatchCoreV1EventListForAllNamespacesResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13220,23 +14731,28 @@ func decodeWatchCoreV1LimitRangeListForAllNamespacesResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13259,23 +14775,28 @@ func decodeWatchCoreV1NamespaceResponse(resp *http.Response) (res WatchCoreV1Nam } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13298,23 +14819,28 @@ func decodeWatchCoreV1NamespaceListResponse(resp *http.Response) (res WatchCoreV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13337,23 +14863,28 @@ func decodeWatchCoreV1NamespacedConfigMapResponse(resp *http.Response) (res Watc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13376,23 +14907,28 @@ func decodeWatchCoreV1NamespacedConfigMapListResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13415,23 +14951,28 @@ func decodeWatchCoreV1NamespacedEndpointsResponse(resp *http.Response) (res Watc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13454,23 +14995,28 @@ func decodeWatchCoreV1NamespacedEndpointsListResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13493,23 +15039,28 @@ func decodeWatchCoreV1NamespacedEventResponse(resp *http.Response) (res WatchCor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13532,23 +15083,28 @@ func decodeWatchCoreV1NamespacedEventListResponse(resp *http.Response) (res Watc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13571,23 +15127,28 @@ func decodeWatchCoreV1NamespacedLimitRangeResponse(resp *http.Response) (res Wat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13610,23 +15171,28 @@ func decodeWatchCoreV1NamespacedLimitRangeListResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13649,23 +15215,28 @@ func decodeWatchCoreV1NamespacedPersistentVolumeClaimResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13688,23 +15259,28 @@ func decodeWatchCoreV1NamespacedPersistentVolumeClaimListResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13727,23 +15303,28 @@ func decodeWatchCoreV1NamespacedPodResponse(resp *http.Response) (res WatchCoreV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13766,23 +15347,28 @@ func decodeWatchCoreV1NamespacedPodListResponse(resp *http.Response) (res WatchC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13805,23 +15391,28 @@ func decodeWatchCoreV1NamespacedPodTemplateResponse(resp *http.Response) (res Wa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13844,23 +15435,28 @@ func decodeWatchCoreV1NamespacedPodTemplateListResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13883,23 +15479,28 @@ func decodeWatchCoreV1NamespacedReplicationControllerResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13922,23 +15523,28 @@ func decodeWatchCoreV1NamespacedReplicationControllerListResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13961,23 +15567,28 @@ func decodeWatchCoreV1NamespacedResourceQuotaResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14000,23 +15611,28 @@ func decodeWatchCoreV1NamespacedResourceQuotaListResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14039,23 +15655,28 @@ func decodeWatchCoreV1NamespacedSecretResponse(resp *http.Response) (res WatchCo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14078,23 +15699,28 @@ func decodeWatchCoreV1NamespacedSecretListResponse(resp *http.Response) (res Wat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14117,23 +15743,28 @@ func decodeWatchCoreV1NamespacedServiceResponse(resp *http.Response) (res WatchC } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14156,23 +15787,28 @@ func decodeWatchCoreV1NamespacedServiceAccountResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14195,23 +15831,28 @@ func decodeWatchCoreV1NamespacedServiceAccountListResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14234,23 +15875,28 @@ func decodeWatchCoreV1NamespacedServiceListResponse(resp *http.Response) (res Wa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14273,23 +15919,28 @@ func decodeWatchCoreV1NodeResponse(resp *http.Response) (res WatchCoreV1NodeRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14312,23 +15963,28 @@ func decodeWatchCoreV1NodeListResponse(resp *http.Response) (res WatchCoreV1Node } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14351,23 +16007,28 @@ func decodeWatchCoreV1PersistentVolumeResponse(resp *http.Response) (res WatchCo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14390,23 +16051,28 @@ func decodeWatchCoreV1PersistentVolumeClaimListForAllNamespacesResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14429,23 +16095,28 @@ func decodeWatchCoreV1PersistentVolumeListResponse(resp *http.Response) (res Wat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14468,23 +16139,28 @@ func decodeWatchCoreV1PodListForAllNamespacesResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14507,23 +16183,28 @@ func decodeWatchCoreV1PodTemplateListForAllNamespacesResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14546,23 +16227,28 @@ func decodeWatchCoreV1ReplicationControllerListForAllNamespacesResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14585,23 +16271,28 @@ func decodeWatchCoreV1ResourceQuotaListForAllNamespacesResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14624,23 +16315,28 @@ func decodeWatchCoreV1SecretListForAllNamespacesResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14663,23 +16359,28 @@ func decodeWatchCoreV1ServiceAccountListForAllNamespacesResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14702,23 +16403,28 @@ func decodeWatchCoreV1ServiceListForAllNamespacesResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14741,23 +16447,28 @@ func decodeWatchDiscoveryV1EndpointSliceListForAllNamespacesResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14780,23 +16491,28 @@ func decodeWatchDiscoveryV1NamespacedEndpointSliceResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14819,23 +16535,28 @@ func decodeWatchDiscoveryV1NamespacedEndpointSliceListResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14858,23 +16579,28 @@ func decodeWatchDiscoveryV1beta1EndpointSliceListForAllNamespacesResponse(resp * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14897,23 +16623,28 @@ func decodeWatchDiscoveryV1beta1NamespacedEndpointSliceResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14936,23 +16667,28 @@ func decodeWatchDiscoveryV1beta1NamespacedEndpointSliceListResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14975,23 +16711,28 @@ func decodeWatchEventsV1EventListForAllNamespacesResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15014,23 +16755,28 @@ func decodeWatchEventsV1NamespacedEventResponse(resp *http.Response) (res WatchE } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15053,23 +16799,28 @@ func decodeWatchEventsV1NamespacedEventListResponse(resp *http.Response) (res Wa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15092,23 +16843,28 @@ func decodeWatchEventsV1beta1EventListForAllNamespacesResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15131,23 +16887,28 @@ func decodeWatchEventsV1beta1NamespacedEventResponse(resp *http.Response) (res W } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15170,23 +16931,28 @@ func decodeWatchEventsV1beta1NamespacedEventListResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15209,23 +16975,28 @@ func decodeWatchFlowcontrolApiserverV1beta1FlowSchemaResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15248,23 +17019,28 @@ func decodeWatchFlowcontrolApiserverV1beta1FlowSchemaListResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15287,23 +17063,28 @@ func decodeWatchFlowcontrolApiserverV1beta1PriorityLevelConfigurationResponse(re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15326,23 +17107,28 @@ func decodeWatchFlowcontrolApiserverV1beta1PriorityLevelConfigurationListRespons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15365,23 +17151,28 @@ func decodeWatchFlowcontrolApiserverV1beta2FlowSchemaResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15404,23 +17195,28 @@ func decodeWatchFlowcontrolApiserverV1beta2FlowSchemaListResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15443,23 +17239,28 @@ func decodeWatchFlowcontrolApiserverV1beta2PriorityLevelConfigurationResponse(re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15482,23 +17283,28 @@ func decodeWatchFlowcontrolApiserverV1beta2PriorityLevelConfigurationListRespons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15521,23 +17327,28 @@ func decodeWatchInternalApiserverV1alpha1StorageVersionResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15560,23 +17371,28 @@ func decodeWatchInternalApiserverV1alpha1StorageVersionListResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15599,23 +17415,28 @@ func decodeWatchNetworkingV1IngressClassResponse(resp *http.Response) (res Watch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15638,23 +17459,28 @@ func decodeWatchNetworkingV1IngressClassListResponse(resp *http.Response) (res W } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15677,23 +17503,28 @@ func decodeWatchNetworkingV1IngressListForAllNamespacesResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15716,23 +17547,28 @@ func decodeWatchNetworkingV1NamespacedIngressResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15755,23 +17591,28 @@ func decodeWatchNetworkingV1NamespacedIngressListResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15794,23 +17635,28 @@ func decodeWatchNetworkingV1NamespacedNetworkPolicyResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15833,23 +17679,28 @@ func decodeWatchNetworkingV1NamespacedNetworkPolicyListResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15872,23 +17723,28 @@ func decodeWatchNetworkingV1NetworkPolicyListForAllNamespacesResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15911,23 +17767,28 @@ func decodeWatchNodeV1RuntimeClassResponse(resp *http.Response) (res WatchNodeV1 } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15950,23 +17811,28 @@ func decodeWatchNodeV1RuntimeClassListResponse(resp *http.Response) (res WatchNo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15989,23 +17855,28 @@ func decodeWatchNodeV1alpha1RuntimeClassResponse(resp *http.Response) (res Watch } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16028,23 +17899,28 @@ func decodeWatchNodeV1alpha1RuntimeClassListResponse(resp *http.Response) (res W } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16067,23 +17943,28 @@ func decodeWatchNodeV1beta1RuntimeClassResponse(resp *http.Response) (res WatchN } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16106,23 +17987,28 @@ func decodeWatchNodeV1beta1RuntimeClassListResponse(resp *http.Response) (res Wa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16145,23 +18031,28 @@ func decodeWatchPolicyV1NamespacedPodDisruptionBudgetResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16184,23 +18075,28 @@ func decodeWatchPolicyV1NamespacedPodDisruptionBudgetListResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16223,23 +18119,28 @@ func decodeWatchPolicyV1PodDisruptionBudgetListForAllNamespacesResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16262,23 +18163,28 @@ func decodeWatchPolicyV1beta1NamespacedPodDisruptionBudgetResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16301,23 +18207,28 @@ func decodeWatchPolicyV1beta1NamespacedPodDisruptionBudgetListResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16340,23 +18251,28 @@ func decodeWatchPolicyV1beta1PodDisruptionBudgetListForAllNamespacesResponse(res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16379,23 +18295,28 @@ func decodeWatchPolicyV1beta1PodSecurityPolicyResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16418,23 +18339,28 @@ func decodeWatchPolicyV1beta1PodSecurityPolicyListResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16457,23 +18383,28 @@ func decodeWatchRbacAuthorizationV1ClusterRoleResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16496,23 +18427,28 @@ func decodeWatchRbacAuthorizationV1ClusterRoleBindingResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16535,23 +18471,28 @@ func decodeWatchRbacAuthorizationV1ClusterRoleBindingListResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16574,23 +18515,28 @@ func decodeWatchRbacAuthorizationV1ClusterRoleListResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16613,23 +18559,28 @@ func decodeWatchRbacAuthorizationV1NamespacedRoleResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16652,23 +18603,28 @@ func decodeWatchRbacAuthorizationV1NamespacedRoleBindingResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16691,23 +18647,28 @@ func decodeWatchRbacAuthorizationV1NamespacedRoleBindingListResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16730,23 +18691,28 @@ func decodeWatchRbacAuthorizationV1NamespacedRoleListResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16769,23 +18735,28 @@ func decodeWatchRbacAuthorizationV1RoleBindingListForAllNamespacesResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16808,23 +18779,28 @@ func decodeWatchRbacAuthorizationV1RoleListForAllNamespacesResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16847,23 +18823,28 @@ func decodeWatchSchedulingV1PriorityClassResponse(resp *http.Response) (res Watc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16886,23 +18867,28 @@ func decodeWatchSchedulingV1PriorityClassListResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16925,23 +18911,28 @@ func decodeWatchStorageV1CSIDriverResponse(resp *http.Response) (res WatchStorag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16964,23 +18955,28 @@ func decodeWatchStorageV1CSIDriverListResponse(resp *http.Response) (res WatchSt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17003,23 +18999,28 @@ func decodeWatchStorageV1CSINodeResponse(resp *http.Response) (res WatchStorageV } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17042,23 +19043,28 @@ func decodeWatchStorageV1CSINodeListResponse(resp *http.Response) (res WatchStor } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17081,23 +19087,28 @@ func decodeWatchStorageV1StorageClassResponse(resp *http.Response) (res WatchSto } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17120,23 +19131,28 @@ func decodeWatchStorageV1StorageClassListResponse(resp *http.Response) (res Watc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17159,23 +19175,28 @@ func decodeWatchStorageV1VolumeAttachmentResponse(resp *http.Response) (res Watc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17198,23 +19219,28 @@ func decodeWatchStorageV1VolumeAttachmentListResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17237,23 +19263,28 @@ func decodeWatchStorageV1alpha1CSIStorageCapacityListForAllNamespacesResponse(re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17276,23 +19307,28 @@ func decodeWatchStorageV1alpha1NamespacedCSIStorageCapacityResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17315,23 +19351,28 @@ func decodeWatchStorageV1alpha1NamespacedCSIStorageCapacityListResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17354,23 +19395,28 @@ func decodeWatchStorageV1beta1CSIStorageCapacityListForAllNamespacesResponse(res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17393,23 +19439,28 @@ func decodeWatchStorageV1beta1NamespacedCSIStorageCapacityResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17432,23 +19483,28 @@ func decodeWatchStorageV1beta1NamespacedCSIStorageCapacityListResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IoK8sApimachineryPkgApisMetaV1WatchEvent if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/examples/ex_manga/oas_response_decoders_gen.go b/examples/ex_manga/oas_response_decoders_gen.go index 16a151493..5dea87aa1 100644 --- a/examples/ex_manga/oas_response_decoders_gen.go +++ b/examples/ex_manga/oas_response_decoders_gen.go @@ -12,6 +12,7 @@ import ( "github.com/go-faster/jx" ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -25,23 +26,28 @@ func decodeGetBookResponse(resp *http.Response) (res GetBookRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Book if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -148,23 +154,28 @@ func decodeSearchResponse(resp *http.Response) (res SearchRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -187,23 +198,28 @@ func decodeSearchByTagIDResponse(resp *http.Response) (res SearchByTagIDRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchByTagIDOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/examples/ex_petstore/oas_response_decoders_gen.go b/examples/ex_petstore/oas_response_decoders_gen.go index 9fb8cfd14..e1e910f5a 100644 --- a/examples/ex_petstore/oas_response_decoders_gen.go +++ b/examples/ex_petstore/oas_response_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "github.com/ogen-go/ogen/conv" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/uri" "github.com/ogen-go/ogen/validate" ) @@ -28,23 +29,28 @@ func decodeCreatePetsResponse(resp *http.Response) (res CreatePetsRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -65,23 +71,28 @@ func decodeListPetsResponse(resp *http.Response) (res ListPetsRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pets if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } var wrapper PetsHeaders wrapper.Response = response @@ -133,23 +144,28 @@ func decodeListPetsResponse(resp *http.Response) (res ListPetsRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -170,23 +186,28 @@ func decodeShowPetByIdResponse(resp *http.Response) (res ShowPetByIdRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -200,23 +221,28 @@ func decodeShowPetByIdResponse(resp *http.Response) (res ShowPetByIdRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/examples/ex_petstore_expanded/oas_request_decoders_gen.go b/examples/ex_petstore_expanded/oas_request_decoders_gen.go index 07176118f..92f1618e8 100644 --- a/examples/ex_petstore_expanded/oas_request_decoders_gen.go +++ b/examples/ex_petstore_expanded/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -59,12 +60,17 @@ func (s *Server) decodeAddPetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: diff --git a/examples/ex_petstore_expanded/oas_response_decoders_gen.go b/examples/ex_petstore_expanded/oas_response_decoders_gen.go index 3a276e1a3..73bb3e49e 100644 --- a/examples/ex_petstore_expanded/oas_response_decoders_gen.go +++ b/examples/ex_petstore_expanded/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeAddPetResponse(resp *http.Response) (res AddPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53,23 +59,28 @@ func decodeAddPetResponse(resp *http.Response) (res AddPetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -93,23 +104,28 @@ func decodeDeletePetResponse(resp *http.Response) (res DeletePetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -130,23 +146,28 @@ func decodeFindPetByIDResponse(resp *http.Response) (res FindPetByIDRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -160,23 +181,28 @@ func decodeFindPetByIDResponse(resp *http.Response) (res FindPetByIDRes, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -197,23 +223,28 @@ func decodeFindPetsResponse(resp *http.Response) (res FindPetsRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response FindPetsOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -227,23 +258,28 @@ func decodeFindPetsResponse(resp *http.Response) (res FindPetsRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/examples/ex_route_params/oas_response_decoders_gen.go b/examples/ex_route_params/oas_response_decoders_gen.go index d716adc6f..20651d036 100644 --- a/examples/ex_route_params/oas_response_decoders_gen.go +++ b/examples/ex_route_params/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,12 +24,12 @@ func decodeDataGetResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -36,12 +37,17 @@ func decodeDataGetResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -61,12 +67,12 @@ func decodeDataGetAnyResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -74,12 +80,17 @@ func decodeDataGetAnyResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -99,12 +110,12 @@ func decodeDataGetIDResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -112,12 +123,17 @@ func decodeDataGetIDResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: diff --git a/examples/ex_telegram/oas_request_decoders_gen.go b/examples/ex_telegram/oas_request_decoders_gen.go index 23498b68d..f4e4334bf 100644 --- a/examples/ex_telegram/oas_request_decoders_gen.go +++ b/examples/ex_telegram/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -59,12 +60,17 @@ func (s *Server) decodeAddStickerToSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -125,12 +131,17 @@ func (s *Server) decodeAnswerCallbackQueryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -191,12 +202,17 @@ func (s *Server) decodeAnswerInlineQueryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -257,12 +273,17 @@ func (s *Server) decodeAnswerPreCheckoutQueryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -315,12 +336,17 @@ func (s *Server) decodeAnswerShippingQueryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -381,12 +407,17 @@ func (s *Server) decodeApproveChatJoinRequestRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -439,12 +470,17 @@ func (s *Server) decodeBanChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -497,12 +533,17 @@ func (s *Server) decodeBanChatSenderChatRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -555,12 +596,17 @@ func (s *Server) decodeCopyMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -621,12 +667,17 @@ func (s *Server) decodeCreateChatInviteLinkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -687,12 +738,17 @@ func (s *Server) decodeCreateNewStickerSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -753,12 +809,17 @@ func (s *Server) decodeDeclineChatJoinRequestRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -811,12 +872,17 @@ func (s *Server) decodeDeleteChatPhotoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -869,12 +935,17 @@ func (s *Server) decodeDeleteChatStickerSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -927,12 +998,17 @@ func (s *Server) decodeDeleteMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -989,12 +1065,17 @@ func (s *Server) decodeDeleteMyCommandsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1047,12 +1128,17 @@ func (s *Server) decodeDeleteStickerFromSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1109,12 +1195,17 @@ func (s *Server) decodeDeleteWebhookRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1167,12 +1258,17 @@ func (s *Server) decodeEditChatInviteLinkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1233,12 +1329,17 @@ func (s *Server) decodeEditMessageCaptionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1299,12 +1400,17 @@ func (s *Server) decodeEditMessageLiveLocationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1365,12 +1471,17 @@ func (s *Server) decodeEditMessageMediaRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1431,12 +1542,17 @@ func (s *Server) decodeEditMessageReplyMarkupRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1497,12 +1613,17 @@ func (s *Server) decodeEditMessageTextRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -1563,12 +1684,17 @@ func (s *Server) decodeExportChatInviteLinkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1621,12 +1747,17 @@ func (s *Server) decodeForwardMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1679,12 +1810,17 @@ func (s *Server) decodeGetChatRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1737,12 +1873,17 @@ func (s *Server) decodeGetChatAdministratorsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1795,12 +1936,17 @@ func (s *Server) decodeGetChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1853,12 +1999,17 @@ func (s *Server) decodeGetChatMemberCountRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1911,12 +2062,17 @@ func (s *Server) decodeGetFileRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -1969,12 +2125,17 @@ func (s *Server) decodeGetGameHighScoresRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2031,12 +2192,17 @@ func (s *Server) decodeGetMyCommandsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2089,12 +2255,17 @@ func (s *Server) decodeGetStickerSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2151,12 +2322,17 @@ func (s *Server) decodeGetUpdatesRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -2224,12 +2400,17 @@ func (s *Server) decodeGetUserProfilePhotosRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2290,12 +2471,17 @@ func (s *Server) decodeLeaveChatRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2348,12 +2534,17 @@ func (s *Server) decodePinChatMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2406,12 +2597,17 @@ func (s *Server) decodePromoteChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2464,12 +2660,17 @@ func (s *Server) decodeRestrictChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2522,12 +2723,17 @@ func (s *Server) decodeRevokeChatInviteLinkRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2580,12 +2786,17 @@ func (s *Server) decodeSendAnimationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2646,12 +2857,17 @@ func (s *Server) decodeSendAudioRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2712,12 +2928,17 @@ func (s *Server) decodeSendChatActionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -2770,12 +2991,17 @@ func (s *Server) decodeSendContactRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2836,12 +3062,17 @@ func (s *Server) decodeSendDiceRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2902,12 +3133,17 @@ func (s *Server) decodeSendDocumentRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -2968,12 +3204,17 @@ func (s *Server) decodeSendGameRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3034,12 +3275,17 @@ func (s *Server) decodeSendInvoiceRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3100,12 +3346,17 @@ func (s *Server) decodeSendLocationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3166,12 +3417,17 @@ func (s *Server) decodeSendMediaGroupRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3232,12 +3488,17 @@ func (s *Server) decodeSendMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3298,12 +3559,17 @@ func (s *Server) decodeSendPhotoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3364,12 +3630,17 @@ func (s *Server) decodeSendPollRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3430,12 +3701,17 @@ func (s *Server) decodeSendStickerRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3496,12 +3772,17 @@ func (s *Server) decodeSendVenueRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3562,12 +3843,17 @@ func (s *Server) decodeSendVideoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3628,12 +3914,17 @@ func (s *Server) decodeSendVideoNoteRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3694,12 +3985,17 @@ func (s *Server) decodeSendVoiceRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3760,12 +4056,17 @@ func (s *Server) decodeSetChatAdministratorCustomTitleRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3826,12 +4127,17 @@ func (s *Server) decodeSetChatDescriptionRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -3892,12 +4198,17 @@ func (s *Server) decodeSetChatPermissionsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -3950,12 +4261,17 @@ func (s *Server) decodeSetChatPhotoRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4008,12 +4324,17 @@ func (s *Server) decodeSetChatStickerSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4066,12 +4387,17 @@ func (s *Server) decodeSetChatTitleRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4132,12 +4458,17 @@ func (s *Server) decodeSetGameScoreRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4190,12 +4521,17 @@ func (s *Server) decodeSetMyCommandsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4256,12 +4592,17 @@ func (s *Server) decodeSetPassportDataErrorsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4322,12 +4663,17 @@ func (s *Server) decodeSetStickerPositionInSetRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4380,12 +4726,17 @@ func (s *Server) decodeSetStickerSetThumbRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4438,12 +4789,17 @@ func (s *Server) decodeSetWebhookRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4496,12 +4852,17 @@ func (s *Server) decodeStopMessageLiveLocationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4562,12 +4923,17 @@ func (s *Server) decodeStopPollRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -4628,12 +4994,17 @@ func (s *Server) decodeUnbanChatMemberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4686,12 +5057,17 @@ func (s *Server) decodeUnbanChatSenderChatRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4744,12 +5120,17 @@ func (s *Server) decodeUnpinAllChatMessagesRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4802,12 +5183,17 @@ func (s *Server) decodeUnpinChatMessageRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -4860,12 +5246,17 @@ func (s *Server) decodeUploadStickerFileRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: diff --git a/examples/ex_telegram/oas_response_decoders_gen.go b/examples/ex_telegram/oas_response_decoders_gen.go index 24c8d6a60..5f777dd27 100644 --- a/examples/ex_telegram/oas_response_decoders_gen.go +++ b/examples/ex_telegram/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeAddStickerToSetResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54,23 +60,28 @@ func decodeAddStickerToSetResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -96,23 +107,28 @@ func decodeAnswerCallbackQueryResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -127,23 +143,28 @@ func decodeAnswerCallbackQueryResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -169,23 +190,28 @@ func decodeAnswerInlineQueryResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -200,23 +226,28 @@ func decodeAnswerInlineQueryResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -242,23 +273,28 @@ func decodeAnswerPreCheckoutQueryResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -273,23 +309,28 @@ func decodeAnswerPreCheckoutQueryResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -315,23 +356,28 @@ func decodeAnswerShippingQueryResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -346,23 +392,28 @@ func decodeAnswerShippingQueryResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -388,23 +439,28 @@ func decodeApproveChatJoinRequestResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -419,23 +475,28 @@ func decodeApproveChatJoinRequestResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -461,23 +522,28 @@ func decodeBanChatMemberResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -492,23 +558,28 @@ func decodeBanChatMemberResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -534,23 +605,28 @@ func decodeBanChatSenderChatResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -565,23 +641,28 @@ func decodeBanChatSenderChatResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -607,23 +688,28 @@ func decodeCloseResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -638,23 +724,28 @@ func decodeCloseResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -680,23 +771,28 @@ func decodeCopyMessageResponse(resp *http.Response) (res *ResultMessageId, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessageId if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -711,23 +807,28 @@ func decodeCopyMessageResponse(resp *http.Response) (res *ResultMessageId, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -753,23 +854,28 @@ func decodeCreateChatInviteLinkResponse(resp *http.Response) (res *ResultChatInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChatInviteLink if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -784,23 +890,28 @@ func decodeCreateChatInviteLinkResponse(resp *http.Response) (res *ResultChatInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -826,23 +937,28 @@ func decodeCreateNewStickerSetResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -857,23 +973,28 @@ func decodeCreateNewStickerSetResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -899,23 +1020,28 @@ func decodeDeclineChatJoinRequestResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -930,23 +1056,28 @@ func decodeDeclineChatJoinRequestResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -972,23 +1103,28 @@ func decodeDeleteChatPhotoResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1003,23 +1139,28 @@ func decodeDeleteChatPhotoResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1045,23 +1186,28 @@ func decodeDeleteChatStickerSetResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1076,23 +1222,28 @@ func decodeDeleteChatStickerSetResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1118,23 +1269,28 @@ func decodeDeleteMessageResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1149,23 +1305,28 @@ func decodeDeleteMessageResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1191,23 +1352,28 @@ func decodeDeleteMyCommandsResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1222,23 +1388,28 @@ func decodeDeleteMyCommandsResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1264,23 +1435,28 @@ func decodeDeleteStickerFromSetResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1295,23 +1471,28 @@ func decodeDeleteStickerFromSetResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1337,23 +1518,28 @@ func decodeDeleteWebhookResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1368,23 +1554,28 @@ func decodeDeleteWebhookResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1410,23 +1601,28 @@ func decodeEditChatInviteLinkResponse(resp *http.Response) (res *ResultChatInvit } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChatInviteLink if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1441,23 +1637,28 @@ func decodeEditChatInviteLinkResponse(resp *http.Response) (res *ResultChatInvit } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1483,23 +1684,28 @@ func decodeEditMessageCaptionResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1514,23 +1720,28 @@ func decodeEditMessageCaptionResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1556,23 +1767,28 @@ func decodeEditMessageLiveLocationResponse(resp *http.Response) (res *Result, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1587,23 +1803,28 @@ func decodeEditMessageLiveLocationResponse(resp *http.Response) (res *Result, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1629,23 +1850,28 @@ func decodeEditMessageMediaResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1660,23 +1886,28 @@ func decodeEditMessageMediaResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1702,23 +1933,28 @@ func decodeEditMessageReplyMarkupResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1733,23 +1969,28 @@ func decodeEditMessageReplyMarkupResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1775,23 +2016,28 @@ func decodeEditMessageTextResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1806,23 +2052,28 @@ func decodeEditMessageTextResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1848,23 +2099,28 @@ func decodeExportChatInviteLinkResponse(resp *http.Response) (res *ResultString, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultString if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1879,23 +2135,28 @@ func decodeExportChatInviteLinkResponse(resp *http.Response) (res *ResultString, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1921,23 +2182,28 @@ func decodeForwardMessageResponse(resp *http.Response) (res *ResultMessage, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1952,23 +2218,28 @@ func decodeForwardMessageResponse(resp *http.Response) (res *ResultMessage, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1994,23 +2265,28 @@ func decodeGetChatResponse(resp *http.Response) (res *ResultChat, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChat if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2025,23 +2301,28 @@ func decodeGetChatResponse(resp *http.Response) (res *ResultChat, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2067,23 +2348,28 @@ func decodeGetChatAdministratorsResponse(resp *http.Response) (res *ResultArrayO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfChatMember if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2098,23 +2384,28 @@ func decodeGetChatAdministratorsResponse(resp *http.Response) (res *ResultArrayO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2140,23 +2431,28 @@ func decodeGetChatMemberResponse(resp *http.Response) (res *ResultChatMember, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChatMember if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2171,23 +2467,28 @@ func decodeGetChatMemberResponse(resp *http.Response) (res *ResultChatMember, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2213,23 +2514,28 @@ func decodeGetChatMemberCountResponse(resp *http.Response) (res *ResultInt, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultInt if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2244,23 +2550,28 @@ func decodeGetChatMemberCountResponse(resp *http.Response) (res *ResultInt, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2286,23 +2597,28 @@ func decodeGetFileResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2317,23 +2633,28 @@ func decodeGetFileResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2359,23 +2680,28 @@ func decodeGetGameHighScoresResponse(resp *http.Response) (res *ResultArrayOfGam } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfGameHighScore if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2390,23 +2716,28 @@ func decodeGetGameHighScoresResponse(resp *http.Response) (res *ResultArrayOfGam } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2432,23 +2763,28 @@ func decodeGetMeResponse(resp *http.Response) (res *ResultUser, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultUser if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2463,23 +2799,28 @@ func decodeGetMeResponse(resp *http.Response) (res *ResultUser, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2505,23 +2846,28 @@ func decodeGetMyCommandsResponse(resp *http.Response) (res *ResultArrayOfBotComm } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfBotCommand if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2536,23 +2882,28 @@ func decodeGetMyCommandsResponse(resp *http.Response) (res *ResultArrayOfBotComm } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2578,23 +2929,28 @@ func decodeGetStickerSetResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2609,23 +2965,28 @@ func decodeGetStickerSetResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2651,23 +3012,28 @@ func decodeGetUpdatesResponse(resp *http.Response) (res *ResultArrayOfUpdate, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfUpdate if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2682,23 +3048,28 @@ func decodeGetUpdatesResponse(resp *http.Response) (res *ResultArrayOfUpdate, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2724,23 +3095,28 @@ func decodeGetUserProfilePhotosResponse(resp *http.Response) (res *ResultUserPro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultUserProfilePhotos if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2755,23 +3131,28 @@ func decodeGetUserProfilePhotosResponse(resp *http.Response) (res *ResultUserPro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2797,23 +3178,28 @@ func decodeGetWebhookInfoResponse(resp *http.Response) (res *ResultWebhookInfo, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultWebhookInfo if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2828,23 +3214,28 @@ func decodeGetWebhookInfoResponse(resp *http.Response) (res *ResultWebhookInfo, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2870,23 +3261,28 @@ func decodeLeaveChatResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2901,23 +3297,28 @@ func decodeLeaveChatResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2943,23 +3344,28 @@ func decodeLogOutResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2974,23 +3380,28 @@ func decodeLogOutResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3016,23 +3427,28 @@ func decodePinChatMessageResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3047,23 +3463,28 @@ func decodePinChatMessageResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3089,23 +3510,28 @@ func decodePromoteChatMemberResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3120,23 +3546,28 @@ func decodePromoteChatMemberResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3162,23 +3593,28 @@ func decodeRestrictChatMemberResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3193,23 +3629,28 @@ func decodeRestrictChatMemberResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3235,23 +3676,28 @@ func decodeRevokeChatInviteLinkResponse(resp *http.Response) (res *ResultChatInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultChatInviteLink if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3266,23 +3712,28 @@ func decodeRevokeChatInviteLinkResponse(resp *http.Response) (res *ResultChatInv } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3308,23 +3759,28 @@ func decodeSendAnimationResponse(resp *http.Response) (res *ResultMessage, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3339,23 +3795,28 @@ func decodeSendAnimationResponse(resp *http.Response) (res *ResultMessage, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3381,23 +3842,28 @@ func decodeSendAudioResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3412,23 +3878,28 @@ func decodeSendAudioResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3454,23 +3925,28 @@ func decodeSendChatActionResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3485,23 +3961,28 @@ func decodeSendChatActionResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3527,23 +4008,28 @@ func decodeSendContactResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3558,23 +4044,28 @@ func decodeSendContactResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3600,23 +4091,28 @@ func decodeSendDiceResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3631,23 +4127,28 @@ func decodeSendDiceResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3673,23 +4174,28 @@ func decodeSendDocumentResponse(resp *http.Response) (res *ResultMessage, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3704,23 +4210,28 @@ func decodeSendDocumentResponse(resp *http.Response) (res *ResultMessage, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3746,23 +4257,28 @@ func decodeSendGameResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3777,23 +4293,28 @@ func decodeSendGameResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3819,23 +4340,28 @@ func decodeSendInvoiceResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3850,23 +4376,28 @@ func decodeSendInvoiceResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3892,23 +4423,28 @@ func decodeSendLocationResponse(resp *http.Response) (res *ResultMessage, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3923,23 +4459,28 @@ func decodeSendLocationResponse(resp *http.Response) (res *ResultMessage, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3965,23 +4506,28 @@ func decodeSendMediaGroupResponse(resp *http.Response) (res *ResultArrayOfMessag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultArrayOfMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3996,23 +4542,28 @@ func decodeSendMediaGroupResponse(resp *http.Response) (res *ResultArrayOfMessag } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4038,23 +4589,28 @@ func decodeSendMessageResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4069,23 +4625,28 @@ func decodeSendMessageResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4111,23 +4672,28 @@ func decodeSendPhotoResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4142,23 +4708,28 @@ func decodeSendPhotoResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4184,23 +4755,28 @@ func decodeSendPollResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4215,23 +4791,28 @@ func decodeSendPollResponse(resp *http.Response) (res *ResultMessage, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4257,23 +4838,28 @@ func decodeSendStickerResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4288,23 +4874,28 @@ func decodeSendStickerResponse(resp *http.Response) (res *ResultMessage, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4330,23 +4921,28 @@ func decodeSendVenueResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4361,23 +4957,28 @@ func decodeSendVenueResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4403,23 +5004,28 @@ func decodeSendVideoResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4434,23 +5040,28 @@ func decodeSendVideoResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4476,23 +5087,28 @@ func decodeSendVideoNoteResponse(resp *http.Response) (res *ResultMessage, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4507,23 +5123,28 @@ func decodeSendVideoNoteResponse(resp *http.Response) (res *ResultMessage, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4549,23 +5170,28 @@ func decodeSendVoiceResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultMessage if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4580,23 +5206,28 @@ func decodeSendVoiceResponse(resp *http.Response) (res *ResultMessage, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4622,23 +5253,28 @@ func decodeSetChatAdministratorCustomTitleResponse(resp *http.Response) (res *Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4653,23 +5289,28 @@ func decodeSetChatAdministratorCustomTitleResponse(resp *http.Response) (res *Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4695,23 +5336,28 @@ func decodeSetChatDescriptionResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4726,23 +5372,28 @@ func decodeSetChatDescriptionResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4768,23 +5419,28 @@ func decodeSetChatPermissionsResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4799,23 +5455,28 @@ func decodeSetChatPermissionsResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4841,23 +5502,28 @@ func decodeSetChatPhotoResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4872,23 +5538,28 @@ func decodeSetChatPhotoResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4914,23 +5585,28 @@ func decodeSetChatStickerSetResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4945,23 +5621,28 @@ func decodeSetChatStickerSetResponse(resp *http.Response) (res *Result, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4987,23 +5668,28 @@ func decodeSetChatTitleResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5018,23 +5704,28 @@ func decodeSetChatTitleResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5060,23 +5751,28 @@ func decodeSetGameScoreResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5091,23 +5787,28 @@ func decodeSetGameScoreResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5133,23 +5834,28 @@ func decodeSetMyCommandsResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5164,23 +5870,28 @@ func decodeSetMyCommandsResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5206,23 +5917,28 @@ func decodeSetPassportDataErrorsResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5237,23 +5953,28 @@ func decodeSetPassportDataErrorsResponse(resp *http.Response) (res *Result, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5279,23 +6000,28 @@ func decodeSetStickerPositionInSetResponse(resp *http.Response) (res *Result, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5310,23 +6036,28 @@ func decodeSetStickerPositionInSetResponse(resp *http.Response) (res *Result, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5352,23 +6083,28 @@ func decodeSetStickerSetThumbResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5383,23 +6119,28 @@ func decodeSetStickerSetThumbResponse(resp *http.Response) (res *Result, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5425,23 +6166,28 @@ func decodeSetWebhookResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5456,23 +6202,28 @@ func decodeSetWebhookResponse(resp *http.Response) (res *Result, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5498,23 +6249,28 @@ func decodeStopMessageLiveLocationResponse(resp *http.Response) (res *Result, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5529,23 +6285,28 @@ func decodeStopMessageLiveLocationResponse(resp *http.Response) (res *Result, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5571,23 +6332,28 @@ func decodeStopPollResponse(resp *http.Response) (res *ResultPoll, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultPoll if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5602,23 +6368,28 @@ func decodeStopPollResponse(resp *http.Response) (res *ResultPoll, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5644,23 +6415,28 @@ func decodeUnbanChatMemberResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5675,23 +6451,28 @@ func decodeUnbanChatMemberResponse(resp *http.Response) (res *Result, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5717,23 +6498,28 @@ func decodeUnbanChatSenderChatResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5748,23 +6534,28 @@ func decodeUnbanChatSenderChatResponse(resp *http.Response) (res *Result, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5790,23 +6581,28 @@ func decodeUnpinAllChatMessagesResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5821,23 +6617,28 @@ func decodeUnpinAllChatMessagesResponse(resp *http.Response) (res *Result, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5863,23 +6664,28 @@ func decodeUnpinChatMessageResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Result if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5894,23 +6700,28 @@ func decodeUnpinChatMessageResponse(resp *http.Response) (res *Result, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5936,23 +6747,28 @@ func decodeUploadStickerFileResponse(resp *http.Response) (res *ResultFile, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ResultFile if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5967,23 +6783,28 @@ func decodeUploadStickerFileResponse(resp *http.Response) (res *ResultFile, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/examples/ex_test_format/oas_request_decoders_gen.go b/examples/ex_test_format/oas_request_decoders_gen.go index 80c3dc654..26eb55d0a 100644 --- a/examples/ex_test_format/oas_request_decoders_gen.go +++ b/examples/ex_test_format/oas_request_decoders_gen.go @@ -17,6 +17,7 @@ import ( "go.uber.org/multierr" "github.com/ogen-go/ogen/json" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -67,12 +68,17 @@ func (s *Server) decodeTestQueryParameterRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -130,12 +136,17 @@ func (s *Server) decodeTestRequestAnyRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -192,12 +203,17 @@ func (s *Server) decodeTestRequestBooleanRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -263,12 +279,17 @@ func (s *Server) decodeTestRequestBooleanArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -342,12 +363,17 @@ func (s *Server) decodeTestRequestBooleanArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -426,12 +452,17 @@ func (s *Server) decodeTestRequestBooleanNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -495,12 +526,17 @@ func (s *Server) decodeTestRequestBooleanNullableArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -572,12 +608,17 @@ func (s *Server) decodeTestRequestBooleanNullableArrayArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -658,12 +699,17 @@ func (s *Server) decodeTestRequestEmptyStructRequest(r *http.Request) ( return err } request = &elem + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -720,12 +766,17 @@ func (s *Server) decodeTestRequestFormatTestRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -797,12 +848,17 @@ func (s *Server) decodeTestRequestIntegerRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -868,12 +924,17 @@ func (s *Server) decodeTestRequestIntegerArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -947,12 +1008,17 @@ func (s *Server) decodeTestRequestIntegerArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -1031,12 +1097,17 @@ func (s *Server) decodeTestRequestIntegerInt32Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1102,12 +1173,17 @@ func (s *Server) decodeTestRequestIntegerInt32ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1181,12 +1257,17 @@ func (s *Server) decodeTestRequestIntegerInt32ArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -1265,12 +1346,17 @@ func (s *Server) decodeTestRequestIntegerInt32NullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1334,12 +1420,17 @@ func (s *Server) decodeTestRequestIntegerInt32NullableArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1411,12 +1502,17 @@ func (s *Server) decodeTestRequestIntegerInt32NullableArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -1495,12 +1591,17 @@ func (s *Server) decodeTestRequestIntegerInt64Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1566,12 +1667,17 @@ func (s *Server) decodeTestRequestIntegerInt64ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1645,12 +1751,17 @@ func (s *Server) decodeTestRequestIntegerInt64ArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -1729,12 +1840,17 @@ func (s *Server) decodeTestRequestIntegerInt64NullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1798,12 +1914,17 @@ func (s *Server) decodeTestRequestIntegerInt64NullableArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -1875,12 +1996,17 @@ func (s *Server) decodeTestRequestIntegerInt64NullableArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -1959,12 +2085,17 @@ func (s *Server) decodeTestRequestIntegerNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2028,12 +2159,17 @@ func (s *Server) decodeTestRequestIntegerNullableArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2105,12 +2241,17 @@ func (s *Server) decodeTestRequestIntegerNullableArrayArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -2189,12 +2330,17 @@ func (s *Server) decodeTestRequestIntegerUintRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2251,12 +2397,17 @@ func (s *Server) decodeTestRequestIntegerUint32Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2322,12 +2473,17 @@ func (s *Server) decodeTestRequestIntegerUint32ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2401,12 +2557,17 @@ func (s *Server) decodeTestRequestIntegerUint32ArrayArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -2485,12 +2646,17 @@ func (s *Server) decodeTestRequestIntegerUint32NullableRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2554,12 +2720,17 @@ func (s *Server) decodeTestRequestIntegerUint32NullableArrayRequest(r *http.Requ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2631,12 +2802,17 @@ func (s *Server) decodeTestRequestIntegerUint32NullableArrayArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -2715,12 +2891,17 @@ func (s *Server) decodeTestRequestIntegerUint64Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2786,12 +2967,17 @@ func (s *Server) decodeTestRequestIntegerUint64ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -2865,12 +3051,17 @@ func (s *Server) decodeTestRequestIntegerUint64ArrayArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -2949,12 +3140,17 @@ func (s *Server) decodeTestRequestIntegerUint64NullableRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3018,12 +3214,17 @@ func (s *Server) decodeTestRequestIntegerUint64NullableArrayRequest(r *http.Requ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3095,12 +3296,17 @@ func (s *Server) decodeTestRequestIntegerUint64NullableArrayArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -3188,12 +3394,17 @@ func (s *Server) decodeTestRequestIntegerUintArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3267,12 +3478,17 @@ func (s *Server) decodeTestRequestIntegerUintArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -3351,12 +3567,17 @@ func (s *Server) decodeTestRequestIntegerUintNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3420,12 +3641,17 @@ func (s *Server) decodeTestRequestIntegerUintNullableArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3497,12 +3723,17 @@ func (s *Server) decodeTestRequestIntegerUintNullableArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -3581,12 +3812,17 @@ func (s *Server) decodeTestRequestIntegerUnixRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3652,12 +3888,17 @@ func (s *Server) decodeTestRequestIntegerUnixArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3731,12 +3972,17 @@ func (s *Server) decodeTestRequestIntegerUnixArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -3815,12 +4061,17 @@ func (s *Server) decodeTestRequestIntegerUnixMicroRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeUnixMicro); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3886,12 +4137,17 @@ func (s *Server) decodeTestRequestIntegerUnixMicroArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -3965,12 +4221,17 @@ func (s *Server) decodeTestRequestIntegerUnixMicroArrayArrayRequest(r *http.Requ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -4049,12 +4310,17 @@ func (s *Server) decodeTestRequestIntegerUnixMicroNullableRequest(r *http.Reques if err := request.Decode(d, json.DecodeUnixMicro); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4118,12 +4384,17 @@ func (s *Server) decodeTestRequestIntegerUnixMicroNullableArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4195,12 +4466,17 @@ func (s *Server) decodeTestRequestIntegerUnixMicroNullableArrayArrayRequest(r *h }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -4279,12 +4555,17 @@ func (s *Server) decodeTestRequestIntegerUnixMilliRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeUnixMilli); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4350,12 +4631,17 @@ func (s *Server) decodeTestRequestIntegerUnixMilliArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4429,12 +4715,17 @@ func (s *Server) decodeTestRequestIntegerUnixMilliArrayArrayRequest(r *http.Requ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -4513,12 +4804,17 @@ func (s *Server) decodeTestRequestIntegerUnixMilliNullableRequest(r *http.Reques if err := request.Decode(d, json.DecodeUnixMilli); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4582,12 +4878,17 @@ func (s *Server) decodeTestRequestIntegerUnixMilliNullableArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4659,12 +4960,17 @@ func (s *Server) decodeTestRequestIntegerUnixMilliNullableArrayArrayRequest(r *h }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -4743,12 +5049,17 @@ func (s *Server) decodeTestRequestIntegerUnixNanoRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeUnixNano); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4814,12 +5125,17 @@ func (s *Server) decodeTestRequestIntegerUnixNanoArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -4893,12 +5209,17 @@ func (s *Server) decodeTestRequestIntegerUnixNanoArrayArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -4977,12 +5298,17 @@ func (s *Server) decodeTestRequestIntegerUnixNanoNullableRequest(r *http.Request if err := request.Decode(d, json.DecodeUnixNano); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -5046,12 +5372,17 @@ func (s *Server) decodeTestRequestIntegerUnixNanoNullableArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -5123,12 +5454,17 @@ func (s *Server) decodeTestRequestIntegerUnixNanoNullableArrayArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -5207,12 +5543,17 @@ func (s *Server) decodeTestRequestIntegerUnixNullableRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -5276,12 +5617,17 @@ func (s *Server) decodeTestRequestIntegerUnixNullableArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -5353,12 +5699,17 @@ func (s *Server) decodeTestRequestIntegerUnixNullableArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -5437,12 +5788,17 @@ func (s *Server) decodeTestRequestIntegerUnixSecondsRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -5508,12 +5864,17 @@ func (s *Server) decodeTestRequestIntegerUnixSecondsArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -5587,242 +5948,262 @@ func (s *Server) decodeTestRequestIntegerUnixSecondsArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - if err := func() error { - var failures []validate.FieldError - for i, elem := range request { - if err := func() error { - if elem == nil { - return errors.New("nil is invalid value") - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "validate") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestRequestIntegerUnixSecondsNullableRequest(r *http.Request) ( - req OptNilUnixSeconds, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { - return req, close, nil - } - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, nil - } - - var request OptNilUnixSeconds - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, nil - } - - d := jx.DecodeBytes(buf) - if err := func() error { - request.Reset() - if err := request.Decode(d, json.DecodeUnixSeconds); err != nil { - return err - } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestRequestIntegerUnixSecondsNullableArrayRequest(r *http.Request) ( - req []NilUnixSeconds, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { - return req, close, nil - } - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, nil - } - - var request []NilUnixSeconds - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, nil - } - - d := jx.DecodeBytes(buf) - if err := func() error { - request = make([]NilUnixSeconds, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem NilUnixSeconds - if err := elem.Decode(d, json.DecodeUnixSeconds); err != nil { - return err - } - request = append(request, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestRequestIntegerUnixSecondsNullableArrayArrayRequest(r *http.Request) ( - req [][]NilUnixSeconds, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { - return req, close, nil - } - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, nil - } - - var request [][]NilUnixSeconds - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, nil - } - - d := jx.DecodeBytes(buf) - if err := func() error { - request = make([][]NilUnixSeconds, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem []NilUnixSeconds - elem = make([]NilUnixSeconds, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elemElem NilUnixSeconds - if err := elemElem.Decode(d, json.DecodeUnixSeconds); err != nil { - return err - } - elem = append(elem, elemElem) - return nil - }); err != nil { - return err - } - request = append(request, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + if err := func() error { + var failures []validate.FieldError + for i, elem := range request { + if err := func() error { + if elem == nil { + return errors.New("nil is invalid value") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + return req, close, errors.Wrap(err, "validate") + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestRequestIntegerUnixSecondsNullableRequest(r *http.Request) ( + req OptNilUnixSeconds, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { + return req, close, nil + } + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, nil + } + + var request OptNilUnixSeconds + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, nil + } + + d := jx.DecodeBytes(buf) + if err := func() error { + request.Reset() + if err := request.Decode(d, json.DecodeUnixSeconds); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestRequestIntegerUnixSecondsNullableArrayRequest(r *http.Request) ( + req []NilUnixSeconds, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { + return req, close, nil + } + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, nil + } + + var request []NilUnixSeconds + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, nil + } + + d := jx.DecodeBytes(buf) + if err := func() error { + request = make([]NilUnixSeconds, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem NilUnixSeconds + if err := elem.Decode(d, json.DecodeUnixSeconds); err != nil { + return err + } + request = append(request, elem) + return nil + }); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestRequestIntegerUnixSecondsNullableArrayArrayRequest(r *http.Request) ( + req [][]NilUnixSeconds, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { + return req, close, nil + } + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, nil + } + + var request [][]NilUnixSeconds + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, nil + } + + d := jx.DecodeBytes(buf) + if err := func() error { + request = make([][]NilUnixSeconds, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem []NilUnixSeconds + elem = make([]NilUnixSeconds, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elemElem NilUnixSeconds + if err := elemElem.Decode(d, json.DecodeUnixSeconds); err != nil { + return err + } + elem = append(elem, elemElem) + return nil + }); err != nil { + return err + } + request = append(request, elem) + return nil + }); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -5901,12 +6282,17 @@ func (s *Server) decodeTestRequestNullRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -5970,12 +6356,17 @@ func (s *Server) decodeTestRequestNullArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -6047,12 +6438,17 @@ func (s *Server) decodeTestRequestNullArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -6131,12 +6527,17 @@ func (s *Server) decodeTestRequestNullNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -6200,12 +6601,17 @@ func (s *Server) decodeTestRequestNullNullableArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -6277,12 +6683,17 @@ func (s *Server) decodeTestRequestNullNullableArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -6361,12 +6772,17 @@ func (s *Server) decodeTestRequestNumberRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -6447,12 +6863,17 @@ func (s *Server) decodeTestRequestNumberArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -6548,12 +6969,17 @@ func (s *Server) decodeTestRequestNumberArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -6649,12 +7075,17 @@ func (s *Server) decodeTestRequestNumberDoubleRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -6735,12 +7166,17 @@ func (s *Server) decodeTestRequestNumberDoubleArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -6836,12 +7272,17 @@ func (s *Server) decodeTestRequestNumberDoubleArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -6937,12 +7378,17 @@ func (s *Server) decodeTestRequestNumberDoubleNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -7021,12 +7467,17 @@ func (s *Server) decodeTestRequestNumberDoubleNullableArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -7120,12 +7571,17 @@ func (s *Server) decodeTestRequestNumberDoubleNullableArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -7221,12 +7677,17 @@ func (s *Server) decodeTestRequestNumberFloatRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -7307,12 +7768,17 @@ func (s *Server) decodeTestRequestNumberFloatArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -7408,12 +7874,17 @@ func (s *Server) decodeTestRequestNumberFloatArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -7509,12 +7980,17 @@ func (s *Server) decodeTestRequestNumberFloatNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -7593,12 +8069,17 @@ func (s *Server) decodeTestRequestNumberFloatNullableArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -7692,12 +8173,17 @@ func (s *Server) decodeTestRequestNumberFloatNullableArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -7793,12 +8279,17 @@ func (s *Server) decodeTestRequestNumberInt32Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -7864,12 +8355,17 @@ func (s *Server) decodeTestRequestNumberInt32ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -7943,12 +8439,17 @@ func (s *Server) decodeTestRequestNumberInt32ArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -8027,12 +8528,17 @@ func (s *Server) decodeTestRequestNumberInt32NullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -8096,12 +8602,17 @@ func (s *Server) decodeTestRequestNumberInt32NullableArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -8173,12 +8684,17 @@ func (s *Server) decodeTestRequestNumberInt32NullableArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -8257,12 +8773,17 @@ func (s *Server) decodeTestRequestNumberInt64Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -8328,12 +8849,17 @@ func (s *Server) decodeTestRequestNumberInt64ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -8407,12 +8933,17 @@ func (s *Server) decodeTestRequestNumberInt64ArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -8491,12 +9022,17 @@ func (s *Server) decodeTestRequestNumberInt64NullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -8560,12 +9096,17 @@ func (s *Server) decodeTestRequestNumberInt64NullableArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -8637,12 +9178,17 @@ func (s *Server) decodeTestRequestNumberInt64NullableArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -8721,12 +9267,17 @@ func (s *Server) decodeTestRequestNumberNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -8805,12 +9356,17 @@ func (s *Server) decodeTestRequestNumberNullableArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -8904,12 +9460,17 @@ func (s *Server) decodeTestRequestNumberNullableArrayArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -9003,12 +9564,17 @@ func (s *Server) decodeTestRequestRequiredAnyRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -9063,12 +9629,17 @@ func (s *Server) decodeTestRequestRequiredBooleanRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -9131,12 +9702,17 @@ func (s *Server) decodeTestRequestRequiredBooleanArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -9215,12 +9791,17 @@ func (s *Server) decodeTestRequestRequiredBooleanArrayArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -9298,12 +9879,17 @@ func (s *Server) decodeTestRequestRequiredBooleanNullableRequest(r *http.Request if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -9364,12 +9950,17 @@ func (s *Server) decodeTestRequestRequiredBooleanNullableArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -9446,12 +10037,17 @@ func (s *Server) decodeTestRequestRequiredBooleanNullableArrayArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -9529,12 +10125,17 @@ func (s *Server) decodeTestRequestRequiredEmptyStructRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: @@ -9587,12 +10188,17 @@ func (s *Server) decodeTestRequestRequiredFormatTestRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -9655,12 +10261,17 @@ func (s *Server) decodeTestRequestRequiredIntegerRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -9723,12 +10334,17 @@ func (s *Server) decodeTestRequestRequiredIntegerArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -9807,12 +10423,17 @@ func (s *Server) decodeTestRequestRequiredIntegerArrayArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -9892,12 +10513,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -9960,12 +10586,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32ArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -10044,12 +10675,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32ArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -10127,12 +10763,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32NullableRequest(r *http.Re if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -10193,12 +10834,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32NullableArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -10275,12 +10921,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32NullableArrayArrayRequest( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -10360,12 +11011,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -10428,12 +11084,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64ArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -10512,12 +11173,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64ArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -10595,12 +11261,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64NullableRequest(r *http.Re if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -10661,12 +11332,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64NullableArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -10743,12 +11419,17 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64NullableArrayArrayRequest( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -10826,12 +11507,17 @@ func (s *Server) decodeTestRequestRequiredIntegerNullableRequest(r *http.Request if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -10892,12 +11578,17 @@ func (s *Server) decodeTestRequestRequiredIntegerNullableArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -10974,12 +11665,17 @@ func (s *Server) decodeTestRequestRequiredIntegerNullableArrayArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -11059,12 +11755,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUintRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -11119,12 +11820,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32Request(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -11187,12 +11893,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32ArrayRequest(r *http.Requ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -11271,12 +11982,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32ArrayArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -11354,12 +12070,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32NullableRequest(r *http.R if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -11420,12 +12141,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32NullableArrayRequest(r *h }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -11502,12 +12228,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32NullableArrayArrayRequest }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -11587,12 +12318,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64Request(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -11655,12 +12391,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64ArrayRequest(r *http.Requ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -11739,12 +12480,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64ArrayArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -11822,12 +12568,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64NullableRequest(r *http.R if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -11888,12 +12639,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64NullableArrayRequest(r *h }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -11970,12 +12726,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64NullableArrayArrayRequest }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -12063,12 +12824,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUintArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -12147,12 +12913,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUintArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -12230,12 +13001,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUintNullableRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -12296,12 +13072,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUintNullableArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -12378,12 +13159,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUintNullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -12463,12 +13249,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -12531,12 +13322,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -12615,12 +13411,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -12700,12 +13501,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -12768,12 +13574,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -12852,12 +13663,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroArrayArrayRequest(r *h }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -12935,12 +13751,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroNullableRequest(r *htt if err := request.Decode(d, json.DecodeUnixMicro); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -13001,12 +13822,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroNullableArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -13083,12 +13909,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroNullableArrayArrayRequ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -13168,12 +13999,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -13236,12 +14072,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -13320,12 +14161,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliArrayArrayRequest(r *h }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -13403,12 +14249,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliNullableRequest(r *htt if err := request.Decode(d, json.DecodeUnixMilli); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -13469,12 +14320,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliNullableArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -13551,12 +14407,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliNullableArrayArrayRequ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -13636,12 +14497,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -13704,12 +14570,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -13788,12 +14659,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoArrayArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -13871,12 +14747,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoNullableRequest(r *http if err := request.Decode(d, json.DecodeUnixNano); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -13937,12 +14818,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoNullableArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -14019,12 +14905,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoNullableArrayArrayReque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -14102,12 +14993,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNullableRequest(r *http.Req if err := request.Decode(d, json.DecodeUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -14168,12 +15064,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNullableArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -14250,12 +15151,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -14335,12 +15241,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -14403,12 +15314,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -14487,12 +15403,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -14570,12 +15491,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsNullableRequest(r *h if err := request.Decode(d, json.DecodeUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -14636,12 +15562,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsNullableArrayRequest }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -14718,12 +15649,17 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsNullableArrayArrayRe }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -14801,12 +15737,17 @@ func (s *Server) decodeTestRequestRequiredNullRequest(r *http.Request) ( if err := d.Null(); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -14867,12 +15808,17 @@ func (s *Server) decodeTestRequestRequiredNullArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -14949,12 +15895,17 @@ func (s *Server) decodeTestRequestRequiredNullArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -15032,12 +15983,17 @@ func (s *Server) decodeTestRequestRequiredNullNullableRequest(r *http.Request) ( if err := d.Null(); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -15098,12 +16054,17 @@ func (s *Server) decodeTestRequestRequiredNullNullableArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -15180,12 +16141,17 @@ func (s *Server) decodeTestRequestRequiredNullNullableArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -15265,12 +16231,17 @@ func (s *Server) decodeTestRequestRequiredNumberRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.Float{}).Validate(float64(request)); err != nil { @@ -15341,12 +16312,17 @@ func (s *Server) decodeTestRequestRequiredNumberArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -15442,12 +16418,17 @@ func (s *Server) decodeTestRequestRequiredNumberArrayArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -15544,12 +16525,17 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.Float{}).Validate(float64(request)); err != nil { @@ -15620,12 +16606,17 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -15721,12 +16712,17 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -15821,12 +16817,17 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleNullableRequest(r *http.Re if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.Float{}).Validate(float64(request.Value)); err != nil { @@ -15895,12 +16896,17 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleNullableArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -15994,12 +17000,17 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleNullableArrayArrayRequest( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -16096,12 +17107,17 @@ func (s *Server) decodeTestRequestRequiredNumberFloatRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.Float{}).Validate(float64(request)); err != nil { @@ -16172,12 +17188,17 @@ func (s *Server) decodeTestRequestRequiredNumberFloatArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -16273,12 +17294,17 @@ func (s *Server) decodeTestRequestRequiredNumberFloatArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -16373,12 +17399,17 @@ func (s *Server) decodeTestRequestRequiredNumberFloatNullableRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.Float{}).Validate(float64(request.Value)); err != nil { @@ -16447,12 +17478,17 @@ func (s *Server) decodeTestRequestRequiredNumberFloatNullableArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -16546,12 +17582,17 @@ func (s *Server) decodeTestRequestRequiredNumberFloatNullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -16648,12 +17689,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt32Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -16716,12 +17762,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt32ArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -16800,12 +17851,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt32ArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -16883,12 +17939,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt32NullableRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -16949,12 +18010,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt32NullableArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -17031,12 +18097,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt32NullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -17116,12 +18187,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -17184,12 +18260,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt64ArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -17268,12 +18349,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt64ArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -17351,12 +18437,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt64NullableRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -17417,12 +18508,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt64NullableArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -17499,12 +18595,17 @@ func (s *Server) decodeTestRequestRequiredNumberInt64NullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -17582,12 +18683,17 @@ func (s *Server) decodeTestRequestRequiredNumberNullableRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.Float{}).Validate(float64(request.Value)); err != nil { @@ -17656,12 +18762,17 @@ func (s *Server) decodeTestRequestRequiredNumberNullableArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -17755,12 +18866,17 @@ func (s *Server) decodeTestRequestRequiredNumberNullableArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -17857,12 +18973,17 @@ func (s *Server) decodeTestRequestRequiredStringRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -17925,12 +19046,17 @@ func (s *Server) decodeTestRequestRequiredStringArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -18009,12 +19135,17 @@ func (s *Server) decodeTestRequestRequiredStringArrayArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -18094,12 +19225,17 @@ func (s *Server) decodeTestRequestRequiredStringBase64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -18162,12 +19298,17 @@ func (s *Server) decodeTestRequestRequiredStringBase64ArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -18246,12 +19387,17 @@ func (s *Server) decodeTestRequestRequiredStringBase64ArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -18331,12 +19477,17 @@ func (s *Server) decodeTestRequestRequiredStringBase64NullableRequest(r *http.Re if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -18399,12 +19550,17 @@ func (s *Server) decodeTestRequestRequiredStringBase64NullableArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -18483,12 +19639,17 @@ func (s *Server) decodeTestRequestRequiredStringBase64NullableArrayArrayRequest( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -18568,12 +19729,17 @@ func (s *Server) decodeTestRequestRequiredStringBinaryRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -18636,12 +19802,17 @@ func (s *Server) decodeTestRequestRequiredStringBinaryArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -18720,12 +19891,17 @@ func (s *Server) decodeTestRequestRequiredStringBinaryArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -18803,12 +19979,17 @@ func (s *Server) decodeTestRequestRequiredStringBinaryNullableRequest(r *http.Re if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -18869,12 +20050,17 @@ func (s *Server) decodeTestRequestRequiredStringBinaryNullableArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -18951,12 +20137,17 @@ func (s *Server) decodeTestRequestRequiredStringBinaryNullableArrayArrayRequest( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -19036,12 +20227,17 @@ func (s *Server) decodeTestRequestRequiredStringByteRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -19104,12 +20300,17 @@ func (s *Server) decodeTestRequestRequiredStringByteArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -19188,12 +20389,17 @@ func (s *Server) decodeTestRequestRequiredStringByteArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -19273,12 +20479,17 @@ func (s *Server) decodeTestRequestRequiredStringByteNullableRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -19341,12 +20552,17 @@ func (s *Server) decodeTestRequestRequiredStringByteNullableArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -19425,12 +20641,17 @@ func (s *Server) decodeTestRequestRequiredStringByteNullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -19510,12 +20731,17 @@ func (s *Server) decodeTestRequestRequiredStringDateRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -19578,12 +20804,17 @@ func (s *Server) decodeTestRequestRequiredStringDateArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -19662,12 +20893,17 @@ func (s *Server) decodeTestRequestRequiredStringDateArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -19745,12 +20981,17 @@ func (s *Server) decodeTestRequestRequiredStringDateNullableRequest(r *http.Requ if err := request.Decode(d, json.DecodeDate); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -19811,12 +21052,17 @@ func (s *Server) decodeTestRequestRequiredStringDateNullableArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -19893,12 +21139,17 @@ func (s *Server) decodeTestRequestRequiredStringDateNullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -19978,12 +21229,17 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -20046,12 +21302,17 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -20130,12 +21391,17 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -20213,12 +21479,17 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeNullableRequest(r *http. if err := request.Decode(d, json.DecodeDateTime); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -20279,12 +21550,17 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeNullableArrayRequest(r * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -20361,12 +21637,17 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeNullableArrayArrayReques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -20446,12 +21727,17 @@ func (s *Server) decodeTestRequestRequiredStringDurationRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -20514,12 +21800,17 @@ func (s *Server) decodeTestRequestRequiredStringDurationArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -20598,12 +21889,17 @@ func (s *Server) decodeTestRequestRequiredStringDurationArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -20681,12 +21977,17 @@ func (s *Server) decodeTestRequestRequiredStringDurationNullableRequest(r *http. if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -20747,12 +22048,17 @@ func (s *Server) decodeTestRequestRequiredStringDurationNullableArrayRequest(r * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -20829,12 +22135,17 @@ func (s *Server) decodeTestRequestRequiredStringDurationNullableArrayArrayReques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -20914,12 +22225,17 @@ func (s *Server) decodeTestRequestRequiredStringEmailRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.String{ @@ -20998,12 +22314,17 @@ func (s *Server) decodeTestRequestRequiredStringEmailArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -21107,12 +22428,17 @@ func (s *Server) decodeTestRequestRequiredStringEmailArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -21215,12 +22541,17 @@ func (s *Server) decodeTestRequestRequiredStringEmailNullableRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.String{ @@ -21297,12 +22628,17 @@ func (s *Server) decodeTestRequestRequiredStringEmailNullableArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -21404,12 +22740,17 @@ func (s *Server) decodeTestRequestRequiredStringEmailNullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -21514,12 +22855,17 @@ func (s *Server) decodeTestRequestRequiredStringHostnameRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.String{ @@ -21598,12 +22944,17 @@ func (s *Server) decodeTestRequestRequiredStringHostnameArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -21707,12 +23058,17 @@ func (s *Server) decodeTestRequestRequiredStringHostnameArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -21815,12 +23171,17 @@ func (s *Server) decodeTestRequestRequiredStringHostnameNullableRequest(r *http. if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.String{ @@ -21897,12 +23258,17 @@ func (s *Server) decodeTestRequestRequiredStringHostnameNullableArrayRequest(r * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -22004,12 +23370,17 @@ func (s *Server) decodeTestRequestRequiredStringHostnameNullableArrayArrayReques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -22114,12 +23485,17 @@ func (s *Server) decodeTestRequestRequiredStringIPRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -22182,12 +23558,17 @@ func (s *Server) decodeTestRequestRequiredStringIPArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -22266,12 +23647,17 @@ func (s *Server) decodeTestRequestRequiredStringIPArrayArrayRequest(r *http.Requ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -22349,12 +23735,17 @@ func (s *Server) decodeTestRequestRequiredStringIPNullableRequest(r *http.Reques if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -22415,12 +23806,17 @@ func (s *Server) decodeTestRequestRequiredStringIPNullableArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -22497,12 +23893,17 @@ func (s *Server) decodeTestRequestRequiredStringIPNullableArrayArrayRequest(r *h }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -22582,12 +23983,17 @@ func (s *Server) decodeTestRequestRequiredStringInt32Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -22650,12 +24056,17 @@ func (s *Server) decodeTestRequestRequiredStringInt32ArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -22734,12 +24145,17 @@ func (s *Server) decodeTestRequestRequiredStringInt32ArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -22817,12 +24233,17 @@ func (s *Server) decodeTestRequestRequiredStringInt32NullableRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -22883,12 +24304,17 @@ func (s *Server) decodeTestRequestRequiredStringInt32NullableArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -22965,12 +24391,17 @@ func (s *Server) decodeTestRequestRequiredStringInt32NullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -23050,12 +24481,17 @@ func (s *Server) decodeTestRequestRequiredStringInt64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -23118,12 +24554,17 @@ func (s *Server) decodeTestRequestRequiredStringInt64ArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -23202,12 +24643,17 @@ func (s *Server) decodeTestRequestRequiredStringInt64ArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -23285,12 +24731,17 @@ func (s *Server) decodeTestRequestRequiredStringInt64NullableRequest(r *http.Req if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -23351,12 +24802,17 @@ func (s *Server) decodeTestRequestRequiredStringInt64NullableArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -23433,12 +24889,17 @@ func (s *Server) decodeTestRequestRequiredStringInt64NullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -23518,12 +24979,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv4Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -23586,12 +25052,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv4ArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -23670,12 +25141,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv4ArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -23753,12 +25229,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv4NullableRequest(r *http.Requ if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -23819,12 +25300,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv4NullableArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -23901,12 +25387,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv4NullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -23986,12 +25477,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv6Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -24054,12 +25550,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv6ArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -24138,12 +25639,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv6ArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -24221,12 +25727,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv6NullableRequest(r *http.Requ if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -24287,12 +25798,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv6NullableArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -24369,12 +25885,17 @@ func (s *Server) decodeTestRequestRequiredStringIpv6NullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -24452,12 +25973,17 @@ func (s *Server) decodeTestRequestRequiredStringNullableRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -24518,12 +26044,17 @@ func (s *Server) decodeTestRequestRequiredStringNullableArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -24600,12 +26131,17 @@ func (s *Server) decodeTestRequestRequiredStringNullableArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -24685,12 +26221,17 @@ func (s *Server) decodeTestRequestRequiredStringPasswordRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -24753,12 +26294,17 @@ func (s *Server) decodeTestRequestRequiredStringPasswordArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -24837,12 +26383,17 @@ func (s *Server) decodeTestRequestRequiredStringPasswordArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -24920,12 +26471,17 @@ func (s *Server) decodeTestRequestRequiredStringPasswordNullableRequest(r *http. if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -24986,12 +26542,17 @@ func (s *Server) decodeTestRequestRequiredStringPasswordNullableArrayRequest(r * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -25068,12 +26629,17 @@ func (s *Server) decodeTestRequestRequiredStringPasswordNullableArrayArrayReques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -25153,12 +26719,17 @@ func (s *Server) decodeTestRequestRequiredStringTimeRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -25221,12 +26792,17 @@ func (s *Server) decodeTestRequestRequiredStringTimeArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -25305,12 +26881,17 @@ func (s *Server) decodeTestRequestRequiredStringTimeArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -25388,12 +26969,17 @@ func (s *Server) decodeTestRequestRequiredStringTimeNullableRequest(r *http.Requ if err := request.Decode(d, json.DecodeTime); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -25454,12 +27040,17 @@ func (s *Server) decodeTestRequestRequiredStringTimeNullableArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -25536,12 +27127,17 @@ func (s *Server) decodeTestRequestRequiredStringTimeNullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -25621,12 +27217,17 @@ func (s *Server) decodeTestRequestRequiredStringURIRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -25689,12 +27290,17 @@ func (s *Server) decodeTestRequestRequiredStringURIArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -25773,12 +27379,17 @@ func (s *Server) decodeTestRequestRequiredStringURIArrayArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -25856,12 +27467,17 @@ func (s *Server) decodeTestRequestRequiredStringURINullableRequest(r *http.Reque if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -25922,12 +27538,17 @@ func (s *Server) decodeTestRequestRequiredStringURINullableArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -26004,12 +27625,17 @@ func (s *Server) decodeTestRequestRequiredStringURINullableArrayArrayRequest(r * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -26089,12 +27715,17 @@ func (s *Server) decodeTestRequestRequiredStringUUIDRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -26157,12 +27788,17 @@ func (s *Server) decodeTestRequestRequiredStringUUIDArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -26241,12 +27877,17 @@ func (s *Server) decodeTestRequestRequiredStringUUIDArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -26324,12 +27965,17 @@ func (s *Server) decodeTestRequestRequiredStringUUIDNullableRequest(r *http.Requ if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -26390,12 +28036,17 @@ func (s *Server) decodeTestRequestRequiredStringUUIDNullableArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -26472,12 +28123,17 @@ func (s *Server) decodeTestRequestRequiredStringUUIDNullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -26557,12 +28213,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -26625,12 +28286,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -26709,12 +28375,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -26794,12 +28465,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -26862,12 +28538,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -26946,12 +28627,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroArrayArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -27029,12 +28715,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroNullableRequest(r *http if err := request.Decode(d, json.DecodeStringUnixMicro); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -27095,12 +28786,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroNullableArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -27177,12 +28873,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroNullableArrayArrayReque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -27262,12 +28963,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -27330,12 +29036,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -27414,12 +29125,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliArrayArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -27497,12 +29213,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliNullableRequest(r *http if err := request.Decode(d, json.DecodeStringUnixMilli); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -27563,12 +29284,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliNullableArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -27645,12 +29371,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliNullableArrayArrayReque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -27730,12 +29461,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -27798,12 +29534,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -27882,12 +29623,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -27965,12 +29711,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoNullableRequest(r *http. if err := request.Decode(d, json.DecodeStringUnixNano); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -28031,12 +29782,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoNullableArrayRequest(r * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -28113,12 +29869,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoNullableArrayArrayReques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -28196,12 +29957,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixNullableRequest(r *http.Requ if err := request.Decode(d, json.DecodeStringUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -28262,12 +30028,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixNullableArrayRequest(r *http }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -28344,12 +30115,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixNullableArrayArrayRequest(r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -28429,12 +30205,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -28497,12 +30278,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -28581,12 +30367,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsArrayArrayRequest(r * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -28664,12 +30455,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsNullableRequest(r *ht if err := request.Decode(d, json.DecodeStringUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -28730,12 +30526,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsNullableArrayRequest( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -28812,12 +30613,17 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsNullableArrayArrayReq }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request == nil { @@ -28899,12 +30705,17 @@ func (s *Server) decodeTestRequestStringRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -28970,12 +30781,17 @@ func (s *Server) decodeTestRequestStringArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -29049,12 +30865,17 @@ func (s *Server) decodeTestRequestStringArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -29134,12 +30955,17 @@ func (s *Server) decodeTestRequestStringBase64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -29205,12 +31031,17 @@ func (s *Server) decodeTestRequestStringBase64ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -29284,12 +31115,17 @@ func (s *Server) decodeTestRequestStringBase64ArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -29368,12 +31204,17 @@ func (s *Server) decodeTestRequestStringBase64NullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -29439,12 +31280,17 @@ func (s *Server) decodeTestRequestStringBase64NullableArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -29518,12 +31364,17 @@ func (s *Server) decodeTestRequestStringBase64NullableArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -29602,12 +31453,17 @@ func (s *Server) decodeTestRequestStringBinaryRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -29673,12 +31529,17 @@ func (s *Server) decodeTestRequestStringBinaryArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -29752,12 +31613,17 @@ func (s *Server) decodeTestRequestStringBinaryArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -29836,12 +31702,17 @@ func (s *Server) decodeTestRequestStringBinaryNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -29905,12 +31776,17 @@ func (s *Server) decodeTestRequestStringBinaryNullableArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -29982,12 +31858,17 @@ func (s *Server) decodeTestRequestStringBinaryNullableArrayArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -30067,12 +31948,17 @@ func (s *Server) decodeTestRequestStringByteRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -30138,12 +32024,17 @@ func (s *Server) decodeTestRequestStringByteArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -30217,12 +32108,17 @@ func (s *Server) decodeTestRequestStringByteArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -30301,12 +32197,17 @@ func (s *Server) decodeTestRequestStringByteNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -30372,12 +32273,17 @@ func (s *Server) decodeTestRequestStringByteNullableArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -30451,12 +32357,17 @@ func (s *Server) decodeTestRequestStringByteNullableArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -30535,12 +32446,17 @@ func (s *Server) decodeTestRequestStringDateRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeDate); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -30606,12 +32522,17 @@ func (s *Server) decodeTestRequestStringDateArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -30685,12 +32606,17 @@ func (s *Server) decodeTestRequestStringDateArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -30769,12 +32695,17 @@ func (s *Server) decodeTestRequestStringDateNullableRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeDate); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -30838,12 +32769,17 @@ func (s *Server) decodeTestRequestStringDateNullableArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -30915,12 +32851,17 @@ func (s *Server) decodeTestRequestStringDateNullableArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -30999,12 +32940,17 @@ func (s *Server) decodeTestRequestStringDateTimeRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeDateTime); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -31070,12 +33016,17 @@ func (s *Server) decodeTestRequestStringDateTimeArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -31149,12 +33100,17 @@ func (s *Server) decodeTestRequestStringDateTimeArrayArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -31233,12 +33189,17 @@ func (s *Server) decodeTestRequestStringDateTimeNullableRequest(r *http.Request) if err := request.Decode(d, json.DecodeDateTime); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -31302,12 +33263,17 @@ func (s *Server) decodeTestRequestStringDateTimeNullableArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -31379,12 +33345,17 @@ func (s *Server) decodeTestRequestStringDateTimeNullableArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -31463,12 +33434,17 @@ func (s *Server) decodeTestRequestStringDurationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -31534,12 +33510,17 @@ func (s *Server) decodeTestRequestStringDurationArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -31613,12 +33594,17 @@ func (s *Server) decodeTestRequestStringDurationArrayArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -31697,12 +33683,17 @@ func (s *Server) decodeTestRequestStringDurationNullableRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -31766,12 +33757,17 @@ func (s *Server) decodeTestRequestStringDurationNullableArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -31843,12 +33839,17 @@ func (s *Server) decodeTestRequestStringDurationNullableArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -31927,12 +33928,17 @@ func (s *Server) decodeTestRequestStringEmailRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -32021,12 +34027,17 @@ func (s *Server) decodeTestRequestStringEmailArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -32130,12 +34141,17 @@ func (s *Server) decodeTestRequestStringEmailArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -32239,12 +34255,17 @@ func (s *Server) decodeTestRequestStringEmailNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -32331,12 +34352,17 @@ func (s *Server) decodeTestRequestStringEmailNullableArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -32438,12 +34464,17 @@ func (s *Server) decodeTestRequestStringEmailNullableArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -32547,12 +34578,17 @@ func (s *Server) decodeTestRequestStringHostnameRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -32641,12 +34677,17 @@ func (s *Server) decodeTestRequestStringHostnameArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -32750,12 +34791,17 @@ func (s *Server) decodeTestRequestStringHostnameArrayArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -32859,12 +34905,17 @@ func (s *Server) decodeTestRequestStringHostnameNullableRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -32951,12 +35002,17 @@ func (s *Server) decodeTestRequestStringHostnameNullableArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -33058,12 +35114,17 @@ func (s *Server) decodeTestRequestStringHostnameNullableArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -33167,12 +35228,17 @@ func (s *Server) decodeTestRequestStringIPRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -33238,12 +35304,17 @@ func (s *Server) decodeTestRequestStringIPArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -33317,12 +35388,17 @@ func (s *Server) decodeTestRequestStringIPArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -33401,12 +35477,17 @@ func (s *Server) decodeTestRequestStringIPNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -33470,12 +35551,17 @@ func (s *Server) decodeTestRequestStringIPNullableArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -33547,12 +35633,17 @@ func (s *Server) decodeTestRequestStringIPNullableArrayArrayRequest(r *http.Requ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -33631,12 +35722,17 @@ func (s *Server) decodeTestRequestStringInt32Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -33702,12 +35798,17 @@ func (s *Server) decodeTestRequestStringInt32ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -33781,12 +35882,17 @@ func (s *Server) decodeTestRequestStringInt32ArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -33865,12 +35971,17 @@ func (s *Server) decodeTestRequestStringInt32NullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -33934,12 +36045,17 @@ func (s *Server) decodeTestRequestStringInt32NullableArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -34011,12 +36127,17 @@ func (s *Server) decodeTestRequestStringInt32NullableArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -34095,12 +36216,17 @@ func (s *Server) decodeTestRequestStringInt64Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -34166,12 +36292,17 @@ func (s *Server) decodeTestRequestStringInt64ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -34245,12 +36376,17 @@ func (s *Server) decodeTestRequestStringInt64ArrayArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -34329,12 +36465,17 @@ func (s *Server) decodeTestRequestStringInt64NullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -34398,12 +36539,17 @@ func (s *Server) decodeTestRequestStringInt64NullableArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -34475,12 +36621,17 @@ func (s *Server) decodeTestRequestStringInt64NullableArrayArrayRequest(r *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -34559,12 +36710,17 @@ func (s *Server) decodeTestRequestStringIpv4Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -34630,12 +36786,17 @@ func (s *Server) decodeTestRequestStringIpv4ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -34709,12 +36870,17 @@ func (s *Server) decodeTestRequestStringIpv4ArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -34793,12 +36959,17 @@ func (s *Server) decodeTestRequestStringIpv4NullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -34862,12 +37033,17 @@ func (s *Server) decodeTestRequestStringIpv4NullableArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -34939,12 +37115,17 @@ func (s *Server) decodeTestRequestStringIpv4NullableArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -35023,12 +37204,17 @@ func (s *Server) decodeTestRequestStringIpv6Request(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -35094,12 +37280,17 @@ func (s *Server) decodeTestRequestStringIpv6ArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -35173,12 +37364,17 @@ func (s *Server) decodeTestRequestStringIpv6ArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -35257,12 +37453,17 @@ func (s *Server) decodeTestRequestStringIpv6NullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -35326,12 +37527,17 @@ func (s *Server) decodeTestRequestStringIpv6NullableArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -35403,12 +37609,17 @@ func (s *Server) decodeTestRequestStringIpv6NullableArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -35487,12 +37698,17 @@ func (s *Server) decodeTestRequestStringNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -35556,12 +37772,17 @@ func (s *Server) decodeTestRequestStringNullableArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -35633,12 +37854,17 @@ func (s *Server) decodeTestRequestStringNullableArrayArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -35717,12 +37943,17 @@ func (s *Server) decodeTestRequestStringPasswordRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -35788,12 +38019,17 @@ func (s *Server) decodeTestRequestStringPasswordArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -35867,12 +38103,17 @@ func (s *Server) decodeTestRequestStringPasswordArrayArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -35951,12 +38192,17 @@ func (s *Server) decodeTestRequestStringPasswordNullableRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -36020,12 +38266,17 @@ func (s *Server) decodeTestRequestStringPasswordNullableArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -36097,12 +38348,17 @@ func (s *Server) decodeTestRequestStringPasswordNullableArrayArrayRequest(r *htt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -36181,12 +38437,17 @@ func (s *Server) decodeTestRequestStringTimeRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeTime); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -36252,12 +38513,17 @@ func (s *Server) decodeTestRequestStringTimeArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -36331,12 +38597,17 @@ func (s *Server) decodeTestRequestStringTimeArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -36415,12 +38686,17 @@ func (s *Server) decodeTestRequestStringTimeNullableRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeTime); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -36484,12 +38760,17 @@ func (s *Server) decodeTestRequestStringTimeNullableArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -36561,12 +38842,17 @@ func (s *Server) decodeTestRequestStringTimeNullableArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -36645,12 +38931,17 @@ func (s *Server) decodeTestRequestStringURIRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -36716,12 +39007,17 @@ func (s *Server) decodeTestRequestStringURIArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -36795,12 +39091,17 @@ func (s *Server) decodeTestRequestStringURIArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -36879,12 +39180,17 @@ func (s *Server) decodeTestRequestStringURINullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -36948,12 +39254,17 @@ func (s *Server) decodeTestRequestStringURINullableArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -37025,12 +39336,17 @@ func (s *Server) decodeTestRequestStringURINullableArrayArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -37109,12 +39425,17 @@ func (s *Server) decodeTestRequestStringUUIDRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -37180,12 +39501,17 @@ func (s *Server) decodeTestRequestStringUUIDArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -37259,12 +39585,17 @@ func (s *Server) decodeTestRequestStringUUIDArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -37343,12 +39674,17 @@ func (s *Server) decodeTestRequestStringUUIDNullableRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -37412,12 +39748,17 @@ func (s *Server) decodeTestRequestStringUUIDNullableArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -37489,12 +39830,17 @@ func (s *Server) decodeTestRequestStringUUIDNullableArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -37573,12 +39919,17 @@ func (s *Server) decodeTestRequestStringUnixRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeStringUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -37644,12 +39995,17 @@ func (s *Server) decodeTestRequestStringUnixArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -37723,12 +40079,266 @@ func (s *Server) decodeTestRequestStringUnixArrayArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + if err := func() error { + var failures []validate.FieldError + for i, elem := range request { + if err := func() error { + if elem == nil { + return errors.New("nil is invalid value") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + return req, close, errors.Wrap(err, "validate") + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestRequestStringUnixMicroRequest(r *http.Request) ( + req OptStringUnixMicro, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { + return req, close, nil + } + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, nil + } + + var request OptStringUnixMicro + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, nil + } + + d := jx.DecodeBytes(buf) + if err := func() error { + request.Reset() + if err := request.Decode(d, json.DecodeStringUnixMicro); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestRequestStringUnixMicroArrayRequest(r *http.Request) ( + req []time.Time, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { + return req, close, nil + } + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, nil + } + + var request []time.Time + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, nil + } + + d := jx.DecodeBytes(buf) + if err := func() error { + request = make([]time.Time, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem time.Time + v, err := json.DecodeStringUnixMicro(d) + elem = v + if err != nil { + return err + } + request = append(request, elem) + return nil + }); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestRequestStringUnixMicroArrayArrayRequest(r *http.Request) ( + req [][]time.Time, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { + return req, close, nil + } + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, nil + } + + var request [][]time.Time + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, nil + } + + d := jx.DecodeBytes(buf) + if err := func() error { + request = make([][]time.Time, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem []time.Time + elem = make([]time.Time, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elemElem time.Time + v, err := json.DecodeStringUnixMicro(d) + elemElem = v + if err != nil { + return err + } + elem = append(elem, elemElem) + return nil + }); err != nil { + return err + } + request = append(request, elem) + return nil + }); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -37758,8 +40368,8 @@ func (s *Server) decodeTestRequestStringUnixArrayArrayRequest(r *http.Request) ( } } -func (s *Server) decodeTestRequestStringUnixMicroRequest(r *http.Request) ( - req OptStringUnixMicro, +func (s *Server) decodeTestRequestStringUnixMicroNullableRequest(r *http.Request) ( + req OptNilStringUnixMicro, close func() error, rerr error, ) { @@ -37791,7 +40401,7 @@ func (s *Server) decodeTestRequestStringUnixMicroRequest(r *http.Request) ( return req, close, nil } - var request OptStringUnixMicro + var request OptNilStringUnixMicro buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -37807,12 +40417,17 @@ func (s *Server) decodeTestRequestStringUnixMicroRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeStringUnixMicro); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -37820,8 +40435,8 @@ func (s *Server) decodeTestRequestStringUnixMicroRequest(r *http.Request) ( } } -func (s *Server) decodeTestRequestStringUnixMicroArrayRequest(r *http.Request) ( - req []time.Time, +func (s *Server) decodeTestRequestStringUnixMicroNullableArrayRequest(r *http.Request) ( + req []NilStringUnixMicro, close func() error, rerr error, ) { @@ -37853,7 +40468,7 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayRequest(r *http.Request) ( return req, close, nil } - var request []time.Time + var request []NilStringUnixMicro buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -37865,12 +40480,10 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayRequest(r *http.Request) ( d := jx.DecodeBytes(buf) if err := func() error { - request = make([]time.Time, 0) + request = make([]NilStringUnixMicro, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem time.Time - v, err := json.DecodeStringUnixMicro(d) - elem = v - if err != nil { + var elem NilStringUnixMicro + if err := elem.Decode(d, json.DecodeStringUnixMicro); err != nil { return err } request = append(request, elem) @@ -37878,12 +40491,17 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -37891,8 +40509,8 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayRequest(r *http.Request) ( } } -func (s *Server) decodeTestRequestStringUnixMicroArrayArrayRequest(r *http.Request) ( - req [][]time.Time, +func (s *Server) decodeTestRequestStringUnixMicroNullableArrayArrayRequest(r *http.Request) ( + req [][]NilStringUnixMicro, close func() error, rerr error, ) { @@ -37924,7 +40542,7 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayArrayRequest(r *http.Reque return req, close, nil } - var request [][]time.Time + var request [][]NilStringUnixMicro buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -37936,15 +40554,13 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayArrayRequest(r *http.Reque d := jx.DecodeBytes(buf) if err := func() error { - request = make([][]time.Time, 0) + request = make([][]NilStringUnixMicro, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem []time.Time - elem = make([]time.Time, 0) + var elem []NilStringUnixMicro + elem = make([]NilStringUnixMicro, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elemElem time.Time - v, err := json.DecodeStringUnixMicro(d) - elemElem = v - if err != nil { + var elemElem NilStringUnixMicro + if err := elemElem.Decode(d, json.DecodeStringUnixMicro); err != nil { return err } elem = append(elem, elemElem) @@ -37957,12 +40573,17 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -37992,8 +40613,8 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayArrayRequest(r *http.Reque } } -func (s *Server) decodeTestRequestStringUnixMicroNullableRequest(r *http.Request) ( - req OptNilStringUnixMicro, +func (s *Server) decodeTestRequestStringUnixMilliRequest(r *http.Request) ( + req OptStringUnixMilli, close func() error, rerr error, ) { @@ -38025,7 +40646,7 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableRequest(r *http.Request return req, close, nil } - var request OptNilStringUnixMicro + var request OptStringUnixMilli buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38038,15 +40659,20 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableRequest(r *http.Request d := jx.DecodeBytes(buf) if err := func() error { request.Reset() - if err := request.Decode(d, json.DecodeStringUnixMicro); err != nil { + if err := request.Decode(d, json.DecodeStringUnixMilli); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -38054,8 +40680,8 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableRequest(r *http.Request } } -func (s *Server) decodeTestRequestStringUnixMicroNullableArrayRequest(r *http.Request) ( - req []NilStringUnixMicro, +func (s *Server) decodeTestRequestStringUnixMilliArrayRequest(r *http.Request) ( + req []time.Time, close func() error, rerr error, ) { @@ -38087,7 +40713,7 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayRequest(r *http.Re return req, close, nil } - var request []NilStringUnixMicro + var request []time.Time buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38099,10 +40725,12 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayRequest(r *http.Re d := jx.DecodeBytes(buf) if err := func() error { - request = make([]NilStringUnixMicro, 0) + request = make([]time.Time, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem NilStringUnixMicro - if err := elem.Decode(d, json.DecodeStringUnixMicro); err != nil { + var elem time.Time + v, err := json.DecodeStringUnixMilli(d) + elem = v + if err != nil { return err } request = append(request, elem) @@ -38110,12 +40738,17 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -38123,8 +40756,8 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayRequest(r *http.Re } } -func (s *Server) decodeTestRequestStringUnixMicroNullableArrayArrayRequest(r *http.Request) ( - req [][]NilStringUnixMicro, +func (s *Server) decodeTestRequestStringUnixMilliArrayArrayRequest(r *http.Request) ( + req [][]time.Time, close func() error, rerr error, ) { @@ -38156,7 +40789,7 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayArrayRequest(r *ht return req, close, nil } - var request [][]NilStringUnixMicro + var request [][]time.Time buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38168,13 +40801,15 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayArrayRequest(r *ht d := jx.DecodeBytes(buf) if err := func() error { - request = make([][]NilStringUnixMicro, 0) + request = make([][]time.Time, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem []NilStringUnixMicro - elem = make([]NilStringUnixMicro, 0) + var elem []time.Time + elem = make([]time.Time, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elemElem NilStringUnixMicro - if err := elemElem.Decode(d, json.DecodeStringUnixMicro); err != nil { + var elemElem time.Time + v, err := json.DecodeStringUnixMilli(d) + elemElem = v + if err != nil { return err } elem = append(elem, elemElem) @@ -38187,12 +40822,17 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -38222,8 +40862,8 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayArrayRequest(r *ht } } -func (s *Server) decodeTestRequestStringUnixMilliRequest(r *http.Request) ( - req OptStringUnixMilli, +func (s *Server) decodeTestRequestStringUnixMilliNullableRequest(r *http.Request) ( + req OptNilStringUnixMilli, close func() error, rerr error, ) { @@ -38255,7 +40895,7 @@ func (s *Server) decodeTestRequestStringUnixMilliRequest(r *http.Request) ( return req, close, nil } - var request OptStringUnixMilli + var request OptNilStringUnixMilli buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38271,12 +40911,17 @@ func (s *Server) decodeTestRequestStringUnixMilliRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeStringUnixMilli); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -38284,8 +40929,8 @@ func (s *Server) decodeTestRequestStringUnixMilliRequest(r *http.Request) ( } } -func (s *Server) decodeTestRequestStringUnixMilliArrayRequest(r *http.Request) ( - req []time.Time, +func (s *Server) decodeTestRequestStringUnixMilliNullableArrayRequest(r *http.Request) ( + req []NilStringUnixMilli, close func() error, rerr error, ) { @@ -38317,7 +40962,7 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayRequest(r *http.Request) ( return req, close, nil } - var request []time.Time + var request []NilStringUnixMilli buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38329,12 +40974,10 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayRequest(r *http.Request) ( d := jx.DecodeBytes(buf) if err := func() error { - request = make([]time.Time, 0) + request = make([]NilStringUnixMilli, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem time.Time - v, err := json.DecodeStringUnixMilli(d) - elem = v - if err != nil { + var elem NilStringUnixMilli + if err := elem.Decode(d, json.DecodeStringUnixMilli); err != nil { return err } request = append(request, elem) @@ -38342,12 +40985,17 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -38355,8 +41003,8 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayRequest(r *http.Request) ( } } -func (s *Server) decodeTestRequestStringUnixMilliArrayArrayRequest(r *http.Request) ( - req [][]time.Time, +func (s *Server) decodeTestRequestStringUnixMilliNullableArrayArrayRequest(r *http.Request) ( + req [][]NilStringUnixMilli, close func() error, rerr error, ) { @@ -38388,7 +41036,7 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayArrayRequest(r *http.Reque return req, close, nil } - var request [][]time.Time + var request [][]NilStringUnixMilli buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38400,15 +41048,13 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayArrayRequest(r *http.Reque d := jx.DecodeBytes(buf) if err := func() error { - request = make([][]time.Time, 0) + request = make([][]NilStringUnixMilli, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem []time.Time - elem = make([]time.Time, 0) + var elem []NilStringUnixMilli + elem = make([]NilStringUnixMilli, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elemElem time.Time - v, err := json.DecodeStringUnixMilli(d) - elemElem = v - if err != nil { + var elemElem NilStringUnixMilli + if err := elemElem.Decode(d, json.DecodeStringUnixMilli); err != nil { return err } elem = append(elem, elemElem) @@ -38421,12 +41067,17 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayArrayRequest(r *http.Reque }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -38456,8 +41107,8 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayArrayRequest(r *http.Reque } } -func (s *Server) decodeTestRequestStringUnixMilliNullableRequest(r *http.Request) ( - req OptNilStringUnixMilli, +func (s *Server) decodeTestRequestStringUnixNanoRequest(r *http.Request) ( + req OptStringUnixNano, close func() error, rerr error, ) { @@ -38489,7 +41140,7 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableRequest(r *http.Request return req, close, nil } - var request OptNilStringUnixMilli + var request OptStringUnixNano buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38502,15 +41153,20 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableRequest(r *http.Request d := jx.DecodeBytes(buf) if err := func() error { request.Reset() - if err := request.Decode(d, json.DecodeStringUnixMilli); err != nil { + if err := request.Decode(d, json.DecodeStringUnixNano); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -38518,8 +41174,8 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableRequest(r *http.Request } } -func (s *Server) decodeTestRequestStringUnixMilliNullableArrayRequest(r *http.Request) ( - req []NilStringUnixMilli, +func (s *Server) decodeTestRequestStringUnixNanoArrayRequest(r *http.Request) ( + req []time.Time, close func() error, rerr error, ) { @@ -38551,7 +41207,7 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayRequest(r *http.Re return req, close, nil } - var request []NilStringUnixMilli + var request []time.Time buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38563,10 +41219,12 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayRequest(r *http.Re d := jx.DecodeBytes(buf) if err := func() error { - request = make([]NilStringUnixMilli, 0) + request = make([]time.Time, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem NilStringUnixMilli - if err := elem.Decode(d, json.DecodeStringUnixMilli); err != nil { + var elem time.Time + v, err := json.DecodeStringUnixNano(d) + elem = v + if err != nil { return err } request = append(request, elem) @@ -38574,12 +41232,17 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -38587,8 +41250,8 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayRequest(r *http.Re } } -func (s *Server) decodeTestRequestStringUnixMilliNullableArrayArrayRequest(r *http.Request) ( - req [][]NilStringUnixMilli, +func (s *Server) decodeTestRequestStringUnixNanoArrayArrayRequest(r *http.Request) ( + req [][]time.Time, close func() error, rerr error, ) { @@ -38620,7 +41283,7 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayArrayRequest(r *ht return req, close, nil } - var request [][]NilStringUnixMilli + var request [][]time.Time buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38632,13 +41295,15 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayArrayRequest(r *ht d := jx.DecodeBytes(buf) if err := func() error { - request = make([][]NilStringUnixMilli, 0) + request = make([][]time.Time, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem []NilStringUnixMilli - elem = make([]NilStringUnixMilli, 0) + var elem []time.Time + elem = make([]time.Time, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elemElem NilStringUnixMilli - if err := elemElem.Decode(d, json.DecodeStringUnixMilli); err != nil { + var elemElem time.Time + v, err := json.DecodeStringUnixNano(d) + elemElem = v + if err != nil { return err } elem = append(elem, elemElem) @@ -38651,12 +41316,17 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayArrayRequest(r *ht }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -38686,8 +41356,8 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayArrayRequest(r *ht } } -func (s *Server) decodeTestRequestStringUnixNanoRequest(r *http.Request) ( - req OptStringUnixNano, +func (s *Server) decodeTestRequestStringUnixNanoNullableRequest(r *http.Request) ( + req OptNilStringUnixNano, close func() error, rerr error, ) { @@ -38719,7 +41389,7 @@ func (s *Server) decodeTestRequestStringUnixNanoRequest(r *http.Request) ( return req, close, nil } - var request OptStringUnixNano + var request OptNilStringUnixNano buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38735,12 +41405,17 @@ func (s *Server) decodeTestRequestStringUnixNanoRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeStringUnixNano); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -38748,8 +41423,8 @@ func (s *Server) decodeTestRequestStringUnixNanoRequest(r *http.Request) ( } } -func (s *Server) decodeTestRequestStringUnixNanoArrayRequest(r *http.Request) ( - req []time.Time, +func (s *Server) decodeTestRequestStringUnixNanoNullableArrayRequest(r *http.Request) ( + req []NilStringUnixNano, close func() error, rerr error, ) { @@ -38781,7 +41456,7 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayRequest(r *http.Request) ( return req, close, nil } - var request []time.Time + var request []NilStringUnixNano buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38793,12 +41468,10 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayRequest(r *http.Request) ( d := jx.DecodeBytes(buf) if err := func() error { - request = make([]time.Time, 0) + request = make([]NilStringUnixNano, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem time.Time - v, err := json.DecodeStringUnixNano(d) - elem = v - if err != nil { + var elem NilStringUnixNano + if err := elem.Decode(d, json.DecodeStringUnixNano); err != nil { return err } request = append(request, elem) @@ -38806,12 +41479,17 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayRequest(r *http.Request) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -38819,8 +41497,8 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayRequest(r *http.Request) ( } } -func (s *Server) decodeTestRequestStringUnixNanoArrayArrayRequest(r *http.Request) ( - req [][]time.Time, +func (s *Server) decodeTestRequestStringUnixNanoNullableArrayArrayRequest(r *http.Request) ( + req [][]NilStringUnixNano, close func() error, rerr error, ) { @@ -38852,7 +41530,7 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayArrayRequest(r *http.Reques return req, close, nil } - var request [][]time.Time + var request [][]NilStringUnixNano buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38864,15 +41542,13 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayArrayRequest(r *http.Reques d := jx.DecodeBytes(buf) if err := func() error { - request = make([][]time.Time, 0) + request = make([][]NilStringUnixNano, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem []time.Time - elem = make([]time.Time, 0) + var elem []NilStringUnixNano + elem = make([]NilStringUnixNano, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elemElem time.Time - v, err := json.DecodeStringUnixNano(d) - elemElem = v - if err != nil { + var elemElem NilStringUnixNano + if err := elemElem.Decode(d, json.DecodeStringUnixNano); err != nil { return err } elem = append(elem, elemElem) @@ -38885,12 +41561,17 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayArrayRequest(r *http.Reques }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -38920,8 +41601,8 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayArrayRequest(r *http.Reques } } -func (s *Server) decodeTestRequestStringUnixNanoNullableRequest(r *http.Request) ( - req OptNilStringUnixNano, +func (s *Server) decodeTestRequestStringUnixNullableRequest(r *http.Request) ( + req OptNilStringUnixSeconds, close func() error, rerr error, ) { @@ -38953,7 +41634,7 @@ func (s *Server) decodeTestRequestStringUnixNanoNullableRequest(r *http.Request) return req, close, nil } - var request OptNilStringUnixNano + var request OptNilStringUnixSeconds buf, err := io.ReadAll(r.Body) if err != nil { return req, close, err @@ -38966,246 +41647,21 @@ func (s *Server) decodeTestRequestStringUnixNanoNullableRequest(r *http.Request) d := jx.DecodeBytes(buf) if err := func() error { request.Reset() - if err := request.Decode(d, json.DecodeStringUnixNano); err != nil { + if err := request.Decode(d, json.DecodeStringUnixSeconds); err != nil { return err } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestRequestStringUnixNanoNullableArrayRequest(r *http.Request) ( - req []NilStringUnixNano, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { - return req, close, nil - } - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, nil - } - - var request []NilStringUnixNano - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, nil - } - - d := jx.DecodeBytes(buf) - if err := func() error { - request = make([]NilStringUnixNano, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem NilStringUnixNano - if err := elem.Decode(d, json.DecodeStringUnixNano); err != nil { - return err - } - request = append(request, elem) - return nil - }); err != nil { - return err + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestRequestStringUnixNanoNullableArrayArrayRequest(r *http.Request) ( - req [][]NilStringUnixNano, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { - return req, close, nil - } - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, nil - } - - var request [][]NilStringUnixNano - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, nil - } - - d := jx.DecodeBytes(buf) - if err := func() error { - request = make([][]NilStringUnixNano, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem []NilStringUnixNano - elem = make([]NilStringUnixNano, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elemElem NilStringUnixNano - if err := elemElem.Decode(d, json.DecodeStringUnixNano); err != nil { - return err - } - elem = append(elem, elemElem) - return nil - }); err != nil { - return err - } - request = append(request, elem) - return nil - }); err != nil { - return err + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - if err := func() error { - var failures []validate.FieldError - for i, elem := range request { - if err := func() error { - if elem == nil { - return errors.New("nil is invalid value") - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "validate") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestRequestStringUnixNullableRequest(r *http.Request) ( - req OptNilStringUnixSeconds, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - if _, ok := r.Header["Content-Type"]; !ok && r.ContentLength == 0 { - return req, close, nil - } - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, nil - } - - var request OptNilStringUnixSeconds - buf, err := io.ReadAll(r.Body) - if err != nil { return req, close, err } - - if len(buf) == 0 { - return req, close, nil - } - - d := jx.DecodeBytes(buf) - if err := func() error { - request.Reset() - if err := request.Decode(d, json.DecodeStringUnixSeconds); err != nil { - return err - } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } return request, close, nil default: return req, close, validate.InvalidContentType(ct) @@ -39268,12 +41724,17 @@ func (s *Server) decodeTestRequestStringUnixNullableArrayRequest(r *http.Request }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -39345,12 +41806,17 @@ func (s *Server) decodeTestRequestStringUnixNullableArrayArrayRequest(r *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -39429,12 +41895,17 @@ func (s *Server) decodeTestRequestStringUnixSecondsRequest(r *http.Request) ( if err := request.Decode(d, json.DecodeStringUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -39500,12 +41971,17 @@ func (s *Server) decodeTestRequestStringUnixSecondsArrayRequest(r *http.Request) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -39579,12 +42055,17 @@ func (s *Server) decodeTestRequestStringUnixSecondsArrayArrayRequest(r *http.Req }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -39663,12 +42144,17 @@ func (s *Server) decodeTestRequestStringUnixSecondsNullableRequest(r *http.Reque if err := request.Decode(d, json.DecodeStringUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -39732,12 +42218,17 @@ func (s *Server) decodeTestRequestStringUnixSecondsNullableArrayRequest(r *http. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -39809,12 +42300,17 @@ func (s *Server) decodeTestRequestStringUnixSecondsNullableArrayArrayRequest(r * }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { var failures []validate.FieldError @@ -39891,12 +42387,17 @@ func (s *Server) decodeTestResponseAnyRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -39951,12 +42452,17 @@ func (s *Server) decodeTestResponseBooleanRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40011,12 +42517,17 @@ func (s *Server) decodeTestResponseBooleanArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40071,12 +42582,17 @@ func (s *Server) decodeTestResponseBooleanArrayArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40131,12 +42647,17 @@ func (s *Server) decodeTestResponseBooleanNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40191,12 +42712,17 @@ func (s *Server) decodeTestResponseBooleanNullableArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40251,12 +42777,17 @@ func (s *Server) decodeTestResponseBooleanNullableArrayArrayRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40311,12 +42842,17 @@ func (s *Server) decodeTestResponseEmptyStructRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40371,12 +42907,17 @@ func (s *Server) decodeTestResponseFormatTestRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40431,12 +42972,17 @@ func (s *Server) decodeTestResponseIntegerRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40491,12 +43037,17 @@ func (s *Server) decodeTestResponseIntegerArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40551,12 +43102,17 @@ func (s *Server) decodeTestResponseIntegerArrayArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40611,12 +43167,17 @@ func (s *Server) decodeTestResponseIntegerInt32Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40671,12 +43232,17 @@ func (s *Server) decodeTestResponseIntegerInt32ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40731,12 +43297,17 @@ func (s *Server) decodeTestResponseIntegerInt32ArrayArrayRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40791,12 +43362,17 @@ func (s *Server) decodeTestResponseIntegerInt32NullableRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40851,12 +43427,17 @@ func (s *Server) decodeTestResponseIntegerInt32NullableArrayRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40911,12 +43492,17 @@ func (s *Server) decodeTestResponseIntegerInt32NullableArrayArrayRequest(r *http if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -40971,12 +43557,17 @@ func (s *Server) decodeTestResponseIntegerInt64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41031,12 +43622,17 @@ func (s *Server) decodeTestResponseIntegerInt64ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41091,12 +43687,17 @@ func (s *Server) decodeTestResponseIntegerInt64ArrayArrayRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41151,193 +43752,213 @@ func (s *Server) decodeTestResponseIntegerInt64NullableRequest(r *http.Request) if err != nil { return err } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestResponseIntegerInt64NullableArrayRequest(r *http.Request) ( - req string, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - - var request string - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - if err := func() error { - v, err := d.Str() - request = string(v) - if err != nil { - return err + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestResponseIntegerInt64NullableArrayRequest(r *http.Request) ( + req string, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + + var request string + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + if err := func() error { + v, err := d.Str() + request = string(v) + if err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestResponseIntegerInt64NullableArrayArrayRequest(r *http.Request) ( + req string, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + + var request string + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + if err := func() error { + v, err := d.Str() + request = string(v) + if err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestResponseIntegerNullableRequest(r *http.Request) ( + req string, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + + var request string + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + if err := func() error { + v, err := d.Str() + request = string(v) + if err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestResponseIntegerInt64NullableArrayArrayRequest(r *http.Request) ( - req string, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - - var request string - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - if err := func() error { - v, err := d.Str() - request = string(v) - if err != nil { - return err + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestResponseIntegerNullableRequest(r *http.Request) ( - req string, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - - var request string - buf, err := io.ReadAll(r.Body) - if err != nil { return req, close, err } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - if err := func() error { - v, err := d.Str() - request = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } return request, close, nil default: return req, close, validate.InvalidContentType(ct) @@ -41391,12 +44012,17 @@ func (s *Server) decodeTestResponseIntegerNullableArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41451,12 +44077,17 @@ func (s *Server) decodeTestResponseIntegerNullableArrayArrayRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41511,12 +44142,17 @@ func (s *Server) decodeTestResponseIntegerUintRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41571,12 +44207,17 @@ func (s *Server) decodeTestResponseIntegerUint32Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41631,12 +44272,17 @@ func (s *Server) decodeTestResponseIntegerUint32ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41691,12 +44337,17 @@ func (s *Server) decodeTestResponseIntegerUint32ArrayArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41751,12 +44402,17 @@ func (s *Server) decodeTestResponseIntegerUint32NullableRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41811,12 +44467,17 @@ func (s *Server) decodeTestResponseIntegerUint32NullableArrayRequest(r *http.Req if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41871,12 +44532,17 @@ func (s *Server) decodeTestResponseIntegerUint32NullableArrayArrayRequest(r *htt if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41931,12 +44597,17 @@ func (s *Server) decodeTestResponseIntegerUint64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -41991,12 +44662,17 @@ func (s *Server) decodeTestResponseIntegerUint64ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42051,12 +44727,17 @@ func (s *Server) decodeTestResponseIntegerUint64ArrayArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42111,12 +44792,17 @@ func (s *Server) decodeTestResponseIntegerUint64NullableRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42171,12 +44857,17 @@ func (s *Server) decodeTestResponseIntegerUint64NullableArrayRequest(r *http.Req if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42231,12 +44922,17 @@ func (s *Server) decodeTestResponseIntegerUint64NullableArrayArrayRequest(r *htt if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42291,12 +44987,17 @@ func (s *Server) decodeTestResponseIntegerUintArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42351,12 +45052,17 @@ func (s *Server) decodeTestResponseIntegerUintArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42411,12 +45117,17 @@ func (s *Server) decodeTestResponseIntegerUintNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42471,12 +45182,17 @@ func (s *Server) decodeTestResponseIntegerUintNullableArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42531,12 +45247,17 @@ func (s *Server) decodeTestResponseIntegerUintNullableArrayArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42591,12 +45312,17 @@ func (s *Server) decodeTestResponseIntegerUnixRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42651,12 +45377,17 @@ func (s *Server) decodeTestResponseIntegerUnixArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42711,12 +45442,17 @@ func (s *Server) decodeTestResponseIntegerUnixArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42771,12 +45507,17 @@ func (s *Server) decodeTestResponseIntegerUnixMicroRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42831,12 +45572,17 @@ func (s *Server) decodeTestResponseIntegerUnixMicroArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42891,12 +45637,17 @@ func (s *Server) decodeTestResponseIntegerUnixMicroArrayArrayRequest(r *http.Req if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -42951,12 +45702,17 @@ func (s *Server) decodeTestResponseIntegerUnixMicroNullableRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43011,12 +45767,17 @@ func (s *Server) decodeTestResponseIntegerUnixMicroNullableArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43071,12 +45832,17 @@ func (s *Server) decodeTestResponseIntegerUnixMicroNullableArrayArrayRequest(r * if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43131,12 +45897,17 @@ func (s *Server) decodeTestResponseIntegerUnixMilliRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43191,12 +45962,17 @@ func (s *Server) decodeTestResponseIntegerUnixMilliArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43251,12 +46027,17 @@ func (s *Server) decodeTestResponseIntegerUnixMilliArrayArrayRequest(r *http.Req if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43311,12 +46092,17 @@ func (s *Server) decodeTestResponseIntegerUnixMilliNullableRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43371,12 +46157,17 @@ func (s *Server) decodeTestResponseIntegerUnixMilliNullableArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43431,12 +46222,17 @@ func (s *Server) decodeTestResponseIntegerUnixMilliNullableArrayArrayRequest(r * if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43491,12 +46287,17 @@ func (s *Server) decodeTestResponseIntegerUnixNanoRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43551,12 +46352,17 @@ func (s *Server) decodeTestResponseIntegerUnixNanoArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43611,12 +46417,17 @@ func (s *Server) decodeTestResponseIntegerUnixNanoArrayArrayRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43671,12 +46482,17 @@ func (s *Server) decodeTestResponseIntegerUnixNanoNullableRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43731,12 +46547,17 @@ func (s *Server) decodeTestResponseIntegerUnixNanoNullableArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43791,12 +46612,17 @@ func (s *Server) decodeTestResponseIntegerUnixNanoNullableArrayArrayRequest(r *h if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43851,12 +46677,17 @@ func (s *Server) decodeTestResponseIntegerUnixNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43911,12 +46742,17 @@ func (s *Server) decodeTestResponseIntegerUnixNullableArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -43971,12 +46807,17 @@ func (s *Server) decodeTestResponseIntegerUnixNullableArrayArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44031,12 +46872,17 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44091,12 +46937,17 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44151,12 +47002,17 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsArrayArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44211,12 +47067,17 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsNullableRequest(r *http.Req if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44271,12 +47132,17 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsNullableArrayRequest(r *htt if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44331,12 +47197,17 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsNullableArrayArrayRequest(r if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44391,12 +47262,17 @@ func (s *Server) decodeTestResponseNullRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44451,12 +47327,17 @@ func (s *Server) decodeTestResponseNullArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44511,12 +47392,17 @@ func (s *Server) decodeTestResponseNullArrayArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44571,12 +47457,17 @@ func (s *Server) decodeTestResponseNullNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44631,12 +47522,17 @@ func (s *Server) decodeTestResponseNullNullableArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44691,12 +47587,17 @@ func (s *Server) decodeTestResponseNullNullableArrayArrayRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44751,12 +47652,17 @@ func (s *Server) decodeTestResponseNumberRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44811,12 +47717,17 @@ func (s *Server) decodeTestResponseNumberArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44871,12 +47782,17 @@ func (s *Server) decodeTestResponseNumberArrayArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44931,12 +47847,17 @@ func (s *Server) decodeTestResponseNumberDoubleRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -44991,12 +47912,17 @@ func (s *Server) decodeTestResponseNumberDoubleArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45051,12 +47977,17 @@ func (s *Server) decodeTestResponseNumberDoubleArrayArrayRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45111,12 +48042,17 @@ func (s *Server) decodeTestResponseNumberDoubleNullableRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45171,12 +48107,17 @@ func (s *Server) decodeTestResponseNumberDoubleNullableArrayRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45231,12 +48172,17 @@ func (s *Server) decodeTestResponseNumberDoubleNullableArrayArrayRequest(r *http if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45291,12 +48237,17 @@ func (s *Server) decodeTestResponseNumberFloatRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45351,12 +48302,17 @@ func (s *Server) decodeTestResponseNumberFloatArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45411,12 +48367,17 @@ func (s *Server) decodeTestResponseNumberFloatArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45471,12 +48432,17 @@ func (s *Server) decodeTestResponseNumberFloatNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45531,12 +48497,17 @@ func (s *Server) decodeTestResponseNumberFloatNullableArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45591,12 +48562,17 @@ func (s *Server) decodeTestResponseNumberFloatNullableArrayArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45651,72 +48627,17 @@ func (s *Server) decodeTestResponseNumberInt32Request(r *http.Request) ( if err != nil { return err } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestResponseNumberInt32ArrayRequest(r *http.Request) ( - req string, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - - var request string - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - if err := func() error { - v, err := d.Str() - request = string(v) - if err != nil { - return err + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45724,7 +48645,7 @@ func (s *Server) decodeTestResponseNumberInt32ArrayRequest(r *http.Request) ( } } -func (s *Server) decodeTestResponseNumberInt32ArrayArrayRequest(r *http.Request) ( +func (s *Server) decodeTestResponseNumberInt32ArrayRequest(r *http.Request) ( req string, close func() error, rerr error, @@ -45771,12 +48692,82 @@ func (s *Server) decodeTestResponseNumberInt32ArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestResponseNumberInt32ArrayArrayRequest(r *http.Request) ( + req string, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + + var request string + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + if err := func() error { + v, err := d.Str() + request = string(v) + if err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45831,12 +48822,17 @@ func (s *Server) decodeTestResponseNumberInt32NullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45891,12 +48887,17 @@ func (s *Server) decodeTestResponseNumberInt32NullableArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -45951,12 +48952,17 @@ func (s *Server) decodeTestResponseNumberInt32NullableArrayArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46011,12 +49017,17 @@ func (s *Server) decodeTestResponseNumberInt64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46071,12 +49082,17 @@ func (s *Server) decodeTestResponseNumberInt64ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46131,12 +49147,17 @@ func (s *Server) decodeTestResponseNumberInt64ArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46191,12 +49212,17 @@ func (s *Server) decodeTestResponseNumberInt64NullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46251,12 +49277,17 @@ func (s *Server) decodeTestResponseNumberInt64NullableArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46311,12 +49342,17 @@ func (s *Server) decodeTestResponseNumberInt64NullableArrayArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46371,12 +49407,17 @@ func (s *Server) decodeTestResponseNumberNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46431,12 +49472,17 @@ func (s *Server) decodeTestResponseNumberNullableArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46491,12 +49537,17 @@ func (s *Server) decodeTestResponseNumberNullableArrayArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46551,12 +49602,17 @@ func (s *Server) decodeTestResponseStringRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46611,12 +49667,17 @@ func (s *Server) decodeTestResponseStringArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46671,12 +49732,17 @@ func (s *Server) decodeTestResponseStringArrayArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46731,12 +49797,17 @@ func (s *Server) decodeTestResponseStringBase64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46791,12 +49862,17 @@ func (s *Server) decodeTestResponseStringBase64ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46851,12 +49927,17 @@ func (s *Server) decodeTestResponseStringBase64ArrayArrayRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46911,12 +49992,17 @@ func (s *Server) decodeTestResponseStringBase64NullableRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -46971,12 +50057,17 @@ func (s *Server) decodeTestResponseStringBase64NullableArrayRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47031,12 +50122,17 @@ func (s *Server) decodeTestResponseStringBase64NullableArrayArrayRequest(r *http if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47091,12 +50187,17 @@ func (s *Server) decodeTestResponseStringBinaryRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47151,12 +50252,17 @@ func (s *Server) decodeTestResponseStringBinaryArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47211,12 +50317,17 @@ func (s *Server) decodeTestResponseStringBinaryArrayArrayRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47271,12 +50382,17 @@ func (s *Server) decodeTestResponseStringBinaryNullableRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47331,12 +50447,17 @@ func (s *Server) decodeTestResponseStringBinaryNullableArrayRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47391,12 +50512,17 @@ func (s *Server) decodeTestResponseStringBinaryNullableArrayArrayRequest(r *http if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47451,12 +50577,17 @@ func (s *Server) decodeTestResponseStringByteRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47511,12 +50642,17 @@ func (s *Server) decodeTestResponseStringByteArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47571,12 +50707,17 @@ func (s *Server) decodeTestResponseStringByteArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47631,12 +50772,17 @@ func (s *Server) decodeTestResponseStringByteNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47691,12 +50837,17 @@ func (s *Server) decodeTestResponseStringByteNullableArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47751,12 +50902,17 @@ func (s *Server) decodeTestResponseStringByteNullableArrayArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47811,12 +50967,17 @@ func (s *Server) decodeTestResponseStringDateRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47871,12 +51032,17 @@ func (s *Server) decodeTestResponseStringDateArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47931,12 +51097,17 @@ func (s *Server) decodeTestResponseStringDateArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -47991,12 +51162,17 @@ func (s *Server) decodeTestResponseStringDateNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48051,12 +51227,17 @@ func (s *Server) decodeTestResponseStringDateNullableArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48111,12 +51292,17 @@ func (s *Server) decodeTestResponseStringDateNullableArrayArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48171,12 +51357,17 @@ func (s *Server) decodeTestResponseStringDateTimeRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48231,12 +51422,17 @@ func (s *Server) decodeTestResponseStringDateTimeArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48291,12 +51487,17 @@ func (s *Server) decodeTestResponseStringDateTimeArrayArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48351,12 +51552,17 @@ func (s *Server) decodeTestResponseStringDateTimeNullableRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48411,12 +51617,17 @@ func (s *Server) decodeTestResponseStringDateTimeNullableArrayRequest(r *http.Re if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48471,12 +51682,17 @@ func (s *Server) decodeTestResponseStringDateTimeNullableArrayArrayRequest(r *ht if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48531,12 +51747,17 @@ func (s *Server) decodeTestResponseStringDurationRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48591,12 +51812,17 @@ func (s *Server) decodeTestResponseStringDurationArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48651,12 +51877,17 @@ func (s *Server) decodeTestResponseStringDurationArrayArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48711,12 +51942,17 @@ func (s *Server) decodeTestResponseStringDurationNullableRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48771,12 +52007,17 @@ func (s *Server) decodeTestResponseStringDurationNullableArrayRequest(r *http.Re if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48831,12 +52072,17 @@ func (s *Server) decodeTestResponseStringDurationNullableArrayArrayRequest(r *ht if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48891,12 +52137,17 @@ func (s *Server) decodeTestResponseStringEmailRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -48951,12 +52202,17 @@ func (s *Server) decodeTestResponseStringEmailArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49011,12 +52267,17 @@ func (s *Server) decodeTestResponseStringEmailArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49071,12 +52332,17 @@ func (s *Server) decodeTestResponseStringEmailNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49131,12 +52397,17 @@ func (s *Server) decodeTestResponseStringEmailNullableArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49191,12 +52462,17 @@ func (s *Server) decodeTestResponseStringEmailNullableArrayArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49251,12 +52527,17 @@ func (s *Server) decodeTestResponseStringHostnameRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49311,12 +52592,17 @@ func (s *Server) decodeTestResponseStringHostnameArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49371,12 +52657,17 @@ func (s *Server) decodeTestResponseStringHostnameArrayArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49431,12 +52722,17 @@ func (s *Server) decodeTestResponseStringHostnameNullableRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49491,12 +52787,17 @@ func (s *Server) decodeTestResponseStringHostnameNullableArrayRequest(r *http.Re if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49551,12 +52852,17 @@ func (s *Server) decodeTestResponseStringHostnameNullableArrayArrayRequest(r *ht if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49611,12 +52917,17 @@ func (s *Server) decodeTestResponseStringIPRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49671,12 +52982,17 @@ func (s *Server) decodeTestResponseStringIPArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49731,12 +53047,17 @@ func (s *Server) decodeTestResponseStringIPArrayArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49791,12 +53112,17 @@ func (s *Server) decodeTestResponseStringIPNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49851,12 +53177,17 @@ func (s *Server) decodeTestResponseStringIPNullableArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49911,12 +53242,17 @@ func (s *Server) decodeTestResponseStringIPNullableArrayArrayRequest(r *http.Req if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -49971,12 +53307,17 @@ func (s *Server) decodeTestResponseStringInt32Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50031,12 +53372,17 @@ func (s *Server) decodeTestResponseStringInt32ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50091,12 +53437,17 @@ func (s *Server) decodeTestResponseStringInt32ArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50151,12 +53502,17 @@ func (s *Server) decodeTestResponseStringInt32NullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50211,12 +53567,17 @@ func (s *Server) decodeTestResponseStringInt32NullableArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50271,12 +53632,17 @@ func (s *Server) decodeTestResponseStringInt32NullableArrayArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50331,12 +53697,17 @@ func (s *Server) decodeTestResponseStringInt64Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50391,12 +53762,17 @@ func (s *Server) decodeTestResponseStringInt64ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50451,12 +53827,17 @@ func (s *Server) decodeTestResponseStringInt64ArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50511,12 +53892,17 @@ func (s *Server) decodeTestResponseStringInt64NullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50571,12 +53957,17 @@ func (s *Server) decodeTestResponseStringInt64NullableArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50631,12 +54022,17 @@ func (s *Server) decodeTestResponseStringInt64NullableArrayArrayRequest(r *http. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50691,12 +54087,17 @@ func (s *Server) decodeTestResponseStringIpv4Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50751,12 +54152,17 @@ func (s *Server) decodeTestResponseStringIpv4ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50811,12 +54217,17 @@ func (s *Server) decodeTestResponseStringIpv4ArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50871,12 +54282,17 @@ func (s *Server) decodeTestResponseStringIpv4NullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50931,12 +54347,17 @@ func (s *Server) decodeTestResponseStringIpv4NullableArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -50991,12 +54412,17 @@ func (s *Server) decodeTestResponseStringIpv4NullableArrayArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51051,12 +54477,17 @@ func (s *Server) decodeTestResponseStringIpv6Request(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51111,12 +54542,17 @@ func (s *Server) decodeTestResponseStringIpv6ArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51171,12 +54607,17 @@ func (s *Server) decodeTestResponseStringIpv6ArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51231,12 +54672,17 @@ func (s *Server) decodeTestResponseStringIpv6NullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51291,12 +54737,17 @@ func (s *Server) decodeTestResponseStringIpv6NullableArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51351,12 +54802,17 @@ func (s *Server) decodeTestResponseStringIpv6NullableArrayArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51411,12 +54867,17 @@ func (s *Server) decodeTestResponseStringNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51471,12 +54932,17 @@ func (s *Server) decodeTestResponseStringNullableArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51531,12 +54997,17 @@ func (s *Server) decodeTestResponseStringNullableArrayArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51591,12 +55062,17 @@ func (s *Server) decodeTestResponseStringPasswordRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51651,12 +55127,17 @@ func (s *Server) decodeTestResponseStringPasswordArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51711,72 +55192,17 @@ func (s *Server) decodeTestResponseStringPasswordArrayArrayRequest(r *http.Reque if err != nil { return err } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeTestResponseStringPasswordNullableRequest(r *http.Request) ( - req string, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - - var request string - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - if err := func() error { - v, err := d.Str() - request = string(v) - if err != nil { - return err + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51784,7 +55210,7 @@ func (s *Server) decodeTestResponseStringPasswordNullableRequest(r *http.Request } } -func (s *Server) decodeTestResponseStringPasswordNullableArrayRequest(r *http.Request) ( +func (s *Server) decodeTestResponseStringPasswordNullableRequest(r *http.Request) ( req string, close func() error, rerr error, @@ -51831,12 +55257,82 @@ func (s *Server) decodeTestResponseStringPasswordNullableArrayRequest(r *http.Re if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeTestResponseStringPasswordNullableArrayRequest(r *http.Request) ( + req string, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + + var request string + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + if err := func() error { + v, err := d.Str() + request = string(v) + if err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51891,12 +55387,17 @@ func (s *Server) decodeTestResponseStringPasswordNullableArrayArrayRequest(r *ht if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -51951,12 +55452,17 @@ func (s *Server) decodeTestResponseStringTimeRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52011,12 +55517,17 @@ func (s *Server) decodeTestResponseStringTimeArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52071,12 +55582,17 @@ func (s *Server) decodeTestResponseStringTimeArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52131,12 +55647,17 @@ func (s *Server) decodeTestResponseStringTimeNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52191,12 +55712,17 @@ func (s *Server) decodeTestResponseStringTimeNullableArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52251,12 +55777,17 @@ func (s *Server) decodeTestResponseStringTimeNullableArrayArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52311,12 +55842,17 @@ func (s *Server) decodeTestResponseStringURIRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52371,12 +55907,17 @@ func (s *Server) decodeTestResponseStringURIArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52431,12 +55972,17 @@ func (s *Server) decodeTestResponseStringURIArrayArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52491,12 +56037,17 @@ func (s *Server) decodeTestResponseStringURINullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52551,12 +56102,17 @@ func (s *Server) decodeTestResponseStringURINullableArrayRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52611,12 +56167,17 @@ func (s *Server) decodeTestResponseStringURINullableArrayArrayRequest(r *http.Re if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52671,12 +56232,17 @@ func (s *Server) decodeTestResponseStringUUIDRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52731,12 +56297,17 @@ func (s *Server) decodeTestResponseStringUUIDArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52791,12 +56362,17 @@ func (s *Server) decodeTestResponseStringUUIDArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52851,12 +56427,17 @@ func (s *Server) decodeTestResponseStringUUIDNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52911,12 +56492,17 @@ func (s *Server) decodeTestResponseStringUUIDNullableArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -52971,12 +56557,17 @@ func (s *Server) decodeTestResponseStringUUIDNullableArrayArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53031,12 +56622,17 @@ func (s *Server) decodeTestResponseStringUnixRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53091,12 +56687,17 @@ func (s *Server) decodeTestResponseStringUnixArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53151,12 +56752,17 @@ func (s *Server) decodeTestResponseStringUnixArrayArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53211,12 +56817,17 @@ func (s *Server) decodeTestResponseStringUnixMicroRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53271,12 +56882,17 @@ func (s *Server) decodeTestResponseStringUnixMicroArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53331,12 +56947,17 @@ func (s *Server) decodeTestResponseStringUnixMicroArrayArrayRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53391,12 +57012,17 @@ func (s *Server) decodeTestResponseStringUnixMicroNullableRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53451,12 +57077,17 @@ func (s *Server) decodeTestResponseStringUnixMicroNullableArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53511,12 +57142,17 @@ func (s *Server) decodeTestResponseStringUnixMicroNullableArrayArrayRequest(r *h if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53571,12 +57207,17 @@ func (s *Server) decodeTestResponseStringUnixMilliRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53631,12 +57272,17 @@ func (s *Server) decodeTestResponseStringUnixMilliArrayRequest(r *http.Request) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53691,12 +57337,17 @@ func (s *Server) decodeTestResponseStringUnixMilliArrayArrayRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53751,12 +57402,17 @@ func (s *Server) decodeTestResponseStringUnixMilliNullableRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53811,12 +57467,17 @@ func (s *Server) decodeTestResponseStringUnixMilliNullableArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53871,12 +57532,17 @@ func (s *Server) decodeTestResponseStringUnixMilliNullableArrayArrayRequest(r *h if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53931,12 +57597,17 @@ func (s *Server) decodeTestResponseStringUnixNanoRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -53991,12 +57662,17 @@ func (s *Server) decodeTestResponseStringUnixNanoArrayRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54051,12 +57727,17 @@ func (s *Server) decodeTestResponseStringUnixNanoArrayArrayRequest(r *http.Reque if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54111,12 +57792,17 @@ func (s *Server) decodeTestResponseStringUnixNanoNullableRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54171,12 +57857,17 @@ func (s *Server) decodeTestResponseStringUnixNanoNullableArrayRequest(r *http.Re if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54231,12 +57922,17 @@ func (s *Server) decodeTestResponseStringUnixNanoNullableArrayArrayRequest(r *ht if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54291,12 +57987,17 @@ func (s *Server) decodeTestResponseStringUnixNullableRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54351,12 +58052,17 @@ func (s *Server) decodeTestResponseStringUnixNullableArrayRequest(r *http.Reques if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54411,12 +58117,17 @@ func (s *Server) decodeTestResponseStringUnixNullableArrayArrayRequest(r *http.R if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54471,12 +58182,17 @@ func (s *Server) decodeTestResponseStringUnixSecondsRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54531,12 +58247,17 @@ func (s *Server) decodeTestResponseStringUnixSecondsArrayRequest(r *http.Request if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54591,12 +58312,17 @@ func (s *Server) decodeTestResponseStringUnixSecondsArrayArrayRequest(r *http.Re if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54651,12 +58377,17 @@ func (s *Server) decodeTestResponseStringUnixSecondsNullableRequest(r *http.Requ if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54711,12 +58442,17 @@ func (s *Server) decodeTestResponseStringUnixSecondsNullableArrayRequest(r *http if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -54771,12 +58507,17 @@ func (s *Server) decodeTestResponseStringUnixSecondsNullableArrayArrayRequest(r if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: diff --git a/examples/ex_test_format/oas_response_decoders_gen.go b/examples/ex_test_format/oas_response_decoders_gen.go index 0a7180e19..ba2d44b62 100644 --- a/examples/ex_test_format/oas_response_decoders_gen.go +++ b/examples/ex_test_format/oas_response_decoders_gen.go @@ -15,6 +15,7 @@ import ( "github.com/google/uuid" "github.com/ogen-go/ogen/json" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -28,23 +29,28 @@ func decodeTestQueryParameterResponse(resp *http.Response) (res *Error, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -64,23 +70,28 @@ func decodeTestRequestAnyResponse(resp *http.Response) (res *Error, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -100,23 +111,28 @@ func decodeTestRequestBooleanResponse(resp *http.Response) (res *Error, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -136,23 +152,28 @@ func decodeTestRequestBooleanArrayResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -172,23 +193,28 @@ func decodeTestRequestBooleanArrayArrayResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -208,23 +234,28 @@ func decodeTestRequestBooleanNullableResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -244,23 +275,28 @@ func decodeTestRequestBooleanNullableArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -280,23 +316,28 @@ func decodeTestRequestBooleanNullableArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -316,23 +357,28 @@ func decodeTestRequestEmptyStructResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -352,23 +398,28 @@ func decodeTestRequestFormatTestResponse(resp *http.Response) (res *Error, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -388,23 +439,28 @@ func decodeTestRequestIntegerResponse(resp *http.Response) (res *Error, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -424,23 +480,28 @@ func decodeTestRequestIntegerArrayResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -460,23 +521,28 @@ func decodeTestRequestIntegerArrayArrayResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -496,23 +562,28 @@ func decodeTestRequestIntegerInt32Response(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -532,23 +603,28 @@ func decodeTestRequestIntegerInt32ArrayResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -568,23 +644,28 @@ func decodeTestRequestIntegerInt32ArrayArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -604,23 +685,28 @@ func decodeTestRequestIntegerInt32NullableResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -640,23 +726,28 @@ func decodeTestRequestIntegerInt32NullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -676,23 +767,28 @@ func decodeTestRequestIntegerInt32NullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -712,23 +808,28 @@ func decodeTestRequestIntegerInt64Response(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -748,23 +849,28 @@ func decodeTestRequestIntegerInt64ArrayResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -784,23 +890,28 @@ func decodeTestRequestIntegerInt64ArrayArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -820,23 +931,28 @@ func decodeTestRequestIntegerInt64NullableResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -856,23 +972,28 @@ func decodeTestRequestIntegerInt64NullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -892,23 +1013,28 @@ func decodeTestRequestIntegerInt64NullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -928,23 +1054,28 @@ func decodeTestRequestIntegerNullableResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -964,23 +1095,28 @@ func decodeTestRequestIntegerNullableArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1000,23 +1136,28 @@ func decodeTestRequestIntegerNullableArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1036,23 +1177,28 @@ func decodeTestRequestIntegerUintResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1072,23 +1218,28 @@ func decodeTestRequestIntegerUint32Response(resp *http.Response) (res *Error, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1108,23 +1259,28 @@ func decodeTestRequestIntegerUint32ArrayResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1144,23 +1300,28 @@ func decodeTestRequestIntegerUint32ArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1180,23 +1341,28 @@ func decodeTestRequestIntegerUint32NullableResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1216,23 +1382,28 @@ func decodeTestRequestIntegerUint32NullableArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1252,23 +1423,28 @@ func decodeTestRequestIntegerUint32NullableArrayArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1288,23 +1464,28 @@ func decodeTestRequestIntegerUint64Response(resp *http.Response) (res *Error, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1324,23 +1505,28 @@ func decodeTestRequestIntegerUint64ArrayResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1360,23 +1546,28 @@ func decodeTestRequestIntegerUint64ArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1396,23 +1587,28 @@ func decodeTestRequestIntegerUint64NullableResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1432,23 +1628,28 @@ func decodeTestRequestIntegerUint64NullableArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1468,23 +1669,28 @@ func decodeTestRequestIntegerUint64NullableArrayArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1504,23 +1710,28 @@ func decodeTestRequestIntegerUintArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1540,23 +1751,28 @@ func decodeTestRequestIntegerUintArrayArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1576,23 +1792,28 @@ func decodeTestRequestIntegerUintNullableResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1612,23 +1833,28 @@ func decodeTestRequestIntegerUintNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1648,23 +1874,28 @@ func decodeTestRequestIntegerUintNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1684,23 +1915,28 @@ func decodeTestRequestIntegerUnixResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1720,23 +1956,28 @@ func decodeTestRequestIntegerUnixArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1756,23 +1997,28 @@ func decodeTestRequestIntegerUnixArrayArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1792,23 +2038,28 @@ func decodeTestRequestIntegerUnixMicroResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1828,23 +2079,28 @@ func decodeTestRequestIntegerUnixMicroArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1864,23 +2120,28 @@ func decodeTestRequestIntegerUnixMicroArrayArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1900,23 +2161,28 @@ func decodeTestRequestIntegerUnixMicroNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1936,23 +2202,28 @@ func decodeTestRequestIntegerUnixMicroNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1972,23 +2243,28 @@ func decodeTestRequestIntegerUnixMicroNullableArrayArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2008,23 +2284,28 @@ func decodeTestRequestIntegerUnixMilliResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2044,23 +2325,28 @@ func decodeTestRequestIntegerUnixMilliArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2080,23 +2366,28 @@ func decodeTestRequestIntegerUnixMilliArrayArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2116,23 +2407,28 @@ func decodeTestRequestIntegerUnixMilliNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2152,23 +2448,28 @@ func decodeTestRequestIntegerUnixMilliNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2188,23 +2489,28 @@ func decodeTestRequestIntegerUnixMilliNullableArrayArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2224,23 +2530,28 @@ func decodeTestRequestIntegerUnixNanoResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2260,23 +2571,28 @@ func decodeTestRequestIntegerUnixNanoArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2296,23 +2612,28 @@ func decodeTestRequestIntegerUnixNanoArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2332,23 +2653,28 @@ func decodeTestRequestIntegerUnixNanoNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2368,23 +2694,28 @@ func decodeTestRequestIntegerUnixNanoNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2404,23 +2735,28 @@ func decodeTestRequestIntegerUnixNanoNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2440,23 +2776,28 @@ func decodeTestRequestIntegerUnixNullableResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2476,23 +2817,28 @@ func decodeTestRequestIntegerUnixNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2512,23 +2858,28 @@ func decodeTestRequestIntegerUnixNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2548,23 +2899,28 @@ func decodeTestRequestIntegerUnixSecondsResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2584,23 +2940,28 @@ func decodeTestRequestIntegerUnixSecondsArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2620,23 +2981,28 @@ func decodeTestRequestIntegerUnixSecondsArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2656,23 +3022,28 @@ func decodeTestRequestIntegerUnixSecondsNullableResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2692,23 +3063,28 @@ func decodeTestRequestIntegerUnixSecondsNullableArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2728,23 +3104,28 @@ func decodeTestRequestIntegerUnixSecondsNullableArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2764,23 +3145,28 @@ func decodeTestRequestNullResponse(resp *http.Response) (res *Error, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2800,23 +3186,28 @@ func decodeTestRequestNullArrayResponse(resp *http.Response) (res *Error, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2836,23 +3227,28 @@ func decodeTestRequestNullArrayArrayResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2872,23 +3268,28 @@ func decodeTestRequestNullNullableResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2908,23 +3309,28 @@ func decodeTestRequestNullNullableArrayResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2944,23 +3350,28 @@ func decodeTestRequestNullNullableArrayArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -2980,23 +3391,28 @@ func decodeTestRequestNumberResponse(resp *http.Response) (res *Error, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3016,23 +3432,28 @@ func decodeTestRequestNumberArrayResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3052,23 +3473,28 @@ func decodeTestRequestNumberArrayArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3088,23 +3514,28 @@ func decodeTestRequestNumberDoubleResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3124,23 +3555,28 @@ func decodeTestRequestNumberDoubleArrayResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3160,23 +3596,28 @@ func decodeTestRequestNumberDoubleArrayArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3196,23 +3637,28 @@ func decodeTestRequestNumberDoubleNullableResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3232,23 +3678,28 @@ func decodeTestRequestNumberDoubleNullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3268,23 +3719,28 @@ func decodeTestRequestNumberDoubleNullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3304,23 +3760,28 @@ func decodeTestRequestNumberFloatResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3340,23 +3801,28 @@ func decodeTestRequestNumberFloatArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3376,23 +3842,28 @@ func decodeTestRequestNumberFloatArrayArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3412,23 +3883,28 @@ func decodeTestRequestNumberFloatNullableResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3448,23 +3924,28 @@ func decodeTestRequestNumberFloatNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3484,23 +3965,28 @@ func decodeTestRequestNumberFloatNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3520,23 +4006,28 @@ func decodeTestRequestNumberInt32Response(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3556,23 +4047,28 @@ func decodeTestRequestNumberInt32ArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3592,23 +4088,28 @@ func decodeTestRequestNumberInt32ArrayArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3628,23 +4129,28 @@ func decodeTestRequestNumberInt32NullableResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3664,23 +4170,28 @@ func decodeTestRequestNumberInt32NullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3700,23 +4211,28 @@ func decodeTestRequestNumberInt32NullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3736,23 +4252,28 @@ func decodeTestRequestNumberInt64Response(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3772,23 +4293,28 @@ func decodeTestRequestNumberInt64ArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3808,23 +4334,28 @@ func decodeTestRequestNumberInt64ArrayArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3844,23 +4375,28 @@ func decodeTestRequestNumberInt64NullableResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3880,23 +4416,28 @@ func decodeTestRequestNumberInt64NullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3916,23 +4457,28 @@ func decodeTestRequestNumberInt64NullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3952,23 +4498,28 @@ func decodeTestRequestNumberNullableResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -3988,23 +4539,28 @@ func decodeTestRequestNumberNullableArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4024,23 +4580,28 @@ func decodeTestRequestNumberNullableArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4060,23 +4621,28 @@ func decodeTestRequestRequiredAnyResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4096,23 +4662,28 @@ func decodeTestRequestRequiredBooleanResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4132,23 +4703,28 @@ func decodeTestRequestRequiredBooleanArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4168,23 +4744,28 @@ func decodeTestRequestRequiredBooleanArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4204,23 +4785,28 @@ func decodeTestRequestRequiredBooleanNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4240,23 +4826,28 @@ func decodeTestRequestRequiredBooleanNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4276,23 +4867,28 @@ func decodeTestRequestRequiredBooleanNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4312,23 +4908,28 @@ func decodeTestRequestRequiredEmptyStructResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4348,23 +4949,28 @@ func decodeTestRequestRequiredFormatTestResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4384,23 +4990,28 @@ func decodeTestRequestRequiredIntegerResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4420,23 +5031,28 @@ func decodeTestRequestRequiredIntegerArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4456,23 +5072,28 @@ func decodeTestRequestRequiredIntegerArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4492,23 +5113,28 @@ func decodeTestRequestRequiredIntegerInt32Response(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4528,23 +5154,28 @@ func decodeTestRequestRequiredIntegerInt32ArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4564,23 +5195,28 @@ func decodeTestRequestRequiredIntegerInt32ArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4600,23 +5236,28 @@ func decodeTestRequestRequiredIntegerInt32NullableResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4636,23 +5277,28 @@ func decodeTestRequestRequiredIntegerInt32NullableArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4672,23 +5318,28 @@ func decodeTestRequestRequiredIntegerInt32NullableArrayArrayResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4708,23 +5359,28 @@ func decodeTestRequestRequiredIntegerInt64Response(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4744,23 +5400,28 @@ func decodeTestRequestRequiredIntegerInt64ArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4780,23 +5441,28 @@ func decodeTestRequestRequiredIntegerInt64ArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4816,23 +5482,28 @@ func decodeTestRequestRequiredIntegerInt64NullableResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4852,23 +5523,28 @@ func decodeTestRequestRequiredIntegerInt64NullableArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4888,23 +5564,28 @@ func decodeTestRequestRequiredIntegerInt64NullableArrayArrayResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4924,23 +5605,28 @@ func decodeTestRequestRequiredIntegerNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4960,23 +5646,28 @@ func decodeTestRequestRequiredIntegerNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -4996,23 +5687,28 @@ func decodeTestRequestRequiredIntegerNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5032,23 +5728,28 @@ func decodeTestRequestRequiredIntegerUintResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5068,23 +5769,28 @@ func decodeTestRequestRequiredIntegerUint32Response(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5104,23 +5810,28 @@ func decodeTestRequestRequiredIntegerUint32ArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5140,23 +5851,28 @@ func decodeTestRequestRequiredIntegerUint32ArrayArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5176,23 +5892,28 @@ func decodeTestRequestRequiredIntegerUint32NullableResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5212,23 +5933,28 @@ func decodeTestRequestRequiredIntegerUint32NullableArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5248,23 +5974,28 @@ func decodeTestRequestRequiredIntegerUint32NullableArrayArrayResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5284,23 +6015,28 @@ func decodeTestRequestRequiredIntegerUint64Response(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5320,23 +6056,28 @@ func decodeTestRequestRequiredIntegerUint64ArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5356,23 +6097,28 @@ func decodeTestRequestRequiredIntegerUint64ArrayArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5392,23 +6138,28 @@ func decodeTestRequestRequiredIntegerUint64NullableResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5428,23 +6179,28 @@ func decodeTestRequestRequiredIntegerUint64NullableArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5464,23 +6220,28 @@ func decodeTestRequestRequiredIntegerUint64NullableArrayArrayResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5500,23 +6261,28 @@ func decodeTestRequestRequiredIntegerUintArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5536,23 +6302,28 @@ func decodeTestRequestRequiredIntegerUintArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5572,23 +6343,28 @@ func decodeTestRequestRequiredIntegerUintNullableResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5608,23 +6384,28 @@ func decodeTestRequestRequiredIntegerUintNullableArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5644,23 +6425,28 @@ func decodeTestRequestRequiredIntegerUintNullableArrayArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5680,23 +6466,28 @@ func decodeTestRequestRequiredIntegerUnixResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5716,23 +6507,28 @@ func decodeTestRequestRequiredIntegerUnixArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5752,23 +6548,28 @@ func decodeTestRequestRequiredIntegerUnixArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5788,23 +6589,28 @@ func decodeTestRequestRequiredIntegerUnixMicroResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5824,23 +6630,28 @@ func decodeTestRequestRequiredIntegerUnixMicroArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5860,23 +6671,28 @@ func decodeTestRequestRequiredIntegerUnixMicroArrayArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5896,23 +6712,28 @@ func decodeTestRequestRequiredIntegerUnixMicroNullableResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5932,23 +6753,28 @@ func decodeTestRequestRequiredIntegerUnixMicroNullableArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -5968,23 +6794,28 @@ func decodeTestRequestRequiredIntegerUnixMicroNullableArrayArrayResponse(resp *h } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6004,23 +6835,28 @@ func decodeTestRequestRequiredIntegerUnixMilliResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6040,23 +6876,28 @@ func decodeTestRequestRequiredIntegerUnixMilliArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6076,23 +6917,28 @@ func decodeTestRequestRequiredIntegerUnixMilliArrayArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6112,23 +6958,28 @@ func decodeTestRequestRequiredIntegerUnixMilliNullableResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6148,23 +6999,28 @@ func decodeTestRequestRequiredIntegerUnixMilliNullableArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6184,23 +7040,28 @@ func decodeTestRequestRequiredIntegerUnixMilliNullableArrayArrayResponse(resp *h } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6220,23 +7081,28 @@ func decodeTestRequestRequiredIntegerUnixNanoResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6256,23 +7122,28 @@ func decodeTestRequestRequiredIntegerUnixNanoArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6292,23 +7163,28 @@ func decodeTestRequestRequiredIntegerUnixNanoArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6328,23 +7204,28 @@ func decodeTestRequestRequiredIntegerUnixNanoNullableResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6364,23 +7245,28 @@ func decodeTestRequestRequiredIntegerUnixNanoNullableArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6400,23 +7286,28 @@ func decodeTestRequestRequiredIntegerUnixNanoNullableArrayArrayResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6436,23 +7327,28 @@ func decodeTestRequestRequiredIntegerUnixNullableResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6472,23 +7368,28 @@ func decodeTestRequestRequiredIntegerUnixNullableArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6508,23 +7409,28 @@ func decodeTestRequestRequiredIntegerUnixNullableArrayArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6544,23 +7450,28 @@ func decodeTestRequestRequiredIntegerUnixSecondsResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6580,23 +7491,28 @@ func decodeTestRequestRequiredIntegerUnixSecondsArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6616,23 +7532,28 @@ func decodeTestRequestRequiredIntegerUnixSecondsArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6652,23 +7573,28 @@ func decodeTestRequestRequiredIntegerUnixSecondsNullableResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6688,23 +7614,28 @@ func decodeTestRequestRequiredIntegerUnixSecondsNullableArrayResponse(resp *http } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6724,23 +7655,28 @@ func decodeTestRequestRequiredIntegerUnixSecondsNullableArrayArrayResponse(resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6760,23 +7696,28 @@ func decodeTestRequestRequiredNullResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6796,23 +7737,28 @@ func decodeTestRequestRequiredNullArrayResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6832,23 +7778,28 @@ func decodeTestRequestRequiredNullArrayArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6868,23 +7819,28 @@ func decodeTestRequestRequiredNullNullableResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6904,23 +7860,28 @@ func decodeTestRequestRequiredNullNullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6940,23 +7901,28 @@ func decodeTestRequestRequiredNullNullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -6976,23 +7942,28 @@ func decodeTestRequestRequiredNumberResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7012,23 +7983,28 @@ func decodeTestRequestRequiredNumberArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7048,23 +8024,28 @@ func decodeTestRequestRequiredNumberArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7084,23 +8065,28 @@ func decodeTestRequestRequiredNumberDoubleResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7120,23 +8106,28 @@ func decodeTestRequestRequiredNumberDoubleArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7156,23 +8147,28 @@ func decodeTestRequestRequiredNumberDoubleArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7192,23 +8188,28 @@ func decodeTestRequestRequiredNumberDoubleNullableResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7228,23 +8229,28 @@ func decodeTestRequestRequiredNumberDoubleNullableArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7264,23 +8270,28 @@ func decodeTestRequestRequiredNumberDoubleNullableArrayArrayResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7300,23 +8311,28 @@ func decodeTestRequestRequiredNumberFloatResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7336,23 +8352,28 @@ func decodeTestRequestRequiredNumberFloatArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7372,23 +8393,28 @@ func decodeTestRequestRequiredNumberFloatArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7408,23 +8434,28 @@ func decodeTestRequestRequiredNumberFloatNullableResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7444,23 +8475,28 @@ func decodeTestRequestRequiredNumberFloatNullableArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7480,23 +8516,28 @@ func decodeTestRequestRequiredNumberFloatNullableArrayArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7516,23 +8557,28 @@ func decodeTestRequestRequiredNumberInt32Response(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7552,23 +8598,28 @@ func decodeTestRequestRequiredNumberInt32ArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7588,23 +8639,28 @@ func decodeTestRequestRequiredNumberInt32ArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7624,23 +8680,28 @@ func decodeTestRequestRequiredNumberInt32NullableResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7660,23 +8721,28 @@ func decodeTestRequestRequiredNumberInt32NullableArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7696,23 +8762,28 @@ func decodeTestRequestRequiredNumberInt32NullableArrayArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7732,23 +8803,28 @@ func decodeTestRequestRequiredNumberInt64Response(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7768,23 +8844,28 @@ func decodeTestRequestRequiredNumberInt64ArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7804,23 +8885,28 @@ func decodeTestRequestRequiredNumberInt64ArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7840,23 +8926,28 @@ func decodeTestRequestRequiredNumberInt64NullableResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7876,23 +8967,28 @@ func decodeTestRequestRequiredNumberInt64NullableArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7912,23 +9008,28 @@ func decodeTestRequestRequiredNumberInt64NullableArrayArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7948,23 +9049,28 @@ func decodeTestRequestRequiredNumberNullableResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -7984,23 +9090,28 @@ func decodeTestRequestRequiredNumberNullableArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8020,23 +9131,28 @@ func decodeTestRequestRequiredNumberNullableArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8056,23 +9172,28 @@ func decodeTestRequestRequiredStringResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8092,23 +9213,28 @@ func decodeTestRequestRequiredStringArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8128,23 +9254,28 @@ func decodeTestRequestRequiredStringArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8164,23 +9295,28 @@ func decodeTestRequestRequiredStringBase64Response(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8200,23 +9336,28 @@ func decodeTestRequestRequiredStringBase64ArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8236,23 +9377,28 @@ func decodeTestRequestRequiredStringBase64ArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8272,23 +9418,28 @@ func decodeTestRequestRequiredStringBase64NullableResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8308,23 +9459,28 @@ func decodeTestRequestRequiredStringBase64NullableArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8344,23 +9500,28 @@ func decodeTestRequestRequiredStringBase64NullableArrayArrayResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8380,23 +9541,28 @@ func decodeTestRequestRequiredStringBinaryResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8416,23 +9582,28 @@ func decodeTestRequestRequiredStringBinaryArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8452,23 +9623,28 @@ func decodeTestRequestRequiredStringBinaryArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8488,23 +9664,28 @@ func decodeTestRequestRequiredStringBinaryNullableResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8524,23 +9705,28 @@ func decodeTestRequestRequiredStringBinaryNullableArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8560,23 +9746,28 @@ func decodeTestRequestRequiredStringBinaryNullableArrayArrayResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8596,23 +9787,28 @@ func decodeTestRequestRequiredStringByteResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8632,23 +9828,28 @@ func decodeTestRequestRequiredStringByteArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8668,23 +9869,28 @@ func decodeTestRequestRequiredStringByteArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8704,23 +9910,28 @@ func decodeTestRequestRequiredStringByteNullableResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8740,23 +9951,28 @@ func decodeTestRequestRequiredStringByteNullableArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8776,23 +9992,28 @@ func decodeTestRequestRequiredStringByteNullableArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8812,23 +10033,28 @@ func decodeTestRequestRequiredStringDateResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8848,23 +10074,28 @@ func decodeTestRequestRequiredStringDateArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8884,23 +10115,28 @@ func decodeTestRequestRequiredStringDateArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8920,23 +10156,28 @@ func decodeTestRequestRequiredStringDateNullableResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8956,23 +10197,28 @@ func decodeTestRequestRequiredStringDateNullableArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -8992,23 +10238,28 @@ func decodeTestRequestRequiredStringDateNullableArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9028,23 +10279,28 @@ func decodeTestRequestRequiredStringDateTimeResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9064,23 +10320,28 @@ func decodeTestRequestRequiredStringDateTimeArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9100,23 +10361,28 @@ func decodeTestRequestRequiredStringDateTimeArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9136,23 +10402,28 @@ func decodeTestRequestRequiredStringDateTimeNullableResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9172,23 +10443,28 @@ func decodeTestRequestRequiredStringDateTimeNullableArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9208,23 +10484,28 @@ func decodeTestRequestRequiredStringDateTimeNullableArrayArrayResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9244,23 +10525,28 @@ func decodeTestRequestRequiredStringDurationResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9280,23 +10566,28 @@ func decodeTestRequestRequiredStringDurationArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9316,23 +10607,28 @@ func decodeTestRequestRequiredStringDurationArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9352,23 +10648,28 @@ func decodeTestRequestRequiredStringDurationNullableResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9388,23 +10689,28 @@ func decodeTestRequestRequiredStringDurationNullableArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9424,23 +10730,28 @@ func decodeTestRequestRequiredStringDurationNullableArrayArrayResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9460,23 +10771,28 @@ func decodeTestRequestRequiredStringEmailResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9496,23 +10812,28 @@ func decodeTestRequestRequiredStringEmailArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9532,23 +10853,28 @@ func decodeTestRequestRequiredStringEmailArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9568,23 +10894,28 @@ func decodeTestRequestRequiredStringEmailNullableResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9604,23 +10935,28 @@ func decodeTestRequestRequiredStringEmailNullableArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9640,23 +10976,28 @@ func decodeTestRequestRequiredStringEmailNullableArrayArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9676,23 +11017,28 @@ func decodeTestRequestRequiredStringHostnameResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9712,23 +11058,28 @@ func decodeTestRequestRequiredStringHostnameArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9748,23 +11099,28 @@ func decodeTestRequestRequiredStringHostnameArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9784,23 +11140,28 @@ func decodeTestRequestRequiredStringHostnameNullableResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9820,23 +11181,28 @@ func decodeTestRequestRequiredStringHostnameNullableArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9856,23 +11222,28 @@ func decodeTestRequestRequiredStringHostnameNullableArrayArrayResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9892,23 +11263,28 @@ func decodeTestRequestRequiredStringIPResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9928,23 +11304,28 @@ func decodeTestRequestRequiredStringIPArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -9964,23 +11345,28 @@ func decodeTestRequestRequiredStringIPArrayArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10000,23 +11386,28 @@ func decodeTestRequestRequiredStringIPNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10036,23 +11427,28 @@ func decodeTestRequestRequiredStringIPNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10072,23 +11468,28 @@ func decodeTestRequestRequiredStringIPNullableArrayArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10108,23 +11509,28 @@ func decodeTestRequestRequiredStringInt32Response(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10144,23 +11550,28 @@ func decodeTestRequestRequiredStringInt32ArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10180,23 +11591,28 @@ func decodeTestRequestRequiredStringInt32ArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10216,23 +11632,28 @@ func decodeTestRequestRequiredStringInt32NullableResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10252,23 +11673,28 @@ func decodeTestRequestRequiredStringInt32NullableArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10288,23 +11714,28 @@ func decodeTestRequestRequiredStringInt32NullableArrayArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10324,23 +11755,28 @@ func decodeTestRequestRequiredStringInt64Response(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10360,23 +11796,28 @@ func decodeTestRequestRequiredStringInt64ArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10396,23 +11837,28 @@ func decodeTestRequestRequiredStringInt64ArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10432,23 +11878,28 @@ func decodeTestRequestRequiredStringInt64NullableResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10468,23 +11919,28 @@ func decodeTestRequestRequiredStringInt64NullableArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10504,23 +11960,28 @@ func decodeTestRequestRequiredStringInt64NullableArrayArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10540,23 +12001,28 @@ func decodeTestRequestRequiredStringIpv4Response(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10576,23 +12042,28 @@ func decodeTestRequestRequiredStringIpv4ArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10612,23 +12083,28 @@ func decodeTestRequestRequiredStringIpv4ArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10648,23 +12124,28 @@ func decodeTestRequestRequiredStringIpv4NullableResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10684,23 +12165,28 @@ func decodeTestRequestRequiredStringIpv4NullableArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10720,23 +12206,28 @@ func decodeTestRequestRequiredStringIpv4NullableArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10756,23 +12247,28 @@ func decodeTestRequestRequiredStringIpv6Response(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10792,23 +12288,28 @@ func decodeTestRequestRequiredStringIpv6ArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10828,23 +12329,28 @@ func decodeTestRequestRequiredStringIpv6ArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10864,23 +12370,28 @@ func decodeTestRequestRequiredStringIpv6NullableResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10900,23 +12411,28 @@ func decodeTestRequestRequiredStringIpv6NullableArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10936,23 +12452,28 @@ func decodeTestRequestRequiredStringIpv6NullableArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -10972,23 +12493,28 @@ func decodeTestRequestRequiredStringNullableResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11008,23 +12534,28 @@ func decodeTestRequestRequiredStringNullableArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11044,23 +12575,28 @@ func decodeTestRequestRequiredStringNullableArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11080,23 +12616,28 @@ func decodeTestRequestRequiredStringPasswordResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11116,23 +12657,28 @@ func decodeTestRequestRequiredStringPasswordArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11152,23 +12698,28 @@ func decodeTestRequestRequiredStringPasswordArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11188,23 +12739,28 @@ func decodeTestRequestRequiredStringPasswordNullableResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11224,23 +12780,28 @@ func decodeTestRequestRequiredStringPasswordNullableArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11260,23 +12821,28 @@ func decodeTestRequestRequiredStringPasswordNullableArrayArrayResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11296,23 +12862,28 @@ func decodeTestRequestRequiredStringTimeResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11332,23 +12903,28 @@ func decodeTestRequestRequiredStringTimeArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11368,23 +12944,28 @@ func decodeTestRequestRequiredStringTimeArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11404,23 +12985,28 @@ func decodeTestRequestRequiredStringTimeNullableResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11440,23 +13026,28 @@ func decodeTestRequestRequiredStringTimeNullableArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11476,23 +13067,28 @@ func decodeTestRequestRequiredStringTimeNullableArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11512,23 +13108,28 @@ func decodeTestRequestRequiredStringURIResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11548,23 +13149,28 @@ func decodeTestRequestRequiredStringURIArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11584,23 +13190,28 @@ func decodeTestRequestRequiredStringURIArrayArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11620,23 +13231,28 @@ func decodeTestRequestRequiredStringURINullableResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11656,23 +13272,28 @@ func decodeTestRequestRequiredStringURINullableArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11692,23 +13313,28 @@ func decodeTestRequestRequiredStringURINullableArrayArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11728,23 +13354,28 @@ func decodeTestRequestRequiredStringUUIDResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11764,23 +13395,28 @@ func decodeTestRequestRequiredStringUUIDArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11800,23 +13436,28 @@ func decodeTestRequestRequiredStringUUIDArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11836,23 +13477,28 @@ func decodeTestRequestRequiredStringUUIDNullableResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11872,23 +13518,28 @@ func decodeTestRequestRequiredStringUUIDNullableArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11908,23 +13559,28 @@ func decodeTestRequestRequiredStringUUIDNullableArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11944,23 +13600,28 @@ func decodeTestRequestRequiredStringUnixResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -11980,23 +13641,28 @@ func decodeTestRequestRequiredStringUnixArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12016,23 +13682,28 @@ func decodeTestRequestRequiredStringUnixArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12052,23 +13723,28 @@ func decodeTestRequestRequiredStringUnixMicroResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12088,23 +13764,28 @@ func decodeTestRequestRequiredStringUnixMicroArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12124,23 +13805,28 @@ func decodeTestRequestRequiredStringUnixMicroArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12160,23 +13846,28 @@ func decodeTestRequestRequiredStringUnixMicroNullableResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12196,23 +13887,28 @@ func decodeTestRequestRequiredStringUnixMicroNullableArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12232,23 +13928,28 @@ func decodeTestRequestRequiredStringUnixMicroNullableArrayArrayResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12268,23 +13969,28 @@ func decodeTestRequestRequiredStringUnixMilliResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12304,23 +14010,28 @@ func decodeTestRequestRequiredStringUnixMilliArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12340,23 +14051,28 @@ func decodeTestRequestRequiredStringUnixMilliArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12376,23 +14092,28 @@ func decodeTestRequestRequiredStringUnixMilliNullableResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12412,23 +14133,28 @@ func decodeTestRequestRequiredStringUnixMilliNullableArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12448,23 +14174,28 @@ func decodeTestRequestRequiredStringUnixMilliNullableArrayArrayResponse(resp *ht } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12484,23 +14215,28 @@ func decodeTestRequestRequiredStringUnixNanoResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12520,23 +14256,28 @@ func decodeTestRequestRequiredStringUnixNanoArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12556,23 +14297,28 @@ func decodeTestRequestRequiredStringUnixNanoArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12592,23 +14338,28 @@ func decodeTestRequestRequiredStringUnixNanoNullableResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12628,23 +14379,28 @@ func decodeTestRequestRequiredStringUnixNanoNullableArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12664,23 +14420,28 @@ func decodeTestRequestRequiredStringUnixNanoNullableArrayArrayResponse(resp *htt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12700,23 +14461,28 @@ func decodeTestRequestRequiredStringUnixNullableResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12736,23 +14502,28 @@ func decodeTestRequestRequiredStringUnixNullableArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12772,23 +14543,28 @@ func decodeTestRequestRequiredStringUnixNullableArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12808,23 +14584,28 @@ func decodeTestRequestRequiredStringUnixSecondsResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12844,23 +14625,28 @@ func decodeTestRequestRequiredStringUnixSecondsArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12880,23 +14666,28 @@ func decodeTestRequestRequiredStringUnixSecondsArrayArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12916,23 +14707,28 @@ func decodeTestRequestRequiredStringUnixSecondsNullableResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12952,23 +14748,28 @@ func decodeTestRequestRequiredStringUnixSecondsNullableArrayResponse(resp *http. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -12988,23 +14789,28 @@ func decodeTestRequestRequiredStringUnixSecondsNullableArrayArrayResponse(resp * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13024,23 +14830,28 @@ func decodeTestRequestStringResponse(resp *http.Response) (res *Error, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13060,23 +14871,28 @@ func decodeTestRequestStringArrayResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13096,23 +14912,28 @@ func decodeTestRequestStringArrayArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13132,23 +14953,28 @@ func decodeTestRequestStringBase64Response(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13168,23 +14994,28 @@ func decodeTestRequestStringBase64ArrayResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13204,23 +15035,28 @@ func decodeTestRequestStringBase64ArrayArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13240,23 +15076,28 @@ func decodeTestRequestStringBase64NullableResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13276,23 +15117,28 @@ func decodeTestRequestStringBase64NullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13312,23 +15158,28 @@ func decodeTestRequestStringBase64NullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13348,23 +15199,28 @@ func decodeTestRequestStringBinaryResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13384,23 +15240,28 @@ func decodeTestRequestStringBinaryArrayResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13420,23 +15281,28 @@ func decodeTestRequestStringBinaryArrayArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13456,23 +15322,28 @@ func decodeTestRequestStringBinaryNullableResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13492,23 +15363,28 @@ func decodeTestRequestStringBinaryNullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13528,23 +15404,28 @@ func decodeTestRequestStringBinaryNullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13564,23 +15445,28 @@ func decodeTestRequestStringByteResponse(resp *http.Response) (res *Error, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13600,23 +15486,28 @@ func decodeTestRequestStringByteArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13636,23 +15527,28 @@ func decodeTestRequestStringByteArrayArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13672,23 +15568,28 @@ func decodeTestRequestStringByteNullableResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13708,23 +15609,28 @@ func decodeTestRequestStringByteNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13744,23 +15650,28 @@ func decodeTestRequestStringByteNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13780,23 +15691,28 @@ func decodeTestRequestStringDateResponse(resp *http.Response) (res *Error, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13816,23 +15732,28 @@ func decodeTestRequestStringDateArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13852,23 +15773,28 @@ func decodeTestRequestStringDateArrayArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13888,23 +15814,28 @@ func decodeTestRequestStringDateNullableResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13924,23 +15855,28 @@ func decodeTestRequestStringDateNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13960,23 +15896,28 @@ func decodeTestRequestStringDateNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -13996,23 +15937,28 @@ func decodeTestRequestStringDateTimeResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14032,23 +15978,28 @@ func decodeTestRequestStringDateTimeArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14068,23 +16019,28 @@ func decodeTestRequestStringDateTimeArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14104,23 +16060,28 @@ func decodeTestRequestStringDateTimeNullableResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14140,23 +16101,28 @@ func decodeTestRequestStringDateTimeNullableArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14176,23 +16142,28 @@ func decodeTestRequestStringDateTimeNullableArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14212,23 +16183,28 @@ func decodeTestRequestStringDurationResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14248,23 +16224,28 @@ func decodeTestRequestStringDurationArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14284,23 +16265,28 @@ func decodeTestRequestStringDurationArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14320,23 +16306,28 @@ func decodeTestRequestStringDurationNullableResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14356,23 +16347,28 @@ func decodeTestRequestStringDurationNullableArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14392,23 +16388,28 @@ func decodeTestRequestStringDurationNullableArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14428,23 +16429,28 @@ func decodeTestRequestStringEmailResponse(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14464,23 +16470,28 @@ func decodeTestRequestStringEmailArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14500,23 +16511,28 @@ func decodeTestRequestStringEmailArrayArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14536,23 +16552,28 @@ func decodeTestRequestStringEmailNullableResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14572,23 +16593,28 @@ func decodeTestRequestStringEmailNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14608,23 +16634,28 @@ func decodeTestRequestStringEmailNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14644,23 +16675,28 @@ func decodeTestRequestStringHostnameResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14680,23 +16716,28 @@ func decodeTestRequestStringHostnameArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14716,23 +16757,28 @@ func decodeTestRequestStringHostnameArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14752,23 +16798,28 @@ func decodeTestRequestStringHostnameNullableResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14788,23 +16839,28 @@ func decodeTestRequestStringHostnameNullableArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14824,23 +16880,28 @@ func decodeTestRequestStringHostnameNullableArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14860,23 +16921,28 @@ func decodeTestRequestStringIPResponse(resp *http.Response) (res *Error, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14896,23 +16962,28 @@ func decodeTestRequestStringIPArrayResponse(resp *http.Response) (res *Error, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14932,23 +17003,28 @@ func decodeTestRequestStringIPArrayArrayResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -14968,23 +17044,28 @@ func decodeTestRequestStringIPNullableResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15004,23 +17085,28 @@ func decodeTestRequestStringIPNullableArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15040,23 +17126,28 @@ func decodeTestRequestStringIPNullableArrayArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15076,23 +17167,28 @@ func decodeTestRequestStringInt32Response(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15112,23 +17208,28 @@ func decodeTestRequestStringInt32ArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15148,23 +17249,28 @@ func decodeTestRequestStringInt32ArrayArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15184,23 +17290,28 @@ func decodeTestRequestStringInt32NullableResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15220,23 +17331,28 @@ func decodeTestRequestStringInt32NullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15256,23 +17372,28 @@ func decodeTestRequestStringInt32NullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15292,23 +17413,28 @@ func decodeTestRequestStringInt64Response(resp *http.Response) (res *Error, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15328,23 +17454,28 @@ func decodeTestRequestStringInt64ArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15364,23 +17495,28 @@ func decodeTestRequestStringInt64ArrayArrayResponse(resp *http.Response) (res *E } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15400,23 +17536,28 @@ func decodeTestRequestStringInt64NullableResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15436,23 +17577,28 @@ func decodeTestRequestStringInt64NullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15472,23 +17618,28 @@ func decodeTestRequestStringInt64NullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15508,23 +17659,28 @@ func decodeTestRequestStringIpv4Response(resp *http.Response) (res *Error, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15544,23 +17700,28 @@ func decodeTestRequestStringIpv4ArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15580,23 +17741,28 @@ func decodeTestRequestStringIpv4ArrayArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15616,23 +17782,28 @@ func decodeTestRequestStringIpv4NullableResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15652,23 +17823,28 @@ func decodeTestRequestStringIpv4NullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15688,23 +17864,28 @@ func decodeTestRequestStringIpv4NullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15724,23 +17905,28 @@ func decodeTestRequestStringIpv6Response(resp *http.Response) (res *Error, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15760,23 +17946,28 @@ func decodeTestRequestStringIpv6ArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15796,23 +17987,28 @@ func decodeTestRequestStringIpv6ArrayArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15832,23 +18028,28 @@ func decodeTestRequestStringIpv6NullableResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15868,23 +18069,28 @@ func decodeTestRequestStringIpv6NullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15904,23 +18110,28 @@ func decodeTestRequestStringIpv6NullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15940,23 +18151,28 @@ func decodeTestRequestStringNullableResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -15976,23 +18192,28 @@ func decodeTestRequestStringNullableArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16012,23 +18233,28 @@ func decodeTestRequestStringNullableArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16048,23 +18274,28 @@ func decodeTestRequestStringPasswordResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16084,23 +18315,28 @@ func decodeTestRequestStringPasswordArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16120,23 +18356,28 @@ func decodeTestRequestStringPasswordArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16156,23 +18397,28 @@ func decodeTestRequestStringPasswordNullableResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16192,23 +18438,28 @@ func decodeTestRequestStringPasswordNullableArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16228,23 +18479,28 @@ func decodeTestRequestStringPasswordNullableArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16264,23 +18520,28 @@ func decodeTestRequestStringTimeResponse(resp *http.Response) (res *Error, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16300,23 +18561,28 @@ func decodeTestRequestStringTimeArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16336,23 +18602,28 @@ func decodeTestRequestStringTimeArrayArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16372,23 +18643,28 @@ func decodeTestRequestStringTimeNullableResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16408,23 +18684,28 @@ func decodeTestRequestStringTimeNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16444,23 +18725,28 @@ func decodeTestRequestStringTimeNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16480,23 +18766,28 @@ func decodeTestRequestStringURIResponse(resp *http.Response) (res *Error, err er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16516,23 +18807,28 @@ func decodeTestRequestStringURIArrayResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16552,23 +18848,28 @@ func decodeTestRequestStringURIArrayArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16588,23 +18889,28 @@ func decodeTestRequestStringURINullableResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16624,23 +18930,28 @@ func decodeTestRequestStringURINullableArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16660,23 +18971,28 @@ func decodeTestRequestStringURINullableArrayArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16696,23 +19012,28 @@ func decodeTestRequestStringUUIDResponse(resp *http.Response) (res *Error, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16732,23 +19053,28 @@ func decodeTestRequestStringUUIDArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16768,23 +19094,28 @@ func decodeTestRequestStringUUIDArrayArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16804,23 +19135,28 @@ func decodeTestRequestStringUUIDNullableResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16840,23 +19176,28 @@ func decodeTestRequestStringUUIDNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16876,23 +19217,28 @@ func decodeTestRequestStringUUIDNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16912,23 +19258,28 @@ func decodeTestRequestStringUnixResponse(resp *http.Response) (res *Error, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16948,23 +19299,28 @@ func decodeTestRequestStringUnixArrayResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -16984,23 +19340,28 @@ func decodeTestRequestStringUnixArrayArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17020,23 +19381,28 @@ func decodeTestRequestStringUnixMicroResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17056,23 +19422,28 @@ func decodeTestRequestStringUnixMicroArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17092,23 +19463,28 @@ func decodeTestRequestStringUnixMicroArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17128,23 +19504,28 @@ func decodeTestRequestStringUnixMicroNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17164,23 +19545,28 @@ func decodeTestRequestStringUnixMicroNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17200,23 +19586,28 @@ func decodeTestRequestStringUnixMicroNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17236,23 +19627,28 @@ func decodeTestRequestStringUnixMilliResponse(resp *http.Response) (res *Error, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17272,23 +19668,28 @@ func decodeTestRequestStringUnixMilliArrayResponse(resp *http.Response) (res *Er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17308,23 +19709,28 @@ func decodeTestRequestStringUnixMilliArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17344,23 +19750,28 @@ func decodeTestRequestStringUnixMilliNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17380,23 +19791,28 @@ func decodeTestRequestStringUnixMilliNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17416,23 +19832,28 @@ func decodeTestRequestStringUnixMilliNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17452,23 +19873,28 @@ func decodeTestRequestStringUnixNanoResponse(resp *http.Response) (res *Error, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17488,23 +19914,28 @@ func decodeTestRequestStringUnixNanoArrayResponse(resp *http.Response) (res *Err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17524,23 +19955,28 @@ func decodeTestRequestStringUnixNanoArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17560,23 +19996,28 @@ func decodeTestRequestStringUnixNanoNullableResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17596,23 +20037,28 @@ func decodeTestRequestStringUnixNanoNullableArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17632,23 +20078,28 @@ func decodeTestRequestStringUnixNanoNullableArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17668,23 +20119,28 @@ func decodeTestRequestStringUnixNullableResponse(resp *http.Response) (res *Erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17704,23 +20160,28 @@ func decodeTestRequestStringUnixNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17740,23 +20201,28 @@ func decodeTestRequestStringUnixNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17776,23 +20242,28 @@ func decodeTestRequestStringUnixSecondsResponse(resp *http.Response) (res *Error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17812,23 +20283,28 @@ func decodeTestRequestStringUnixSecondsArrayResponse(resp *http.Response) (res * } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17848,23 +20324,28 @@ func decodeTestRequestStringUnixSecondsArrayArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17884,23 +20365,28 @@ func decodeTestRequestStringUnixSecondsNullableResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17920,23 +20406,28 @@ func decodeTestRequestStringUnixSecondsNullableArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17956,23 +20447,28 @@ func decodeTestRequestStringUnixSecondsNullableArrayArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -17992,12 +20488,12 @@ func decodeTestResponseAnyResponse(resp *http.Response) (res jx.Raw, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response jx.Raw if err := func() error { v, err := d.RawAppend(nil) @@ -18005,12 +20501,17 @@ func decodeTestResponseAnyResponse(resp *http.Response) (res jx.Raw, err error) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18030,12 +20531,12 @@ func decodeTestResponseBooleanResponse(resp *http.Response) (res bool, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response bool if err := func() error { v, err := d.Bool() @@ -18043,12 +20544,17 @@ func decodeTestResponseBooleanResponse(resp *http.Response) (res bool, err error if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18068,12 +20574,12 @@ func decodeTestResponseBooleanArrayResponse(resp *http.Response) (res []bool, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []bool if err := func() error { response = make([]bool, 0) @@ -18089,12 +20595,17 @@ func decodeTestResponseBooleanArrayResponse(resp *http.Response) (res []bool, er }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18114,12 +20625,12 @@ func decodeTestResponseBooleanArrayArrayResponse(resp *http.Response) (res [][]b } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]bool if err := func() error { response = make([][]bool, 0) @@ -18143,12 +20654,17 @@ func decodeTestResponseBooleanArrayArrayResponse(resp *http.Response) (res [][]b }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18168,23 +20684,28 @@ func decodeTestResponseBooleanNullableResponse(resp *http.Response) (res NilBool } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilBool if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18204,12 +20725,12 @@ func decodeTestResponseBooleanNullableArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilBool if err := func() error { response = make([]NilBool, 0) @@ -18223,12 +20744,17 @@ func decodeTestResponseBooleanNullableArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18248,12 +20774,12 @@ func decodeTestResponseBooleanNullableArrayArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilBool if err := func() error { response = make([][]NilBool, 0) @@ -18275,12 +20801,17 @@ func decodeTestResponseBooleanNullableArrayArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18300,23 +20831,28 @@ func decodeTestResponseEmptyStructResponse(resp *http.Response) (res *TestRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TestResponseEmptyStructOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18336,23 +20872,28 @@ func decodeTestResponseFormatTestResponse(resp *http.Response) (res *TestRespons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TestResponseFormatTestOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -18372,12 +20913,12 @@ func decodeTestResponseIntegerResponse(resp *http.Response) (res int, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int if err := func() error { v, err := d.Int() @@ -18385,12 +20926,17 @@ func decodeTestResponseIntegerResponse(resp *http.Response) (res int, err error) if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18410,12 +20956,12 @@ func decodeTestResponseIntegerArrayResponse(resp *http.Response) (res []int, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []int if err := func() error { response = make([]int, 0) @@ -18431,12 +20977,17 @@ func decodeTestResponseIntegerArrayResponse(resp *http.Response) (res []int, err }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18456,12 +21007,12 @@ func decodeTestResponseIntegerArrayArrayResponse(resp *http.Response) (res [][]i } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]int if err := func() error { response = make([][]int, 0) @@ -18485,12 +21036,17 @@ func decodeTestResponseIntegerArrayArrayResponse(resp *http.Response) (res [][]i }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18510,12 +21066,12 @@ func decodeTestResponseIntegerInt32Response(resp *http.Response) (res int32, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int32 if err := func() error { v, err := d.Int32() @@ -18523,12 +21079,17 @@ func decodeTestResponseIntegerInt32Response(resp *http.Response) (res int32, err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18548,12 +21109,12 @@ func decodeTestResponseIntegerInt32ArrayResponse(resp *http.Response) (res []int } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []int32 if err := func() error { response = make([]int32, 0) @@ -18569,12 +21130,17 @@ func decodeTestResponseIntegerInt32ArrayResponse(resp *http.Response) (res []int }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18594,12 +21160,12 @@ func decodeTestResponseIntegerInt32ArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]int32 if err := func() error { response = make([][]int32, 0) @@ -18623,12 +21189,17 @@ func decodeTestResponseIntegerInt32ArrayArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18648,23 +21219,28 @@ func decodeTestResponseIntegerInt32NullableResponse(resp *http.Response) (res Ni } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilInt32 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18684,12 +21260,12 @@ func decodeTestResponseIntegerInt32NullableArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilInt32 if err := func() error { response = make([]NilInt32, 0) @@ -18703,12 +21279,17 @@ func decodeTestResponseIntegerInt32NullableArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18728,12 +21309,12 @@ func decodeTestResponseIntegerInt32NullableArrayArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilInt32 if err := func() error { response = make([][]NilInt32, 0) @@ -18755,12 +21336,17 @@ func decodeTestResponseIntegerInt32NullableArrayArrayResponse(resp *http.Respons }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18780,12 +21366,12 @@ func decodeTestResponseIntegerInt64Response(resp *http.Response) (res int64, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int64 if err := func() error { v, err := d.Int64() @@ -18793,12 +21379,17 @@ func decodeTestResponseIntegerInt64Response(resp *http.Response) (res int64, err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18818,12 +21409,12 @@ func decodeTestResponseIntegerInt64ArrayResponse(resp *http.Response) (res []int } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []int64 if err := func() error { response = make([]int64, 0) @@ -18839,12 +21430,17 @@ func decodeTestResponseIntegerInt64ArrayResponse(resp *http.Response) (res []int }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18864,12 +21460,12 @@ func decodeTestResponseIntegerInt64ArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]int64 if err := func() error { response = make([][]int64, 0) @@ -18893,12 +21489,17 @@ func decodeTestResponseIntegerInt64ArrayArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18918,23 +21519,28 @@ func decodeTestResponseIntegerInt64NullableResponse(resp *http.Response) (res Ni } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilInt64 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18954,12 +21560,12 @@ func decodeTestResponseIntegerInt64NullableArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilInt64 if err := func() error { response = make([]NilInt64, 0) @@ -18973,12 +21579,17 @@ func decodeTestResponseIntegerInt64NullableArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -18998,12 +21609,12 @@ func decodeTestResponseIntegerInt64NullableArrayArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilInt64 if err := func() error { response = make([][]NilInt64, 0) @@ -19025,12 +21636,17 @@ func decodeTestResponseIntegerInt64NullableArrayArrayResponse(resp *http.Respons }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19050,23 +21666,28 @@ func decodeTestResponseIntegerNullableResponse(resp *http.Response) (res NilInt, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilInt if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19086,12 +21707,12 @@ func decodeTestResponseIntegerNullableArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilInt if err := func() error { response = make([]NilInt, 0) @@ -19105,12 +21726,17 @@ func decodeTestResponseIntegerNullableArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19130,12 +21756,12 @@ func decodeTestResponseIntegerNullableArrayArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilInt if err := func() error { response = make([][]NilInt, 0) @@ -19157,12 +21783,17 @@ func decodeTestResponseIntegerNullableArrayArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19182,12 +21813,12 @@ func decodeTestResponseIntegerUintResponse(resp *http.Response) (res uint, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response uint if err := func() error { v, err := d.UInt() @@ -19195,12 +21826,17 @@ func decodeTestResponseIntegerUintResponse(resp *http.Response) (res uint, err e if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19220,12 +21856,12 @@ func decodeTestResponseIntegerUint32Response(resp *http.Response) (res uint32, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response uint32 if err := func() error { v, err := d.UInt32() @@ -19233,12 +21869,17 @@ func decodeTestResponseIntegerUint32Response(resp *http.Response) (res uint32, e if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19258,12 +21899,12 @@ func decodeTestResponseIntegerUint32ArrayResponse(resp *http.Response) (res []ui } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []uint32 if err := func() error { response = make([]uint32, 0) @@ -19279,12 +21920,17 @@ func decodeTestResponseIntegerUint32ArrayResponse(resp *http.Response) (res []ui }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19304,12 +21950,12 @@ func decodeTestResponseIntegerUint32ArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]uint32 if err := func() error { response = make([][]uint32, 0) @@ -19333,12 +21979,17 @@ func decodeTestResponseIntegerUint32ArrayArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19358,23 +22009,28 @@ func decodeTestResponseIntegerUint32NullableResponse(resp *http.Response) (res N } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilUint32 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19394,12 +22050,12 @@ func decodeTestResponseIntegerUint32NullableArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilUint32 if err := func() error { response = make([]NilUint32, 0) @@ -19413,12 +22069,17 @@ func decodeTestResponseIntegerUint32NullableArrayResponse(resp *http.Response) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19438,12 +22099,12 @@ func decodeTestResponseIntegerUint32NullableArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilUint32 if err := func() error { response = make([][]NilUint32, 0) @@ -19465,12 +22126,17 @@ func decodeTestResponseIntegerUint32NullableArrayArrayResponse(resp *http.Respon }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19490,12 +22156,12 @@ func decodeTestResponseIntegerUint64Response(resp *http.Response) (res uint64, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response uint64 if err := func() error { v, err := d.UInt64() @@ -19503,12 +22169,17 @@ func decodeTestResponseIntegerUint64Response(resp *http.Response) (res uint64, e if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19528,12 +22199,12 @@ func decodeTestResponseIntegerUint64ArrayResponse(resp *http.Response) (res []ui } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []uint64 if err := func() error { response = make([]uint64, 0) @@ -19549,12 +22220,17 @@ func decodeTestResponseIntegerUint64ArrayResponse(resp *http.Response) (res []ui }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19574,12 +22250,12 @@ func decodeTestResponseIntegerUint64ArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]uint64 if err := func() error { response = make([][]uint64, 0) @@ -19603,12 +22279,17 @@ func decodeTestResponseIntegerUint64ArrayArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19628,23 +22309,28 @@ func decodeTestResponseIntegerUint64NullableResponse(resp *http.Response) (res N } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilUint64 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19664,12 +22350,12 @@ func decodeTestResponseIntegerUint64NullableArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilUint64 if err := func() error { response = make([]NilUint64, 0) @@ -19683,12 +22369,17 @@ func decodeTestResponseIntegerUint64NullableArrayResponse(resp *http.Response) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19708,12 +22399,12 @@ func decodeTestResponseIntegerUint64NullableArrayArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilUint64 if err := func() error { response = make([][]NilUint64, 0) @@ -19735,12 +22426,17 @@ func decodeTestResponseIntegerUint64NullableArrayArrayResponse(resp *http.Respon }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19760,12 +22456,12 @@ func decodeTestResponseIntegerUintArrayResponse(resp *http.Response) (res []uint } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []uint if err := func() error { response = make([]uint, 0) @@ -19781,12 +22477,17 @@ func decodeTestResponseIntegerUintArrayResponse(resp *http.Response) (res []uint }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19806,12 +22507,12 @@ func decodeTestResponseIntegerUintArrayArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]uint if err := func() error { response = make([][]uint, 0) @@ -19835,12 +22536,17 @@ func decodeTestResponseIntegerUintArrayArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19860,23 +22566,28 @@ func decodeTestResponseIntegerUintNullableResponse(resp *http.Response) (res Nil } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilUint if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19896,12 +22607,12 @@ func decodeTestResponseIntegerUintNullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilUint if err := func() error { response = make([]NilUint, 0) @@ -19915,12 +22626,17 @@ func decodeTestResponseIntegerUintNullableArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19940,12 +22656,12 @@ func decodeTestResponseIntegerUintNullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilUint if err := func() error { response = make([][]NilUint, 0) @@ -19967,12 +22683,17 @@ func decodeTestResponseIntegerUintNullableArrayArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -19992,12 +22713,12 @@ func decodeTestResponseIntegerUnixResponse(resp *http.Response) (res time.Time, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeUnixSeconds(d) @@ -20005,12 +22726,17 @@ func decodeTestResponseIntegerUnixResponse(resp *http.Response) (res time.Time, if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20030,12 +22756,12 @@ func decodeTestResponseIntegerUnixArrayResponse(resp *http.Response) (res []time } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -20051,12 +22777,17 @@ func decodeTestResponseIntegerUnixArrayResponse(resp *http.Response) (res []time }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20076,12 +22807,12 @@ func decodeTestResponseIntegerUnixArrayArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -20105,12 +22836,17 @@ func decodeTestResponseIntegerUnixArrayArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20130,12 +22866,12 @@ func decodeTestResponseIntegerUnixMicroResponse(resp *http.Response) (res time.T } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeUnixMicro(d) @@ -20143,12 +22879,17 @@ func decodeTestResponseIntegerUnixMicroResponse(resp *http.Response) (res time.T if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20168,12 +22909,12 @@ func decodeTestResponseIntegerUnixMicroArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -20189,12 +22930,17 @@ func decodeTestResponseIntegerUnixMicroArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20214,12 +22960,12 @@ func decodeTestResponseIntegerUnixMicroArrayArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -20243,12 +22989,17 @@ func decodeTestResponseIntegerUnixMicroArrayArrayResponse(resp *http.Response) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20268,23 +23019,28 @@ func decodeTestResponseIntegerUnixMicroNullableResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilUnixMicro if err := func() error { if err := response.Decode(d, json.DecodeUnixMicro); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20304,12 +23060,12 @@ func decodeTestResponseIntegerUnixMicroNullableArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilUnixMicro if err := func() error { response = make([]NilUnixMicro, 0) @@ -20323,12 +23079,17 @@ func decodeTestResponseIntegerUnixMicroNullableArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20348,12 +23109,12 @@ func decodeTestResponseIntegerUnixMicroNullableArrayArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilUnixMicro if err := func() error { response = make([][]NilUnixMicro, 0) @@ -20375,12 +23136,17 @@ func decodeTestResponseIntegerUnixMicroNullableArrayArrayResponse(resp *http.Res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20400,12 +23166,12 @@ func decodeTestResponseIntegerUnixMilliResponse(resp *http.Response) (res time.T } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeUnixMilli(d) @@ -20413,12 +23179,17 @@ func decodeTestResponseIntegerUnixMilliResponse(resp *http.Response) (res time.T if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20438,12 +23209,12 @@ func decodeTestResponseIntegerUnixMilliArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -20459,12 +23230,17 @@ func decodeTestResponseIntegerUnixMilliArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20484,12 +23260,12 @@ func decodeTestResponseIntegerUnixMilliArrayArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -20513,12 +23289,17 @@ func decodeTestResponseIntegerUnixMilliArrayArrayResponse(resp *http.Response) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20538,23 +23319,28 @@ func decodeTestResponseIntegerUnixMilliNullableResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilUnixMilli if err := func() error { if err := response.Decode(d, json.DecodeUnixMilli); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20574,12 +23360,12 @@ func decodeTestResponseIntegerUnixMilliNullableArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilUnixMilli if err := func() error { response = make([]NilUnixMilli, 0) @@ -20593,12 +23379,17 @@ func decodeTestResponseIntegerUnixMilliNullableArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20618,12 +23409,12 @@ func decodeTestResponseIntegerUnixMilliNullableArrayArrayResponse(resp *http.Res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilUnixMilli if err := func() error { response = make([][]NilUnixMilli, 0) @@ -20645,12 +23436,17 @@ func decodeTestResponseIntegerUnixMilliNullableArrayArrayResponse(resp *http.Res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20670,12 +23466,12 @@ func decodeTestResponseIntegerUnixNanoResponse(resp *http.Response) (res time.Ti } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeUnixNano(d) @@ -20683,12 +23479,17 @@ func decodeTestResponseIntegerUnixNanoResponse(resp *http.Response) (res time.Ti if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20708,12 +23509,12 @@ func decodeTestResponseIntegerUnixNanoArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -20729,12 +23530,17 @@ func decodeTestResponseIntegerUnixNanoArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20754,12 +23560,12 @@ func decodeTestResponseIntegerUnixNanoArrayArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -20783,12 +23589,17 @@ func decodeTestResponseIntegerUnixNanoArrayArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20808,23 +23619,28 @@ func decodeTestResponseIntegerUnixNanoNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilUnixNano if err := func() error { if err := response.Decode(d, json.DecodeUnixNano); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20844,12 +23660,12 @@ func decodeTestResponseIntegerUnixNanoNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilUnixNano if err := func() error { response = make([]NilUnixNano, 0) @@ -20863,12 +23679,17 @@ func decodeTestResponseIntegerUnixNanoNullableArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20888,12 +23709,12 @@ func decodeTestResponseIntegerUnixNanoNullableArrayArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilUnixNano if err := func() error { response = make([][]NilUnixNano, 0) @@ -20915,12 +23736,17 @@ func decodeTestResponseIntegerUnixNanoNullableArrayArrayResponse(resp *http.Resp }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20940,23 +23766,28 @@ func decodeTestResponseIntegerUnixNullableResponse(resp *http.Response) (res Nil } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilUnixSeconds if err := func() error { if err := response.Decode(d, json.DecodeUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -20976,12 +23807,12 @@ func decodeTestResponseIntegerUnixNullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilUnixSeconds if err := func() error { response = make([]NilUnixSeconds, 0) @@ -20995,12 +23826,17 @@ func decodeTestResponseIntegerUnixNullableArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21020,12 +23856,12 @@ func decodeTestResponseIntegerUnixNullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilUnixSeconds if err := func() error { response = make([][]NilUnixSeconds, 0) @@ -21047,12 +23883,17 @@ func decodeTestResponseIntegerUnixNullableArrayArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21072,12 +23913,12 @@ func decodeTestResponseIntegerUnixSecondsResponse(resp *http.Response) (res time } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeUnixSeconds(d) @@ -21085,12 +23926,17 @@ func decodeTestResponseIntegerUnixSecondsResponse(resp *http.Response) (res time if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21110,12 +23956,12 @@ func decodeTestResponseIntegerUnixSecondsArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -21131,12 +23977,17 @@ func decodeTestResponseIntegerUnixSecondsArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21156,12 +24007,12 @@ func decodeTestResponseIntegerUnixSecondsArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -21185,12 +24036,17 @@ func decodeTestResponseIntegerUnixSecondsArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21210,23 +24066,28 @@ func decodeTestResponseIntegerUnixSecondsNullableResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilUnixSeconds if err := func() error { if err := response.Decode(d, json.DecodeUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21246,12 +24107,12 @@ func decodeTestResponseIntegerUnixSecondsNullableArrayResponse(resp *http.Respon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilUnixSeconds if err := func() error { response = make([]NilUnixSeconds, 0) @@ -21265,12 +24126,17 @@ func decodeTestResponseIntegerUnixSecondsNullableArrayResponse(resp *http.Respon }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21290,12 +24156,12 @@ func decodeTestResponseIntegerUnixSecondsNullableArrayArrayResponse(resp *http.R } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilUnixSeconds if err := func() error { response = make([][]NilUnixSeconds, 0) @@ -21317,12 +24183,17 @@ func decodeTestResponseIntegerUnixSecondsNullableArrayArrayResponse(resp *http.R }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21342,23 +24213,28 @@ func decodeTestResponseNullResponse(resp *http.Response) (res struct{}, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response struct{} if err := func() error { if err := d.Null(); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21378,12 +24254,12 @@ func decodeTestResponseNullArrayResponse(resp *http.Response) (res []struct{}, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []struct{} if err := func() error { response = make([]struct{}, 0) @@ -21397,12 +24273,17 @@ func decodeTestResponseNullArrayResponse(resp *http.Response) (res []struct{}, e }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21422,12 +24303,12 @@ func decodeTestResponseNullArrayArrayResponse(resp *http.Response) (res [][]stru } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]struct{} if err := func() error { response = make([][]struct{}, 0) @@ -21449,12 +24330,17 @@ func decodeTestResponseNullArrayArrayResponse(resp *http.Response) (res [][]stru }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21474,23 +24360,28 @@ func decodeTestResponseNullNullableResponse(resp *http.Response) (res struct{}, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response struct{} if err := func() error { if err := d.Null(); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21510,12 +24401,12 @@ func decodeTestResponseNullNullableArrayResponse(resp *http.Response) (res []str } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []struct{} if err := func() error { response = make([]struct{}, 0) @@ -21529,12 +24420,17 @@ func decodeTestResponseNullNullableArrayResponse(resp *http.Response) (res []str }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21554,12 +24450,12 @@ func decodeTestResponseNullNullableArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]struct{} if err := func() error { response = make([][]struct{}, 0) @@ -21581,12 +24477,17 @@ func decodeTestResponseNullNullableArrayArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21606,12 +24507,12 @@ func decodeTestResponseNumberResponse(resp *http.Response) (res float64, err err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response float64 if err := func() error { v, err := d.Float64() @@ -21619,12 +24520,17 @@ func decodeTestResponseNumberResponse(resp *http.Response) (res float64, err err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21644,12 +24550,12 @@ func decodeTestResponseNumberArrayResponse(resp *http.Response) (res []float64, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []float64 if err := func() error { response = make([]float64, 0) @@ -21665,12 +24571,17 @@ func decodeTestResponseNumberArrayResponse(resp *http.Response) (res []float64, }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21690,12 +24601,12 @@ func decodeTestResponseNumberArrayArrayResponse(resp *http.Response) (res [][]fl } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]float64 if err := func() error { response = make([][]float64, 0) @@ -21719,12 +24630,17 @@ func decodeTestResponseNumberArrayArrayResponse(resp *http.Response) (res [][]fl }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21744,12 +24660,12 @@ func decodeTestResponseNumberDoubleResponse(resp *http.Response) (res float64, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response float64 if err := func() error { v, err := d.Float64() @@ -21757,12 +24673,17 @@ func decodeTestResponseNumberDoubleResponse(resp *http.Response) (res float64, e if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21782,12 +24703,12 @@ func decodeTestResponseNumberDoubleArrayResponse(resp *http.Response) (res []flo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []float64 if err := func() error { response = make([]float64, 0) @@ -21803,12 +24724,17 @@ func decodeTestResponseNumberDoubleArrayResponse(resp *http.Response) (res []flo }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21828,12 +24754,12 @@ func decodeTestResponseNumberDoubleArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]float64 if err := func() error { response = make([][]float64, 0) @@ -21857,12 +24783,17 @@ func decodeTestResponseNumberDoubleArrayArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21882,23 +24813,28 @@ func decodeTestResponseNumberDoubleNullableResponse(resp *http.Response) (res Ni } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilFloat64 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21918,12 +24854,12 @@ func decodeTestResponseNumberDoubleNullableArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilFloat64 if err := func() error { response = make([]NilFloat64, 0) @@ -21937,12 +24873,17 @@ func decodeTestResponseNumberDoubleNullableArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -21962,12 +24903,12 @@ func decodeTestResponseNumberDoubleNullableArrayArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilFloat64 if err := func() error { response = make([][]NilFloat64, 0) @@ -21989,12 +24930,17 @@ func decodeTestResponseNumberDoubleNullableArrayArrayResponse(resp *http.Respons }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22014,12 +24960,12 @@ func decodeTestResponseNumberFloatResponse(resp *http.Response) (res float32, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response float32 if err := func() error { v, err := d.Float32() @@ -22027,12 +24973,17 @@ func decodeTestResponseNumberFloatResponse(resp *http.Response) (res float32, er if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22052,12 +25003,12 @@ func decodeTestResponseNumberFloatArrayResponse(resp *http.Response) (res []floa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []float32 if err := func() error { response = make([]float32, 0) @@ -22073,12 +25024,17 @@ func decodeTestResponseNumberFloatArrayResponse(resp *http.Response) (res []floa }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22098,12 +25054,12 @@ func decodeTestResponseNumberFloatArrayArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]float32 if err := func() error { response = make([][]float32, 0) @@ -22127,12 +25083,17 @@ func decodeTestResponseNumberFloatArrayArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22152,23 +25113,28 @@ func decodeTestResponseNumberFloatNullableResponse(resp *http.Response) (res Nil } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilFloat32 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22188,12 +25154,12 @@ func decodeTestResponseNumberFloatNullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilFloat32 if err := func() error { response = make([]NilFloat32, 0) @@ -22207,12 +25173,17 @@ func decodeTestResponseNumberFloatNullableArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22232,12 +25203,12 @@ func decodeTestResponseNumberFloatNullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilFloat32 if err := func() error { response = make([][]NilFloat32, 0) @@ -22259,12 +25230,17 @@ func decodeTestResponseNumberFloatNullableArrayArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22284,12 +25260,12 @@ func decodeTestResponseNumberInt32Response(resp *http.Response) (res int32, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int32 if err := func() error { v, err := d.Int32() @@ -22297,12 +25273,17 @@ func decodeTestResponseNumberInt32Response(resp *http.Response) (res int32, err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22322,12 +25303,12 @@ func decodeTestResponseNumberInt32ArrayResponse(resp *http.Response) (res []int3 } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []int32 if err := func() error { response = make([]int32, 0) @@ -22343,12 +25324,17 @@ func decodeTestResponseNumberInt32ArrayResponse(resp *http.Response) (res []int3 }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22368,12 +25354,12 @@ func decodeTestResponseNumberInt32ArrayArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]int32 if err := func() error { response = make([][]int32, 0) @@ -22397,12 +25383,17 @@ func decodeTestResponseNumberInt32ArrayArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22422,23 +25413,28 @@ func decodeTestResponseNumberInt32NullableResponse(resp *http.Response) (res Nil } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilInt32 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22458,12 +25454,12 @@ func decodeTestResponseNumberInt32NullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilInt32 if err := func() error { response = make([]NilInt32, 0) @@ -22477,12 +25473,17 @@ func decodeTestResponseNumberInt32NullableArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22502,12 +25503,12 @@ func decodeTestResponseNumberInt32NullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilInt32 if err := func() error { response = make([][]NilInt32, 0) @@ -22529,12 +25530,17 @@ func decodeTestResponseNumberInt32NullableArrayArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22554,12 +25560,12 @@ func decodeTestResponseNumberInt64Response(resp *http.Response) (res int64, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int64 if err := func() error { v, err := d.Int64() @@ -22567,12 +25573,17 @@ func decodeTestResponseNumberInt64Response(resp *http.Response) (res int64, err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22592,12 +25603,12 @@ func decodeTestResponseNumberInt64ArrayResponse(resp *http.Response) (res []int6 } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []int64 if err := func() error { response = make([]int64, 0) @@ -22613,12 +25624,17 @@ func decodeTestResponseNumberInt64ArrayResponse(resp *http.Response) (res []int6 }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22638,12 +25654,12 @@ func decodeTestResponseNumberInt64ArrayArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]int64 if err := func() error { response = make([][]int64, 0) @@ -22667,12 +25683,17 @@ func decodeTestResponseNumberInt64ArrayArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22692,23 +25713,28 @@ func decodeTestResponseNumberInt64NullableResponse(resp *http.Response) (res Nil } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilInt64 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22728,12 +25754,12 @@ func decodeTestResponseNumberInt64NullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilInt64 if err := func() error { response = make([]NilInt64, 0) @@ -22747,12 +25773,17 @@ func decodeTestResponseNumberInt64NullableArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22772,12 +25803,12 @@ func decodeTestResponseNumberInt64NullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilInt64 if err := func() error { response = make([][]NilInt64, 0) @@ -22799,12 +25830,17 @@ func decodeTestResponseNumberInt64NullableArrayArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22824,23 +25860,28 @@ func decodeTestResponseNumberNullableResponse(resp *http.Response) (res NilFloat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilFloat64 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22860,12 +25901,12 @@ func decodeTestResponseNumberNullableArrayResponse(resp *http.Response) (res []N } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilFloat64 if err := func() error { response = make([]NilFloat64, 0) @@ -22879,12 +25920,17 @@ func decodeTestResponseNumberNullableArrayResponse(resp *http.Response) (res []N }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22904,12 +25950,12 @@ func decodeTestResponseNumberNullableArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilFloat64 if err := func() error { response = make([][]NilFloat64, 0) @@ -22931,12 +25977,17 @@ func decodeTestResponseNumberNullableArrayArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22956,12 +26007,12 @@ func decodeTestResponseStringResponse(resp *http.Response) (res string, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -22969,12 +26020,17 @@ func decodeTestResponseStringResponse(resp *http.Response) (res string, err erro if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -22994,12 +26050,12 @@ func decodeTestResponseStringArrayResponse(resp *http.Response) (res []string, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []string if err := func() error { response = make([]string, 0) @@ -23015,12 +26071,17 @@ func decodeTestResponseStringArrayResponse(resp *http.Response) (res []string, e }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23040,12 +26101,12 @@ func decodeTestResponseStringArrayArrayResponse(resp *http.Response) (res [][]st } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]string if err := func() error { response = make([][]string, 0) @@ -23069,12 +26130,17 @@ func decodeTestResponseStringArrayArrayResponse(resp *http.Response) (res [][]st }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23094,12 +26160,12 @@ func decodeTestResponseStringBase64Response(resp *http.Response) (res []byte, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []byte if err := func() error { v, err := d.Base64() @@ -23107,12 +26173,17 @@ func decodeTestResponseStringBase64Response(resp *http.Response) (res []byte, er if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23132,12 +26203,12 @@ func decodeTestResponseStringBase64ArrayResponse(resp *http.Response) (res [][]b } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]byte if err := func() error { response = make([][]byte, 0) @@ -23153,12 +26224,17 @@ func decodeTestResponseStringBase64ArrayResponse(resp *http.Response) (res [][]b }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23178,12 +26254,12 @@ func decodeTestResponseStringBase64ArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][][]byte if err := func() error { response = make([][][]byte, 0) @@ -23207,12 +26283,17 @@ func decodeTestResponseStringBase64ArrayArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23232,12 +26313,12 @@ func decodeTestResponseStringBase64NullableResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []byte if err := func() error { v, err := d.Base64() @@ -23245,12 +26326,17 @@ func decodeTestResponseStringBase64NullableResponse(resp *http.Response) (res [] if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23270,12 +26356,12 @@ func decodeTestResponseStringBase64NullableArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]byte if err := func() error { response = make([][]byte, 0) @@ -23291,12 +26377,17 @@ func decodeTestResponseStringBase64NullableArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23316,12 +26407,12 @@ func decodeTestResponseStringBase64NullableArrayArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][][]byte if err := func() error { response = make([][][]byte, 0) @@ -23345,12 +26436,17 @@ func decodeTestResponseStringBase64NullableArrayArrayResponse(resp *http.Respons }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23370,12 +26466,12 @@ func decodeTestResponseStringBinaryResponse(resp *http.Response) (res string, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -23383,12 +26479,17 @@ func decodeTestResponseStringBinaryResponse(resp *http.Response) (res string, er if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23408,12 +26509,12 @@ func decodeTestResponseStringBinaryArrayResponse(resp *http.Response) (res []str } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []string if err := func() error { response = make([]string, 0) @@ -23429,12 +26530,17 @@ func decodeTestResponseStringBinaryArrayResponse(resp *http.Response) (res []str }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23454,12 +26560,12 @@ func decodeTestResponseStringBinaryArrayArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]string if err := func() error { response = make([][]string, 0) @@ -23483,12 +26589,17 @@ func decodeTestResponseStringBinaryArrayArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23508,23 +26619,28 @@ func decodeTestResponseStringBinaryNullableResponse(resp *http.Response) (res Ni } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilString if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23544,12 +26660,12 @@ func decodeTestResponseStringBinaryNullableArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilString if err := func() error { response = make([]NilString, 0) @@ -23563,12 +26679,17 @@ func decodeTestResponseStringBinaryNullableArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23588,12 +26709,12 @@ func decodeTestResponseStringBinaryNullableArrayArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilString if err := func() error { response = make([][]NilString, 0) @@ -23615,12 +26736,17 @@ func decodeTestResponseStringBinaryNullableArrayArrayResponse(resp *http.Respons }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23640,12 +26766,12 @@ func decodeTestResponseStringByteResponse(resp *http.Response) (res []byte, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []byte if err := func() error { v, err := d.Base64() @@ -23653,12 +26779,17 @@ func decodeTestResponseStringByteResponse(resp *http.Response) (res []byte, err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23678,12 +26809,12 @@ func decodeTestResponseStringByteArrayResponse(resp *http.Response) (res [][]byt } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]byte if err := func() error { response = make([][]byte, 0) @@ -23699,12 +26830,17 @@ func decodeTestResponseStringByteArrayResponse(resp *http.Response) (res [][]byt }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23724,12 +26860,12 @@ func decodeTestResponseStringByteArrayArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][][]byte if err := func() error { response = make([][][]byte, 0) @@ -23753,12 +26889,17 @@ func decodeTestResponseStringByteArrayArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23778,12 +26919,12 @@ func decodeTestResponseStringByteNullableResponse(resp *http.Response) (res []by } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []byte if err := func() error { v, err := d.Base64() @@ -23791,12 +26932,17 @@ func decodeTestResponseStringByteNullableResponse(resp *http.Response) (res []by if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23816,12 +26962,12 @@ func decodeTestResponseStringByteNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]byte if err := func() error { response = make([][]byte, 0) @@ -23837,12 +26983,17 @@ func decodeTestResponseStringByteNullableArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23862,12 +27013,12 @@ func decodeTestResponseStringByteNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][][]byte if err := func() error { response = make([][][]byte, 0) @@ -23891,12 +27042,17 @@ func decodeTestResponseStringByteNullableArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23916,12 +27072,12 @@ func decodeTestResponseStringDateResponse(resp *http.Response) (res time.Time, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeDate(d) @@ -23929,12 +27085,17 @@ func decodeTestResponseStringDateResponse(resp *http.Response) (res time.Time, e if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -23954,12 +27115,12 @@ func decodeTestResponseStringDateArrayResponse(resp *http.Response) (res []time. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -23975,12 +27136,17 @@ func decodeTestResponseStringDateArrayResponse(resp *http.Response) (res []time. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24000,12 +27166,12 @@ func decodeTestResponseStringDateArrayArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -24029,12 +27195,17 @@ func decodeTestResponseStringDateArrayArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24054,23 +27225,28 @@ func decodeTestResponseStringDateNullableResponse(resp *http.Response) (res NilD } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilDate if err := func() error { if err := response.Decode(d, json.DecodeDate); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24090,12 +27266,12 @@ func decodeTestResponseStringDateNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilDate if err := func() error { response = make([]NilDate, 0) @@ -24109,12 +27285,17 @@ func decodeTestResponseStringDateNullableArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24134,12 +27315,12 @@ func decodeTestResponseStringDateNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilDate if err := func() error { response = make([][]NilDate, 0) @@ -24161,12 +27342,17 @@ func decodeTestResponseStringDateNullableArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24186,12 +27372,12 @@ func decodeTestResponseStringDateTimeResponse(resp *http.Response) (res time.Tim } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeDateTime(d) @@ -24199,12 +27385,17 @@ func decodeTestResponseStringDateTimeResponse(resp *http.Response) (res time.Tim if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24224,12 +27415,12 @@ func decodeTestResponseStringDateTimeArrayResponse(resp *http.Response) (res []t } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -24245,12 +27436,17 @@ func decodeTestResponseStringDateTimeArrayResponse(resp *http.Response) (res []t }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24270,12 +27466,12 @@ func decodeTestResponseStringDateTimeArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -24299,12 +27495,17 @@ func decodeTestResponseStringDateTimeArrayArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24324,23 +27525,28 @@ func decodeTestResponseStringDateTimeNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilDateTime if err := func() error { if err := response.Decode(d, json.DecodeDateTime); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24360,12 +27566,12 @@ func decodeTestResponseStringDateTimeNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilDateTime if err := func() error { response = make([]NilDateTime, 0) @@ -24379,12 +27585,17 @@ func decodeTestResponseStringDateTimeNullableArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24404,12 +27615,12 @@ func decodeTestResponseStringDateTimeNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilDateTime if err := func() error { response = make([][]NilDateTime, 0) @@ -24431,12 +27642,17 @@ func decodeTestResponseStringDateTimeNullableArrayArrayResponse(resp *http.Respo }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24456,12 +27672,12 @@ func decodeTestResponseStringDurationResponse(resp *http.Response) (res time.Dur } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Duration if err := func() error { v, err := json.DecodeDuration(d) @@ -24469,12 +27685,17 @@ func decodeTestResponseStringDurationResponse(resp *http.Response) (res time.Dur if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24494,12 +27715,12 @@ func decodeTestResponseStringDurationArrayResponse(resp *http.Response) (res []t } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Duration if err := func() error { response = make([]time.Duration, 0) @@ -24515,12 +27736,17 @@ func decodeTestResponseStringDurationArrayResponse(resp *http.Response) (res []t }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24540,12 +27766,12 @@ func decodeTestResponseStringDurationArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Duration if err := func() error { response = make([][]time.Duration, 0) @@ -24569,12 +27795,17 @@ func decodeTestResponseStringDurationArrayArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24594,23 +27825,28 @@ func decodeTestResponseStringDurationNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilDuration if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24630,12 +27866,12 @@ func decodeTestResponseStringDurationNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilDuration if err := func() error { response = make([]NilDuration, 0) @@ -24649,12 +27885,17 @@ func decodeTestResponseStringDurationNullableArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24674,12 +27915,12 @@ func decodeTestResponseStringDurationNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilDuration if err := func() error { response = make([][]NilDuration, 0) @@ -24701,12 +27942,17 @@ func decodeTestResponseStringDurationNullableArrayArrayResponse(resp *http.Respo }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24726,12 +27972,12 @@ func decodeTestResponseStringEmailResponse(resp *http.Response) (res string, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -24739,12 +27985,17 @@ func decodeTestResponseStringEmailResponse(resp *http.Response) (res string, err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24764,12 +28015,12 @@ func decodeTestResponseStringEmailArrayResponse(resp *http.Response) (res []stri } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []string if err := func() error { response = make([]string, 0) @@ -24785,12 +28036,17 @@ func decodeTestResponseStringEmailArrayResponse(resp *http.Response) (res []stri }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24810,12 +28066,12 @@ func decodeTestResponseStringEmailArrayArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]string if err := func() error { response = make([][]string, 0) @@ -24839,12 +28095,17 @@ func decodeTestResponseStringEmailArrayArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24864,23 +28125,28 @@ func decodeTestResponseStringEmailNullableResponse(resp *http.Response) (res Nil } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilString if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24900,12 +28166,12 @@ func decodeTestResponseStringEmailNullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilString if err := func() error { response = make([]NilString, 0) @@ -24919,12 +28185,17 @@ func decodeTestResponseStringEmailNullableArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24944,12 +28215,12 @@ func decodeTestResponseStringEmailNullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilString if err := func() error { response = make([][]NilString, 0) @@ -24971,12 +28242,17 @@ func decodeTestResponseStringEmailNullableArrayArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -24996,12 +28272,12 @@ func decodeTestResponseStringHostnameResponse(resp *http.Response) (res string, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -25009,12 +28285,17 @@ func decodeTestResponseStringHostnameResponse(resp *http.Response) (res string, if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25034,12 +28315,12 @@ func decodeTestResponseStringHostnameArrayResponse(resp *http.Response) (res []s } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []string if err := func() error { response = make([]string, 0) @@ -25055,12 +28336,17 @@ func decodeTestResponseStringHostnameArrayResponse(resp *http.Response) (res []s }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25080,12 +28366,12 @@ func decodeTestResponseStringHostnameArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]string if err := func() error { response = make([][]string, 0) @@ -25109,12 +28395,17 @@ func decodeTestResponseStringHostnameArrayArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25134,23 +28425,28 @@ func decodeTestResponseStringHostnameNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilString if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25170,12 +28466,12 @@ func decodeTestResponseStringHostnameNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilString if err := func() error { response = make([]NilString, 0) @@ -25189,12 +28485,17 @@ func decodeTestResponseStringHostnameNullableArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25214,12 +28515,12 @@ func decodeTestResponseStringHostnameNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilString if err := func() error { response = make([][]NilString, 0) @@ -25241,12 +28542,17 @@ func decodeTestResponseStringHostnameNullableArrayArrayResponse(resp *http.Respo }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25266,12 +28572,12 @@ func decodeTestResponseStringIPResponse(resp *http.Response) (res netip.Addr, er } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response netip.Addr if err := func() error { v, err := json.DecodeIP(d) @@ -25279,12 +28585,17 @@ func decodeTestResponseStringIPResponse(resp *http.Response) (res netip.Addr, er if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25304,12 +28615,12 @@ func decodeTestResponseStringIPArrayResponse(resp *http.Response) (res []netip.A } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []netip.Addr if err := func() error { response = make([]netip.Addr, 0) @@ -25325,12 +28636,17 @@ func decodeTestResponseStringIPArrayResponse(resp *http.Response) (res []netip.A }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25350,12 +28666,12 @@ func decodeTestResponseStringIPArrayArrayResponse(resp *http.Response) (res [][] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]netip.Addr if err := func() error { response = make([][]netip.Addr, 0) @@ -25379,12 +28695,17 @@ func decodeTestResponseStringIPArrayArrayResponse(resp *http.Response) (res [][] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25404,23 +28725,28 @@ func decodeTestResponseStringIPNullableResponse(resp *http.Response) (res NilIP, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilIP if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25440,12 +28766,12 @@ func decodeTestResponseStringIPNullableArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilIP if err := func() error { response = make([]NilIP, 0) @@ -25459,12 +28785,17 @@ func decodeTestResponseStringIPNullableArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25484,12 +28815,12 @@ func decodeTestResponseStringIPNullableArrayArrayResponse(resp *http.Response) ( } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilIP if err := func() error { response = make([][]NilIP, 0) @@ -25511,12 +28842,17 @@ func decodeTestResponseStringIPNullableArrayArrayResponse(resp *http.Response) ( }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25536,12 +28872,12 @@ func decodeTestResponseStringInt32Response(resp *http.Response) (res int32, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int32 if err := func() error { v, err := json.DecodeStringInt32(d) @@ -25549,12 +28885,17 @@ func decodeTestResponseStringInt32Response(resp *http.Response) (res int32, err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25574,12 +28915,12 @@ func decodeTestResponseStringInt32ArrayResponse(resp *http.Response) (res []int3 } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []int32 if err := func() error { response = make([]int32, 0) @@ -25595,12 +28936,17 @@ func decodeTestResponseStringInt32ArrayResponse(resp *http.Response) (res []int3 }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25620,12 +28966,12 @@ func decodeTestResponseStringInt32ArrayArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]int32 if err := func() error { response = make([][]int32, 0) @@ -25649,12 +28995,17 @@ func decodeTestResponseStringInt32ArrayArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25674,23 +29025,28 @@ func decodeTestResponseStringInt32NullableResponse(resp *http.Response) (res Nil } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilStringInt32 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25710,12 +29066,12 @@ func decodeTestResponseStringInt32NullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilStringInt32 if err := func() error { response = make([]NilStringInt32, 0) @@ -25729,12 +29085,17 @@ func decodeTestResponseStringInt32NullableArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25754,12 +29115,12 @@ func decodeTestResponseStringInt32NullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilStringInt32 if err := func() error { response = make([][]NilStringInt32, 0) @@ -25781,12 +29142,17 @@ func decodeTestResponseStringInt32NullableArrayArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25806,12 +29172,12 @@ func decodeTestResponseStringInt64Response(resp *http.Response) (res int64, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int64 if err := func() error { v, err := json.DecodeStringInt64(d) @@ -25819,12 +29185,17 @@ func decodeTestResponseStringInt64Response(resp *http.Response) (res int64, err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25844,12 +29215,12 @@ func decodeTestResponseStringInt64ArrayResponse(resp *http.Response) (res []int6 } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []int64 if err := func() error { response = make([]int64, 0) @@ -25865,12 +29236,17 @@ func decodeTestResponseStringInt64ArrayResponse(resp *http.Response) (res []int6 }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25890,12 +29266,12 @@ func decodeTestResponseStringInt64ArrayArrayResponse(resp *http.Response) (res [ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]int64 if err := func() error { response = make([][]int64, 0) @@ -25919,12 +29295,17 @@ func decodeTestResponseStringInt64ArrayArrayResponse(resp *http.Response) (res [ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25944,23 +29325,28 @@ func decodeTestResponseStringInt64NullableResponse(resp *http.Response) (res Nil } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilStringInt64 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -25980,12 +29366,12 @@ func decodeTestResponseStringInt64NullableArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilStringInt64 if err := func() error { response = make([]NilStringInt64, 0) @@ -25999,12 +29385,17 @@ func decodeTestResponseStringInt64NullableArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26024,12 +29415,12 @@ func decodeTestResponseStringInt64NullableArrayArrayResponse(resp *http.Response } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilStringInt64 if err := func() error { response = make([][]NilStringInt64, 0) @@ -26051,12 +29442,17 @@ func decodeTestResponseStringInt64NullableArrayArrayResponse(resp *http.Response }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26076,12 +29472,12 @@ func decodeTestResponseStringIpv4Response(resp *http.Response) (res netip.Addr, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response netip.Addr if err := func() error { v, err := json.DecodeIPv4(d) @@ -26089,12 +29485,17 @@ func decodeTestResponseStringIpv4Response(resp *http.Response) (res netip.Addr, if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26114,12 +29515,12 @@ func decodeTestResponseStringIpv4ArrayResponse(resp *http.Response) (res []netip } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []netip.Addr if err := func() error { response = make([]netip.Addr, 0) @@ -26135,12 +29536,17 @@ func decodeTestResponseStringIpv4ArrayResponse(resp *http.Response) (res []netip }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26160,12 +29566,12 @@ func decodeTestResponseStringIpv4ArrayArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]netip.Addr if err := func() error { response = make([][]netip.Addr, 0) @@ -26189,12 +29595,17 @@ func decodeTestResponseStringIpv4ArrayArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26214,23 +29625,28 @@ func decodeTestResponseStringIpv4NullableResponse(resp *http.Response) (res NilI } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilIPv4 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26250,12 +29666,12 @@ func decodeTestResponseStringIpv4NullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilIPv4 if err := func() error { response = make([]NilIPv4, 0) @@ -26269,12 +29685,17 @@ func decodeTestResponseStringIpv4NullableArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26294,12 +29715,12 @@ func decodeTestResponseStringIpv4NullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilIPv4 if err := func() error { response = make([][]NilIPv4, 0) @@ -26321,12 +29742,17 @@ func decodeTestResponseStringIpv4NullableArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26346,12 +29772,12 @@ func decodeTestResponseStringIpv6Response(resp *http.Response) (res netip.Addr, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response netip.Addr if err := func() error { v, err := json.DecodeIPv6(d) @@ -26359,12 +29785,17 @@ func decodeTestResponseStringIpv6Response(resp *http.Response) (res netip.Addr, if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26384,12 +29815,12 @@ func decodeTestResponseStringIpv6ArrayResponse(resp *http.Response) (res []netip } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []netip.Addr if err := func() error { response = make([]netip.Addr, 0) @@ -26405,12 +29836,17 @@ func decodeTestResponseStringIpv6ArrayResponse(resp *http.Response) (res []netip }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26430,12 +29866,12 @@ func decodeTestResponseStringIpv6ArrayArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]netip.Addr if err := func() error { response = make([][]netip.Addr, 0) @@ -26459,12 +29895,17 @@ func decodeTestResponseStringIpv6ArrayArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26484,23 +29925,28 @@ func decodeTestResponseStringIpv6NullableResponse(resp *http.Response) (res NilI } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilIPv6 if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26520,12 +29966,12 @@ func decodeTestResponseStringIpv6NullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilIPv6 if err := func() error { response = make([]NilIPv6, 0) @@ -26539,12 +29985,17 @@ func decodeTestResponseStringIpv6NullableArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26564,12 +30015,12 @@ func decodeTestResponseStringIpv6NullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilIPv6 if err := func() error { response = make([][]NilIPv6, 0) @@ -26591,12 +30042,17 @@ func decodeTestResponseStringIpv6NullableArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26616,23 +30072,28 @@ func decodeTestResponseStringNullableResponse(resp *http.Response) (res NilStrin } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilString if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26652,12 +30113,12 @@ func decodeTestResponseStringNullableArrayResponse(resp *http.Response) (res []N } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilString if err := func() error { response = make([]NilString, 0) @@ -26671,12 +30132,17 @@ func decodeTestResponseStringNullableArrayResponse(resp *http.Response) (res []N }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26696,12 +30162,12 @@ func decodeTestResponseStringNullableArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilString if err := func() error { response = make([][]NilString, 0) @@ -26723,12 +30189,17 @@ func decodeTestResponseStringNullableArrayArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26748,12 +30219,12 @@ func decodeTestResponseStringPasswordResponse(resp *http.Response) (res string, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -26761,12 +30232,17 @@ func decodeTestResponseStringPasswordResponse(resp *http.Response) (res string, if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26786,12 +30262,12 @@ func decodeTestResponseStringPasswordArrayResponse(resp *http.Response) (res []s } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []string if err := func() error { response = make([]string, 0) @@ -26807,12 +30283,17 @@ func decodeTestResponseStringPasswordArrayResponse(resp *http.Response) (res []s }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26832,12 +30313,12 @@ func decodeTestResponseStringPasswordArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]string if err := func() error { response = make([][]string, 0) @@ -26861,12 +30342,17 @@ func decodeTestResponseStringPasswordArrayArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26886,23 +30372,28 @@ func decodeTestResponseStringPasswordNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilString if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26922,12 +30413,12 @@ func decodeTestResponseStringPasswordNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilString if err := func() error { response = make([]NilString, 0) @@ -26941,12 +30432,17 @@ func decodeTestResponseStringPasswordNullableArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -26966,12 +30462,12 @@ func decodeTestResponseStringPasswordNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilString if err := func() error { response = make([][]NilString, 0) @@ -26993,12 +30489,17 @@ func decodeTestResponseStringPasswordNullableArrayArrayResponse(resp *http.Respo }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27018,12 +30519,12 @@ func decodeTestResponseStringTimeResponse(resp *http.Response) (res time.Time, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeTime(d) @@ -27031,12 +30532,17 @@ func decodeTestResponseStringTimeResponse(resp *http.Response) (res time.Time, e if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27056,12 +30562,12 @@ func decodeTestResponseStringTimeArrayResponse(resp *http.Response) (res []time. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -27077,12 +30583,17 @@ func decodeTestResponseStringTimeArrayResponse(resp *http.Response) (res []time. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27102,12 +30613,12 @@ func decodeTestResponseStringTimeArrayArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -27131,12 +30642,17 @@ func decodeTestResponseStringTimeArrayArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27156,23 +30672,28 @@ func decodeTestResponseStringTimeNullableResponse(resp *http.Response) (res NilT } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilTime if err := func() error { if err := response.Decode(d, json.DecodeTime); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27192,12 +30713,12 @@ func decodeTestResponseStringTimeNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilTime if err := func() error { response = make([]NilTime, 0) @@ -27211,12 +30732,17 @@ func decodeTestResponseStringTimeNullableArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27236,12 +30762,12 @@ func decodeTestResponseStringTimeNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilTime if err := func() error { response = make([][]NilTime, 0) @@ -27263,12 +30789,17 @@ func decodeTestResponseStringTimeNullableArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27288,12 +30819,12 @@ func decodeTestResponseStringURIResponse(resp *http.Response) (res url.URL, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response url.URL if err := func() error { v, err := json.DecodeURI(d) @@ -27301,12 +30832,17 @@ func decodeTestResponseStringURIResponse(resp *http.Response) (res url.URL, err if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27326,12 +30862,12 @@ func decodeTestResponseStringURIArrayResponse(resp *http.Response) (res []url.UR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []url.URL if err := func() error { response = make([]url.URL, 0) @@ -27347,12 +30883,17 @@ func decodeTestResponseStringURIArrayResponse(resp *http.Response) (res []url.UR }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27372,12 +30913,12 @@ func decodeTestResponseStringURIArrayArrayResponse(resp *http.Response) (res [][ } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]url.URL if err := func() error { response = make([][]url.URL, 0) @@ -27401,12 +30942,17 @@ func decodeTestResponseStringURIArrayArrayResponse(resp *http.Response) (res [][ }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27426,23 +30972,28 @@ func decodeTestResponseStringURINullableResponse(resp *http.Response) (res NilUR } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilURI if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27462,12 +31013,12 @@ func decodeTestResponseStringURINullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilURI if err := func() error { response = make([]NilURI, 0) @@ -27481,12 +31032,17 @@ func decodeTestResponseStringURINullableArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27506,12 +31062,12 @@ func decodeTestResponseStringURINullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilURI if err := func() error { response = make([][]NilURI, 0) @@ -27533,12 +31089,17 @@ func decodeTestResponseStringURINullableArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27558,12 +31119,12 @@ func decodeTestResponseStringUUIDResponse(resp *http.Response) (res uuid.UUID, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response uuid.UUID if err := func() error { v, err := json.DecodeUUID(d) @@ -27571,12 +31132,17 @@ func decodeTestResponseStringUUIDResponse(resp *http.Response) (res uuid.UUID, e if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27596,12 +31162,12 @@ func decodeTestResponseStringUUIDArrayResponse(resp *http.Response) (res []uuid. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []uuid.UUID if err := func() error { response = make([]uuid.UUID, 0) @@ -27617,12 +31183,17 @@ func decodeTestResponseStringUUIDArrayResponse(resp *http.Response) (res []uuid. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27642,12 +31213,12 @@ func decodeTestResponseStringUUIDArrayArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]uuid.UUID if err := func() error { response = make([][]uuid.UUID, 0) @@ -27671,12 +31242,17 @@ func decodeTestResponseStringUUIDArrayArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27696,23 +31272,28 @@ func decodeTestResponseStringUUIDNullableResponse(resp *http.Response) (res NilU } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilUUID if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27732,12 +31313,12 @@ func decodeTestResponseStringUUIDNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilUUID if err := func() error { response = make([]NilUUID, 0) @@ -27751,12 +31332,17 @@ func decodeTestResponseStringUUIDNullableArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27776,12 +31362,12 @@ func decodeTestResponseStringUUIDNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilUUID if err := func() error { response = make([][]NilUUID, 0) @@ -27803,12 +31389,17 @@ func decodeTestResponseStringUUIDNullableArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27828,12 +31419,12 @@ func decodeTestResponseStringUnixResponse(resp *http.Response) (res time.Time, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeStringUnixSeconds(d) @@ -27841,12 +31432,17 @@ func decodeTestResponseStringUnixResponse(resp *http.Response) (res time.Time, e if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27866,12 +31462,12 @@ func decodeTestResponseStringUnixArrayResponse(resp *http.Response) (res []time. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -27887,12 +31483,17 @@ func decodeTestResponseStringUnixArrayResponse(resp *http.Response) (res []time. }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27912,12 +31513,12 @@ func decodeTestResponseStringUnixArrayArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -27941,12 +31542,17 @@ func decodeTestResponseStringUnixArrayArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -27966,12 +31572,12 @@ func decodeTestResponseStringUnixMicroResponse(resp *http.Response) (res time.Ti } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeStringUnixMicro(d) @@ -27979,12 +31585,17 @@ func decodeTestResponseStringUnixMicroResponse(resp *http.Response) (res time.Ti if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28004,12 +31615,12 @@ func decodeTestResponseStringUnixMicroArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -28025,12 +31636,17 @@ func decodeTestResponseStringUnixMicroArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28050,12 +31666,12 @@ func decodeTestResponseStringUnixMicroArrayArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -28079,12 +31695,17 @@ func decodeTestResponseStringUnixMicroArrayArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28104,23 +31725,28 @@ func decodeTestResponseStringUnixMicroNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilStringUnixMicro if err := func() error { if err := response.Decode(d, json.DecodeStringUnixMicro); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28140,12 +31766,12 @@ func decodeTestResponseStringUnixMicroNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilStringUnixMicro if err := func() error { response = make([]NilStringUnixMicro, 0) @@ -28159,12 +31785,17 @@ func decodeTestResponseStringUnixMicroNullableArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28184,12 +31815,12 @@ func decodeTestResponseStringUnixMicroNullableArrayArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilStringUnixMicro if err := func() error { response = make([][]NilStringUnixMicro, 0) @@ -28211,12 +31842,17 @@ func decodeTestResponseStringUnixMicroNullableArrayArrayResponse(resp *http.Resp }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28236,12 +31872,12 @@ func decodeTestResponseStringUnixMilliResponse(resp *http.Response) (res time.Ti } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeStringUnixMilli(d) @@ -28249,12 +31885,17 @@ func decodeTestResponseStringUnixMilliResponse(resp *http.Response) (res time.Ti if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28274,12 +31915,12 @@ func decodeTestResponseStringUnixMilliArrayResponse(resp *http.Response) (res [] } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -28295,12 +31936,17 @@ func decodeTestResponseStringUnixMilliArrayResponse(resp *http.Response) (res [] }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28320,12 +31966,12 @@ func decodeTestResponseStringUnixMilliArrayArrayResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -28349,12 +31995,17 @@ func decodeTestResponseStringUnixMilliArrayArrayResponse(resp *http.Response) (r }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28374,23 +32025,28 @@ func decodeTestResponseStringUnixMilliNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilStringUnixMilli if err := func() error { if err := response.Decode(d, json.DecodeStringUnixMilli); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28410,12 +32066,12 @@ func decodeTestResponseStringUnixMilliNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilStringUnixMilli if err := func() error { response = make([]NilStringUnixMilli, 0) @@ -28429,12 +32085,17 @@ func decodeTestResponseStringUnixMilliNullableArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28454,12 +32115,12 @@ func decodeTestResponseStringUnixMilliNullableArrayArrayResponse(resp *http.Resp } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilStringUnixMilli if err := func() error { response = make([][]NilStringUnixMilli, 0) @@ -28481,12 +32142,17 @@ func decodeTestResponseStringUnixMilliNullableArrayArrayResponse(resp *http.Resp }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28506,12 +32172,12 @@ func decodeTestResponseStringUnixNanoResponse(resp *http.Response) (res time.Tim } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeStringUnixNano(d) @@ -28519,12 +32185,17 @@ func decodeTestResponseStringUnixNanoResponse(resp *http.Response) (res time.Tim if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28544,12 +32215,12 @@ func decodeTestResponseStringUnixNanoArrayResponse(resp *http.Response) (res []t } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -28565,12 +32236,17 @@ func decodeTestResponseStringUnixNanoArrayResponse(resp *http.Response) (res []t }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28590,12 +32266,12 @@ func decodeTestResponseStringUnixNanoArrayArrayResponse(resp *http.Response) (re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -28619,12 +32295,17 @@ func decodeTestResponseStringUnixNanoArrayArrayResponse(resp *http.Response) (re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28644,23 +32325,28 @@ func decodeTestResponseStringUnixNanoNullableResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilStringUnixNano if err := func() error { if err := response.Decode(d, json.DecodeStringUnixNano); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28680,12 +32366,12 @@ func decodeTestResponseStringUnixNanoNullableArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilStringUnixNano if err := func() error { response = make([]NilStringUnixNano, 0) @@ -28699,12 +32385,17 @@ func decodeTestResponseStringUnixNanoNullableArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28724,12 +32415,12 @@ func decodeTestResponseStringUnixNanoNullableArrayArrayResponse(resp *http.Respo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilStringUnixNano if err := func() error { response = make([][]NilStringUnixNano, 0) @@ -28751,12 +32442,17 @@ func decodeTestResponseStringUnixNanoNullableArrayArrayResponse(resp *http.Respo }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28776,23 +32472,28 @@ func decodeTestResponseStringUnixNullableResponse(resp *http.Response) (res NilS } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilStringUnixSeconds if err := func() error { if err := response.Decode(d, json.DecodeStringUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28812,12 +32513,12 @@ func decodeTestResponseStringUnixNullableArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilStringUnixSeconds if err := func() error { response = make([]NilStringUnixSeconds, 0) @@ -28831,12 +32532,17 @@ func decodeTestResponseStringUnixNullableArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28856,12 +32562,12 @@ func decodeTestResponseStringUnixNullableArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilStringUnixSeconds if err := func() error { response = make([][]NilStringUnixSeconds, 0) @@ -28883,12 +32589,17 @@ func decodeTestResponseStringUnixNullableArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28908,12 +32619,12 @@ func decodeTestResponseStringUnixSecondsResponse(resp *http.Response) (res time. } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response time.Time if err := func() error { v, err := json.DecodeStringUnixSeconds(d) @@ -28921,12 +32632,17 @@ func decodeTestResponseStringUnixSecondsResponse(resp *http.Response) (res time. if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28946,12 +32662,12 @@ func decodeTestResponseStringUnixSecondsArrayResponse(resp *http.Response) (res } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []time.Time if err := func() error { response = make([]time.Time, 0) @@ -28967,12 +32683,17 @@ func decodeTestResponseStringUnixSecondsArrayResponse(resp *http.Response) (res }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -28992,12 +32713,12 @@ func decodeTestResponseStringUnixSecondsArrayArrayResponse(resp *http.Response) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]time.Time if err := func() error { response = make([][]time.Time, 0) @@ -29021,12 +32742,17 @@ func decodeTestResponseStringUnixSecondsArrayArrayResponse(resp *http.Response) }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -29046,23 +32772,28 @@ func decodeTestResponseStringUnixSecondsNullableResponse(resp *http.Response) (r } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilStringUnixSeconds if err := func() error { if err := response.Decode(d, json.DecodeStringUnixSeconds); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -29082,12 +32813,12 @@ func decodeTestResponseStringUnixSecondsNullableArrayResponse(resp *http.Respons } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []NilStringUnixSeconds if err := func() error { response = make([]NilStringUnixSeconds, 0) @@ -29101,12 +32832,17 @@ func decodeTestResponseStringUnixSecondsNullableArrayResponse(resp *http.Respons }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -29126,12 +32862,12 @@ func decodeTestResponseStringUnixSecondsNullableArrayArrayResponse(resp *http.Re } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response [][]NilStringUnixSeconds if err := func() error { response = make([][]NilStringUnixSeconds, 0) @@ -29153,12 +32889,17 @@ func decodeTestResponseStringUnixSecondsNullableArrayArrayResponse(resp *http.Re }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: diff --git a/examples/ex_tinkoff/oas_request_decoders_gen.go b/examples/ex_tinkoff/oas_request_decoders_gen.go index 4553acf26..8ad397a69 100644 --- a/examples/ex_tinkoff/oas_request_decoders_gen.go +++ b/examples/ex_tinkoff/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -59,12 +60,17 @@ func (s *Server) decodeOrdersLimitOrderPostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -125,12 +131,17 @@ func (s *Server) decodeOrdersMarketOrderPostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -191,12 +202,17 @@ func (s *Server) decodeSandboxCurrenciesBalancePostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -257,12 +273,17 @@ func (s *Server) decodeSandboxPositionsBalancePostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -327,12 +348,17 @@ func (s *Server) decodeSandboxRegisterPostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { diff --git a/examples/ex_tinkoff/oas_response_decoders_gen.go b/examples/ex_tinkoff/oas_response_decoders_gen.go index 400f7142f..1f802df58 100644 --- a/examples/ex_tinkoff/oas_response_decoders_gen.go +++ b/examples/ex_tinkoff/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeMarketBondsGetResponse(resp *http.Response) (res MarketBondsGetRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MarketInstrumentListResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -53,23 +59,28 @@ func decodeMarketBondsGetResponse(resp *http.Response) (res MarketBondsGetRes, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -89,23 +100,28 @@ func decodeMarketCandlesGetResponse(resp *http.Response) (res MarketCandlesGetRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CandlesResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -119,23 +135,28 @@ func decodeMarketCandlesGetResponse(resp *http.Response) (res MarketCandlesGetRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -155,23 +176,28 @@ func decodeMarketCurrenciesGetResponse(resp *http.Response) (res MarketCurrencie } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MarketInstrumentListResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -185,23 +211,28 @@ func decodeMarketCurrenciesGetResponse(resp *http.Response) (res MarketCurrencie } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -221,23 +252,28 @@ func decodeMarketEtfsGetResponse(resp *http.Response) (res MarketEtfsGetRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MarketInstrumentListResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -251,23 +287,28 @@ func decodeMarketEtfsGetResponse(resp *http.Response) (res MarketEtfsGetRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -287,23 +328,28 @@ func decodeMarketOrderbookGetResponse(resp *http.Response) (res MarketOrderbookG } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrderbookResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -317,23 +363,28 @@ func decodeMarketOrderbookGetResponse(resp *http.Response) (res MarketOrderbookG } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -353,23 +404,28 @@ func decodeMarketSearchByFigiGetResponse(resp *http.Response) (res MarketSearchB } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SearchMarketInstrumentResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -383,23 +439,28 @@ func decodeMarketSearchByFigiGetResponse(resp *http.Response) (res MarketSearchB } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -419,23 +480,28 @@ func decodeMarketSearchByTickerGetResponse(resp *http.Response) (res MarketSearc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MarketInstrumentListResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -449,23 +515,28 @@ func decodeMarketSearchByTickerGetResponse(resp *http.Response) (res MarketSearc } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -485,23 +556,28 @@ func decodeMarketStocksGetResponse(resp *http.Response) (res MarketStocksGetRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MarketInstrumentListResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -515,23 +591,28 @@ func decodeMarketStocksGetResponse(resp *http.Response) (res MarketStocksGetRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -551,23 +632,28 @@ func decodeOperationsGetResponse(resp *http.Response) (res OperationsGetRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OperationsResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -581,23 +667,28 @@ func decodeOperationsGetResponse(resp *http.Response) (res OperationsGetRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -617,23 +708,28 @@ func decodeOrdersCancelPostResponse(resp *http.Response) (res OrdersCancelPostRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Empty if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -647,23 +743,28 @@ func decodeOrdersCancelPostResponse(resp *http.Response) (res OrdersCancelPostRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -683,23 +784,28 @@ func decodeOrdersGetResponse(resp *http.Response) (res OrdersGetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OrdersResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -713,23 +819,28 @@ func decodeOrdersGetResponse(resp *http.Response) (res OrdersGetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -749,23 +860,28 @@ func decodeOrdersLimitOrderPostResponse(resp *http.Response) (res OrdersLimitOrd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response LimitOrderResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -779,23 +895,28 @@ func decodeOrdersLimitOrderPostResponse(resp *http.Response) (res OrdersLimitOrd } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -815,23 +936,28 @@ func decodeOrdersMarketOrderPostResponse(resp *http.Response) (res OrdersMarketO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MarketOrderResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -845,23 +971,28 @@ func decodeOrdersMarketOrderPostResponse(resp *http.Response) (res OrdersMarketO } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -881,23 +1012,28 @@ func decodePortfolioCurrenciesGetResponse(resp *http.Response) (res PortfolioCur } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PortfolioCurrenciesResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -911,23 +1047,28 @@ func decodePortfolioCurrenciesGetResponse(resp *http.Response) (res PortfolioCur } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -947,23 +1088,28 @@ func decodePortfolioGetResponse(resp *http.Response) (res PortfolioGetRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PortfolioResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -977,23 +1123,28 @@ func decodePortfolioGetResponse(resp *http.Response) (res PortfolioGetRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1013,23 +1164,28 @@ func decodeSandboxClearPostResponse(resp *http.Response) (res SandboxClearPostRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Empty if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1043,23 +1199,28 @@ func decodeSandboxClearPostResponse(resp *http.Response) (res SandboxClearPostRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1079,23 +1240,28 @@ func decodeSandboxCurrenciesBalancePostResponse(resp *http.Response) (res Sandbo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Empty if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1109,23 +1275,28 @@ func decodeSandboxCurrenciesBalancePostResponse(resp *http.Response) (res Sandbo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1145,23 +1316,28 @@ func decodeSandboxPositionsBalancePostResponse(resp *http.Response) (res Sandbox } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Empty if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1175,23 +1351,28 @@ func decodeSandboxPositionsBalancePostResponse(resp *http.Response) (res Sandbox } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1211,23 +1392,28 @@ func decodeSandboxRegisterPostResponse(resp *http.Response) (res SandboxRegister } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response SandboxRegisterResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1241,23 +1427,28 @@ func decodeSandboxRegisterPostResponse(resp *http.Response) (res SandboxRegister } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1277,23 +1468,28 @@ func decodeSandboxRemovePostResponse(resp *http.Response) (res SandboxRemovePost } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Empty if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1307,23 +1503,28 @@ func decodeSandboxRemovePostResponse(resp *http.Response) (res SandboxRemovePost } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1343,23 +1544,28 @@ func decodeUserAccountsGetResponse(resp *http.Response) (res UserAccountsGetRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response UserAccountsResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -1373,23 +1579,28 @@ func decodeUserAccountsGetResponse(resp *http.Response) (res UserAccountsGetRes, } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/gen/_template/request_decode.tmpl b/gen/_template/request_decode.tmpl index 0a55c8501..e4715c97d 100644 --- a/gen/_template/request_decode.tmpl +++ b/gen/_template/request_decode.tmpl @@ -92,12 +92,17 @@ func (s *{{ if $op.WebhookInfo }}Webhook{{ end }}Server) decode{{ $op.Name }}Req d := jx.DecodeBytes(buf) if err := func() error { {{- template "json/dec" elem $t "request" }} + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, {{ printf "decode %q" $contentType | quote }}) - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } {{- if $t.NeedValidation }} if err := func() error { diff --git a/gen/_template/response_decode.tmpl b/gen/_template/response_decode.tmpl index fa90d2c96..7c61415fe 100644 --- a/gen/_template/response_decode.tmpl +++ b/gen/_template/response_decode.tmpl @@ -93,21 +93,26 @@ func decode{{ $op.Name }}Response(resp *http.Response) (res {{ $op.Responses.GoT {{- end }} {{- if $encoding.JSON }} - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response {{ $type.Go }} if err := func() error { {{- template "json/dec" elem $type "response" }} + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, {{ printf "decode %q" $contentType | quote }}) - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } {{- else if $type.IsStream }} {{- if $type.IsBase64Stream }} diff --git a/internal/integration/referenced_path_item/oas_response_decoders_gen.go b/internal/integration/referenced_path_item/oas_response_decoders_gen.go index b4956a498..9b55014b0 100644 --- a/internal/integration/referenced_path_item/oas_response_decoders_gen.go +++ b/internal/integration/referenced_path_item/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,12 +24,12 @@ func decodeFooGetResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -36,12 +37,17 @@ func decodeFooGetResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: diff --git a/internal/integration/sample_api/oas_request_decoders_gen.go b/internal/integration/sample_api/oas_request_decoders_gen.go index 8a9f5137d..df6a51d51 100644 --- a/internal/integration/sample_api/oas_request_decoders_gen.go +++ b/internal/integration/sample_api/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -59,12 +60,17 @@ func (s *Server) decodeDefaultTestRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -129,12 +135,17 @@ func (s *Server) decodeFoobarPostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -202,12 +213,17 @@ func (s *Server) decodeOneofBugRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -272,12 +288,17 @@ func (s *Server) decodePetCreateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -349,12 +370,17 @@ func (s *Server) decodePetUpdateNameAliasPostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -426,12 +452,17 @@ func (s *Server) decodePetUpdateNamePostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -544,12 +575,17 @@ func (s *Server) decodeTestFloatValidationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { diff --git a/internal/integration/sample_api/oas_response_decoders_gen.go b/internal/integration/sample_api/oas_response_decoders_gen.go index 389284bc7..f90adeef2 100644 --- a/internal/integration/sample_api/oas_response_decoders_gen.go +++ b/internal/integration/sample_api/oas_response_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -24,12 +25,12 @@ func decodeDataGetFormatResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -37,12 +38,17 @@ func decodeDataGetFormatResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -62,12 +68,12 @@ func decodeDefaultTestResponse(resp *http.Response) (res int32, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int32 if err := func() error { v, err := d.Int32() @@ -75,12 +81,17 @@ func decodeDefaultTestResponse(resp *http.Response) (res int32, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -98,23 +109,28 @@ func decodeErrorGetResponse(resp *http.Response) (res *ErrorStatusCode, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -135,23 +151,28 @@ func decodeFoobarGetResponse(resp *http.Response) (res FoobarGetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -174,23 +195,28 @@ func decodeFoobarPostResponse(resp *http.Response) (res FoobarPostRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -207,23 +233,28 @@ func decodeFoobarPostResponse(resp *http.Response) (res FoobarPostRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -251,23 +282,28 @@ func decodeNoAdditionalPropertiesTestResponse(resp *http.Response) (res *NoAddit } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NoAdditionalPropertiesTest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -285,23 +321,28 @@ func decodeNullableDefaultResponseResponse(resp *http.Response) (res *NilIntStat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilInt if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &NilIntStatusCode{ StatusCode: resp.StatusCode, @@ -331,23 +372,28 @@ func decodePatternRecursiveMapGetResponse(resp *http.Response) (res PatternRecur } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PatternRecursiveMap if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -367,23 +413,28 @@ func decodePetCreateResponse(resp *http.Response) (res *Pet, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -403,12 +454,12 @@ func decodePetFriendsNamesByIDResponse(resp *http.Response) (res []string, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []string if err := func() error { response = make([]string, 0) @@ -424,12 +475,17 @@ func decodePetFriendsNamesByIDResponse(resp *http.Response) (res []string, err e }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -449,23 +505,28 @@ func decodePetGetResponse(resp *http.Response) (res PetGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -479,23 +540,28 @@ func decodePetGetResponse(resp *http.Response) (res PetGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PetGetDef if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &PetGetDefStatusCode{ StatusCode: resp.StatusCode, @@ -538,23 +604,28 @@ func decodePetGetAvatarByIDResponse(resp *http.Response) (res PetGetAvatarByIDRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -597,23 +668,28 @@ func decodePetGetAvatarByNameResponse(resp *http.Response) (res PetGetAvatarByNa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -634,23 +710,28 @@ func decodePetGetByNameResponse(resp *http.Response) (res *Pet, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -670,12 +751,12 @@ func decodePetNameByIDResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -683,12 +764,17 @@ func decodePetNameByIDResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -728,23 +814,28 @@ func decodePetUploadAvatarByIDResponse(resp *http.Response) (res PetUploadAvatar } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -765,23 +856,28 @@ func decodeRecursiveArrayGetResponse(resp *http.Response) (res RecursiveArray, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RecursiveArray if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -801,23 +897,28 @@ func decodeRecursiveMapGetResponse(resp *http.Response) (res *RecursiveMap, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RecursiveMap if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -837,12 +938,12 @@ func decodeSecurityTestResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -850,12 +951,17 @@ func decodeSecurityTestResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -875,23 +981,28 @@ func decodeStringIntMapGetResponse(resp *http.Response) (res *StringIntMap, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response StringIntMap if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -920,23 +1031,28 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TestNullableOneofsApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -950,23 +1066,28 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TestNullableOneofsApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -980,23 +1101,28 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OneOfBooleanSumNullables if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/internal/integration/sample_api_nc/oas_request_decoders_gen.go b/internal/integration/sample_api_nc/oas_request_decoders_gen.go index 8a9f5137d..df6a51d51 100644 --- a/internal/integration/sample_api_nc/oas_request_decoders_gen.go +++ b/internal/integration/sample_api_nc/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -59,12 +60,17 @@ func (s *Server) decodeDefaultTestRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -129,12 +135,17 @@ func (s *Server) decodeFoobarPostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -202,12 +213,17 @@ func (s *Server) decodeOneofBugRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -272,12 +288,17 @@ func (s *Server) decodePetCreateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -349,12 +370,17 @@ func (s *Server) decodePetUpdateNameAliasPostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -426,12 +452,17 @@ func (s *Server) decodePetUpdateNamePostRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if request.Set { @@ -544,12 +575,17 @@ func (s *Server) decodeTestFloatValidationRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { diff --git a/internal/integration/sample_api_ns/oas_response_decoders_gen.go b/internal/integration/sample_api_ns/oas_response_decoders_gen.go index 389284bc7..f90adeef2 100644 --- a/internal/integration/sample_api_ns/oas_response_decoders_gen.go +++ b/internal/integration/sample_api_ns/oas_response_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -24,12 +25,12 @@ func decodeDataGetFormatResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -37,12 +38,17 @@ func decodeDataGetFormatResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -62,12 +68,12 @@ func decodeDefaultTestResponse(resp *http.Response) (res int32, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int32 if err := func() error { v, err := d.Int32() @@ -75,12 +81,17 @@ func decodeDefaultTestResponse(resp *http.Response) (res int32, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -98,23 +109,28 @@ func decodeErrorGetResponse(resp *http.Response) (res *ErrorStatusCode, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -135,23 +151,28 @@ func decodeFoobarGetResponse(resp *http.Response) (res FoobarGetRes, err error) } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -174,23 +195,28 @@ func decodeFoobarPostResponse(resp *http.Response) (res FoobarPostRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -207,23 +233,28 @@ func decodeFoobarPostResponse(resp *http.Response) (res FoobarPostRes, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -251,23 +282,28 @@ func decodeNoAdditionalPropertiesTestResponse(resp *http.Response) (res *NoAddit } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NoAdditionalPropertiesTest if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -285,23 +321,28 @@ func decodeNullableDefaultResponseResponse(resp *http.Response) (res *NilIntStat } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilInt if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &NilIntStatusCode{ StatusCode: resp.StatusCode, @@ -331,23 +372,28 @@ func decodePatternRecursiveMapGetResponse(resp *http.Response) (res PatternRecur } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PatternRecursiveMap if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -367,23 +413,28 @@ func decodePetCreateResponse(resp *http.Response) (res *Pet, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -403,12 +454,12 @@ func decodePetFriendsNamesByIDResponse(resp *http.Response) (res []string, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []string if err := func() error { response = make([]string, 0) @@ -424,12 +475,17 @@ func decodePetFriendsNamesByIDResponse(resp *http.Response) (res []string, err e }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -449,23 +505,28 @@ func decodePetGetResponse(resp *http.Response) (res PetGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -479,23 +540,28 @@ func decodePetGetResponse(resp *http.Response) (res PetGetRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response PetGetDef if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &PetGetDefStatusCode{ StatusCode: resp.StatusCode, @@ -538,23 +604,28 @@ func decodePetGetAvatarByIDResponse(resp *http.Response) (res PetGetAvatarByIDRe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -597,23 +668,28 @@ func decodePetGetAvatarByNameResponse(resp *http.Response) (res PetGetAvatarByNa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -634,23 +710,28 @@ func decodePetGetByNameResponse(resp *http.Response) (res *Pet, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Pet if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -670,12 +751,12 @@ func decodePetNameByIDResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -683,12 +764,17 @@ func decodePetNameByIDResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -728,23 +814,28 @@ func decodePetUploadAvatarByIDResponse(resp *http.Response) (res PetUploadAvatar } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -765,23 +856,28 @@ func decodeRecursiveArrayGetResponse(resp *http.Response) (res RecursiveArray, e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RecursiveArray if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -801,23 +897,28 @@ func decodeRecursiveMapGetResponse(resp *http.Response) (res *RecursiveMap, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response RecursiveMap if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -837,12 +938,12 @@ func decodeSecurityTestResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -850,12 +951,17 @@ func decodeSecurityTestResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -875,23 +981,28 @@ func decodeStringIntMapGetResponse(resp *http.Response) (res *StringIntMap, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response StringIntMap if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -920,23 +1031,28 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TestNullableOneofsApplicationJSONOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -950,23 +1066,28 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TestNullableOneofsApplicationJSONCreated if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -980,23 +1101,28 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OneOfBooleanSumNullables if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/internal/integration/sample_err/oas_request_decoders_gen.go b/internal/integration/sample_err/oas_request_decoders_gen.go index 8b0a25c15..221810b5f 100644 --- a/internal/integration/sample_err/oas_request_decoders_gen.go +++ b/internal/integration/sample_err/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -63,12 +64,17 @@ func (s *Server) decodeDataCreateRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: diff --git a/internal/integration/sample_err/oas_response_decoders_gen.go b/internal/integration/sample_err/oas_response_decoders_gen.go index e2fce94f3..9e441a5c9 100644 --- a/internal/integration/sample_err/oas_response_decoders_gen.go +++ b/internal/integration/sample_err/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeDataCreateResponse(resp *http.Response) (res *Data, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Data if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54,23 +60,28 @@ func decodeDataCreateResponse(resp *http.Response) (res *Data, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -96,23 +107,28 @@ func decodeDataGetResponse(resp *http.Response) (res *Data, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Data if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -127,23 +143,28 @@ func decodeDataGetResponse(resp *http.Response) (res *Data, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/internal/integration/techempower/oas_response_decoders_gen.go b/internal/integration/techempower/oas_response_decoders_gen.go index 1248b6889..006dcfa65 100644 --- a/internal/integration/techempower/oas_response_decoders_gen.go +++ b/internal/integration/techempower/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeCachingResponse(resp *http.Response) (res WorldObjects, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WorldObjects if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -59,23 +65,28 @@ func decodeDBResponse(resp *http.Response) (res *WorldObject, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WorldObject if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -95,23 +106,28 @@ func decodeJSONResponse(resp *http.Response) (res *HelloWorld, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response HelloWorld if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -131,23 +147,28 @@ func decodeQueriesResponse(resp *http.Response) (res WorldObjects, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WorldObjects if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -167,23 +188,28 @@ func decodeUpdatesResponse(resp *http.Response) (res WorldObjects, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WorldObjects if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: diff --git a/internal/integration/test_allof/oas_request_decoders_gen.go b/internal/integration/test_allof/oas_request_decoders_gen.go index 66ed9ce07..6ad294720 100644 --- a/internal/integration/test_allof/oas_request_decoders_gen.go +++ b/internal/integration/test_allof/oas_request_decoders_gen.go @@ -13,6 +13,7 @@ import ( "go.uber.org/multierr" "github.com/ogen-go/ogen/conv" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/uri" "github.com/ogen-go/ogen/validate" ) @@ -62,12 +63,17 @@ func (s *Server) decodeNullableStringsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.String{ @@ -136,12 +142,17 @@ func (s *Server) decodeObjectsWithConflictingArrayPropertyRequest(r *http.Reques if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -202,12 +213,17 @@ func (s *Server) decodeObjectsWithConflictingPropertiesRequest(r *http.Request) if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -268,12 +284,17 @@ func (s *Server) decodeReferencedAllofRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -446,12 +467,17 @@ func (s *Server) decodeReferencedAllofOptionalRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := request.Validate(); err != nil { @@ -622,12 +648,17 @@ func (s *Server) decodeSimpleIntegerRequest(r *http.Request) ( if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } if err := func() error { if err := (validate.Int{ @@ -697,12 +728,17 @@ func (s *Server) decodeSimpleObjectsRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil default: diff --git a/internal/integration/test_anyof/oas_response_decoders_gen.go b/internal/integration/test_anyof/oas_response_decoders_gen.go index 5915668a5..7769c0fc9 100644 --- a/internal/integration/test_anyof/oas_response_decoders_gen.go +++ b/internal/integration/test_anyof/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeIntegerNumberResponse(resp *http.Response) (res *IntegerNumber, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IntegerNumber if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -59,23 +65,28 @@ func decodeJaegerAnyOfResponse(resp *http.Response) (res *JaegerAnyOf, err error } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response JaegerAnyOf if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -95,23 +106,28 @@ func decodeOneUUIDResponse(resp *http.Response) (res *OneUUID, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response OneUUID if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/internal/integration/test_enum_naming/oas_response_decoders_gen.go b/internal/integration/test_enum_naming/oas_response_decoders_gen.go index c8d59a91f..acfe59870 100644 --- a/internal/integration/test_enum_naming/oas_response_decoders_gen.go +++ b/internal/integration/test_enum_naming/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodeProbeLivenessResponse(resp *http.Response) (res *ProbeLivenessOK, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ProbeLivenessOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/internal/integration/test_form/oas_request_decoders_gen.go b/internal/integration/test_form/oas_request_decoders_gen.go index 665b58362..fabe24d44 100644 --- a/internal/integration/test_form/oas_request_decoders_gen.go +++ b/internal/integration/test_form/oas_request_decoders_gen.go @@ -15,6 +15,7 @@ import ( "github.com/ogen-go/ogen/conv" ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/uri" "github.com/ogen-go/ogen/validate" ) @@ -684,12 +685,17 @@ func (s *Server) decodeTestShareFormSchemaRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil case ct == "multipart/form-data": diff --git a/internal/integration/test_form/oas_response_decoders_gen.go b/internal/integration/test_form/oas_response_decoders_gen.go index d554a2fd7..b28599325 100644 --- a/internal/integration/test_form/oas_response_decoders_gen.go +++ b/internal/integration/test_form/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -41,23 +42,28 @@ func decodeTestMultipartUploadResponse(resp *http.Response) (res *TestMultipartU } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response TestMultipartUploadOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/internal/integration/test_http_requests/oas_request_decoders_gen.go b/internal/integration/test_http_requests/oas_request_decoders_gen.go index 6f22f5460..61b7f8354 100644 --- a/internal/integration/test_http_requests/oas_request_decoders_gen.go +++ b/internal/integration/test_http_requests/oas_request_decoders_gen.go @@ -15,6 +15,7 @@ import ( "github.com/ogen-go/ogen/conv" ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/uri" "github.com/ogen-go/ogen/validate" ) @@ -64,12 +65,17 @@ func (s *Server) decodeAllRequestBodiesRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil case ct == "application/octet-stream": @@ -289,12 +295,17 @@ func (s *Server) decodeAllRequestBodiesOptionalRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return &request, close, nil case ct == "application/octet-stream": diff --git a/internal/integration/test_http_requests/oas_response_decoders_gen.go b/internal/integration/test_http_requests/oas_response_decoders_gen.go index 9a3a04592..09ea89dcd 100644 --- a/internal/integration/test_http_requests/oas_response_decoders_gen.go +++ b/internal/integration/test_http_requests/oas_response_decoders_gen.go @@ -12,6 +12,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -100,23 +101,28 @@ func decodeMaskContentTypeResponse(resp *http.Response) (res *MaskResponse, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MaskResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -136,23 +142,28 @@ func decodeMaskContentTypeOptionalResponse(resp *http.Response) (res *MaskRespon } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response MaskResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/internal/integration/test_http_responses/oas_response_decoders_gen.go b/internal/integration/test_http_responses/oas_response_decoders_gen.go index dba2b0962..43d47510b 100644 --- a/internal/integration/test_http_responses/oas_response_decoders_gen.go +++ b/internal/integration/test_http_responses/oas_response_decoders_gen.go @@ -13,6 +13,7 @@ import ( "github.com/ogen-go/ogen/conv" ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/uri" "github.com/ogen-go/ogen/validate" ) @@ -76,23 +77,28 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response CombinedOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -108,12 +114,12 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int if err := func() error { v, err := d.Int() @@ -121,12 +127,17 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &Combined2XXStatusCode{ StatusCode: resp.StatusCode, @@ -143,12 +154,12 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response bool if err := func() error { v, err := d.Bool() @@ -156,12 +167,17 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &Combined5XXStatusCode{ StatusCode: resp.StatusCode, @@ -178,12 +194,12 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response []string if err := func() error { response = make([]string, 0) @@ -199,12 +215,17 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { }); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &CombinedDefStatusCode{ StatusCode: resp.StatusCode, @@ -526,23 +547,28 @@ func decodeIntersectPatternCodeResponse(resp *http.Response) (res IntersectPatte } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response IntersectPatternCodeOKApplicationJSON if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -558,12 +584,12 @@ func decodeIntersectPatternCodeResponse(resp *http.Response) (res IntersectPatte } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response int if err := func() error { v, err := d.Int() @@ -571,12 +597,17 @@ func decodeIntersectPatternCodeResponse(resp *http.Response) (res IntersectPatte if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &IntersectPatternCode2XXStatusCode{ StatusCode: resp.StatusCode, @@ -599,23 +630,28 @@ func decodeMultipleGenericResponsesResponse(resp *http.Response) (res MultipleGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilInt if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -629,23 +665,28 @@ func decodeMultipleGenericResponsesResponse(resp *http.Response) (res MultipleGe } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response NilString if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/internal/integration/test_parameters/oas_response_decoders_gen.go b/internal/integration/test_parameters/oas_response_decoders_gen.go index cd0e071c5..a71a6e5eb 100644 --- a/internal/integration/test_parameters/oas_response_decoders_gen.go +++ b/internal/integration/test_parameters/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -32,12 +33,12 @@ func decodeContentQueryParameterResponse(resp *http.Response) (res string, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -45,12 +46,17 @@ func decodeContentQueryParameterResponse(resp *http.Response) (res string, err e if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -70,23 +76,28 @@ func decodeHeaderParameterResponse(resp *http.Response) (res *Hash, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Hash if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -106,23 +117,28 @@ func decodeObjectQueryParameterResponse(resp *http.Response) (res *ObjectQueryPa } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response ObjectQueryParameterOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -142,23 +158,28 @@ func decodePathObjectParameterResponse(resp *http.Response) (res *User, err erro } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response User if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: diff --git a/internal/integration/test_servers/oas_response_decoders_gen.go b/internal/integration/test_servers/oas_response_decoders_gen.go index 406521fe2..6633b253d 100644 --- a/internal/integration/test_servers/oas_response_decoders_gen.go +++ b/internal/integration/test_servers/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,12 +24,12 @@ func decodeProbeLivenessResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -36,12 +37,17 @@ func decodeProbeLivenessResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -56,23 +62,28 @@ func decodeProbeLivenessResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/internal/integration/test_single_endpoint/oas_response_decoders_gen.go b/internal/integration/test_single_endpoint/oas_response_decoders_gen.go index 406521fe2..6633b253d 100644 --- a/internal/integration/test_single_endpoint/oas_response_decoders_gen.go +++ b/internal/integration/test_single_endpoint/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,12 +24,12 @@ func decodeProbeLivenessResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response string if err := func() error { v, err := d.Str() @@ -36,12 +37,17 @@ func decodeProbeLivenessResponse(resp *http.Response) (res string, err error) { if err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return response, nil default: @@ -56,23 +62,28 @@ func decodeProbeLivenessResponse(resp *http.Response) (res string, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/internal/integration/test_webhooks/oas_request_decoders_gen.go b/internal/integration/test_webhooks/oas_request_decoders_gen.go index 7a997f05c..100f100fb 100644 --- a/internal/integration/test_webhooks/oas_request_decoders_gen.go +++ b/internal/integration/test_webhooks/oas_request_decoders_gen.go @@ -11,6 +11,7 @@ import ( "github.com/go-faster/jx" "go.uber.org/multierr" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -63,12 +64,17 @@ func (s *Server) decodePublishEventRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: @@ -125,12 +131,17 @@ func (s *WebhookServer) decodeUpdateWebhookRequest(r *http.Request) ( if err := request.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return req, close, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return req, close, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err } return request, close, nil default: diff --git a/internal/integration/test_webhooks/oas_response_decoders_gen.go b/internal/integration/test_webhooks/oas_response_decoders_gen.go index b63b23502..bda8cb71d 100644 --- a/internal/integration/test_webhooks/oas_response_decoders_gen.go +++ b/internal/integration/test_webhooks/oas_response_decoders_gen.go @@ -10,6 +10,7 @@ import ( "github.com/go-faster/errors" "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/validate" ) @@ -23,23 +24,28 @@ func decodePublishEventResponse(resp *http.Response) (res *Event, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Event if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -54,23 +60,28 @@ func decodePublishEventResponse(resp *http.Response) (res *Event, err error) { } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -96,23 +107,28 @@ func decodeStatusWebhookResponse(resp *http.Response) (res *StatusWebhookOK, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response StatusWebhookOK if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -135,23 +151,28 @@ func decodeUpdateDeleteResponse(resp *http.Response) (res UpdateDeleteRes, err e } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -172,23 +193,28 @@ func decodeUpdateWebhookResponse(resp *http.Response) (res UpdateWebhookRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response WebhookResponse if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &response, nil default: @@ -202,23 +228,28 @@ func decodeUpdateWebhookResponse(resp *http.Response) (res UpdateWebhookRes, err } switch { case ct == "application/json": - b, err := io.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { return res, err } - d := jx.DecodeBytes(b) + d := jx.DecodeBytes(buf) var response Error if err := func() error { if err := response.Decode(d); err != nil { return err } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } return nil }(); err != nil { - return res, errors.Wrap(err, "decode \"application/json\"") - } - if err := d.Skip(); err != io.EOF { - return res, errors.New("unexpected trailing data") + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err } return &ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/ogenerrors/json.go b/ogenerrors/json.go new file mode 100644 index 000000000..5908fe843 --- /dev/null +++ b/ogenerrors/json.go @@ -0,0 +1,45 @@ +package ogenerrors + +import ( + "fmt" + + "github.com/go-faster/errors" +) + +var _ interface { + errors.Wrapper + errors.Formatter + fmt.Formatter + error +} = (*DecodeBodyError)(nil) + +// DecodeBodyError occurs when request or response body cannot be decoded. +type DecodeBodyError struct { + ContentType string + Body []byte + Err error +} + +// Unwrap returns child error. +func (d *DecodeBodyError) Unwrap() error { + return d.Err +} + +// FormatError implements errors.Formatter. +func (d *DecodeBodyError) FormatError(p errors.Printer) (next error) { + p.Printf("decode %s", d.ContentType) + if p.Detail() { + p.Printf("body: %s", d.Body) + } + return d.Err +} + +// Format implements fmt.Formatter. +func (d *DecodeBodyError) Format(s fmt.State, verb rune) { + errors.FormatError(d, s, verb) +} + +// Error implements error. +func (d *DecodeBodyError) Error() string { + return fmt.Sprintf("decode %s: %s", d.ContentType, d.Err) +} diff --git a/ogenerrors/json_test.go b/ogenerrors/json_test.go new file mode 100644 index 000000000..3e5c20872 --- /dev/null +++ b/ogenerrors/json_test.go @@ -0,0 +1,24 @@ +package ogenerrors + +import ( + "fmt" + "testing" + + "github.com/go-faster/errors" + "github.com/stretchr/testify/require" +) + +func TestDecodeBodyError(t *testing.T) { + innerErr := errors.New("inner error") + decErr := &DecodeBodyError{ + ContentType: "application/json", + Body: []byte(`{"foo": "bar"}`), + Err: innerErr, + } + + a := require.New(t) + a.Equal(innerErr, decErr.Unwrap()) + a.EqualError(decErr, "decode application/json: inner error") + detailed := fmt.Sprintf("%+v", decErr) + a.Contains(detailed, `body: {"foo": "bar"}`) +}