From 6a0f900c39be016d3a4d8f3c27eb91314f5f5a96 Mon Sep 17 00:00:00 2001 From: tdakkota Date: Tue, 4 Oct 2022 23:36:08 +0300 Subject: [PATCH] chore: commit generated files --- examples/ex_2ch/oas_response_decoders_gen.go | 65 +- examples/ex_ent/oas_request_decoders_gen.go | 15 + examples/ex_ent/oas_response_decoders_gen.go | 230 +- .../oas_request_decoders_gen.go | 60 + .../oas_response_decoders_gen.go | 275 +- .../ex_github/oas_request_decoders_gen.go | 552 ++ .../ex_github/oas_response_decoders_gen.go | 6987 +++++++++++++---- examples/ex_gotd/oas_request_decoders_gen.go | 249 + examples/ex_gotd/oas_response_decoders_gen.go | 870 +- examples/ex_k8s/oas_response_decoders_gen.go | 2055 ++++- .../ex_manga/oas_response_decoders_gen.go | 15 +- .../ex_petstore/oas_response_decoders_gen.go | 25 +- .../oas_request_decoders_gen.go | 3 + .../oas_response_decoders_gen.go | 35 +- .../oas_response_decoders_gen.go | 15 +- .../ex_telegram/oas_request_decoders_gen.go | 234 + .../ex_telegram/oas_response_decoders_gen.go | 820 +- .../oas_request_decoders_gen.go | 2190 ++++++ .../oas_response_decoders_gen.go | 3650 +++++++-- .../ex_tinkoff/oas_request_decoders_gen.go | 15 + .../ex_tinkoff/oas_response_decoders_gen.go | 210 +- .../oas_response_decoders_gen.go | 5 +- .../sample_api/oas_request_decoders_gen.go | 21 + .../sample_api/oas_response_decoders_gen.go | 140 +- .../sample_api_nc/oas_request_decoders_gen.go | 21 + .../oas_response_decoders_gen.go | 140 +- .../sample_err/oas_request_decoders_gen.go | 3 + .../sample_err/oas_response_decoders_gen.go | 20 +- .../techempower/oas_response_decoders_gen.go | 25 +- .../test_allof/oas_request_decoders_gen.go | 21 + .../test_form/oas_request_decoders_gen.go | 3 + .../test_form/oas_response_decoders_gen.go | 5 +- .../oas_request_decoders_gen.go | 6 + .../oas_response_decoders_gen.go | 10 +- .../oas_response_decoders_gen.go | 40 +- .../oas_response_decoders_gen.go | 10 +- 36 files changed, 15892 insertions(+), 3148 deletions(-) diff --git a/examples/ex_2ch/oas_response_decoders_gen.go b/examples/ex_2ch/oas_response_decoders_gen.go index 54ae75b89..d77a81451 100644 --- a/examples/ex_2ch/oas_response_decoders_gen.go +++ b/examples/ex_2ch/oas_response_decoders_gen.go @@ -36,7 +36,10 @@ func decodeAPICaptcha2chcaptchaIDGetResponse(resp *http.Response) (res Captcha, } return nil }(); err != nil { - return res, err + 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: @@ -81,7 +84,10 @@ func decodeAPICaptchaAppIDPublicKeyGetResponse(resp *http.Response) (res Captcha } return nil }(); err != nil { - return res, err + 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: @@ -114,7 +120,10 @@ func decodeAPICaptchaInvisibleRecaptchaIDGetResponse(resp *http.Response) (res C } return nil }(); err != nil { - return res, err + 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: @@ -156,7 +165,10 @@ func decodeAPICaptchaRecaptchaIDGetResponse(resp *http.Response) (res Captcha, e } return nil }(); err != nil { - return res, err + 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: @@ -198,7 +210,10 @@ func decodeAPIDislikeGetResponse(resp *http.Response) (res Like, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -231,7 +246,10 @@ func decodeAPILikeGetResponse(resp *http.Response) (res Like, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -264,7 +282,10 @@ func decodeAPIMobileV2AfterBoardThreadNumGetResponse(resp *http.Response) (res M } return nil }(); err != nil { - return res, err + 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: @@ -297,7 +318,10 @@ func decodeAPIMobileV2BoardsGetResponse(resp *http.Response) (res Boards, err er } return nil }(); err != nil { - return res, err + 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: @@ -330,7 +354,10 @@ func decodeAPIMobileV2InfoBoardThreadGetResponse(resp *http.Response) (res Mobil } return nil }(); err != nil { - return res, err + 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: @@ -363,7 +390,10 @@ func decodeAPIMobileV2PostBoardNumGetResponse(resp *http.Response) (res MobilePo } return nil }(); err != nil { - return res, err + 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: @@ -396,7 +426,10 @@ func decodeUserPassloginPostResponse(resp *http.Response) (res Passcode, err err } return nil }(); err != nil { - return res, err + 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: @@ -429,7 +462,10 @@ func decodeUserPostingPostResponse(resp *http.Response) (res UserPostingPostOK, } return nil }(); err != nil { - return res, err + 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: @@ -462,7 +498,10 @@ func decodeUserReportPostResponse(resp *http.Response) (res Report, err error) { } return nil }(); err != nil { - return res, err + 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: diff --git a/examples/ex_ent/oas_request_decoders_gen.go b/examples/ex_ent/oas_request_decoders_gen.go index 1576f9a56..8bc21efdb 100644 --- a/examples/ex_ent/oas_request_decoders_gen.go +++ b/examples/ex_ent/oas_request_decoders_gen.go @@ -63,6 +63,9 @@ func (s *Server) decodeCreatePetRequest(r *http.Request) ( }(); err != nil { 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) @@ -118,6 +121,9 @@ func (s *Server) decodeCreatePetCategoriesRequest(r *http.Request) ( }(); err != nil { 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) @@ -173,6 +179,9 @@ func (s *Server) decodeCreatePetFriendsRequest(r *http.Request) ( }(); err != nil { 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) @@ -228,6 +237,9 @@ func (s *Server) decodeCreatePetOwnerRequest(r *http.Request) ( }(); err != nil { 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) @@ -283,6 +295,9 @@ func (s *Server) decodeUpdatePetRequest(r *http.Request) ( }(); err != nil { 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) diff --git a/examples/ex_ent/oas_response_decoders_gen.go b/examples/ex_ent/oas_response_decoders_gen.go index d187c6d68..9595a77ce 100644 --- a/examples/ex_ent/oas_response_decoders_gen.go +++ b/examples/ex_ent/oas_response_decoders_gen.go @@ -36,7 +36,10 @@ func decodeCreatePetResponse(resp *http.Response) (res CreatePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -63,7 +66,10 @@ func decodeCreatePetResponse(resp *http.Response) (res CreatePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -90,7 +96,10 @@ func decodeCreatePetResponse(resp *http.Response) (res CreatePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -117,7 +126,10 @@ func decodeCreatePetResponse(resp *http.Response) (res CreatePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -150,7 +162,10 @@ func decodeCreatePetCategoriesResponse(resp *http.Response) (res CreatePetCatego } return nil }(); err != nil { - return res, err + 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: @@ -177,7 +192,10 @@ func decodeCreatePetCategoriesResponse(resp *http.Response) (res CreatePetCatego } return nil }(); err != nil { - return res, err + 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: @@ -204,7 +222,10 @@ func decodeCreatePetCategoriesResponse(resp *http.Response) (res CreatePetCatego } return nil }(); err != nil { - return res, err + 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: @@ -231,7 +252,10 @@ func decodeCreatePetCategoriesResponse(resp *http.Response) (res CreatePetCatego } return nil }(); err != nil { - return res, err + 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: @@ -264,7 +288,10 @@ func decodeCreatePetFriendsResponse(resp *http.Response) (res CreatePetFriendsRe } return nil }(); err != nil { - return res, err + 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: @@ -291,7 +318,10 @@ func decodeCreatePetFriendsResponse(resp *http.Response) (res CreatePetFriendsRe } return nil }(); err != nil { - return res, err + 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: @@ -318,7 +348,10 @@ func decodeCreatePetFriendsResponse(resp *http.Response) (res CreatePetFriendsRe } return nil }(); err != nil { - return res, err + 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: @@ -345,7 +378,10 @@ func decodeCreatePetFriendsResponse(resp *http.Response) (res CreatePetFriendsRe } return nil }(); err != nil { - return res, err + 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: @@ -378,7 +414,10 @@ func decodeCreatePetOwnerResponse(resp *http.Response) (res CreatePetOwnerRes, e } return nil }(); err != nil { - return res, err + 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: @@ -405,7 +444,10 @@ func decodeCreatePetOwnerResponse(resp *http.Response) (res CreatePetOwnerRes, e } return nil }(); err != nil { - return res, err + 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: @@ -432,7 +474,10 @@ func decodeCreatePetOwnerResponse(resp *http.Response) (res CreatePetOwnerRes, e } return nil }(); err != nil { - return res, err + 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: @@ -459,7 +504,10 @@ func decodeCreatePetOwnerResponse(resp *http.Response) (res CreatePetOwnerRes, e } return nil }(); err != nil { - return res, err + 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: @@ -495,7 +543,10 @@ func decodeDeletePetResponse(resp *http.Response) (res DeletePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -522,7 +573,10 @@ func decodeDeletePetResponse(resp *http.Response) (res DeletePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -549,7 +603,10 @@ func decodeDeletePetResponse(resp *http.Response) (res DeletePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -585,7 +642,10 @@ func decodeDeletePetOwnerResponse(resp *http.Response) (res DeletePetOwnerRes, e } return nil }(); err != nil { - return res, err + 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: @@ -612,7 +672,10 @@ func decodeDeletePetOwnerResponse(resp *http.Response) (res DeletePetOwnerRes, e } return nil }(); err != nil { - return res, err + 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: @@ -639,7 +702,10 @@ func decodeDeletePetOwnerResponse(resp *http.Response) (res DeletePetOwnerRes, e } return nil }(); err != nil { - return res, err + 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: @@ -672,7 +738,10 @@ func decodeListPetResponse(resp *http.Response) (res ListPetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -699,7 +768,10 @@ func decodeListPetResponse(resp *http.Response) (res ListPetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -726,7 +798,10 @@ func decodeListPetResponse(resp *http.Response) (res ListPetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -753,7 +828,10 @@ func decodeListPetResponse(resp *http.Response) (res ListPetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -786,7 +864,10 @@ func decodeListPetCategoriesResponse(resp *http.Response) (res ListPetCategories } return nil }(); err != nil { - return res, err + 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: @@ -813,7 +894,10 @@ func decodeListPetCategoriesResponse(resp *http.Response) (res ListPetCategories } return nil }(); err != nil { - return res, err + 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: @@ -840,7 +924,10 @@ func decodeListPetCategoriesResponse(resp *http.Response) (res ListPetCategories } return nil }(); err != nil { - return res, err + 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: @@ -867,7 +954,10 @@ func decodeListPetCategoriesResponse(resp *http.Response) (res ListPetCategories } return nil }(); err != nil { - return res, err + 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: @@ -900,7 +990,10 @@ func decodeListPetFriendsResponse(resp *http.Response) (res ListPetFriendsRes, e } return nil }(); err != nil { - return res, err + 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: @@ -927,7 +1020,10 @@ func decodeListPetFriendsResponse(resp *http.Response) (res ListPetFriendsRes, e } return nil }(); err != nil { - return res, err + 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: @@ -954,7 +1050,10 @@ func decodeListPetFriendsResponse(resp *http.Response) (res ListPetFriendsRes, e } return nil }(); err != nil { - return res, err + 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: @@ -981,7 +1080,10 @@ func decodeListPetFriendsResponse(resp *http.Response) (res ListPetFriendsRes, e } return nil }(); err != nil { - return res, err + 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: @@ -1014,7 +1116,10 @@ func decodeReadPetResponse(resp *http.Response) (res ReadPetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1041,7 +1146,10 @@ func decodeReadPetResponse(resp *http.Response) (res ReadPetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1068,7 +1176,10 @@ func decodeReadPetResponse(resp *http.Response) (res ReadPetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1095,7 +1206,10 @@ func decodeReadPetResponse(resp *http.Response) (res ReadPetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1128,7 +1242,10 @@ func decodeReadPetOwnerResponse(resp *http.Response) (res ReadPetOwnerRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -1155,7 +1272,10 @@ func decodeReadPetOwnerResponse(resp *http.Response) (res ReadPetOwnerRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -1182,7 +1302,10 @@ func decodeReadPetOwnerResponse(resp *http.Response) (res ReadPetOwnerRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -1209,7 +1332,10 @@ func decodeReadPetOwnerResponse(resp *http.Response) (res ReadPetOwnerRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -1242,7 +1368,10 @@ func decodeUpdatePetResponse(resp *http.Response) (res UpdatePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -1269,7 +1398,10 @@ func decodeUpdatePetResponse(resp *http.Response) (res UpdatePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -1296,7 +1428,10 @@ func decodeUpdatePetResponse(resp *http.Response) (res UpdatePetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -1323,7 +1458,10 @@ func decodeUpdatePetResponse(resp *http.Response) (res UpdatePetRes, err error) } return nil }(); err != nil { - return res, err + 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: diff --git a/examples/ex_firecracker/oas_request_decoders_gen.go b/examples/ex_firecracker/oas_request_decoders_gen.go index 2c8146116..8934de0f3 100644 --- a/examples/ex_firecracker/oas_request_decoders_gen.go +++ b/examples/ex_firecracker/oas_request_decoders_gen.go @@ -63,6 +63,9 @@ func (s *Server) decodeCreateSnapshotRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -126,6 +129,9 @@ func (s *Server) decodeCreateSyncActionRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -189,6 +195,9 @@ func (s *Server) decodeLoadSnapshotRequest(r *http.Request) ( }(); err != nil { 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) @@ -244,6 +253,9 @@ func (s *Server) decodeMmdsConfigPutRequest(r *http.Request) ( }(); err != nil { 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) @@ -305,6 +317,9 @@ func (s *Server) decodeMmdsPatchRequest(r *http.Request) ( }(); err != nil { 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) @@ -366,6 +381,9 @@ func (s *Server) decodeMmdsPutRequest(r *http.Request) ( }(); err != nil { 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) @@ -421,6 +439,9 @@ func (s *Server) decodePatchBalloonRequest(r *http.Request) ( }(); err != nil { 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) @@ -476,6 +497,9 @@ func (s *Server) decodePatchBalloonStatsIntervalRequest(r *http.Request) ( }(); err != nil { 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) @@ -531,6 +555,9 @@ func (s *Server) decodePatchGuestDriveByIDRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -594,6 +621,9 @@ func (s *Server) decodePatchGuestNetworkInterfaceByIDRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -661,6 +691,9 @@ func (s *Server) decodePatchMachineConfigurationRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -731,6 +764,9 @@ func (s *Server) decodePatchVmRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -794,6 +830,9 @@ func (s *Server) decodePutBalloonRequest(r *http.Request) ( }(); err != nil { 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) @@ -849,6 +888,9 @@ func (s *Server) decodePutGuestBootSourceRequest(r *http.Request) ( }(); err != nil { 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) @@ -904,6 +946,9 @@ func (s *Server) decodePutGuestDriveByIDRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -967,6 +1012,9 @@ func (s *Server) decodePutGuestNetworkInterfaceByIDRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1030,6 +1078,9 @@ func (s *Server) decodePutGuestVsockRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1093,6 +1144,9 @@ func (s *Server) decodePutLoggerRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1160,6 +1214,9 @@ func (s *Server) decodePutMachineConfigurationRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -1230,6 +1287,9 @@ func (s *Server) decodePutMetricsRequest(r *http.Request) ( }(); err != nil { 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) diff --git a/examples/ex_firecracker/oas_response_decoders_gen.go b/examples/ex_firecracker/oas_response_decoders_gen.go index a04c7e0c9..76e825f7f 100644 --- a/examples/ex_firecracker/oas_response_decoders_gen.go +++ b/examples/ex_firecracker/oas_response_decoders_gen.go @@ -39,7 +39,10 @@ func decodeCreateSnapshotResponse(resp *http.Response) (res CreateSnapshotRes, e } return nil }(); err != nil { - return res, err + 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: @@ -66,7 +69,10 @@ func decodeCreateSnapshotResponse(resp *http.Response) (res CreateSnapshotRes, e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -103,7 +109,10 @@ func decodeCreateSyncActionResponse(resp *http.Response) (res CreateSyncActionRe } return nil }(); err != nil { - return res, err + 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: @@ -130,7 +139,10 @@ func decodeCreateSyncActionResponse(resp *http.Response) (res CreateSyncActionRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -164,7 +176,10 @@ func decodeDescribeBalloonConfigResponse(resp *http.Response) (res DescribeBallo } return nil }(); err != nil { - return res, err + 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: @@ -191,7 +206,10 @@ func decodeDescribeBalloonConfigResponse(resp *http.Response) (res DescribeBallo } return nil }(); err != nil { - return res, err + 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: @@ -218,7 +236,10 @@ func decodeDescribeBalloonConfigResponse(resp *http.Response) (res DescribeBallo } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -252,7 +273,10 @@ func decodeDescribeBalloonStatsResponse(resp *http.Response) (res DescribeBalloo } return nil }(); err != nil { - return res, err + 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: @@ -279,7 +303,10 @@ func decodeDescribeBalloonStatsResponse(resp *http.Response) (res DescribeBalloo } return nil }(); err != nil { - return res, err + 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: @@ -306,7 +333,10 @@ func decodeDescribeBalloonStatsResponse(resp *http.Response) (res DescribeBalloo } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -340,7 +370,10 @@ func decodeDescribeInstanceResponse(resp *http.Response) (res DescribeInstanceRe } return nil }(); err != nil { - return res, err + 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: @@ -367,7 +400,10 @@ func decodeDescribeInstanceResponse(resp *http.Response) (res DescribeInstanceRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -401,7 +437,10 @@ func decodeGetExportVmConfigResponse(resp *http.Response) (res GetExportVmConfig } return nil }(); err != nil { - return res, err + 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: @@ -428,7 +467,10 @@ func decodeGetExportVmConfigResponse(resp *http.Response) (res GetExportVmConfig } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -462,7 +504,10 @@ func decodeGetMachineConfigurationResponse(resp *http.Response) (res GetMachineC } return nil }(); err != nil { - return res, err + 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: @@ -489,7 +534,10 @@ func decodeGetMachineConfigurationResponse(resp *http.Response) (res GetMachineC } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -526,7 +574,10 @@ func decodeLoadSnapshotResponse(resp *http.Response) (res LoadSnapshotRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -553,7 +604,10 @@ func decodeLoadSnapshotResponse(resp *http.Response) (res LoadSnapshotRes, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -590,7 +644,10 @@ func decodeMmdsConfigPutResponse(resp *http.Response) (res MmdsConfigPutRes, err } return nil }(); err != nil { - return res, err + 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: @@ -617,7 +674,10 @@ func decodeMmdsConfigPutResponse(resp *http.Response) (res MmdsConfigPutRes, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -651,7 +711,10 @@ func decodeMmdsGetResponse(resp *http.Response) (res MmdsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -678,7 +741,10 @@ func decodeMmdsGetResponse(resp *http.Response) (res MmdsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -705,7 +771,10 @@ func decodeMmdsGetResponse(resp *http.Response) (res MmdsGetRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -742,7 +811,10 @@ func decodeMmdsPatchResponse(resp *http.Response) (res MmdsPatchRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -769,7 +841,10 @@ func decodeMmdsPatchResponse(resp *http.Response) (res MmdsPatchRes, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -806,7 +881,10 @@ func decodeMmdsPutResponse(resp *http.Response) (res MmdsPutRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -833,7 +911,10 @@ func decodeMmdsPutResponse(resp *http.Response) (res MmdsPutRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -870,7 +951,10 @@ func decodePatchBalloonResponse(resp *http.Response) (res PatchBalloonRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -897,7 +981,10 @@ func decodePatchBalloonResponse(resp *http.Response) (res PatchBalloonRes, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -934,7 +1021,10 @@ func decodePatchBalloonStatsIntervalResponse(resp *http.Response) (res PatchBall } return nil }(); err != nil { - return res, err + 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: @@ -961,7 +1051,10 @@ func decodePatchBalloonStatsIntervalResponse(resp *http.Response) (res PatchBall } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -998,7 +1091,10 @@ func decodePatchGuestDriveByIDResponse(resp *http.Response) (res PatchGuestDrive } return nil }(); err != nil { - return res, err + 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: @@ -1025,7 +1121,10 @@ func decodePatchGuestDriveByIDResponse(resp *http.Response) (res PatchGuestDrive } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1062,7 +1161,10 @@ func decodePatchGuestNetworkInterfaceByIDResponse(resp *http.Response) (res Patc } return nil }(); err != nil { - return res, err + 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: @@ -1089,7 +1191,10 @@ func decodePatchGuestNetworkInterfaceByIDResponse(resp *http.Response) (res Patc } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1126,7 +1231,10 @@ func decodePatchMachineConfigurationResponse(resp *http.Response) (res PatchMach } return nil }(); err != nil { - return res, err + 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: @@ -1153,7 +1261,10 @@ func decodePatchMachineConfigurationResponse(resp *http.Response) (res PatchMach } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1190,7 +1301,10 @@ func decodePatchVmResponse(resp *http.Response) (res PatchVmRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1217,7 +1331,10 @@ func decodePatchVmResponse(resp *http.Response) (res PatchVmRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1254,7 +1371,10 @@ func decodePutBalloonResponse(resp *http.Response) (res PutBalloonRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -1281,7 +1401,10 @@ func decodePutBalloonResponse(resp *http.Response) (res PutBalloonRes, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1318,7 +1441,10 @@ func decodePutGuestBootSourceResponse(resp *http.Response) (res PutGuestBootSour } return nil }(); err != nil { - return res, err + 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: @@ -1345,7 +1471,10 @@ func decodePutGuestBootSourceResponse(resp *http.Response) (res PutGuestBootSour } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1382,7 +1511,10 @@ func decodePutGuestDriveByIDResponse(resp *http.Response) (res PutGuestDriveByID } return nil }(); err != nil { - return res, err + 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: @@ -1409,7 +1541,10 @@ func decodePutGuestDriveByIDResponse(resp *http.Response) (res PutGuestDriveByID } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1446,7 +1581,10 @@ func decodePutGuestNetworkInterfaceByIDResponse(resp *http.Response) (res PutGue } return nil }(); err != nil { - return res, err + 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: @@ -1473,7 +1611,10 @@ func decodePutGuestNetworkInterfaceByIDResponse(resp *http.Response) (res PutGue } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1510,7 +1651,10 @@ func decodePutGuestVsockResponse(resp *http.Response) (res PutGuestVsockRes, err } return nil }(); err != nil { - return res, err + 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: @@ -1537,7 +1681,10 @@ func decodePutGuestVsockResponse(resp *http.Response) (res PutGuestVsockRes, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1574,7 +1721,10 @@ func decodePutLoggerResponse(resp *http.Response) (res PutLoggerRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -1601,7 +1751,10 @@ func decodePutLoggerResponse(resp *http.Response) (res PutLoggerRes, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1638,7 +1791,10 @@ func decodePutMachineConfigurationResponse(resp *http.Response) (res PutMachineC } return nil }(); err != nil { - return res, err + 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: @@ -1665,7 +1821,10 @@ func decodePutMachineConfigurationResponse(resp *http.Response) (res PutMachineC } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1702,7 +1861,10 @@ func decodePutMetricsResponse(resp *http.Response) (res PutMetricsRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -1729,7 +1891,10 @@ func decodePutMetricsResponse(resp *http.Response) (res PutMetricsRes, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } 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 8323d7a3f..316f075fe 100644 --- a/examples/ex_github/oas_request_decoders_gen.go +++ b/examples/ex_github/oas_request_decoders_gen.go @@ -63,6 +63,9 @@ func (s *Server) decodeActionsCreateOrUpdateEnvironmentSecretRequest(r *http.Req }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -126,6 +129,9 @@ func (s *Server) decodeActionsCreateOrUpdateOrgSecretRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -189,6 +195,9 @@ func (s *Server) decodeActionsCreateOrUpdateRepoSecretRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -252,6 +261,9 @@ func (s *Server) decodeActionsCreateSelfHostedRunnerGroupForOrgRequest(r *http.R }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -315,6 +327,9 @@ func (s *Server) decodeActionsReviewPendingDeploymentsForRunRequest(r *http.Requ }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -382,6 +397,9 @@ func (s *Server) decodeActionsSetAllowedActionsOrganizationRequest(r *http.Reque }(); err != nil { 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) @@ -441,6 +459,9 @@ func (s *Server) decodeActionsSetAllowedActionsRepositoryRequest(r *http.Request }(); err != nil { 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) @@ -496,6 +517,9 @@ func (s *Server) decodeActionsSetGithubActionsPermissionsOrganizationRequest(r * }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -559,6 +583,9 @@ func (s *Server) decodeActionsSetGithubActionsPermissionsRepositoryRequest(r *ht }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -622,6 +649,9 @@ func (s *Server) decodeActionsSetRepoAccessToSelfHostedRunnerGroupInOrgRequest(r }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -685,6 +715,9 @@ func (s *Server) decodeActionsSetSelectedReposForOrgSecretRequest(r *http.Reques }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -748,6 +781,9 @@ func (s *Server) decodeActionsSetSelectedRepositoriesEnabledGithubActionsOrganiz }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -811,6 +847,9 @@ func (s *Server) decodeActionsSetSelfHostedRunnersInGroupForOrgRequest(r *http.R }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -874,6 +913,9 @@ func (s *Server) decodeActionsUpdateSelfHostedRunnerGroupForOrgRequest(r *http.R }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -941,6 +983,9 @@ func (s *Server) decodeActivityMarkNotificationsAsReadRequest(r *http.Request) ( }(); err != nil { 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) @@ -1000,6 +1045,9 @@ func (s *Server) decodeActivityMarkRepoNotificationsAsReadRequest(r *http.Reques }(); err != nil { 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) @@ -1059,6 +1107,9 @@ func (s *Server) decodeActivitySetRepoSubscriptionRequest(r *http.Request) ( }(); err != nil { 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) @@ -1118,6 +1169,9 @@ func (s *Server) decodeActivitySetThreadSubscriptionRequest(r *http.Request) ( }(); err != nil { 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) @@ -1173,6 +1227,9 @@ func (s *Server) decodeAppsCheckTokenRequest(r *http.Request) ( }(); err != nil { 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) @@ -1228,6 +1285,9 @@ func (s *Server) decodeAppsCreateContentAttachmentRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1297,6 +1357,9 @@ func (s *Server) decodeAppsCreateFromManifestRequest(r *http.Request) ( }(); err != nil { 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) @@ -1356,6 +1419,9 @@ func (s *Server) decodeAppsCreateInstallationAccessTokenRequest(r *http.Request) }(); err != nil { 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 { if request.Set { if err := func() error { @@ -1426,6 +1492,9 @@ func (s *Server) decodeAppsDeleteAuthorizationRequest(r *http.Request) ( }(); err != nil { 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) @@ -1481,6 +1550,9 @@ func (s *Server) decodeAppsDeleteTokenRequest(r *http.Request) ( }(); err != nil { 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) @@ -1536,6 +1608,9 @@ func (s *Server) decodeAppsResetTokenRequest(r *http.Request) ( }(); err != nil { 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) @@ -1591,6 +1666,9 @@ func (s *Server) decodeAppsScopeTokenRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1658,6 +1736,9 @@ func (s *Server) decodeAppsUpdateWebhookConfigForAppRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -1728,6 +1809,9 @@ func (s *Server) decodeChecksCreateSuiteRequest(r *http.Request) ( }(); err != nil { 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) @@ -1783,6 +1867,9 @@ func (s *Server) decodeChecksSetSuitesPreferencesRequest(r *http.Request) ( }(); err != nil { 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) @@ -1838,6 +1925,9 @@ func (s *Server) decodeCodeScanningUpdateAlertRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1901,6 +1991,9 @@ func (s *Server) decodeCodeScanningUploadSarifRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1964,6 +2057,9 @@ func (s *Server) decodeEnterpriseAdminCreateSelfHostedRunnerGroupForEnterpriseRe }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2027,6 +2123,9 @@ func (s *Server) decodeEnterpriseAdminProvisionAndInviteEnterpriseGroupRequest(r }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2090,6 +2189,9 @@ func (s *Server) decodeEnterpriseAdminProvisionAndInviteEnterpriseUserRequest(r }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2153,6 +2255,9 @@ func (s *Server) decodeEnterpriseAdminSetAllowedActionsEnterpriseRequest(r *http }(); err != nil { 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) @@ -2208,6 +2313,9 @@ func (s *Server) decodeEnterpriseAdminSetGithubActionsPermissionsEnterpriseReque }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2271,6 +2379,9 @@ func (s *Server) decodeEnterpriseAdminSetInformationForProvisionedEnterpriseGrou }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2334,6 +2445,9 @@ func (s *Server) decodeEnterpriseAdminSetInformationForProvisionedEnterpriseUser }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2397,6 +2511,9 @@ func (s *Server) decodeEnterpriseAdminSetOrgAccessToSelfHostedRunnerGroupInEnter }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2460,6 +2577,9 @@ func (s *Server) decodeEnterpriseAdminSetSelectedOrganizationsEnabledGithubActio }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2523,6 +2643,9 @@ func (s *Server) decodeEnterpriseAdminSetSelfHostedRunnersInGroupForEnterpriseRe }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2586,6 +2709,9 @@ func (s *Server) decodeEnterpriseAdminUpdateAttributeForEnterpriseGroupRequest(r }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2649,6 +2775,9 @@ func (s *Server) decodeEnterpriseAdminUpdateAttributeForEnterpriseUserRequest(r }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2716,6 +2845,9 @@ func (s *Server) decodeEnterpriseAdminUpdateSelfHostedRunnerGroupForEnterpriseRe }(); err != nil { 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 { if request.Set { if err := func() error { @@ -2786,6 +2918,9 @@ func (s *Server) decodeGistsCreateRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2849,6 +2984,9 @@ func (s *Server) decodeGistsCreateCommentRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2912,6 +3050,9 @@ func (s *Server) decodeGistsUpdateCommentRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2975,6 +3116,9 @@ func (s *Server) decodeGitCreateBlobRequest(r *http.Request) ( }(); err != nil { 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) @@ -3030,6 +3174,9 @@ func (s *Server) decodeGitCreateCommitRequest(r *http.Request) ( }(); err != nil { 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) @@ -3085,6 +3232,9 @@ func (s *Server) decodeGitCreateRefRequest(r *http.Request) ( }(); err != nil { 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) @@ -3140,6 +3290,9 @@ func (s *Server) decodeGitCreateTagRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3203,6 +3356,9 @@ func (s *Server) decodeGitCreateTreeRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3266,6 +3422,9 @@ func (s *Server) decodeGitUpdateRefRequest(r *http.Request) ( }(); err != nil { 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) @@ -3321,6 +3480,9 @@ func (s *Server) decodeInteractionsSetRestrictionsForAuthenticatedUserRequest(r }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3384,6 +3546,9 @@ func (s *Server) decodeInteractionsSetRestrictionsForOrgRequest(r *http.Request) }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3447,6 +3612,9 @@ func (s *Server) decodeInteractionsSetRestrictionsForRepoRequest(r *http.Request }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3514,6 +3682,9 @@ func (s *Server) decodeIssuesAddAssigneesRequest(r *http.Request) ( }(); err != nil { 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) @@ -3569,6 +3740,9 @@ func (s *Server) decodeIssuesCreateRequest(r *http.Request) ( }(); err != nil { 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) @@ -3624,6 +3798,9 @@ func (s *Server) decodeIssuesCreateCommentRequest(r *http.Request) ( }(); err != nil { 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) @@ -3679,6 +3856,9 @@ func (s *Server) decodeIssuesCreateLabelRequest(r *http.Request) ( }(); err != nil { 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) @@ -3734,6 +3914,9 @@ func (s *Server) decodeIssuesCreateMilestoneRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3801,6 +3984,9 @@ func (s *Server) decodeIssuesLockRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -3875,6 +4061,9 @@ func (s *Server) decodeIssuesRemoveAssigneesRequest(r *http.Request) ( }(); err != nil { 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) @@ -3934,6 +4123,9 @@ func (s *Server) decodeIssuesUpdateRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -4004,6 +4196,9 @@ func (s *Server) decodeIssuesUpdateCommentRequest(r *http.Request) ( }(); err != nil { 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) @@ -4063,6 +4258,9 @@ func (s *Server) decodeIssuesUpdateLabelRequest(r *http.Request) ( }(); err != nil { 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) @@ -4122,6 +4320,9 @@ func (s *Server) decodeIssuesUpdateMilestoneRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -4196,6 +4397,9 @@ func (s *Server) decodeMigrationsMapCommitAuthorRequest(r *http.Request) ( }(); err != nil { 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) @@ -4251,6 +4455,9 @@ func (s *Server) decodeMigrationsSetLfsPreferenceRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4314,6 +4521,9 @@ func (s *Server) decodeMigrationsStartForAuthenticatedUserRequest(r *http.Reques }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4377,6 +4587,9 @@ func (s *Server) decodeMigrationsStartForOrgRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4440,6 +4653,9 @@ func (s *Server) decodeMigrationsStartImportRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4507,6 +4723,9 @@ func (s *Server) decodeMigrationsUpdateImportRequest(r *http.Request) ( }(); err != nil { 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) @@ -4566,6 +4785,9 @@ func (s *Server) decodeOAuthAuthorizationsCreateAuthorizationRequest(r *http.Req }(); err != nil { 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 { if request.Set { if err := func() error { @@ -4636,6 +4858,9 @@ func (s *Server) decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppRequest( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4699,6 +4924,9 @@ func (s *Server) decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppAndFinge }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4766,6 +4994,9 @@ func (s *Server) decodeOAuthAuthorizationsUpdateAuthorizationRequest(r *http.Req }(); err != nil { 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 { if request.Set { if err := func() error { @@ -4840,6 +5071,9 @@ func (s *Server) decodeOrgsCreateInvitationRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -4910,6 +5144,9 @@ func (s *Server) decodeOrgsCreateWebhookRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4977,6 +5214,9 @@ func (s *Server) decodeOrgsSetMembershipForUserRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -5047,6 +5287,9 @@ func (s *Server) decodeOrgsUpdateMembershipForAuthenticatedUserRequest(r *http.R }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -5114,6 +5357,9 @@ func (s *Server) decodeOrgsUpdateWebhookRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -5188,6 +5434,9 @@ func (s *Server) decodeOrgsUpdateWebhookConfigForOrgRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -5262,6 +5511,9 @@ func (s *Server) decodeProjectsAddCollaboratorRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -5332,6 +5584,9 @@ func (s *Server) decodeProjectsCreateColumnRequest(r *http.Request) ( }(); err != nil { 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) @@ -5387,6 +5642,9 @@ func (s *Server) decodeProjectsCreateForAuthenticatedUserRequest(r *http.Request }(); err != nil { 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) @@ -5442,6 +5700,9 @@ func (s *Server) decodeProjectsCreateForOrgRequest(r *http.Request) ( }(); err != nil { 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) @@ -5497,6 +5758,9 @@ func (s *Server) decodeProjectsCreateForRepoRequest(r *http.Request) ( }(); err != nil { 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) @@ -5552,6 +5816,9 @@ func (s *Server) decodeProjectsMoveCardRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -5615,6 +5882,9 @@ func (s *Server) decodeProjectsMoveColumnRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -5682,6 +5952,9 @@ func (s *Server) decodeProjectsUpdateRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -5756,6 +6029,9 @@ func (s *Server) decodeProjectsUpdateCardRequest(r *http.Request) ( }(); err != nil { 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) @@ -5811,6 +6087,9 @@ func (s *Server) decodeProjectsUpdateColumnRequest(r *http.Request) ( }(); err != nil { 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) @@ -5866,6 +6145,9 @@ func (s *Server) decodePullsCreateRequest(r *http.Request) ( }(); err != nil { 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) @@ -5921,6 +6203,9 @@ func (s *Server) decodePullsCreateReplyForReviewCommentRequest(r *http.Request) }(); err != nil { 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) @@ -5980,6 +6265,9 @@ func (s *Server) decodePullsCreateReviewRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -6050,6 +6338,9 @@ func (s *Server) decodePullsCreateReviewCommentRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -6113,6 +6404,9 @@ func (s *Server) decodePullsDismissReviewRequest(r *http.Request) ( }(); err != nil { 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) @@ -6172,6 +6466,9 @@ func (s *Server) decodePullsMergeRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -6242,6 +6539,9 @@ func (s *Server) decodePullsRemoveRequestedReviewersRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -6305,6 +6605,9 @@ func (s *Server) decodePullsSubmitReviewRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -6372,6 +6675,9 @@ func (s *Server) decodePullsUpdateRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -6446,6 +6752,9 @@ func (s *Server) decodePullsUpdateBranchRequest(r *http.Request) ( }(); err != nil { 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) @@ -6501,6 +6810,9 @@ func (s *Server) decodePullsUpdateReviewRequest(r *http.Request) ( }(); err != nil { 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) @@ -6556,6 +6868,9 @@ func (s *Server) decodePullsUpdateReviewCommentRequest(r *http.Request) ( }(); err != nil { 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) @@ -6611,6 +6926,9 @@ func (s *Server) decodeReactionsCreateForCommitCommentRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -6674,6 +6992,9 @@ func (s *Server) decodeReactionsCreateForIssueRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -6737,6 +7058,9 @@ func (s *Server) decodeReactionsCreateForIssueCommentRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -6800,6 +7124,9 @@ func (s *Server) decodeReactionsCreateForPullRequestReviewCommentRequest(r *http }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -6863,6 +7190,9 @@ func (s *Server) decodeReactionsCreateForReleaseRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -6926,6 +7256,9 @@ func (s *Server) decodeReactionsCreateForTeamDiscussionCommentInOrgRequest(r *ht }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -6989,6 +7322,9 @@ func (s *Server) decodeReactionsCreateForTeamDiscussionCommentLegacyRequest(r *h }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -7052,6 +7388,9 @@ func (s *Server) decodeReactionsCreateForTeamDiscussionInOrgRequest(r *http.Requ }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -7115,6 +7454,9 @@ func (s *Server) decodeReactionsCreateForTeamDiscussionLegacyRequest(r *http.Req }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -7182,6 +7524,9 @@ func (s *Server) decodeReposAddAppAccessRestrictionsRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -7256,6 +7601,9 @@ func (s *Server) decodeReposAddCollaboratorRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -7330,6 +7678,9 @@ func (s *Server) decodeReposAddStatusCheckContextsRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -7404,6 +7755,9 @@ func (s *Server) decodeReposAddTeamAccessRestrictionsRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -7478,6 +7832,9 @@ func (s *Server) decodeReposAddUserAccessRestrictionsRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -7548,6 +7905,9 @@ func (s *Server) decodeReposCreateAutolinkRequest(r *http.Request) ( }(); err != nil { 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) @@ -7603,6 +7963,9 @@ func (s *Server) decodeReposCreateCommitCommentRequest(r *http.Request) ( }(); err != nil { 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) @@ -7658,6 +8021,9 @@ func (s *Server) decodeReposCreateCommitStatusRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -7721,6 +8087,9 @@ func (s *Server) decodeReposCreateDeployKeyRequest(r *http.Request) ( }(); err != nil { 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) @@ -7776,6 +8145,9 @@ func (s *Server) decodeReposCreateDeploymentRequest(r *http.Request) ( }(); err != nil { 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) @@ -7831,6 +8203,9 @@ func (s *Server) decodeReposCreateDeploymentStatusRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -7894,6 +8269,9 @@ func (s *Server) decodeReposCreateDispatchEventRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -7957,6 +8335,9 @@ func (s *Server) decodeReposCreateForAuthenticatedUserRequest(r *http.Request) ( }(); err != nil { 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) @@ -8016,6 +8397,9 @@ func (s *Server) decodeReposCreateForkRequest(r *http.Request) ( }(); err != nil { 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) @@ -8071,6 +8455,9 @@ func (s *Server) decodeReposCreateInOrgRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -8134,6 +8521,9 @@ func (s *Server) decodeReposCreateOrUpdateFileContentsRequest(r *http.Request) ( }(); err != nil { 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) @@ -8189,6 +8579,9 @@ func (s *Server) decodeReposCreatePagesSiteRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Value.Validate(); err != nil { return err @@ -8252,6 +8645,9 @@ func (s *Server) decodeReposCreateReleaseRequest(r *http.Request) ( }(); err != nil { 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) @@ -8307,6 +8703,9 @@ func (s *Server) decodeReposCreateUsingTemplateRequest(r *http.Request) ( }(); err != nil { 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) @@ -8366,6 +8765,9 @@ func (s *Server) decodeReposCreateWebhookRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -8436,6 +8838,9 @@ func (s *Server) decodeReposDeleteFileRequest(r *http.Request) ( }(); err != nil { 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) @@ -8491,6 +8896,9 @@ func (s *Server) decodeReposMergeRequest(r *http.Request) ( }(); err != nil { 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) @@ -8546,6 +8954,9 @@ func (s *Server) decodeReposMergeUpstreamRequest(r *http.Request) ( }(); err != nil { 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) @@ -8605,6 +9016,9 @@ func (s *Server) decodeReposRemoveAppAccessRestrictionsRequest(r *http.Request) }(); err != nil { 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 { if request.Set { if err := func() error { @@ -8679,6 +9093,9 @@ func (s *Server) decodeReposRemoveStatusCheckContextsRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -8753,6 +9170,9 @@ func (s *Server) decodeReposRemoveTeamAccessRestrictionsRequest(r *http.Request) }(); err != nil { 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 { if request.Set { if err := func() error { @@ -8827,6 +9247,9 @@ func (s *Server) decodeReposRemoveUserAccessRestrictionsRequest(r *http.Request) }(); err != nil { 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 { if request.Set { if err := func() error { @@ -8901,6 +9324,9 @@ func (s *Server) decodeReposRenameBranchRequest(r *http.Request) ( }(); err != nil { 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) @@ -8956,6 +9382,9 @@ func (s *Server) decodeReposReplaceAllTopicsRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -9023,6 +9452,9 @@ func (s *Server) decodeReposSetAppAccessRestrictionsRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -9097,6 +9529,9 @@ func (s *Server) decodeReposSetStatusCheckContextsRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -9171,6 +9606,9 @@ func (s *Server) decodeReposSetTeamAccessRestrictionsRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -9245,6 +9683,9 @@ func (s *Server) decodeReposSetUserAccessRestrictionsRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -9315,6 +9756,9 @@ func (s *Server) decodeReposTransferRequest(r *http.Request) ( }(); err != nil { 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) @@ -9374,6 +9818,9 @@ func (s *Server) decodeReposUpdateRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -9444,6 +9891,9 @@ func (s *Server) decodeReposUpdateBranchProtectionRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -9507,6 +9957,9 @@ func (s *Server) decodeReposUpdateCommitCommentRequest(r *http.Request) ( }(); err != nil { 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) @@ -9566,6 +10019,9 @@ func (s *Server) decodeReposUpdateInvitationRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -9640,6 +10096,9 @@ func (s *Server) decodeReposUpdatePullRequestReviewProtectionRequest(r *http.Req }(); err != nil { 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) @@ -9699,6 +10158,9 @@ func (s *Server) decodeReposUpdateReleaseRequest(r *http.Request) ( }(); err != nil { 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) @@ -9758,6 +10220,9 @@ func (s *Server) decodeReposUpdateReleaseAssetRequest(r *http.Request) ( }(); err != nil { 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) @@ -9817,6 +10282,9 @@ func (s *Server) decodeReposUpdateStatusCheckProtectionRequest(r *http.Request) }(); err != nil { 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) @@ -9876,6 +10344,9 @@ func (s *Server) decodeReposUpdateWebhookRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -9950,6 +10421,9 @@ func (s *Server) decodeReposUpdateWebhookConfigForRepoRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -10020,6 +10494,9 @@ func (s *Server) decodeSecretScanningUpdateAlertRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -10087,6 +10564,9 @@ func (s *Server) decodeTeamsAddOrUpdateMembershipForUserInOrgRequest(r *http.Req }(); err != nil { 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 { if request.Set { if err := func() error { @@ -10161,6 +10641,9 @@ func (s *Server) decodeTeamsAddOrUpdateMembershipForUserLegacyRequest(r *http.Re }(); err != nil { 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 { if request.Set { if err := func() error { @@ -10235,6 +10718,9 @@ func (s *Server) decodeTeamsAddOrUpdateProjectPermissionsInOrgRequest(r *http.Re }(); err != nil { 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 { if request.Set { if err := func() error { @@ -10309,6 +10795,9 @@ func (s *Server) decodeTeamsAddOrUpdateProjectPermissionsLegacyRequest(r *http.R }(); err != nil { 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 { if request.Set { if err := func() error { @@ -10383,6 +10872,9 @@ func (s *Server) decodeTeamsAddOrUpdateRepoPermissionsInOrgRequest(r *http.Reque }(); err != nil { 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 { if request.Set { if err := func() error { @@ -10457,6 +10949,9 @@ func (s *Server) decodeTeamsAddOrUpdateRepoPermissionsLegacyRequest(r *http.Requ }(); err != nil { 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 { if request.Set { if err := func() error { @@ -10527,6 +11022,9 @@ func (s *Server) decodeTeamsCreateRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -10590,6 +11088,9 @@ func (s *Server) decodeTeamsCreateDiscussionCommentInOrgRequest(r *http.Request) }(); err != nil { 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) @@ -10645,6 +11146,9 @@ func (s *Server) decodeTeamsCreateDiscussionCommentLegacyRequest(r *http.Request }(); err != nil { 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) @@ -10700,6 +11204,9 @@ func (s *Server) decodeTeamsCreateDiscussionInOrgRequest(r *http.Request) ( }(); err != nil { 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) @@ -10755,6 +11262,9 @@ func (s *Server) decodeTeamsCreateDiscussionLegacyRequest(r *http.Request) ( }(); err != nil { 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) @@ -10810,6 +11320,9 @@ func (s *Server) decodeTeamsCreateOrUpdateIdpGroupConnectionsInOrgRequest(r *htt }(); err != nil { 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) @@ -10865,6 +11378,9 @@ func (s *Server) decodeTeamsCreateOrUpdateIdpGroupConnectionsLegacyRequest(r *ht }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -10928,6 +11444,9 @@ func (s *Server) decodeTeamsUpdateDiscussionCommentInOrgRequest(r *http.Request) }(); err != nil { 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) @@ -10983,6 +11502,9 @@ func (s *Server) decodeTeamsUpdateDiscussionCommentLegacyRequest(r *http.Request }(); err != nil { 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) @@ -11042,6 +11564,9 @@ func (s *Server) decodeTeamsUpdateDiscussionInOrgRequest(r *http.Request) ( }(); err != nil { 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) @@ -11101,6 +11626,9 @@ func (s *Server) decodeTeamsUpdateDiscussionLegacyRequest(r *http.Request) ( }(); err != nil { 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) @@ -11160,6 +11688,9 @@ func (s *Server) decodeTeamsUpdateInOrgRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -11230,6 +11761,9 @@ func (s *Server) decodeTeamsUpdateLegacyRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -11297,6 +11831,9 @@ func (s *Server) decodeUsersAddEmailForAuthenticatedRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -11367,6 +11904,9 @@ func (s *Server) decodeUsersCreateGpgKeyForAuthenticatedRequest(r *http.Request) }(); err != nil { 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) @@ -11422,6 +11962,9 @@ func (s *Server) decodeUsersCreatePublicSSHKeyForAuthenticatedRequest(r *http.Re }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -11489,6 +12032,9 @@ func (s *Server) decodeUsersDeleteEmailForAuthenticatedRequest(r *http.Request) }(); err != nil { 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 { if request.Set { if err := func() error { @@ -11559,6 +12105,9 @@ func (s *Server) decodeUsersSetPrimaryEmailVisibilityForAuthenticatedRequest(r * }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -11626,6 +12175,9 @@ func (s *Server) decodeUsersUpdateAuthenticatedRequest(r *http.Request) ( }(); err != nil { 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) diff --git a/examples/ex_github/oas_response_decoders_gen.go b/examples/ex_github/oas_response_decoders_gen.go index 499327b60..1bc6be251 100644 --- a/examples/ex_github/oas_response_decoders_gen.go +++ b/examples/ex_github/oas_response_decoders_gen.go @@ -69,7 +69,10 @@ func decodeActionsApproveWorkflowRunResponse(resp *http.Response) (res ActionsAp } return nil }(); err != nil { - return res, err + 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: @@ -96,7 +99,10 @@ func decodeActionsApproveWorkflowRunResponse(resp *http.Response) (res ActionsAp } return nil }(); err != nil { - return res, err + 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: @@ -123,7 +129,10 @@ func decodeActionsApproveWorkflowRunResponse(resp *http.Response) (res ActionsAp } return nil }(); err != nil { - return res, err + 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: @@ -156,7 +165,10 @@ func decodeActionsCancelWorkflowRunResponse(resp *http.Response) (res ActionsCan } return nil }(); err != nil { - return res, err + 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: @@ -189,7 +201,10 @@ func decodeActionsCreateOrUpdateEnvironmentSecretResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -225,7 +240,10 @@ func decodeActionsCreateOrUpdateOrgSecretResponse(resp *http.Response) (res Acti } return nil }(); err != nil { - return res, err + 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: @@ -261,7 +279,10 @@ func decodeActionsCreateOrUpdateRepoSecretResponse(resp *http.Response) (res Act } return nil }(); err != nil { - return res, err + 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: @@ -297,7 +318,10 @@ func decodeActionsCreateRegistrationTokenForOrgResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -330,7 +354,10 @@ func decodeActionsCreateRegistrationTokenForRepoResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -363,7 +390,10 @@ func decodeActionsCreateRemoveTokenForOrgResponse(resp *http.Response) (res Auth } return nil }(); err != nil { - return res, err + 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: @@ -396,7 +426,10 @@ func decodeActionsCreateRemoveTokenForRepoResponse(resp *http.Response) (res Aut } return nil }(); err != nil { - return res, err + 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: @@ -429,7 +462,10 @@ func decodeActionsCreateSelfHostedRunnerGroupForOrgResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -684,7 +720,10 @@ func decodeActionsGetAllowedActionsOrganizationResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -717,7 +756,10 @@ func decodeActionsGetAllowedActionsRepositoryResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -750,7 +792,10 @@ func decodeActionsGetArtifactResponse(resp *http.Response) (res Artifact, err er } return nil }(); err != nil { - return res, err + 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: @@ -783,7 +828,10 @@ func decodeActionsGetEnvironmentPublicKeyResponse(resp *http.Response) (res Acti } return nil }(); err != nil { - return res, err + 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: @@ -816,7 +864,10 @@ func decodeActionsGetEnvironmentSecretResponse(resp *http.Response) (res Actions } return nil }(); err != nil { - return res, err + 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: @@ -849,7 +900,10 @@ func decodeActionsGetGithubActionsPermissionsOrganizationResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -882,7 +936,10 @@ func decodeActionsGetGithubActionsPermissionsRepositoryResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -915,7 +972,10 @@ func decodeActionsGetJobForWorkflowRunResponse(resp *http.Response) (res Job, er } return nil }(); err != nil { - return res, err + 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: @@ -948,7 +1008,10 @@ func decodeActionsGetOrgPublicKeyResponse(resp *http.Response) (res ActionsPubli } return nil }(); err != nil { - return res, err + 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: @@ -981,7 +1044,10 @@ func decodeActionsGetOrgSecretResponse(resp *http.Response) (res OrganizationAct } return nil }(); err != nil { - return res, err + 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: @@ -1014,7 +1080,10 @@ func decodeActionsGetRepoPublicKeyResponse(resp *http.Response) (res ActionsPubl } return nil }(); err != nil { - return res, err + 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: @@ -1047,7 +1116,10 @@ func decodeActionsGetRepoSecretResponse(resp *http.Response) (res ActionsSecret, } return nil }(); err != nil { - return res, err + 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: @@ -1088,7 +1160,10 @@ func decodeActionsGetReviewsForRunResponse(resp *http.Response) (res []Environme } return nil }(); err != nil { - return res, err + 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: @@ -1121,7 +1196,10 @@ func decodeActionsGetSelfHostedRunnerForOrgResponse(resp *http.Response) (res Ru } return nil }(); err != nil { - return res, err + 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: @@ -1154,7 +1232,10 @@ func decodeActionsGetSelfHostedRunnerForRepoResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -1187,7 +1268,10 @@ func decodeActionsGetSelfHostedRunnerGroupForOrgResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -1220,7 +1304,10 @@ func decodeActionsGetWorkflowRunResponse(resp *http.Response) (res WorkflowRun, } return nil }(); err != nil { - return res, err + 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: @@ -1253,7 +1340,10 @@ func decodeActionsGetWorkflowRunUsageResponse(resp *http.Response) (res Workflow } return nil }(); err != nil { - return res, err + 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: @@ -1286,7 +1376,10 @@ func decodeActionsListArtifactsForRepoResponse(resp *http.Response) (res Actions } return nil }(); err != nil { - return res, err + 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 @@ -1352,7 +1445,10 @@ func decodeActionsListEnvironmentSecretsResponse(resp *http.Response) (res Actio } return nil }(); err != nil { - return res, err + 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 @@ -1418,7 +1514,10 @@ func decodeActionsListJobsForWorkflowRunResponse(resp *http.Response) (res Actio } return nil }(); err != nil { - return res, err + 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 wrapper.Response = response @@ -1484,7 +1583,10 @@ func decodeActionsListOrgSecretsResponse(resp *http.Response) (res ActionsListOr } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActionsListOrgSecretsOKHeaders wrapper.Response = response @@ -1550,7 +1652,10 @@ func decodeActionsListRepoAccessToSelfHostedRunnerGroupInOrgResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -1583,7 +1688,10 @@ func decodeActionsListRepoSecretsResponse(resp *http.Response) (res ActionsListR } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActionsListRepoSecretsOKHeaders wrapper.Response = response @@ -1649,7 +1757,10 @@ func decodeActionsListRepoWorkflowsResponse(resp *http.Response) (res ActionsLis } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActionsListRepoWorkflowsOKHeaders wrapper.Response = response @@ -1723,7 +1834,10 @@ func decodeActionsListRunnerApplicationsForOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -1764,7 +1878,10 @@ func decodeActionsListRunnerApplicationsForRepoResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -1797,7 +1914,10 @@ func decodeActionsListSelectedReposForOrgSecretResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -1830,7 +1950,10 @@ func decodeActionsListSelectedRepositoriesEnabledGithubActionsOrganizationRespon } return nil }(); err != nil { - return res, err + 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: @@ -1863,7 +1986,10 @@ func decodeActionsListSelfHostedRunnerGroupsForOrgResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -1896,7 +2022,10 @@ func decodeActionsListSelfHostedRunnersForOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActionsListSelfHostedRunnersForOrgOKHeaders wrapper.Response = response @@ -1962,7 +2091,10 @@ func decodeActionsListSelfHostedRunnersForRepoResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActionsListSelfHostedRunnersForRepoOKHeaders wrapper.Response = response @@ -2028,7 +2160,10 @@ func decodeActionsListSelfHostedRunnersInGroupForOrgResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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 @@ -2094,7 +2229,10 @@ func decodeActionsListWorkflowRunArtifactsResponse(resp *http.Response) (res Act } return nil }(); err != nil { - return res, err + 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 wrapper.Response = response @@ -2160,7 +2298,10 @@ func decodeActionsListWorkflowRunsForRepoResponse(resp *http.Response) (res Acti } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActionsListWorkflowRunsForRepoOKHeaders wrapper.Response = response @@ -2226,7 +2367,10 @@ func decodeActionsReRunWorkflowResponse(resp *http.Response) (res ActionsReRunWo } return nil }(); err != nil { - return res, err + 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: @@ -2289,7 +2433,10 @@ func decodeActionsRetryWorkflowResponse(resp *http.Response) (res ActionsRetryWo } return nil }(); err != nil { - return res, err + 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: @@ -2330,7 +2477,10 @@ func decodeActionsReviewPendingDeploymentsForRunResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -2435,7 +2585,10 @@ func decodeActionsUpdateSelfHostedRunnerGroupForOrgResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -2474,7 +2627,10 @@ func decodeActivityCheckRepoIsStarredByAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -2501,7 +2657,10 @@ func decodeActivityCheckRepoIsStarredByAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -2528,7 +2687,10 @@ func decodeActivityCheckRepoIsStarredByAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -2576,7 +2738,10 @@ func decodeActivityDeleteThreadSubscriptionResponse(resp *http.Response) (res Ac } return nil }(); err != nil { - return res, err + 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: @@ -2603,7 +2768,10 @@ func decodeActivityDeleteThreadSubscriptionResponse(resp *http.Response) (res Ac } return nil }(); err != nil { - return res, err + 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: @@ -2636,7 +2804,10 @@ func decodeActivityGetFeedsResponse(resp *http.Response) (res Feed, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2669,7 +2840,10 @@ func decodeActivityGetRepoSubscriptionResponse(resp *http.Response) (res Activit } return nil }(); err != nil { - return res, err + 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: @@ -2696,7 +2870,10 @@ func decodeActivityGetRepoSubscriptionResponse(resp *http.Response) (res Activit } return nil }(); err != nil { - return res, err + 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: @@ -2732,7 +2909,10 @@ func decodeActivityGetThreadResponse(resp *http.Response) (res ActivityGetThread } return nil }(); err != nil { - return res, err + 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: @@ -2762,7 +2942,10 @@ func decodeActivityGetThreadResponse(resp *http.Response) (res ActivityGetThread } return nil }(); err != nil { - return res, err + 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: @@ -2789,7 +2972,10 @@ func decodeActivityGetThreadResponse(resp *http.Response) (res ActivityGetThread } return nil }(); err != nil { - return res, err + 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: @@ -2822,7 +3008,10 @@ func decodeActivityGetThreadSubscriptionForAuthenticatedUserResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -2852,7 +3041,10 @@ func decodeActivityGetThreadSubscriptionForAuthenticatedUserResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -2879,7 +3071,10 @@ func decodeActivityGetThreadSubscriptionForAuthenticatedUserResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -2920,7 +3115,10 @@ func decodeActivityListEventsForAuthenticatedUserResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -2961,7 +3159,10 @@ func decodeActivityListNotificationsForAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActivityListNotificationsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -3024,7 +3225,10 @@ func decodeActivityListNotificationsForAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -3051,7 +3255,10 @@ func decodeActivityListNotificationsForAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -3078,7 +3285,10 @@ func decodeActivityListNotificationsForAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -3119,7 +3329,10 @@ func decodeActivityListOrgEventsForAuthenticatedUserResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -3152,7 +3365,10 @@ func decodeActivityListPublicEventsResponse(resp *http.Response) (res ActivityLi } return nil }(); err != nil { - return res, err + 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: @@ -3182,7 +3398,10 @@ func decodeActivityListPublicEventsResponse(resp *http.Response) (res ActivityLi } return nil }(); err != nil { - return res, err + 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: @@ -3209,7 +3428,10 @@ func decodeActivityListPublicEventsResponse(resp *http.Response) (res ActivityLi } return nil }(); err != nil { - return res, err + 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: @@ -3242,7 +3464,10 @@ func decodeActivityListPublicEventsForRepoNetworkResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -3269,7 +3494,10 @@ func decodeActivityListPublicEventsForRepoNetworkResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -3299,7 +3527,10 @@ func decodeActivityListPublicEventsForRepoNetworkResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -3326,7 +3557,10 @@ func decodeActivityListPublicEventsForRepoNetworkResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -3367,7 +3601,10 @@ func decodeActivityListPublicEventsForUserResponse(resp *http.Response) (res []E } return nil }(); err != nil { - return res, err + 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: @@ -3408,7 +3645,10 @@ func decodeActivityListPublicOrgEventsResponse(resp *http.Response) (res []Event } return nil }(); err != nil { - return res, err + 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: @@ -3449,7 +3689,10 @@ func decodeActivityListReceivedEventsForUserResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -3490,7 +3733,10 @@ func decodeActivityListReceivedPublicEventsForUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -3531,7 +3777,10 @@ func decodeActivityListRepoEventsResponse(resp *http.Response) (res []Event, err } return nil }(); err != nil { - return res, err + 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: @@ -3572,7 +3821,10 @@ func decodeActivityListRepoNotificationsForAuthenticatedUserResponse(resp *http. } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActivityListRepoNotificationsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -3646,7 +3898,10 @@ func decodeActivityListReposStarredByAuthenticatedUserResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActivityListReposStarredByAuthenticatedUserOKHeaders wrapper.Response = response @@ -3709,7 +3964,10 @@ func decodeActivityListReposStarredByAuthenticatedUserResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -3736,7 +3994,10 @@ func decodeActivityListReposStarredByAuthenticatedUserResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -3777,7 +4038,10 @@ func decodeActivityListReposWatchedByUserResponse(resp *http.Response) (res Acti } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActivityListReposWatchedByUserOKHeaders wrapper.Response = response @@ -3851,7 +4115,10 @@ func decodeActivityListWatchedReposForAuthenticatedUserResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActivityListWatchedReposForAuthenticatedUserOKHeaders wrapper.Response = response @@ -3914,7 +4181,10 @@ func decodeActivityListWatchedReposForAuthenticatedUserResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -3941,7 +4211,10 @@ func decodeActivityListWatchedReposForAuthenticatedUserResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -3982,7 +4255,10 @@ func decodeActivityListWatchersForRepoResponse(resp *http.Response) (res Activit } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ActivityListWatchersForRepoOKHeaders wrapper.Response = response @@ -4048,7 +4324,10 @@ func decodeActivityMarkNotificationsAsReadResponse(resp *http.Response) (res Act } return nil }(); err != nil { - return res, err + 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: @@ -4081,7 +4360,10 @@ func decodeActivityMarkNotificationsAsReadResponse(resp *http.Response) (res Act } return nil }(); err != nil { - return res, err + 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: @@ -4108,7 +4390,10 @@ func decodeActivityMarkNotificationsAsReadResponse(resp *http.Response) (res Act } return nil }(); err != nil { - return res, err + 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: @@ -4141,7 +4426,10 @@ func decodeActivityMarkRepoNotificationsAsReadResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -4183,7 +4471,10 @@ func decodeActivityMarkThreadAsReadResponse(resp *http.Response) (res ActivityMa } return nil }(); err != nil { - return res, err + 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: @@ -4216,7 +4507,10 @@ func decodeActivitySetRepoSubscriptionResponse(resp *http.Response) (res Reposit } return nil }(); err != nil { - return res, err + 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: @@ -4249,7 +4543,10 @@ func decodeActivitySetThreadSubscriptionResponse(resp *http.Response) (res Activ } return nil }(); err != nil { - return res, err + 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: @@ -4279,7 +4576,10 @@ func decodeActivitySetThreadSubscriptionResponse(resp *http.Response) (res Activ } return nil }(); err != nil { - return res, err + 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: @@ -4306,7 +4606,10 @@ func decodeActivitySetThreadSubscriptionResponse(resp *http.Response) (res Activ } return nil }(); err != nil { - return res, err + 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: @@ -4345,7 +4648,10 @@ func decodeActivityStarRepoForAuthenticatedUserResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -4372,7 +4678,10 @@ func decodeActivityStarRepoForAuthenticatedUserResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -4399,7 +4708,10 @@ func decodeActivityStarRepoForAuthenticatedUserResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -4438,7 +4750,10 @@ func decodeActivityUnstarRepoForAuthenticatedUserResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -4465,7 +4780,10 @@ func decodeActivityUnstarRepoForAuthenticatedUserResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -4492,7 +4810,10 @@ func decodeActivityUnstarRepoForAuthenticatedUserResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -4531,7 +4852,10 @@ func decodeAppsAddRepoToInstallationResponse(resp *http.Response) (res AppsAddRe } return nil }(); err != nil { - return res, err + 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: @@ -4558,7 +4882,10 @@ func decodeAppsAddRepoToInstallationResponse(resp *http.Response) (res AppsAddRe } return nil }(); err != nil { - return res, err + 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: @@ -4591,7 +4918,10 @@ func decodeAppsCheckTokenResponse(resp *http.Response) (res AppsCheckTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -4618,7 +4948,10 @@ func decodeAppsCheckTokenResponse(resp *http.Response) (res AppsCheckTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -4645,7 +4978,10 @@ func decodeAppsCheckTokenResponse(resp *http.Response) (res AppsCheckTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -4678,7 +5014,10 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } return nil }(); err != nil { - return res, err + 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: @@ -4708,7 +5047,10 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } return nil }(); err != nil { - return res, err + 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: @@ -4735,7 +5077,10 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } return nil }(); err != nil { - return res, err + 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: @@ -4762,7 +5107,10 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } return nil }(); err != nil { - return res, err + 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: @@ -4789,7 +5137,10 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } return nil }(); err != nil { - return res, err + 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: @@ -4816,7 +5167,10 @@ func decodeAppsCreateContentAttachmentResponse(resp *http.Response) (res AppsCre } return nil }(); err != nil { - return res, err + 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: @@ -4849,7 +5203,10 @@ func decodeAppsCreateFromManifestResponse(resp *http.Response) (res AppsCreateFr } return nil }(); err != nil { - return res, err + 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: @@ -4876,7 +5233,10 @@ func decodeAppsCreateFromManifestResponse(resp *http.Response) (res AppsCreateFr } return nil }(); err != nil { - return res, err + 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: @@ -4903,7 +5263,10 @@ func decodeAppsCreateFromManifestResponse(resp *http.Response) (res AppsCreateFr } return nil }(); err != nil { - return res, err + 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: @@ -4936,7 +5299,10 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -4963,7 +5329,10 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -4990,7 +5359,10 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -5017,7 +5389,10 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -5044,7 +5419,10 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -5071,7 +5449,10 @@ func decodeAppsCreateInstallationAccessTokenResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -5107,7 +5488,10 @@ func decodeAppsDeleteAuthorizationResponse(resp *http.Response) (res AppsDeleteA } return nil }(); err != nil { - return res, err + 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: @@ -5143,7 +5527,10 @@ func decodeAppsDeleteInstallationResponse(resp *http.Response) (res AppsDeleteIn } return nil }(); err != nil { - return res, err + 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: @@ -5179,7 +5566,10 @@ func decodeAppsDeleteTokenResponse(resp *http.Response) (res AppsDeleteTokenRes, } return nil }(); err != nil { - return res, err + 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: @@ -5212,7 +5602,10 @@ func decodeAppsGetAuthenticatedResponse(resp *http.Response) (res Integration, e } return nil }(); err != nil { - return res, err + 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: @@ -5245,7 +5638,10 @@ func decodeAppsGetBySlugResponse(resp *http.Response) (res AppsGetBySlugRes, err } return nil }(); err != nil { - return res, err + 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: @@ -5272,7 +5668,10 @@ func decodeAppsGetBySlugResponse(resp *http.Response) (res AppsGetBySlugRes, err } return nil }(); err != nil { - return res, err + 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: @@ -5299,7 +5698,10 @@ func decodeAppsGetBySlugResponse(resp *http.Response) (res AppsGetBySlugRes, err } return nil }(); err != nil { - return res, err + 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: @@ -5326,7 +5728,10 @@ func decodeAppsGetBySlugResponse(resp *http.Response) (res AppsGetBySlugRes, err } return nil }(); err != nil { - return res, err + 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: @@ -5359,7 +5764,10 @@ func decodeAppsGetSubscriptionPlanForAccountResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -5386,7 +5794,10 @@ func decodeAppsGetSubscriptionPlanForAccountResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -5413,7 +5824,10 @@ func decodeAppsGetSubscriptionPlanForAccountResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -5446,7 +5860,10 @@ func decodeAppsGetSubscriptionPlanForAccountStubbedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -5473,7 +5890,10 @@ func decodeAppsGetSubscriptionPlanForAccountStubbedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -5509,7 +5929,10 @@ func decodeAppsGetWebhookConfigForAppResponse(resp *http.Response) (res WebhookC } return nil }(); err != nil { - return res, err + 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: @@ -5542,7 +5965,10 @@ func decodeAppsGetWebhookDeliveryResponse(resp *http.Response) (res AppsGetWebho } return nil }(); err != nil { - return res, err + 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: @@ -5569,7 +5995,10 @@ func decodeAppsGetWebhookDeliveryResponse(resp *http.Response) (res AppsGetWebho } return nil }(); err != nil { - return res, err + 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: @@ -5596,7 +6025,10 @@ func decodeAppsGetWebhookDeliveryResponse(resp *http.Response) (res AppsGetWebho } return nil }(); err != nil { - return res, err + 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: @@ -5637,7 +6069,10 @@ func decodeAppsListAccountsForPlanResponse(resp *http.Response) (res AppsListAcc } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AppsListAccountsForPlanOKHeaders wrapper.Response = response @@ -5697,7 +6132,10 @@ func decodeAppsListAccountsForPlanResponse(resp *http.Response) (res AppsListAcc } return nil }(); err != nil { - return res, err + 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: @@ -5724,7 +6162,10 @@ func decodeAppsListAccountsForPlanResponse(resp *http.Response) (res AppsListAcc } return nil }(); err != nil { - return res, err + 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: @@ -5751,7 +6192,10 @@ func decodeAppsListAccountsForPlanResponse(resp *http.Response) (res AppsListAcc } return nil }(); err != nil { - return res, err + 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: @@ -5792,7 +6236,10 @@ func decodeAppsListAccountsForPlanStubbedResponse(resp *http.Response) (res Apps } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AppsListAccountsForPlanStubbedOKHeaders wrapper.Response = response @@ -5852,7 +6299,10 @@ func decodeAppsListAccountsForPlanStubbedResponse(resp *http.Response) (res Apps } return nil }(); err != nil { - return res, err + 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: @@ -5885,7 +6335,10 @@ func decodeAppsListInstallationReposForAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AppsListInstallationReposForAuthenticatedUserOKHeaders wrapper.Response = response @@ -5948,7 +6401,10 @@ func decodeAppsListInstallationReposForAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -5975,7 +6431,10 @@ func decodeAppsListInstallationReposForAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -6016,7 +6475,10 @@ func decodeAppsListPlansResponse(resp *http.Response) (res AppsListPlansRes, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AppsListPlansOKHeaders wrapper.Response = response @@ -6076,7 +6538,10 @@ func decodeAppsListPlansResponse(resp *http.Response) (res AppsListPlansRes, err } return nil }(); err != nil { - return res, err + 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: @@ -6103,7 +6568,10 @@ func decodeAppsListPlansResponse(resp *http.Response) (res AppsListPlansRes, err } return nil }(); err != nil { - return res, err + 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: @@ -6144,7 +6612,10 @@ func decodeAppsListPlansStubbedResponse(resp *http.Response) (res AppsListPlansS } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AppsListPlansStubbedOKHeaders wrapper.Response = response @@ -6204,7 +6675,10 @@ func decodeAppsListPlansStubbedResponse(resp *http.Response) (res AppsListPlansS } return nil }(); err != nil { - return res, err + 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: @@ -6237,7 +6711,10 @@ func decodeAppsListReposAccessibleToInstallationResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AppsListReposAccessibleToInstallationOKHeaders wrapper.Response = response @@ -6300,7 +6777,10 @@ func decodeAppsListReposAccessibleToInstallationResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -6327,7 +6807,10 @@ func decodeAppsListReposAccessibleToInstallationResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -6368,7 +6851,10 @@ func decodeAppsListSubscriptionsForAuthenticatedUserResponse(resp *http.Response } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AppsListSubscriptionsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -6431,7 +6917,10 @@ func decodeAppsListSubscriptionsForAuthenticatedUserResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -6458,7 +6947,10 @@ func decodeAppsListSubscriptionsForAuthenticatedUserResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -6499,7 +6991,10 @@ func decodeAppsListSubscriptionsForAuthenticatedUserStubbedResponse(resp *http.R } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AppsListSubscriptionsForAuthenticatedUserStubbedOKHeaders wrapper.Response = response @@ -6562,7 +7057,10 @@ func decodeAppsListSubscriptionsForAuthenticatedUserStubbedResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -6595,7 +7093,10 @@ func decodeAppsListWebhookDeliveriesResponse(resp *http.Response) (res AppsListW } return nil }(); err != nil { - return res, err + 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: @@ -6622,7 +7123,10 @@ func decodeAppsListWebhookDeliveriesResponse(resp *http.Response) (res AppsListW } return nil }(); err != nil { - return res, err + 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: @@ -6649,7 +7153,10 @@ func decodeAppsListWebhookDeliveriesResponse(resp *http.Response) (res AppsListW } return nil }(); err != nil { - return res, err + 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: @@ -6682,7 +7189,10 @@ func decodeAppsRedeliverWebhookDeliveryResponse(resp *http.Response) (res AppsRe } return nil }(); err != nil { - return res, err + 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: @@ -6709,7 +7219,10 @@ func decodeAppsRedeliverWebhookDeliveryResponse(resp *http.Response) (res AppsRe } return nil }(); err != nil { - return res, err + 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: @@ -6736,7 +7249,10 @@ func decodeAppsRedeliverWebhookDeliveryResponse(resp *http.Response) (res AppsRe } return nil }(); err != nil { - return res, err + 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: @@ -6775,7 +7291,10 @@ func decodeAppsRemoveRepoFromInstallationResponse(resp *http.Response) (res Apps } return nil }(); err != nil { - return res, err + 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: @@ -6802,7 +7321,10 @@ func decodeAppsRemoveRepoFromInstallationResponse(resp *http.Response) (res Apps } return nil }(); err != nil { - return res, err + 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: @@ -6835,7 +7357,10 @@ func decodeAppsResetTokenResponse(resp *http.Response) (res AppsResetTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -6862,7 +7387,10 @@ func decodeAppsResetTokenResponse(resp *http.Response) (res AppsResetTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -6904,7 +7432,10 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -6931,7 +7462,10 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -6958,7 +7492,10 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -6985,7 +7522,10 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -7012,7 +7552,10 @@ func decodeAppsScopeTokenResponse(resp *http.Response) (res AppsScopeTokenRes, e } return nil }(); err != nil { - return res, err + 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: @@ -7048,7 +7591,10 @@ func decodeAppsSuspendInstallationResponse(resp *http.Response) (res AppsSuspend } return nil }(); err != nil { - return res, err + 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: @@ -7084,7 +7630,10 @@ func decodeAppsUnsuspendInstallationResponse(resp *http.Response) (res AppsUnsus } return nil }(); err != nil { - return res, err + 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: @@ -7117,7 +7666,10 @@ func decodeAppsUpdateWebhookConfigForAppResponse(resp *http.Response) (res Webho } return nil }(); err != nil { - return res, err + 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: @@ -7150,7 +7702,10 @@ func decodeBillingGetGithubActionsBillingGheResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -7183,7 +7738,10 @@ func decodeBillingGetGithubActionsBillingOrgResponse(resp *http.Response) (res A } return nil }(); err != nil { - return res, err + 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: @@ -7216,7 +7774,10 @@ func decodeBillingGetGithubActionsBillingUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7249,7 +7810,10 @@ func decodeBillingGetGithubPackagesBillingGheResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7282,7 +7846,10 @@ func decodeBillingGetGithubPackagesBillingOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7315,7 +7882,10 @@ func decodeBillingGetGithubPackagesBillingUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7348,7 +7918,10 @@ func decodeBillingGetSharedStorageBillingGheResponse(resp *http.Response) (res C } return nil }(); err != nil { - return res, err + 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: @@ -7381,7 +7954,10 @@ func decodeBillingGetSharedStorageBillingOrgResponse(resp *http.Response) (res C } return nil }(); err != nil { - return res, err + 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: @@ -7414,7 +7990,10 @@ func decodeBillingGetSharedStorageBillingUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7447,7 +8026,10 @@ func decodeChecksCreateSuiteResponse(resp *http.Response) (res ChecksCreateSuite } return nil }(); err != nil { - return res, err + 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: @@ -7474,7 +8056,10 @@ func decodeChecksCreateSuiteResponse(resp *http.Response) (res ChecksCreateSuite } return nil }(); err != nil { - return res, err + 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: @@ -7507,7 +8092,10 @@ func decodeChecksGetResponse(resp *http.Response) (res CheckRun, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -7540,7 +8128,10 @@ func decodeChecksGetSuiteResponse(resp *http.Response) (res CheckSuite, err erro } return nil }(); err != nil { - return res, err + 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: @@ -7581,7 +8172,10 @@ func decodeChecksListAnnotationsResponse(resp *http.Response) (res ChecksListAnn } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ChecksListAnnotationsOKHeaders wrapper.Response = response @@ -7647,7 +8241,10 @@ func decodeChecksListForRefResponse(resp *http.Response) (res ChecksListForRefOK } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ChecksListForRefOKHeaders wrapper.Response = response @@ -7713,7 +8310,10 @@ func decodeChecksListForSuiteResponse(resp *http.Response) (res ChecksListForSui } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ChecksListForSuiteOKHeaders wrapper.Response = response @@ -7779,7 +8379,10 @@ func decodeChecksListSuitesForRefResponse(resp *http.Response) (res ChecksListSu } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ChecksListSuitesForRefOKHeaders wrapper.Response = response @@ -7845,7 +8448,10 @@ func decodeChecksRerequestSuiteResponse(resp *http.Response) (res ChecksRereques } return nil }(); err != nil { - return res, err + 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: @@ -7878,7 +8484,10 @@ func decodeChecksSetSuitesPreferencesResponse(resp *http.Response) (res CheckSui } return nil }(); err != nil { - return res, err + 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: @@ -7911,7 +8520,10 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } return nil }(); err != nil { - return res, err + 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: @@ -7938,7 +8550,10 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } return nil }(); err != nil { - return res, err + 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: @@ -7965,7 +8580,10 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } return nil }(); err != nil { - return res, err + 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: @@ -7992,7 +8610,10 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } return nil }(); err != nil { - return res, err + 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: @@ -8019,7 +8640,10 @@ func decodeCodeScanningDeleteAnalysisResponse(resp *http.Response) (res CodeScan } return nil }(); err != nil { - return res, err + 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: @@ -8052,7 +8676,10 @@ func decodeCodeScanningGetAlertResponse(resp *http.Response) (res CodeScanningGe } return nil }(); err != nil { - return res, err + 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: @@ -8079,7 +8706,10 @@ func decodeCodeScanningGetAlertResponse(resp *http.Response) (res CodeScanningGe } return nil }(); err != nil { - return res, err + 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: @@ -8106,7 +8736,10 @@ func decodeCodeScanningGetAlertResponse(resp *http.Response) (res CodeScanningGe } return nil }(); err != nil { - return res, err + 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: @@ -8133,7 +8766,10 @@ func decodeCodeScanningGetAlertResponse(resp *http.Response) (res CodeScanningGe } return nil }(); err != nil { - return res, err + 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: @@ -8166,7 +8802,10 @@ func decodeCodeScanningGetAnalysisResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8193,7 +8832,10 @@ func decodeCodeScanningGetAnalysisResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8220,7 +8862,10 @@ func decodeCodeScanningGetAnalysisResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8247,7 +8892,10 @@ func decodeCodeScanningGetAnalysisResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8280,7 +8928,10 @@ func decodeCodeScanningGetSarifResponse(resp *http.Response) (res CodeScanningGe } return nil }(); err != nil { - return res, err + 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: @@ -8307,7 +8958,10 @@ func decodeCodeScanningGetSarifResponse(resp *http.Response) (res CodeScanningGe } return nil }(); err != nil { - return res, err + 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: @@ -8337,7 +8991,10 @@ func decodeCodeScanningGetSarifResponse(resp *http.Response) (res CodeScanningGe } return nil }(); err != nil { - return res, err + 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: @@ -8370,7 +9027,10 @@ func decodeCodeScanningListAlertInstancesResponse(resp *http.Response) (res Code } return nil }(); err != nil { - return res, err + 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: @@ -8397,7 +9057,10 @@ func decodeCodeScanningListAlertInstancesResponse(resp *http.Response) (res Code } return nil }(); err != nil { - return res, err + 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: @@ -8424,7 +9087,10 @@ func decodeCodeScanningListAlertInstancesResponse(resp *http.Response) (res Code } return nil }(); err != nil { - return res, err + 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: @@ -8451,7 +9117,10 @@ func decodeCodeScanningListAlertInstancesResponse(resp *http.Response) (res Code } return nil }(); err != nil { - return res, err + 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: @@ -8484,7 +9153,10 @@ func decodeCodeScanningListAlertsForRepoResponse(resp *http.Response) (res CodeS } return nil }(); err != nil { - return res, err + 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: @@ -8511,7 +9183,10 @@ func decodeCodeScanningListAlertsForRepoResponse(resp *http.Response) (res CodeS } return nil }(); err != nil { - return res, err + 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: @@ -8538,7 +9213,10 @@ func decodeCodeScanningListAlertsForRepoResponse(resp *http.Response) (res CodeS } return nil }(); err != nil { - return res, err + 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: @@ -8565,7 +9243,10 @@ func decodeCodeScanningListAlertsForRepoResponse(resp *http.Response) (res CodeS } return nil }(); err != nil { - return res, err + 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: @@ -8598,7 +9279,10 @@ func decodeCodeScanningListRecentAnalysesResponse(resp *http.Response) (res Code } return nil }(); err != nil { - return res, err + 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: @@ -8625,7 +9309,10 @@ func decodeCodeScanningListRecentAnalysesResponse(resp *http.Response) (res Code } return nil }(); err != nil { - return res, err + 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: @@ -8652,7 +9339,10 @@ func decodeCodeScanningListRecentAnalysesResponse(resp *http.Response) (res Code } return nil }(); err != nil { - return res, err + 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: @@ -8679,7 +9369,10 @@ func decodeCodeScanningListRecentAnalysesResponse(resp *http.Response) (res Code } return nil }(); err != nil { - return res, err + 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: @@ -8712,7 +9405,10 @@ func decodeCodeScanningUpdateAlertResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8739,7 +9435,10 @@ func decodeCodeScanningUpdateAlertResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8766,7 +9465,10 @@ func decodeCodeScanningUpdateAlertResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8793,7 +9495,10 @@ func decodeCodeScanningUpdateAlertResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8826,7 +9531,10 @@ func decodeCodeScanningUploadSarifResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8856,7 +9564,10 @@ func decodeCodeScanningUploadSarifResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8883,7 +9594,10 @@ func decodeCodeScanningUploadSarifResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8913,7 +9627,10 @@ func decodeCodeScanningUploadSarifResponse(resp *http.Response) (res CodeScannin } return nil }(); err != nil { - return res, err + 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: @@ -8946,7 +9663,10 @@ func decodeCodesOfConductGetAllCodesOfConductResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -8982,7 +9702,10 @@ func decodeCodesOfConductGetConductCodeResponse(resp *http.Response) (res CodesO } return nil }(); err != nil { - return res, err + 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: @@ -9012,7 +9735,10 @@ func decodeCodesOfConductGetConductCodeResponse(resp *http.Response) (res CodesO } return nil }(); err != nil { - return res, err + 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: @@ -9045,7 +9771,10 @@ func decodeEmojisGetResponse(resp *http.Response) (res EmojisGetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -9099,7 +9828,10 @@ func decodeEnterpriseAdminCreateRegistrationTokenForEnterpriseResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: @@ -9132,7 +9864,10 @@ func decodeEnterpriseAdminCreateRemoveTokenForEnterpriseResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -9165,7 +9900,10 @@ func decodeEnterpriseAdminCreateSelfHostedRunnerGroupForEnterpriseResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -9252,7 +9990,10 @@ func decodeEnterpriseAdminGetAllowedActionsEnterpriseResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -9293,7 +10034,10 @@ func decodeEnterpriseAdminGetAuditLogResponse(resp *http.Response) (res []AuditL } return nil }(); err != nil { - return res, err + 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: @@ -9326,7 +10070,10 @@ func decodeEnterpriseAdminGetGithubActionsPermissionsEnterpriseResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -9359,7 +10106,10 @@ func decodeEnterpriseAdminGetProvisioningInformationForEnterpriseGroupResponse(r } return nil }(); err != nil { - return res, err + 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: @@ -9392,7 +10142,10 @@ func decodeEnterpriseAdminGetProvisioningInformationForEnterpriseUserResponse(re } return nil }(); err != nil { - return res, err + 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: @@ -9425,7 +10178,10 @@ func decodeEnterpriseAdminGetSelfHostedRunnerForEnterpriseResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -9458,7 +10214,10 @@ func decodeEnterpriseAdminGetSelfHostedRunnerGroupForEnterpriseResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -9491,7 +10250,10 @@ func decodeEnterpriseAdminListOrgAccessToSelfHostedRunnerGroupInEnterpriseRespon } return nil }(); err != nil { - return res, err + 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: @@ -9524,7 +10286,10 @@ func decodeEnterpriseAdminListProvisionedGroupsEnterpriseResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -9557,7 +10322,10 @@ func decodeEnterpriseAdminListProvisionedIdentitiesEnterpriseResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -9598,7 +10366,10 @@ func decodeEnterpriseAdminListRunnerApplicationsForEnterpriseResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -9631,7 +10402,10 @@ func decodeEnterpriseAdminListSelectedOrganizationsEnabledGithubActionsEnterpris } return nil }(); err != nil { - return res, err + 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: @@ -9664,7 +10438,10 @@ func decodeEnterpriseAdminListSelfHostedRunnerGroupsForEnterpriseResponse(resp * } return nil }(); err != nil { - return res, err + 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: @@ -9697,7 +10474,10 @@ func decodeEnterpriseAdminListSelfHostedRunnersForEnterpriseResponse(resp *http. } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper EnterpriseAdminListSelfHostedRunnersForEnterpriseOKHeaders wrapper.Response = response @@ -9763,7 +10543,10 @@ func decodeEnterpriseAdminListSelfHostedRunnersInGroupForEnterpriseResponse(resp } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper EnterpriseAdminListSelfHostedRunnersInGroupForEnterpriseOKHeaders wrapper.Response = response @@ -9829,7 +10612,10 @@ func decodeEnterpriseAdminProvisionAndInviteEnterpriseGroupResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -9862,7 +10648,10 @@ func decodeEnterpriseAdminProvisionAndInviteEnterpriseUserResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -9931,7 +10720,10 @@ func decodeEnterpriseAdminSetInformationForProvisionedEnterpriseGroupResponse(re } return nil }(); err != nil { - return res, err + 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: @@ -9964,7 +10756,10 @@ func decodeEnterpriseAdminSetInformationForProvisionedEnterpriseUserResponse(res } return nil }(); err != nil { - return res, err + 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: @@ -10024,7 +10819,10 @@ func decodeEnterpriseAdminUpdateAttributeForEnterpriseGroupResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -10057,7 +10855,10 @@ func decodeEnterpriseAdminUpdateAttributeForEnterpriseUserResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -10090,7 +10891,10 @@ func decodeEnterpriseAdminUpdateSelfHostedRunnerGroupForEnterpriseResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -10129,7 +10933,10 @@ func decodeGistsCheckIsStarredResponse(resp *http.Response) (res GistsCheckIsSta } return nil }(); err != nil { - return res, err + 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: @@ -10156,7 +10963,10 @@ func decodeGistsCheckIsStarredResponse(resp *http.Response) (res GistsCheckIsSta } return nil }(); err != nil { - return res, err + 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: @@ -10189,7 +10999,10 @@ func decodeGistsCreateResponse(resp *http.Response) (res GistsCreateRes, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GistSimpleHeaders wrapper.Response = response @@ -10252,7 +11065,10 @@ func decodeGistsCreateResponse(resp *http.Response) (res GistsCreateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -10279,7 +11095,10 @@ func decodeGistsCreateResponse(resp *http.Response) (res GistsCreateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -10306,7 +11125,10 @@ func decodeGistsCreateResponse(resp *http.Response) (res GistsCreateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -10339,7 +11161,10 @@ func decodeGistsCreateCommentResponse(resp *http.Response) (res GistsCreateComme } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GistCommentHeaders wrapper.Response = response @@ -10402,7 +11227,10 @@ func decodeGistsCreateCommentResponse(resp *http.Response) (res GistsCreateComme } return nil }(); err != nil { - return res, err + 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: @@ -10429,7 +11257,10 @@ func decodeGistsCreateCommentResponse(resp *http.Response) (res GistsCreateComme } return nil }(); err != nil { - return res, err + 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: @@ -10468,7 +11299,10 @@ func decodeGistsDeleteResponse(resp *http.Response) (res GistsDeleteRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -10495,7 +11329,10 @@ func decodeGistsDeleteResponse(resp *http.Response) (res GistsDeleteRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -10534,7 +11371,10 @@ func decodeGistsDeleteCommentResponse(resp *http.Response) (res GistsDeleteComme } return nil }(); err != nil { - return res, err + 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: @@ -10561,7 +11401,10 @@ func decodeGistsDeleteCommentResponse(resp *http.Response) (res GistsDeleteComme } return nil }(); err != nil { - return res, err + 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: @@ -10594,7 +11437,10 @@ func decodeGistsForkResponse(resp *http.Response) (res GistsForkRes, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper BaseGistHeaders wrapper.Response = response @@ -10657,7 +11503,10 @@ func decodeGistsForkResponse(resp *http.Response) (res GistsForkRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -10684,7 +11533,10 @@ func decodeGistsForkResponse(resp *http.Response) (res GistsForkRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -10711,7 +11563,10 @@ func decodeGistsForkResponse(resp *http.Response) (res GistsForkRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -10744,7 +11599,10 @@ func decodeGistsGetResponse(resp *http.Response) (res GistsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -10774,7 +11632,10 @@ func decodeGistsGetResponse(resp *http.Response) (res GistsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -10801,7 +11662,10 @@ func decodeGistsGetResponse(resp *http.Response) (res GistsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -10834,7 +11698,10 @@ func decodeGistsGetCommentResponse(resp *http.Response) (res GistsGetCommentRes, } return nil }(); err != nil { - return res, err + 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: @@ -10864,7 +11731,10 @@ func decodeGistsGetCommentResponse(resp *http.Response) (res GistsGetCommentRes, } return nil }(); err != nil { - return res, err + 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: @@ -10891,7 +11761,10 @@ func decodeGistsGetCommentResponse(resp *http.Response) (res GistsGetCommentRes, } return nil }(); err != nil { - return res, err + 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: @@ -10924,7 +11797,10 @@ func decodeGistsGetRevisionResponse(resp *http.Response) (res GistsGetRevisionRe } return nil }(); err != nil { - return res, err + 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: @@ -10951,7 +11827,10 @@ func decodeGistsGetRevisionResponse(resp *http.Response) (res GistsGetRevisionRe } return nil }(); err != nil { - return res, err + 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: @@ -10978,7 +11857,10 @@ func decodeGistsGetRevisionResponse(resp *http.Response) (res GistsGetRevisionRe } return nil }(); err != nil { - return res, err + 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: @@ -11005,7 +11887,10 @@ func decodeGistsGetRevisionResponse(resp *http.Response) (res GistsGetRevisionRe } return nil }(); err != nil { - return res, err + 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: @@ -11046,7 +11931,10 @@ func decodeGistsListResponse(resp *http.Response) (res GistsListRes, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GistsListOKHeaders wrapper.Response = response @@ -11109,7 +11997,10 @@ func decodeGistsListResponse(resp *http.Response) (res GistsListRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -11150,7 +12041,10 @@ func decodeGistsListCommentsResponse(resp *http.Response) (res GistsListComments } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GistsListCommentsOKHeaders wrapper.Response = response @@ -11213,7 +12107,10 @@ func decodeGistsListCommentsResponse(resp *http.Response) (res GistsListComments } return nil }(); err != nil { - return res, err + 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: @@ -11240,7 +12137,10 @@ func decodeGistsListCommentsResponse(resp *http.Response) (res GistsListComments } return nil }(); err != nil { - return res, err + 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: @@ -11281,7 +12181,10 @@ func decodeGistsListCommitsResponse(resp *http.Response) (res GistsListCommitsRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GistsListCommitsOKHeaders wrapper.Response = response @@ -11344,7 +12247,10 @@ func decodeGistsListCommitsResponse(resp *http.Response) (res GistsListCommitsRe } return nil }(); err != nil { - return res, err + 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: @@ -11371,7 +12277,10 @@ func decodeGistsListCommitsResponse(resp *http.Response) (res GistsListCommitsRe } return nil }(); err != nil { - return res, err + 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: @@ -11412,7 +12321,10 @@ func decodeGistsListForUserResponse(resp *http.Response) (res GistsListForUserRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GistsListForUserOKHeaders wrapper.Response = response @@ -11472,7 +12384,10 @@ func decodeGistsListForUserResponse(resp *http.Response) (res GistsListForUserRe } return nil }(); err != nil { - return res, err + 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: @@ -11513,7 +12428,10 @@ func decodeGistsListForksResponse(resp *http.Response) (res GistsListForksRes, e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GistsListForksOKHeaders wrapper.Response = response @@ -11576,7 +12494,10 @@ func decodeGistsListForksResponse(resp *http.Response) (res GistsListForksRes, e } return nil }(); err != nil { - return res, err + 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: @@ -11603,7 +12524,10 @@ func decodeGistsListForksResponse(resp *http.Response) (res GistsListForksRes, e } return nil }(); err != nil { - return res, err + 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: @@ -11644,7 +12568,10 @@ func decodeGistsListPublicResponse(resp *http.Response) (res GistsListPublicRes, } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GistsListPublicOKHeaders wrapper.Response = response @@ -11707,7 +12634,10 @@ func decodeGistsListPublicResponse(resp *http.Response) (res GistsListPublicRes, } return nil }(); err != nil { - return res, err + 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: @@ -11734,7 +12664,10 @@ func decodeGistsListPublicResponse(resp *http.Response) (res GistsListPublicRes, } return nil }(); err != nil { - return res, err + 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: @@ -11775,7 +12708,10 @@ func decodeGistsListStarredResponse(resp *http.Response) (res GistsListStarredRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GistsListStarredOKHeaders wrapper.Response = response @@ -11838,7 +12774,10 @@ func decodeGistsListStarredResponse(resp *http.Response) (res GistsListStarredRe } return nil }(); err != nil { - return res, err + 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: @@ -11865,7 +12804,10 @@ func decodeGistsListStarredResponse(resp *http.Response) (res GistsListStarredRe } return nil }(); err != nil { - return res, err + 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: @@ -11904,7 +12846,10 @@ func decodeGistsStarResponse(resp *http.Response) (res GistsStarRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -11931,7 +12876,10 @@ func decodeGistsStarResponse(resp *http.Response) (res GistsStarRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -11970,7 +12918,10 @@ func decodeGistsUnstarResponse(resp *http.Response) (res GistsUnstarRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -11997,7 +12948,10 @@ func decodeGistsUnstarResponse(resp *http.Response) (res GistsUnstarRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -12030,7 +12984,10 @@ func decodeGistsUpdateCommentResponse(resp *http.Response) (res GistsUpdateComme } return nil }(); err != nil { - return res, err + 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: @@ -12057,7 +13014,10 @@ func decodeGistsUpdateCommentResponse(resp *http.Response) (res GistsUpdateComme } return nil }(); err != nil { - return res, err + 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: @@ -12090,7 +13050,10 @@ func decodeGitCreateBlobResponse(resp *http.Response) (res GitCreateBlobRes, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ShortBlobHeaders wrapper.Response = response @@ -12150,7 +13113,10 @@ func decodeGitCreateBlobResponse(resp *http.Response) (res GitCreateBlobRes, err } return nil }(); err != nil { - return res, err + 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: @@ -12177,7 +13143,10 @@ func decodeGitCreateBlobResponse(resp *http.Response) (res GitCreateBlobRes, err } return nil }(); err != nil { - return res, err + 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: @@ -12204,7 +13173,10 @@ func decodeGitCreateBlobResponse(resp *http.Response) (res GitCreateBlobRes, err } return nil }(); err != nil { - return res, err + 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: @@ -12231,7 +13203,10 @@ func decodeGitCreateBlobResponse(resp *http.Response) (res GitCreateBlobRes, err } return nil }(); err != nil { - return res, err + 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: @@ -12264,7 +13239,10 @@ func decodeGitCreateCommitResponse(resp *http.Response) (res GitCreateCommitRes, } return nil }(); err != nil { - return res, err + 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 @@ -12324,7 +13302,10 @@ func decodeGitCreateCommitResponse(resp *http.Response) (res GitCreateCommitRes, } return nil }(); err != nil { - return res, err + 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: @@ -12351,7 +13332,10 @@ func decodeGitCreateCommitResponse(resp *http.Response) (res GitCreateCommitRes, } return nil }(); err != nil { - return res, err + 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: @@ -12384,7 +13368,10 @@ func decodeGitCreateRefResponse(resp *http.Response) (res GitCreateRefRes, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GitRefHeaders wrapper.Response = response @@ -12444,7 +13431,10 @@ func decodeGitCreateRefResponse(resp *http.Response) (res GitCreateRefRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -12477,7 +13467,10 @@ func decodeGitCreateTagResponse(resp *http.Response) (res GitCreateTagRes, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GitTagHeaders wrapper.Response = response @@ -12537,7 +13530,10 @@ func decodeGitCreateTagResponse(resp *http.Response) (res GitCreateTagRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -12570,7 +13566,10 @@ func decodeGitCreateTreeResponse(resp *http.Response) (res GitCreateTreeRes, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GitTreeHeaders wrapper.Response = response @@ -12630,7 +13629,10 @@ func decodeGitCreateTreeResponse(resp *http.Response) (res GitCreateTreeRes, err } return nil }(); err != nil { - return res, err + 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: @@ -12657,7 +13659,10 @@ func decodeGitCreateTreeResponse(resp *http.Response) (res GitCreateTreeRes, err } return nil }(); err != nil { - return res, err + 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: @@ -12684,7 +13689,10 @@ func decodeGitCreateTreeResponse(resp *http.Response) (res GitCreateTreeRes, err } return nil }(); err != nil { - return res, err + 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: @@ -12720,7 +13728,10 @@ func decodeGitDeleteRefResponse(resp *http.Response) (res GitDeleteRefRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -12753,7 +13764,10 @@ func decodeGitGetBlobResponse(resp *http.Response) (res GitGetBlobRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -12780,7 +13794,10 @@ func decodeGitGetBlobResponse(resp *http.Response) (res GitGetBlobRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -12807,7 +13824,10 @@ func decodeGitGetBlobResponse(resp *http.Response) (res GitGetBlobRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -12834,7 +13854,10 @@ func decodeGitGetBlobResponse(resp *http.Response) (res GitGetBlobRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -12867,7 +13890,10 @@ func decodeGitGetCommitResponse(resp *http.Response) (res GitGetCommitRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -12894,7 +13920,10 @@ func decodeGitGetCommitResponse(resp *http.Response) (res GitGetCommitRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -12927,7 +13956,10 @@ func decodeGitGetRefResponse(resp *http.Response) (res GitGetRefRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -12954,7 +13986,10 @@ func decodeGitGetRefResponse(resp *http.Response) (res GitGetRefRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -12987,7 +14022,10 @@ func decodeGitGetTagResponse(resp *http.Response) (res GitGetTagRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -13014,7 +14052,10 @@ func decodeGitGetTagResponse(resp *http.Response) (res GitGetTagRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -13047,7 +14088,10 @@ func decodeGitGetTreeResponse(resp *http.Response) (res GitGetTreeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -13074,7 +14118,10 @@ func decodeGitGetTreeResponse(resp *http.Response) (res GitGetTreeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -13101,7 +14148,10 @@ func decodeGitGetTreeResponse(resp *http.Response) (res GitGetTreeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -13142,7 +14192,10 @@ func decodeGitListMatchingRefsResponse(resp *http.Response) (res GitListMatching } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GitListMatchingRefsOKHeaders wrapper.Response = response @@ -13208,7 +14261,10 @@ func decodeGitUpdateRefResponse(resp *http.Response) (res GitUpdateRefRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -13235,7 +14291,10 @@ func decodeGitUpdateRefResponse(resp *http.Response) (res GitUpdateRefRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -13268,7 +14327,10 @@ func decodeGitignoreGetAllTemplatesResponse(resp *http.Response) (res GitignoreG } return nil }(); err != nil { - return res, err + 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: @@ -13304,7 +14366,10 @@ func decodeGitignoreGetTemplateResponse(resp *http.Response) (res GitignoreGetTe } return nil }(); err != nil { - return res, err + 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: @@ -13370,7 +14435,10 @@ func decodeInteractionsSetRestrictionsForAuthenticatedUserResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -13397,7 +14465,10 @@ func decodeInteractionsSetRestrictionsForAuthenticatedUserResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -13430,7 +14501,10 @@ func decodeInteractionsSetRestrictionsForOrgResponse(resp *http.Response) (res I } return nil }(); err != nil { - return res, err + 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: @@ -13457,7 +14531,10 @@ func decodeInteractionsSetRestrictionsForOrgResponse(resp *http.Response) (res I } return nil }(); err != nil { - return res, err + 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: @@ -13490,7 +14567,10 @@ func decodeInteractionsSetRestrictionsForRepoResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -13526,7 +14606,10 @@ func decodeIssuesAddAssigneesResponse(resp *http.Response) (res IssueSimple, err } return nil }(); err != nil { - return res, err + 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: @@ -13562,7 +14645,10 @@ func decodeIssuesCheckUserCanBeAssignedResponse(resp *http.Response) (res Issues } return nil }(); err != nil { - return res, err + 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: @@ -13595,7 +14681,10 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssueHeaders wrapper.Response = response @@ -13655,7 +14744,10 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -13682,7 +14774,10 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -13709,7 +14804,10 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -13736,7 +14834,10 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -13763,7 +14864,10 @@ func decodeIssuesCreateResponse(resp *http.Response) (res IssuesCreateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -13796,7 +14900,10 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssueCommentHeaders wrapper.Response = response @@ -13856,7 +14963,10 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } return nil }(); err != nil { - return res, err + 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: @@ -13883,7 +14993,10 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } return nil }(); err != nil { - return res, err + 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: @@ -13910,7 +15023,10 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } return nil }(); err != nil { - return res, err + 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: @@ -13937,7 +15053,10 @@ func decodeIssuesCreateCommentResponse(resp *http.Response) (res IssuesCreateCom } return nil }(); err != nil { - return res, err + 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: @@ -13970,7 +15089,10 @@ func decodeIssuesCreateLabelResponse(resp *http.Response) (res IssuesCreateLabel } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper LabelHeaders wrapper.Response = response @@ -14030,7 +15152,10 @@ func decodeIssuesCreateLabelResponse(resp *http.Response) (res IssuesCreateLabel } return nil }(); err != nil { - return res, err + 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: @@ -14057,7 +15182,10 @@ func decodeIssuesCreateLabelResponse(resp *http.Response) (res IssuesCreateLabel } return nil }(); err != nil { - return res, err + 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: @@ -14090,7 +15218,10 @@ func decodeIssuesCreateMilestoneResponse(resp *http.Response) (res IssuesCreateM } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper MilestoneHeaders wrapper.Response = response @@ -14150,7 +15281,10 @@ func decodeIssuesCreateMilestoneResponse(resp *http.Response) (res IssuesCreateM } return nil }(); err != nil { - return res, err + 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: @@ -14177,7 +15311,10 @@ func decodeIssuesCreateMilestoneResponse(resp *http.Response) (res IssuesCreateM } return nil }(); err != nil { - return res, err + 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: @@ -14231,7 +15368,10 @@ func decodeIssuesDeleteMilestoneResponse(resp *http.Response) (res IssuesDeleteM } return nil }(); err != nil { - return res, err + 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: @@ -14264,7 +15404,10 @@ func decodeIssuesGetResponse(resp *http.Response) (res IssuesGetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -14291,7 +15434,10 @@ func decodeIssuesGetResponse(resp *http.Response) (res IssuesGetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -14321,7 +15467,10 @@ func decodeIssuesGetResponse(resp *http.Response) (res IssuesGetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -14348,7 +15497,10 @@ func decodeIssuesGetResponse(resp *http.Response) (res IssuesGetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -14381,7 +15533,10 @@ func decodeIssuesGetCommentResponse(resp *http.Response) (res IssuesGetCommentRe } return nil }(); err != nil { - return res, err + 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: @@ -14408,7 +15563,10 @@ func decodeIssuesGetCommentResponse(resp *http.Response) (res IssuesGetCommentRe } return nil }(); err != nil { - return res, err + 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: @@ -14441,7 +15599,10 @@ func decodeIssuesGetEventResponse(resp *http.Response) (res IssuesGetEventRes, e } return nil }(); err != nil { - return res, err + 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: @@ -14468,7 +15629,10 @@ func decodeIssuesGetEventResponse(resp *http.Response) (res IssuesGetEventRes, e } return nil }(); err != nil { - return res, err + 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: @@ -14495,7 +15659,10 @@ func decodeIssuesGetEventResponse(resp *http.Response) (res IssuesGetEventRes, e } return nil }(); err != nil { - return res, err + 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: @@ -14522,7 +15689,10 @@ func decodeIssuesGetEventResponse(resp *http.Response) (res IssuesGetEventRes, e } return nil }(); err != nil { - return res, err + 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: @@ -14555,7 +15725,10 @@ func decodeIssuesGetLabelResponse(resp *http.Response) (res IssuesGetLabelRes, e } return nil }(); err != nil { - return res, err + 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: @@ -14582,7 +15755,10 @@ func decodeIssuesGetLabelResponse(resp *http.Response) (res IssuesGetLabelRes, e } return nil }(); err != nil { - return res, err + 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: @@ -14615,7 +15791,10 @@ func decodeIssuesGetMilestoneResponse(resp *http.Response) (res IssuesGetMilesto } return nil }(); err != nil { - return res, err + 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: @@ -14642,7 +15821,10 @@ func decodeIssuesGetMilestoneResponse(resp *http.Response) (res IssuesGetMilesto } return nil }(); err != nil { - return res, err + 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: @@ -14683,7 +15865,10 @@ func decodeIssuesListResponse(resp *http.Response) (res IssuesListRes, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListOKHeaders wrapper.Response = response @@ -14746,7 +15931,10 @@ func decodeIssuesListResponse(resp *http.Response) (res IssuesListRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -14773,7 +15961,10 @@ func decodeIssuesListResponse(resp *http.Response) (res IssuesListRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -14814,7 +16005,10 @@ func decodeIssuesListAssigneesResponse(resp *http.Response) (res IssuesListAssig } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListAssigneesOKHeaders wrapper.Response = response @@ -14874,7 +16068,10 @@ func decodeIssuesListAssigneesResponse(resp *http.Response) (res IssuesListAssig } return nil }(); err != nil { - return res, err + 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: @@ -14915,7 +16112,10 @@ func decodeIssuesListCommentsResponse(resp *http.Response) (res IssuesListCommen } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListCommentsOKHeaders wrapper.Response = response @@ -14975,7 +16175,10 @@ func decodeIssuesListCommentsResponse(resp *http.Response) (res IssuesListCommen } return nil }(); err != nil { - return res, err + 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: @@ -15002,7 +16205,10 @@ func decodeIssuesListCommentsResponse(resp *http.Response) (res IssuesListCommen } return nil }(); err != nil { - return res, err + 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: @@ -15043,7 +16249,10 @@ func decodeIssuesListCommentsForRepoResponse(resp *http.Response) (res IssuesLis } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListCommentsForRepoOKHeaders wrapper.Response = response @@ -15103,7 +16312,10 @@ func decodeIssuesListCommentsForRepoResponse(resp *http.Response) (res IssuesLis } return nil }(); err != nil { - return res, err + 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: @@ -15130,7 +16342,10 @@ func decodeIssuesListCommentsForRepoResponse(resp *http.Response) (res IssuesLis } return nil }(); err != nil { - return res, err + 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: @@ -15171,7 +16386,10 @@ func decodeIssuesListEventsForRepoResponse(resp *http.Response) (res IssuesListE } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListEventsForRepoOKHeaders wrapper.Response = response @@ -15231,7 +16449,10 @@ func decodeIssuesListEventsForRepoResponse(resp *http.Response) (res IssuesListE } return nil }(); err != nil { - return res, err + 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: @@ -15272,7 +16493,10 @@ func decodeIssuesListForAuthenticatedUserResponse(resp *http.Response) (res Issu } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListForAuthenticatedUserOKHeaders wrapper.Response = response @@ -15335,7 +16559,10 @@ func decodeIssuesListForAuthenticatedUserResponse(resp *http.Response) (res Issu } return nil }(); err != nil { - return res, err + 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: @@ -15376,7 +16603,10 @@ func decodeIssuesListForOrgResponse(resp *http.Response) (res IssuesListForOrgRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListForOrgOKHeaders wrapper.Response = response @@ -15436,7 +16666,10 @@ func decodeIssuesListForOrgResponse(resp *http.Response) (res IssuesListForOrgRe } return nil }(); err != nil { - return res, err + 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: @@ -15477,7 +16710,10 @@ func decodeIssuesListForRepoResponse(resp *http.Response) (res IssuesListForRepo } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListForRepoOKHeaders wrapper.Response = response @@ -15537,7 +16773,10 @@ func decodeIssuesListForRepoResponse(resp *http.Response) (res IssuesListForRepo } return nil }(); err != nil { - return res, err + 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: @@ -15564,7 +16803,10 @@ func decodeIssuesListForRepoResponse(resp *http.Response) (res IssuesListForRepo } return nil }(); err != nil { - return res, err + 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: @@ -15591,7 +16833,10 @@ func decodeIssuesListForRepoResponse(resp *http.Response) (res IssuesListForRepo } return nil }(); err != nil { - return res, err + 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: @@ -15632,7 +16877,10 @@ func decodeIssuesListLabelsForMilestoneResponse(resp *http.Response) (res Issues } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListLabelsForMilestoneOKHeaders wrapper.Response = response @@ -15706,7 +16954,10 @@ func decodeIssuesListLabelsForRepoResponse(resp *http.Response) (res IssuesListL } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListLabelsForRepoOKHeaders wrapper.Response = response @@ -15766,7 +17017,10 @@ func decodeIssuesListLabelsForRepoResponse(resp *http.Response) (res IssuesListL } return nil }(); err != nil { - return res, err + 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: @@ -15807,7 +17061,10 @@ func decodeIssuesListLabelsOnIssueResponse(resp *http.Response) (res IssuesListL } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListLabelsOnIssueOKHeaders wrapper.Response = response @@ -15867,7 +17124,10 @@ func decodeIssuesListLabelsOnIssueResponse(resp *http.Response) (res IssuesListL } return nil }(); err != nil { - return res, err + 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: @@ -15908,7 +17168,10 @@ func decodeIssuesListMilestonesResponse(resp *http.Response) (res IssuesListMile } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper IssuesListMilestonesOKHeaders wrapper.Response = response @@ -15968,7 +17231,10 @@ func decodeIssuesListMilestonesResponse(resp *http.Response) (res IssuesListMile } return nil }(); err != nil { - return res, err + 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: @@ -16004,7 +17270,10 @@ func decodeIssuesLockResponse(resp *http.Response) (res IssuesLockRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -16031,7 +17300,10 @@ func decodeIssuesLockResponse(resp *http.Response) (res IssuesLockRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -16058,7 +17330,10 @@ func decodeIssuesLockResponse(resp *http.Response) (res IssuesLockRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -16085,7 +17360,10 @@ func decodeIssuesLockResponse(resp *http.Response) (res IssuesLockRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -16121,7 +17399,10 @@ func decodeIssuesRemoveAllLabelsResponse(resp *http.Response) (res IssuesRemoveA } return nil }(); err != nil { - return res, err + 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: @@ -16154,7 +17435,10 @@ func decodeIssuesRemoveAssigneesResponse(resp *http.Response) (res IssueSimple, } return nil }(); err != nil { - return res, err + 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: @@ -16187,7 +17471,10 @@ func decodeIssuesRemoveLabelResponse(resp *http.Response) (res IssuesRemoveLabel } return nil }(); err != nil { - return res, err + 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: @@ -16214,7 +17501,10 @@ func decodeIssuesRemoveLabelResponse(resp *http.Response) (res IssuesRemoveLabel } return nil }(); err != nil { - return res, err + 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: @@ -16241,7 +17531,10 @@ func decodeIssuesRemoveLabelResponse(resp *http.Response) (res IssuesRemoveLabel } return nil }(); err != nil { - return res, err + 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: @@ -16277,7 +17570,10 @@ func decodeIssuesUnlockResponse(resp *http.Response) (res IssuesUnlockRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -16304,7 +17600,10 @@ func decodeIssuesUnlockResponse(resp *http.Response) (res IssuesUnlockRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -16337,7 +17636,10 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -16364,7 +17666,10 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -16391,7 +17696,10 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -16418,7 +17726,10 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -16445,7 +17756,10 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -16472,7 +17786,10 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -16499,7 +17816,10 @@ func decodeIssuesUpdateResponse(resp *http.Response) (res IssuesUpdateRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -16532,7 +17852,10 @@ func decodeIssuesUpdateCommentResponse(resp *http.Response) (res IssuesUpdateCom } return nil }(); err != nil { - return res, err + 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: @@ -16559,7 +17882,10 @@ func decodeIssuesUpdateCommentResponse(resp *http.Response) (res IssuesUpdateCom } return nil }(); err != nil { - return res, err + 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: @@ -16592,7 +17918,10 @@ func decodeIssuesUpdateLabelResponse(resp *http.Response) (res Label, err error) } return nil }(); err != nil { - return res, err + 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: @@ -16625,7 +17954,10 @@ func decodeIssuesUpdateMilestoneResponse(resp *http.Response) (res Milestone, er } return nil }(); err != nil { - return res, err + 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: @@ -16658,7 +17990,10 @@ func decodeLicensesGetResponse(resp *http.Response) (res LicensesGetRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -16688,7 +18023,10 @@ func decodeLicensesGetResponse(resp *http.Response) (res LicensesGetRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -16715,7 +18053,10 @@ func decodeLicensesGetResponse(resp *http.Response) (res LicensesGetRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -16748,7 +18089,10 @@ func decodeLicensesGetAllCommonlyUsedResponse(resp *http.Response) (res Licenses } return nil }(); err != nil { - return res, err + 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: @@ -16784,7 +18128,10 @@ func decodeLicensesGetForRepoResponse(resp *http.Response) (res LicenseContent, } return nil }(); err != nil { - return res, err + 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: @@ -16817,7 +18164,10 @@ func decodeMetaGetResponse(resp *http.Response) (res MetaGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -16877,7 +18227,10 @@ func decodeMetaRootResponse(resp *http.Response) (res MetaRootOK, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -16925,7 +18278,10 @@ func decodeMigrationsDeleteArchiveForAuthenticatedUserResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -16952,7 +18308,10 @@ func decodeMigrationsDeleteArchiveForAuthenticatedUserResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -16979,7 +18338,10 @@ func decodeMigrationsDeleteArchiveForAuthenticatedUserResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -17015,7 +18377,10 @@ func decodeMigrationsDeleteArchiveForOrgResponse(resp *http.Response) (res Migra } return nil }(); err != nil { - return res, err + 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: @@ -17051,7 +18416,10 @@ func decodeMigrationsDownloadArchiveForOrgResponse(resp *http.Response) (res Mig } return nil }(); err != nil { - return res, err + 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: @@ -17090,7 +18458,10 @@ func decodeMigrationsGetArchiveForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -17117,7 +18488,10 @@ func decodeMigrationsGetArchiveForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -17150,7 +18524,10 @@ func decodeMigrationsGetCommitAuthorsResponse(resp *http.Response) (res Migratio } return nil }(); err != nil { - return res, err + 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: @@ -17177,7 +18554,10 @@ func decodeMigrationsGetCommitAuthorsResponse(resp *http.Response) (res Migratio } return nil }(); err != nil { - return res, err + 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: @@ -17210,7 +18590,10 @@ func decodeMigrationsGetImportStatusResponse(resp *http.Response) (res Migration } return nil }(); err != nil { - return res, err + 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: @@ -17237,7 +18620,10 @@ func decodeMigrationsGetImportStatusResponse(resp *http.Response) (res Migration } return nil }(); err != nil { - return res, err + 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: @@ -17278,7 +18664,10 @@ func decodeMigrationsGetLargeFilesResponse(resp *http.Response) (res []PorterLar } return nil }(); err != nil { - return res, err + 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: @@ -17311,7 +18700,10 @@ func decodeMigrationsGetStatusForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -17341,7 +18733,10 @@ func decodeMigrationsGetStatusForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -17368,7 +18763,10 @@ func decodeMigrationsGetStatusForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -17395,7 +18793,10 @@ func decodeMigrationsGetStatusForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -17428,7 +18829,10 @@ func decodeMigrationsGetStatusForOrgResponse(resp *http.Response) (res Migration } return nil }(); err != nil { - return res, err + 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: @@ -17455,7 +18859,10 @@ func decodeMigrationsGetStatusForOrgResponse(resp *http.Response) (res Migration } return nil }(); err != nil { - return res, err + 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: @@ -17496,7 +18903,10 @@ func decodeMigrationsListForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper MigrationsListForAuthenticatedUserOKHeaders wrapper.Response = response @@ -17559,7 +18969,10 @@ func decodeMigrationsListForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -17586,7 +18999,10 @@ func decodeMigrationsListForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -17627,7 +19043,10 @@ func decodeMigrationsListForOrgResponse(resp *http.Response) (res MigrationsList } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper MigrationsListForOrgOKHeaders wrapper.Response = response @@ -17701,7 +19120,10 @@ func decodeMigrationsListReposForOrgResponse(resp *http.Response) (res Migration } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper MigrationsListReposForOrgOKHeaders wrapper.Response = response @@ -17761,7 +19183,10 @@ func decodeMigrationsListReposForOrgResponse(resp *http.Response) (res Migration } return nil }(); err != nil { - return res, err + 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: @@ -17802,7 +19227,10 @@ func decodeMigrationsListReposForUserResponse(resp *http.Response) (res Migratio } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper MigrationsListReposForUserOKHeaders wrapper.Response = response @@ -17862,7 +19290,10 @@ func decodeMigrationsListReposForUserResponse(resp *http.Response) (res Migratio } return nil }(); err != nil { - return res, err + 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: @@ -17895,7 +19326,10 @@ func decodeMigrationsMapCommitAuthorResponse(resp *http.Response) (res Migration } return nil }(); err != nil { - return res, err + 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: @@ -17922,7 +19356,10 @@ func decodeMigrationsMapCommitAuthorResponse(resp *http.Response) (res Migration } return nil }(); err != nil { - return res, err + 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: @@ -17949,7 +19386,10 @@ func decodeMigrationsMapCommitAuthorResponse(resp *http.Response) (res Migration } return nil }(); err != nil { - return res, err + 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: @@ -17982,7 +19422,10 @@ func decodeMigrationsSetLfsPreferenceResponse(resp *http.Response) (res Migratio } return nil }(); err != nil { - return res, err + 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: @@ -18009,7 +19452,10 @@ func decodeMigrationsSetLfsPreferenceResponse(resp *http.Response) (res Migratio } return nil }(); err != nil { - return res, err + 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: @@ -18042,7 +19488,10 @@ func decodeMigrationsStartForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -18072,7 +19521,10 @@ func decodeMigrationsStartForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -18099,7 +19551,10 @@ func decodeMigrationsStartForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -18126,7 +19581,10 @@ func decodeMigrationsStartForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -18159,7 +19617,10 @@ func decodeMigrationsStartForOrgResponse(resp *http.Response) (res MigrationsSta } return nil }(); err != nil { - return res, err + 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: @@ -18186,7 +19647,10 @@ func decodeMigrationsStartForOrgResponse(resp *http.Response) (res MigrationsSta } return nil }(); err != nil { - return res, err + 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: @@ -18213,7 +19677,10 @@ func decodeMigrationsStartForOrgResponse(resp *http.Response) (res MigrationsSta } return nil }(); err != nil { - return res, err + 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: @@ -18246,7 +19713,10 @@ func decodeMigrationsStartImportResponse(resp *http.Response) (res MigrationsSta } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ImportHeaders wrapper.Response = response @@ -18306,7 +19776,10 @@ func decodeMigrationsStartImportResponse(resp *http.Response) (res MigrationsSta } return nil }(); err != nil { - return res, err + 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: @@ -18333,7 +19806,10 @@ func decodeMigrationsStartImportResponse(resp *http.Response) (res MigrationsSta } return nil }(); err != nil { - return res, err + 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: @@ -18372,7 +19848,10 @@ func decodeMigrationsUnlockRepoForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -18399,7 +19878,10 @@ func decodeMigrationsUnlockRepoForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -18426,7 +19908,10 @@ func decodeMigrationsUnlockRepoForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -18462,7 +19947,10 @@ func decodeMigrationsUnlockRepoForOrgResponse(resp *http.Response) (res Migratio } return nil }(); err != nil { - return res, err + 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: @@ -18495,7 +19983,10 @@ func decodeMigrationsUpdateImportResponse(resp *http.Response) (res Import, err } return nil }(); err != nil { - return res, err + 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: @@ -18528,7 +20019,10 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AuthorizationHeaders wrapper.Response = response @@ -18591,7 +20085,10 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -18618,7 +20115,10 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -18645,7 +20145,10 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -18672,7 +20175,10 @@ func decodeOAuthAuthorizationsCreateAuthorizationResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -18711,7 +20217,10 @@ func decodeOAuthAuthorizationsDeleteAuthorizationResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -18738,7 +20247,10 @@ func decodeOAuthAuthorizationsDeleteAuthorizationResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -18777,7 +20289,10 @@ func decodeOAuthAuthorizationsDeleteGrantResponse(resp *http.Response) (res OAut } return nil }(); err != nil { - return res, err + 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: @@ -18804,7 +20319,10 @@ func decodeOAuthAuthorizationsDeleteGrantResponse(resp *http.Response) (res OAut } return nil }(); err != nil { - return res, err + 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: @@ -18837,7 +20355,10 @@ func decodeOAuthAuthorizationsGetAuthorizationResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -18867,7 +20388,10 @@ func decodeOAuthAuthorizationsGetAuthorizationResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -18894,7 +20418,10 @@ func decodeOAuthAuthorizationsGetAuthorizationResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -18927,7 +20454,10 @@ func decodeOAuthAuthorizationsGetGrantResponse(resp *http.Response) (res OAuthAu } return nil }(); err != nil { - return res, err + 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: @@ -18957,7 +20487,10 @@ func decodeOAuthAuthorizationsGetGrantResponse(resp *http.Response) (res OAuthAu } return nil }(); err != nil { - return res, err + 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: @@ -18984,7 +20517,10 @@ func decodeOAuthAuthorizationsGetGrantResponse(resp *http.Response) (res OAuthAu } return nil }(); err != nil { - return res, err + 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: @@ -19017,7 +20553,10 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OAuthAuthorizationsGetOrCreateAuthorizationForAppApplicationJSONOK wrapper.Response = response @@ -19077,7 +20616,10 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OAuthAuthorizationsGetOrCreateAuthorizationForAppApplicationJSONCreated wrapper.Response = response @@ -19140,7 +20682,10 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -19167,7 +20712,10 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -19194,7 +20742,10 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -19227,7 +20778,10 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRespon } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintApplicationJSONOK wrapper.Response = response @@ -19287,7 +20841,10 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRespon } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintApplicationJSONCreated wrapper.Response = response @@ -19347,7 +20904,10 @@ func decodeOAuthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRespon } return nil }(); err != nil { - return res, err + 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: @@ -19388,7 +20948,10 @@ func decodeOAuthAuthorizationsListAuthorizationsResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OAuthAuthorizationsListAuthorizationsOKHeaders wrapper.Response = response @@ -19451,7 +21014,10 @@ func decodeOAuthAuthorizationsListAuthorizationsResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -19478,7 +21044,10 @@ func decodeOAuthAuthorizationsListAuthorizationsResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -19505,7 +21074,10 @@ func decodeOAuthAuthorizationsListAuthorizationsResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -19546,7 +21118,10 @@ func decodeOAuthAuthorizationsListGrantsResponse(resp *http.Response) (res OAuth } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OAuthAuthorizationsListGrantsOKHeaders wrapper.Response = response @@ -19609,7 +21184,10 @@ func decodeOAuthAuthorizationsListGrantsResponse(resp *http.Response) (res OAuth } return nil }(); err != nil { - return res, err + 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: @@ -19636,7 +21214,10 @@ func decodeOAuthAuthorizationsListGrantsResponse(resp *http.Response) (res OAuth } return nil }(); err != nil { - return res, err + 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: @@ -19663,7 +21244,10 @@ func decodeOAuthAuthorizationsListGrantsResponse(resp *http.Response) (res OAuth } return nil }(); err != nil { - return res, err + 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: @@ -19696,7 +21280,10 @@ func decodeOAuthAuthorizationsUpdateAuthorizationResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -19723,7 +21310,10 @@ func decodeOAuthAuthorizationsUpdateAuthorizationResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -19759,7 +21349,10 @@ func decodeOrgsBlockUserResponse(resp *http.Response) (res OrgsBlockUserRes, err } return nil }(); err != nil { - return res, err + 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: @@ -19795,7 +21388,10 @@ func decodeOrgsCancelInvitationResponse(resp *http.Response) (res OrgsCancelInvi } return nil }(); err != nil { - return res, err + 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: @@ -19822,7 +21418,10 @@ func decodeOrgsCancelInvitationResponse(resp *http.Response) (res OrgsCancelInvi } return nil }(); err != nil { - return res, err + 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: @@ -19858,7 +21457,10 @@ func decodeOrgsCheckBlockedUserResponse(resp *http.Response) (res OrgsCheckBlock } return nil }(); err != nil { - return res, err + 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: @@ -19950,7 +21552,10 @@ func decodeOrgsConvertMemberToOutsideCollaboratorResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -19983,7 +21588,10 @@ func decodeOrgsConvertMemberToOutsideCollaboratorResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -20016,7 +21624,10 @@ func decodeOrgsCreateInvitationResponse(resp *http.Response) (res OrgsCreateInvi } return nil }(); err != nil { - return res, err + 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: @@ -20043,7 +21654,10 @@ func decodeOrgsCreateInvitationResponse(resp *http.Response) (res OrgsCreateInvi } return nil }(); err != nil { - return res, err + 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: @@ -20070,7 +21684,10 @@ func decodeOrgsCreateInvitationResponse(resp *http.Response) (res OrgsCreateInvi } return nil }(); err != nil { - return res, err + 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: @@ -20103,7 +21720,10 @@ func decodeOrgsCreateWebhookResponse(resp *http.Response) (res OrgsCreateWebhook } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgHookHeaders wrapper.Response = response @@ -20163,7 +21783,10 @@ func decodeOrgsCreateWebhookResponse(resp *http.Response) (res OrgsCreateWebhook } return nil }(); err != nil { - return res, err + 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: @@ -20190,7 +21813,10 @@ func decodeOrgsCreateWebhookResponse(resp *http.Response) (res OrgsCreateWebhook } return nil }(); err != nil { - return res, err + 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: @@ -20226,7 +21852,10 @@ func decodeOrgsDeleteWebhookResponse(resp *http.Response) (res OrgsDeleteWebhook } return nil }(); err != nil { - return res, err + 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: @@ -20259,7 +21888,10 @@ func decodeOrgsGetResponse(resp *http.Response) (res OrgsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -20286,7 +21918,10 @@ func decodeOrgsGetResponse(resp *http.Response) (res OrgsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -20327,7 +21962,10 @@ func decodeOrgsGetAuditLogResponse(resp *http.Response) (res []AuditLogEvent, er } return nil }(); err != nil { - return res, err + 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: @@ -20360,7 +21998,10 @@ func decodeOrgsGetMembershipForAuthenticatedUserResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -20387,7 +22028,10 @@ func decodeOrgsGetMembershipForAuthenticatedUserResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -20414,7 +22058,10 @@ func decodeOrgsGetMembershipForAuthenticatedUserResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -20447,7 +22094,10 @@ func decodeOrgsGetMembershipForUserResponse(resp *http.Response) (res OrgsGetMem } return nil }(); err != nil { - return res, err + 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: @@ -20474,7 +22124,10 @@ func decodeOrgsGetMembershipForUserResponse(resp *http.Response) (res OrgsGetMem } return nil }(); err != nil { - return res, err + 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: @@ -20501,7 +22154,10 @@ func decodeOrgsGetMembershipForUserResponse(resp *http.Response) (res OrgsGetMem } return nil }(); err != nil { - return res, err + 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: @@ -20534,7 +22190,10 @@ func decodeOrgsGetWebhookResponse(resp *http.Response) (res OrgsGetWebhookRes, e } return nil }(); err != nil { - return res, err + 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: @@ -20561,7 +22220,10 @@ func decodeOrgsGetWebhookResponse(resp *http.Response) (res OrgsGetWebhookRes, e } return nil }(); err != nil { - return res, err + 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: @@ -20594,7 +22256,10 @@ func decodeOrgsGetWebhookConfigForOrgResponse(resp *http.Response) (res WebhookC } return nil }(); err != nil { - return res, err + 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: @@ -20627,7 +22292,10 @@ func decodeOrgsGetWebhookDeliveryResponse(resp *http.Response) (res OrgsGetWebho } return nil }(); err != nil { - return res, err + 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: @@ -20654,7 +22322,10 @@ func decodeOrgsGetWebhookDeliveryResponse(resp *http.Response) (res OrgsGetWebho } return nil }(); err != nil { - return res, err + 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: @@ -20681,7 +22352,10 @@ func decodeOrgsGetWebhookDeliveryResponse(resp *http.Response) (res OrgsGetWebho } return nil }(); err != nil { - return res, err + 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: @@ -20722,7 +22396,10 @@ func decodeOrgsListResponse(resp *http.Response) (res OrgsListRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListOKHeaders wrapper.Response = response @@ -20791,7 +22468,10 @@ func decodeOrgsListBlockedUsersResponse(resp *http.Response) (res OrgsListBlocke } return nil }(); err != nil { - return res, err + 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: @@ -20818,7 +22498,10 @@ func decodeOrgsListBlockedUsersResponse(resp *http.Response) (res OrgsListBlocke } return nil }(); err != nil { - return res, err + 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: @@ -20859,7 +22542,10 @@ func decodeOrgsListFailedInvitationsResponse(resp *http.Response) (res OrgsListF } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListFailedInvitationsOKHeaders wrapper.Response = response @@ -20919,7 +22605,10 @@ func decodeOrgsListFailedInvitationsResponse(resp *http.Response) (res OrgsListF } return nil }(); err != nil { - return res, err + 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: @@ -20960,7 +22649,10 @@ func decodeOrgsListForAuthenticatedUserResponse(resp *http.Response) (res OrgsLi } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListForAuthenticatedUserOKHeaders wrapper.Response = response @@ -21023,7 +22715,10 @@ func decodeOrgsListForAuthenticatedUserResponse(resp *http.Response) (res OrgsLi } return nil }(); err != nil { - return res, err + 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: @@ -21050,7 +22745,10 @@ func decodeOrgsListForAuthenticatedUserResponse(resp *http.Response) (res OrgsLi } return nil }(); err != nil { - return res, err + 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: @@ -21091,7 +22789,10 @@ func decodeOrgsListForUserResponse(resp *http.Response) (res OrgsListForUserOKHe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListForUserOKHeaders wrapper.Response = response @@ -21165,7 +22866,10 @@ func decodeOrgsListInvitationTeamsResponse(resp *http.Response) (res OrgsListInv } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListInvitationTeamsOKHeaders wrapper.Response = response @@ -21225,7 +22929,10 @@ func decodeOrgsListInvitationTeamsResponse(resp *http.Response) (res OrgsListInv } return nil }(); err != nil { - return res, err + 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: @@ -21266,7 +22973,10 @@ func decodeOrgsListMembersResponse(resp *http.Response) (res OrgsListMembersRes, } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListMembersOKHeaders wrapper.Response = response @@ -21361,7 +23071,10 @@ func decodeOrgsListMembersResponse(resp *http.Response) (res OrgsListMembersRes, } return nil }(); err != nil { - return res, err + 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: @@ -21402,7 +23115,10 @@ func decodeOrgsListMembershipsForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListMembershipsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -21465,7 +23181,10 @@ func decodeOrgsListMembershipsForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -21492,7 +23211,10 @@ func decodeOrgsListMembershipsForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -21519,7 +23241,10 @@ func decodeOrgsListMembershipsForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -21560,7 +23285,10 @@ func decodeOrgsListOutsideCollaboratorsResponse(resp *http.Response) (res OrgsLi } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListOutsideCollaboratorsOKHeaders wrapper.Response = response @@ -21634,7 +23362,10 @@ func decodeOrgsListPendingInvitationsResponse(resp *http.Response) (res OrgsList } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListPendingInvitationsOKHeaders wrapper.Response = response @@ -21694,7 +23425,10 @@ func decodeOrgsListPendingInvitationsResponse(resp *http.Response) (res OrgsList } return nil }(); err != nil { - return res, err + 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: @@ -21735,7 +23469,10 @@ func decodeOrgsListPublicMembersResponse(resp *http.Response) (res OrgsListPubli } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListPublicMembersOKHeaders wrapper.Response = response @@ -21809,7 +23546,10 @@ func decodeOrgsListSamlSSOAuthorizationsResponse(resp *http.Response) (res []Cre } return nil }(); err != nil { - return res, err + 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: @@ -21842,7 +23582,10 @@ func decodeOrgsListWebhookDeliveriesResponse(resp *http.Response) (res OrgsListW } return nil }(); err != nil { - return res, err + 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: @@ -21869,7 +23612,10 @@ func decodeOrgsListWebhookDeliveriesResponse(resp *http.Response) (res OrgsListW } return nil }(); err != nil { - return res, err + 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: @@ -21896,7 +23642,10 @@ func decodeOrgsListWebhookDeliveriesResponse(resp *http.Response) (res OrgsListW } return nil }(); err != nil { - return res, err + 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: @@ -21937,7 +23686,10 @@ func decodeOrgsListWebhooksResponse(resp *http.Response) (res OrgsListWebhooksRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper OrgsListWebhooksOKHeaders wrapper.Response = response @@ -21997,7 +23749,10 @@ func decodeOrgsListWebhooksResponse(resp *http.Response) (res OrgsListWebhooksRe } return nil }(); err != nil { - return res, err + 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: @@ -22033,7 +23788,10 @@ func decodeOrgsPingWebhookResponse(resp *http.Response) (res OrgsPingWebhookRes, } return nil }(); err != nil { - return res, err + 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: @@ -22066,7 +23824,10 @@ func decodeOrgsRedeliverWebhookDeliveryResponse(resp *http.Response) (res OrgsRe } return nil }(); err != nil { - return res, err + 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: @@ -22093,7 +23854,10 @@ func decodeOrgsRedeliverWebhookDeliveryResponse(resp *http.Response) (res OrgsRe } return nil }(); err != nil { - return res, err + 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: @@ -22120,7 +23884,10 @@ func decodeOrgsRedeliverWebhookDeliveryResponse(resp *http.Response) (res OrgsRe } return nil }(); err != nil { - return res, err + 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: @@ -22156,7 +23923,10 @@ func decodeOrgsRemoveMemberResponse(resp *http.Response) (res OrgsRemoveMemberRe } return nil }(); err != nil { - return res, err + 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: @@ -22192,7 +23962,10 @@ func decodeOrgsRemoveMembershipForUserResponse(resp *http.Response) (res OrgsRem } return nil }(); err != nil { - return res, err + 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: @@ -22219,7 +23992,10 @@ func decodeOrgsRemoveMembershipForUserResponse(resp *http.Response) (res OrgsRem } return nil }(); err != nil { - return res, err + 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: @@ -22255,7 +24031,10 @@ func decodeOrgsRemoveOutsideCollaboratorResponse(resp *http.Response) (res OrgsR } return nil }(); err != nil { - return res, err + 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: @@ -22300,7 +24079,10 @@ func decodeOrgsRemoveSamlSSOAuthorizationResponse(resp *http.Response) (res Orgs } return nil }(); err != nil { - return res, err + 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: @@ -22333,7 +24115,10 @@ func decodeOrgsSetMembershipForUserResponse(resp *http.Response) (res OrgsSetMem } return nil }(); err != nil { - return res, err + 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: @@ -22360,7 +24145,10 @@ func decodeOrgsSetMembershipForUserResponse(resp *http.Response) (res OrgsSetMem } return nil }(); err != nil { - return res, err + 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: @@ -22387,7 +24175,10 @@ func decodeOrgsSetMembershipForUserResponse(resp *http.Response) (res OrgsSetMem } return nil }(); err != nil { - return res, err + 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: @@ -22423,7 +24214,10 @@ func decodeOrgsSetPublicMembershipForAuthenticatedUserResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -22465,7 +24259,10 @@ func decodeOrgsUpdateMembershipForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -22492,7 +24289,10 @@ func decodeOrgsUpdateMembershipForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -22519,7 +24319,10 @@ func decodeOrgsUpdateMembershipForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -22546,7 +24349,10 @@ func decodeOrgsUpdateMembershipForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -22579,7 +24385,10 @@ func decodeOrgsUpdateWebhookResponse(resp *http.Response) (res OrgsUpdateWebhook } return nil }(); err != nil { - return res, err + 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: @@ -22606,7 +24415,10 @@ func decodeOrgsUpdateWebhookResponse(resp *http.Response) (res OrgsUpdateWebhook } return nil }(); err != nil { - return res, err + 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: @@ -22633,7 +24445,10 @@ func decodeOrgsUpdateWebhookResponse(resp *http.Response) (res OrgsUpdateWebhook } return nil }(); err != nil { - return res, err + 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: @@ -22666,7 +24481,10 @@ func decodeOrgsUpdateWebhookConfigForOrgResponse(resp *http.Response) (res Webho } return nil }(); err != nil { - return res, err + 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: @@ -22702,7 +24520,10 @@ func decodePackagesDeletePackageForAuthenticatedUserResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -22729,7 +24550,10 @@ func decodePackagesDeletePackageForAuthenticatedUserResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -22756,7 +24580,10 @@ func decodePackagesDeletePackageForAuthenticatedUserResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -22792,7 +24619,10 @@ func decodePackagesDeletePackageForOrgResponse(resp *http.Response) (res Package } return nil }(); err != nil { - return res, err + 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: @@ -22819,7 +24649,10 @@ func decodePackagesDeletePackageForOrgResponse(resp *http.Response) (res Package } return nil }(); err != nil { - return res, err + 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: @@ -22846,7 +24679,10 @@ func decodePackagesDeletePackageForOrgResponse(resp *http.Response) (res Package } return nil }(); err != nil { - return res, err + 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: @@ -22882,7 +24718,10 @@ func decodePackagesDeletePackageForUserResponse(resp *http.Response) (res Packag } return nil }(); err != nil { - return res, err + 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: @@ -22909,7 +24748,10 @@ func decodePackagesDeletePackageForUserResponse(resp *http.Response) (res Packag } return nil }(); err != nil { - return res, err + 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: @@ -22936,7 +24778,10 @@ func decodePackagesDeletePackageForUserResponse(resp *http.Response) (res Packag } return nil }(); err != nil { - return res, err + 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: @@ -22972,7 +24817,10 @@ func decodePackagesDeletePackageVersionForAuthenticatedUserResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -22999,7 +24847,10 @@ func decodePackagesDeletePackageVersionForAuthenticatedUserResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -23026,7 +24877,10 @@ func decodePackagesDeletePackageVersionForAuthenticatedUserResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -23062,7 +24916,10 @@ func decodePackagesDeletePackageVersionForOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23089,7 +24946,10 @@ func decodePackagesDeletePackageVersionForOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23116,7 +24976,10 @@ func decodePackagesDeletePackageVersionForOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23152,7 +25015,10 @@ func decodePackagesDeletePackageVersionForUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23179,7 +25045,10 @@ func decodePackagesDeletePackageVersionForUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23206,7 +25075,10 @@ func decodePackagesDeletePackageVersionForUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23239,7 +25111,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserRespon } return nil }(); err != nil { - return res, err + 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: @@ -23266,7 +25141,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserRespon } return nil }(); err != nil { - return res, err + 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: @@ -23293,7 +25171,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserRespon } return nil }(); err != nil { - return res, err + 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: @@ -23320,7 +25201,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserRespon } return nil }(); err != nil { - return res, err + 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: @@ -23353,7 +25237,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByOrgResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -23380,7 +25267,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByOrgResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -23407,7 +25297,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByOrgResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -23434,7 +25327,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByOrgResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -23467,7 +25363,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByUserResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -23494,7 +25393,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByUserResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -23521,7 +25423,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByUserResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -23548,7 +25453,10 @@ func decodePackagesGetAllPackageVersionsForPackageOwnedByUserResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -23581,7 +25489,10 @@ func decodePackagesGetPackageForAuthenticatedUserResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -23614,7 +25525,10 @@ func decodePackagesGetPackageForOrganizationResponse(resp *http.Response) (res P } return nil }(); err != nil { - return res, err + 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: @@ -23647,7 +25561,10 @@ func decodePackagesGetPackageForUserResponse(resp *http.Response) (res Package, } return nil }(); err != nil { - return res, err + 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: @@ -23680,7 +25597,10 @@ func decodePackagesGetPackageVersionForAuthenticatedUserResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -23713,7 +25633,10 @@ func decodePackagesGetPackageVersionForOrganizationResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -23746,7 +25669,10 @@ func decodePackagesGetPackageVersionForUserResponse(resp *http.Response) (res Pa } return nil }(); err != nil { - return res, err + 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: @@ -23787,7 +25713,10 @@ func decodePackagesListPackagesForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -23820,7 +25749,10 @@ func decodePackagesListPackagesForOrganizationResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23847,7 +25779,10 @@ func decodePackagesListPackagesForOrganizationResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23874,7 +25809,10 @@ func decodePackagesListPackagesForOrganizationResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23907,7 +25845,10 @@ func decodePackagesListPackagesForUserResponse(resp *http.Response) (res Package } return nil }(); err != nil { - return res, err + 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: @@ -23934,7 +25875,10 @@ func decodePackagesListPackagesForUserResponse(resp *http.Response) (res Package } return nil }(); err != nil { - return res, err + 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: @@ -23961,7 +25905,10 @@ func decodePackagesListPackagesForUserResponse(resp *http.Response) (res Package } return nil }(); err != nil { - return res, err + 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: @@ -23997,7 +25944,10 @@ func decodePackagesRestorePackageForAuthenticatedUserResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -24024,7 +25974,10 @@ func decodePackagesRestorePackageForAuthenticatedUserResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -24051,7 +26004,10 @@ func decodePackagesRestorePackageForAuthenticatedUserResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -24087,7 +26043,10 @@ func decodePackagesRestorePackageForOrgResponse(resp *http.Response) (res Packag } return nil }(); err != nil { - return res, err + 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: @@ -24114,7 +26073,10 @@ func decodePackagesRestorePackageForOrgResponse(resp *http.Response) (res Packag } return nil }(); err != nil { - return res, err + 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: @@ -24141,7 +26103,10 @@ func decodePackagesRestorePackageForOrgResponse(resp *http.Response) (res Packag } return nil }(); err != nil { - return res, err + 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: @@ -24177,7 +26142,10 @@ func decodePackagesRestorePackageForUserResponse(resp *http.Response) (res Packa } return nil }(); err != nil { - return res, err + 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: @@ -24204,7 +26172,10 @@ func decodePackagesRestorePackageForUserResponse(resp *http.Response) (res Packa } return nil }(); err != nil { - return res, err + 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: @@ -24231,7 +26202,10 @@ func decodePackagesRestorePackageForUserResponse(resp *http.Response) (res Packa } return nil }(); err != nil { - return res, err + 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: @@ -24267,7 +26241,10 @@ func decodePackagesRestorePackageVersionForAuthenticatedUserResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -24294,7 +26271,10 @@ func decodePackagesRestorePackageVersionForAuthenticatedUserResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -24321,7 +26301,10 @@ func decodePackagesRestorePackageVersionForAuthenticatedUserResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -24357,7 +26340,10 @@ func decodePackagesRestorePackageVersionForOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24384,7 +26370,10 @@ func decodePackagesRestorePackageVersionForOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24411,7 +26400,10 @@ func decodePackagesRestorePackageVersionForOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24447,7 +26439,10 @@ func decodePackagesRestorePackageVersionForUserResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -24474,7 +26469,10 @@ func decodePackagesRestorePackageVersionForUserResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -24501,7 +26499,10 @@ func decodePackagesRestorePackageVersionForUserResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -24540,7 +26541,10 @@ func decodeProjectsAddCollaboratorResponse(resp *http.Response) (res ProjectsAdd } return nil }(); err != nil { - return res, err + 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: @@ -24567,7 +26571,10 @@ func decodeProjectsAddCollaboratorResponse(resp *http.Response) (res ProjectsAdd } return nil }(); err != nil { - return res, err + 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: @@ -24594,7 +26601,10 @@ func decodeProjectsAddCollaboratorResponse(resp *http.Response) (res ProjectsAdd } return nil }(); err != nil { - return res, err + 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: @@ -24621,7 +26631,10 @@ func decodeProjectsAddCollaboratorResponse(resp *http.Response) (res ProjectsAdd } return nil }(); err != nil { - return res, err + 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: @@ -24654,7 +26667,10 @@ func decodeProjectsCreateColumnResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -24684,7 +26700,10 @@ func decodeProjectsCreateColumnResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -24711,7 +26730,10 @@ func decodeProjectsCreateColumnResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -24738,7 +26760,10 @@ func decodeProjectsCreateColumnResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -24771,7 +26796,10 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24801,7 +26829,10 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24828,7 +26859,10 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24855,7 +26889,10 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24882,7 +26919,10 @@ func decodeProjectsCreateForAuthenticatedUserResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24915,7 +26955,10 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -24942,7 +26985,10 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -24969,7 +27015,10 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -24996,7 +27045,10 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -25023,7 +27075,10 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -25050,7 +27105,10 @@ func decodeProjectsCreateForOrgResponse(resp *http.Response) (res ProjectsCreate } return nil }(); err != nil { - return res, err + 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: @@ -25083,7 +27141,10 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } return nil }(); err != nil { - return res, err + 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: @@ -25110,7 +27171,10 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } return nil }(); err != nil { - return res, err + 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: @@ -25137,7 +27201,10 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } return nil }(); err != nil { - return res, err + 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: @@ -25164,7 +27231,10 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } return nil }(); err != nil { - return res, err + 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: @@ -25191,7 +27261,10 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } return nil }(); err != nil { - return res, err + 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: @@ -25218,7 +27291,10 @@ func decodeProjectsCreateForRepoResponse(resp *http.Response) (res ProjectsCreat } return nil }(); err != nil { - return res, err + 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: @@ -25257,7 +27333,10 @@ func decodeProjectsDeleteResponse(resp *http.Response) (res ProjectsDeleteRes, e } return nil }(); err != nil { - return res, err + 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: @@ -25284,7 +27363,10 @@ func decodeProjectsDeleteResponse(resp *http.Response) (res ProjectsDeleteRes, e } return nil }(); err != nil { - return res, err + 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: @@ -25311,7 +27393,10 @@ func decodeProjectsDeleteResponse(resp *http.Response) (res ProjectsDeleteRes, e } return nil }(); err != nil { - return res, err + 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: @@ -25338,7 +27423,10 @@ func decodeProjectsDeleteResponse(resp *http.Response) (res ProjectsDeleteRes, e } return nil }(); err != nil { - return res, err + 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: @@ -25377,7 +27465,10 @@ func decodeProjectsDeleteCardResponse(resp *http.Response) (res ProjectsDeleteCa } return nil }(); err != nil { - return res, err + 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: @@ -25404,7 +27495,10 @@ func decodeProjectsDeleteCardResponse(resp *http.Response) (res ProjectsDeleteCa } return nil }(); err != nil { - return res, err + 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: @@ -25431,7 +27525,10 @@ func decodeProjectsDeleteCardResponse(resp *http.Response) (res ProjectsDeleteCa } return nil }(); err != nil { - return res, err + 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: @@ -25470,7 +27567,10 @@ func decodeProjectsDeleteColumnResponse(resp *http.Response) (res ProjectsDelete } return nil }(); err != nil { - return res, err + 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: @@ -25497,7 +27597,10 @@ func decodeProjectsDeleteColumnResponse(resp *http.Response) (res ProjectsDelete } return nil }(); err != nil { - return res, err + 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: @@ -25530,7 +27633,10 @@ func decodeProjectsGetResponse(resp *http.Response) (res ProjectsGetRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -25560,7 +27666,10 @@ func decodeProjectsGetResponse(resp *http.Response) (res ProjectsGetRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -25587,7 +27696,10 @@ func decodeProjectsGetResponse(resp *http.Response) (res ProjectsGetRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -25620,7 +27732,10 @@ func decodeProjectsGetCardResponse(resp *http.Response) (res ProjectsGetCardRes, } return nil }(); err != nil { - return res, err + 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: @@ -25650,7 +27765,10 @@ func decodeProjectsGetCardResponse(resp *http.Response) (res ProjectsGetCardRes, } return nil }(); err != nil { - return res, err + 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: @@ -25677,7 +27795,10 @@ func decodeProjectsGetCardResponse(resp *http.Response) (res ProjectsGetCardRes, } return nil }(); err != nil { - return res, err + 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: @@ -25704,7 +27825,10 @@ func decodeProjectsGetCardResponse(resp *http.Response) (res ProjectsGetCardRes, } return nil }(); err != nil { - return res, err + 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: @@ -25737,7 +27861,10 @@ func decodeProjectsGetColumnResponse(resp *http.Response) (res ProjectsGetColumn } return nil }(); err != nil { - return res, err + 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: @@ -25767,7 +27894,10 @@ func decodeProjectsGetColumnResponse(resp *http.Response) (res ProjectsGetColumn } return nil }(); err != nil { - return res, err + 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: @@ -25794,7 +27924,10 @@ func decodeProjectsGetColumnResponse(resp *http.Response) (res ProjectsGetColumn } return nil }(); err != nil { - return res, err + 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: @@ -25821,7 +27954,10 @@ func decodeProjectsGetColumnResponse(resp *http.Response) (res ProjectsGetColumn } return nil }(); err != nil { - return res, err + 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: @@ -25854,7 +27990,10 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } return nil }(); err != nil { - return res, err + 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: @@ -25884,7 +28023,10 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } return nil }(); err != nil { - return res, err + 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: @@ -25911,7 +28053,10 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } return nil }(); err != nil { - return res, err + 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: @@ -25938,7 +28083,10 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } return nil }(); err != nil { - return res, err + 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: @@ -25965,7 +28113,10 @@ func decodeProjectsGetPermissionForUserResponse(resp *http.Response) (res Projec } return nil }(); err != nil { - return res, err + 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: @@ -26006,7 +28157,10 @@ func decodeProjectsListCardsResponse(resp *http.Response) (res ProjectsListCards } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ProjectsListCardsOKHeaders wrapper.Response = response @@ -26069,7 +28223,10 @@ func decodeProjectsListCardsResponse(resp *http.Response) (res ProjectsListCards } return nil }(); err != nil { - return res, err + 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: @@ -26096,7 +28253,10 @@ func decodeProjectsListCardsResponse(resp *http.Response) (res ProjectsListCards } return nil }(); err != nil { - return res, err + 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: @@ -26137,7 +28297,10 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ProjectsListCollaboratorsOKHeaders wrapper.Response = response @@ -26200,7 +28363,10 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } return nil }(); err != nil { - return res, err + 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: @@ -26227,7 +28393,10 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } return nil }(); err != nil { - return res, err + 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: @@ -26254,7 +28423,10 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } return nil }(); err != nil { - return res, err + 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: @@ -26281,7 +28453,10 @@ func decodeProjectsListCollaboratorsResponse(resp *http.Response) (res ProjectsL } return nil }(); err != nil { - return res, err + 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: @@ -26322,7 +28497,10 @@ func decodeProjectsListColumnsResponse(resp *http.Response) (res ProjectsListCol } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ProjectsListColumnsOKHeaders wrapper.Response = response @@ -26385,7 +28563,10 @@ func decodeProjectsListColumnsResponse(resp *http.Response) (res ProjectsListCol } return nil }(); err != nil { - return res, err + 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: @@ -26412,7 +28593,10 @@ func decodeProjectsListColumnsResponse(resp *http.Response) (res ProjectsListCol } return nil }(); err != nil { - return res, err + 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: @@ -26453,7 +28637,10 @@ func decodeProjectsListForOrgResponse(resp *http.Response) (res ProjectsListForO } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ProjectsListForOrgOKHeaders wrapper.Response = response @@ -26513,7 +28700,10 @@ func decodeProjectsListForOrgResponse(resp *http.Response) (res ProjectsListForO } return nil }(); err != nil { - return res, err + 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: @@ -26554,7 +28744,10 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ProjectsListForRepoOKHeaders wrapper.Response = response @@ -26614,7 +28807,10 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } return nil }(); err != nil { - return res, err + 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: @@ -26641,7 +28837,10 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } return nil }(); err != nil { - return res, err + 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: @@ -26668,7 +28867,10 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } return nil }(); err != nil { - return res, err + 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: @@ -26695,7 +28897,10 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } return nil }(); err != nil { - return res, err + 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: @@ -26722,7 +28927,10 @@ func decodeProjectsListForRepoResponse(resp *http.Response) (res ProjectsListFor } return nil }(); err != nil { - return res, err + 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: @@ -26763,7 +28971,10 @@ func decodeProjectsListForUserResponse(resp *http.Response) (res ProjectsListFor } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ProjectsListForUserOKHeaders wrapper.Response = response @@ -26823,7 +29034,10 @@ func decodeProjectsListForUserResponse(resp *http.Response) (res ProjectsListFor } return nil }(); err != nil { - return res, err + 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: @@ -26856,7 +29070,10 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } return nil }(); err != nil { - return res, err + 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: @@ -26886,7 +29103,10 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } return nil }(); err != nil { - return res, err + 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: @@ -26913,7 +29133,10 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } return nil }(); err != nil { - return res, err + 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: @@ -26940,7 +29163,10 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } return nil }(); err != nil { - return res, err + 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: @@ -26967,7 +29193,10 @@ func decodeProjectsMoveCardResponse(resp *http.Response) (res ProjectsMoveCardRe } return nil }(); err != nil { - return res, err + 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: @@ -27000,7 +29229,10 @@ func decodeProjectsMoveColumnResponse(resp *http.Response) (res ProjectsMoveColu } return nil }(); err != nil { - return res, err + 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: @@ -27030,7 +29262,10 @@ func decodeProjectsMoveColumnResponse(resp *http.Response) (res ProjectsMoveColu } return nil }(); err != nil { - return res, err + 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: @@ -27057,7 +29292,10 @@ func decodeProjectsMoveColumnResponse(resp *http.Response) (res ProjectsMoveColu } return nil }(); err != nil { - return res, err + 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: @@ -27084,7 +29322,10 @@ func decodeProjectsMoveColumnResponse(resp *http.Response) (res ProjectsMoveColu } return nil }(); err != nil { - return res, err + 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: @@ -27123,7 +29364,10 @@ func decodeProjectsRemoveCollaboratorResponse(resp *http.Response) (res Projects } return nil }(); err != nil { - return res, err + 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: @@ -27150,7 +29394,10 @@ func decodeProjectsRemoveCollaboratorResponse(resp *http.Response) (res Projects } return nil }(); err != nil { - return res, err + 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: @@ -27177,7 +29424,10 @@ func decodeProjectsRemoveCollaboratorResponse(resp *http.Response) (res Projects } return nil }(); err != nil { - return res, err + 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: @@ -27204,7 +29454,10 @@ func decodeProjectsRemoveCollaboratorResponse(resp *http.Response) (res Projects } return nil }(); err != nil { - return res, err + 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: @@ -27237,7 +29490,10 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } return nil }(); err != nil { - return res, err + 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: @@ -27267,7 +29523,10 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } return nil }(); err != nil { - return res, err + 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: @@ -27294,7 +29553,10 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } return nil }(); err != nil { - return res, err + 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: @@ -27324,7 +29586,10 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } return nil }(); err != nil { - return res, err + 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: @@ -27351,7 +29616,10 @@ func decodeProjectsUpdateResponse(resp *http.Response) (res ProjectsUpdateRes, e } return nil }(); err != nil { - return res, err + 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: @@ -27384,7 +29652,10 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } return nil }(); err != nil { - return res, err + 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: @@ -27414,7 +29685,10 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } return nil }(); err != nil { - return res, err + 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: @@ -27441,7 +29715,10 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } return nil }(); err != nil { - return res, err + 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: @@ -27468,7 +29745,10 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } return nil }(); err != nil { - return res, err + 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: @@ -27495,7 +29775,10 @@ func decodeProjectsUpdateCardResponse(resp *http.Response) (res ProjectsUpdateCa } return nil }(); err != nil { - return res, err + 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: @@ -27528,7 +29811,10 @@ func decodeProjectsUpdateColumnResponse(resp *http.Response) (res ProjectsUpdate } return nil }(); err != nil { - return res, err + 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: @@ -27558,7 +29844,10 @@ func decodeProjectsUpdateColumnResponse(resp *http.Response) (res ProjectsUpdate } return nil }(); err != nil { - return res, err + 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: @@ -27585,7 +29874,10 @@ func decodeProjectsUpdateColumnResponse(resp *http.Response) (res ProjectsUpdate } return nil }(); err != nil { - return res, err + 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: @@ -27630,7 +29922,10 @@ func decodePullsCreateResponse(resp *http.Response) (res PullsCreateRes, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullRequestHeaders wrapper.Response = response @@ -27690,7 +29985,10 @@ func decodePullsCreateResponse(resp *http.Response) (res PullsCreateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -27717,7 +30015,10 @@ func decodePullsCreateResponse(resp *http.Response) (res PullsCreateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -27750,7 +30051,10 @@ func decodePullsCreateReplyForReviewCommentResponse(resp *http.Response) (res Pu } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullRequestReviewCommentHeaders wrapper.Response = response @@ -27810,7 +30114,10 @@ func decodePullsCreateReplyForReviewCommentResponse(resp *http.Response) (res Pu } return nil }(); err != nil { - return res, err + 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: @@ -27843,7 +30150,10 @@ func decodePullsCreateReviewResponse(resp *http.Response) (res PullsCreateReview } return nil }(); err != nil { - return res, err + 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: @@ -27870,7 +30180,10 @@ func decodePullsCreateReviewResponse(resp *http.Response) (res PullsCreateReview } return nil }(); err != nil { - return res, err + 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: @@ -27897,7 +30210,10 @@ func decodePullsCreateReviewResponse(resp *http.Response) (res PullsCreateReview } return nil }(); err != nil { - return res, err + 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: @@ -27930,7 +30246,10 @@ func decodePullsCreateReviewCommentResponse(resp *http.Response) (res PullsCreat } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullRequestReviewCommentHeaders wrapper.Response = response @@ -27990,7 +30309,10 @@ func decodePullsCreateReviewCommentResponse(resp *http.Response) (res PullsCreat } return nil }(); err != nil { - return res, err + 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: @@ -28017,7 +30339,10 @@ func decodePullsCreateReviewCommentResponse(resp *http.Response) (res PullsCreat } return nil }(); err != nil { - return res, err + 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: @@ -28050,7 +30375,10 @@ func decodePullsDeletePendingReviewResponse(resp *http.Response) (res PullsDelet } return nil }(); err != nil { - return res, err + 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: @@ -28077,7 +30405,10 @@ func decodePullsDeletePendingReviewResponse(resp *http.Response) (res PullsDelet } return nil }(); err != nil { - return res, err + 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: @@ -28104,7 +30435,10 @@ func decodePullsDeletePendingReviewResponse(resp *http.Response) (res PullsDelet } return nil }(); err != nil { - return res, err + 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: @@ -28140,7 +30474,10 @@ func decodePullsDeleteReviewCommentResponse(resp *http.Response) (res PullsDelet } return nil }(); err != nil { - return res, err + 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: @@ -28173,7 +30510,10 @@ func decodePullsDismissReviewResponse(resp *http.Response) (res PullsDismissRevi } return nil }(); err != nil { - return res, err + 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: @@ -28200,7 +30540,10 @@ func decodePullsDismissReviewResponse(resp *http.Response) (res PullsDismissRevi } return nil }(); err != nil { - return res, err + 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: @@ -28227,7 +30570,10 @@ func decodePullsDismissReviewResponse(resp *http.Response) (res PullsDismissRevi } return nil }(); err != nil { - return res, err + 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: @@ -28260,7 +30606,10 @@ func decodePullsGetResponse(resp *http.Response) (res PullsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -28290,7 +30639,10 @@ func decodePullsGetResponse(resp *http.Response) (res PullsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -28317,7 +30669,10 @@ func decodePullsGetResponse(resp *http.Response) (res PullsGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -28350,7 +30705,10 @@ func decodePullsGetReviewResponse(resp *http.Response) (res PullsGetReviewRes, e } return nil }(); err != nil { - return res, err + 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: @@ -28377,7 +30735,10 @@ func decodePullsGetReviewResponse(resp *http.Response) (res PullsGetReviewRes, e } return nil }(); err != nil { - return res, err + 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: @@ -28410,7 +30771,10 @@ func decodePullsGetReviewCommentResponse(resp *http.Response) (res PullsGetRevie } return nil }(); err != nil { - return res, err + 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: @@ -28437,7 +30801,10 @@ func decodePullsGetReviewCommentResponse(resp *http.Response) (res PullsGetRevie } return nil }(); err != nil { - return res, err + 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: @@ -28478,7 +30845,10 @@ func decodePullsListResponse(resp *http.Response) (res PullsListRes, err error) } return nil }(); err != nil { - return res, err + 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 @@ -28541,7 +30911,10 @@ func decodePullsListResponse(resp *http.Response) (res PullsListRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -28582,7 +30955,10 @@ func decodePullsListCommentsForReviewResponse(resp *http.Response) (res PullsLis } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullsListCommentsForReviewOKHeaders wrapper.Response = response @@ -28642,7 +31018,10 @@ func decodePullsListCommentsForReviewResponse(resp *http.Response) (res PullsLis } return nil }(); err != nil { - return res, err + 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: @@ -28683,7 +31062,10 @@ func decodePullsListCommitsResponse(resp *http.Response) (res PullsListCommitsOK } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullsListCommitsOKHeaders wrapper.Response = response @@ -28757,7 +31139,10 @@ func decodePullsListFilesResponse(resp *http.Response) (res PullsListFilesRes, e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullsListFilesOKHeaders wrapper.Response = response @@ -28817,7 +31202,10 @@ func decodePullsListFilesResponse(resp *http.Response) (res PullsListFilesRes, e } return nil }(); err != nil { - return res, err + 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: @@ -28844,7 +31232,10 @@ func decodePullsListFilesResponse(resp *http.Response) (res PullsListFilesRes, e } return nil }(); err != nil { - return res, err + 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: @@ -28877,7 +31268,10 @@ func decodePullsListRequestedReviewersResponse(resp *http.Response) (res PullReq } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullRequestReviewRequestHeaders wrapper.Response = response @@ -28951,7 +31345,10 @@ func decodePullsListReviewCommentsResponse(resp *http.Response) (res PullsListRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullsListReviewCommentsOKHeaders wrapper.Response = response @@ -29025,7 +31422,10 @@ func decodePullsListReviewCommentsForRepoResponse(resp *http.Response) (res Pull } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullsListReviewCommentsForRepoOKHeaders wrapper.Response = response @@ -29099,7 +31499,10 @@ func decodePullsListReviewsResponse(resp *http.Response) (res PullsListReviewsOK } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PullsListReviewsOKHeaders wrapper.Response = response @@ -29165,7 +31568,10 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -29192,7 +31598,10 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -29219,7 +31628,10 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -29246,7 +31658,10 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -29273,7 +31688,10 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -29300,7 +31718,10 @@ func decodePullsMergeResponse(resp *http.Response) (res PullsMergeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -29333,7 +31754,10 @@ func decodePullsRemoveRequestedReviewersResponse(resp *http.Response) (res Pulls } return nil }(); err != nil { - return res, err + 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: @@ -29360,7 +31784,10 @@ func decodePullsRemoveRequestedReviewersResponse(resp *http.Response) (res Pulls } return nil }(); err != nil { - return res, err + 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: @@ -29393,7 +31820,10 @@ func decodePullsSubmitReviewResponse(resp *http.Response) (res PullsSubmitReview } return nil }(); err != nil { - return res, err + 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: @@ -29420,7 +31850,10 @@ func decodePullsSubmitReviewResponse(resp *http.Response) (res PullsSubmitReview } return nil }(); err != nil { - return res, err + 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: @@ -29447,7 +31880,10 @@ func decodePullsSubmitReviewResponse(resp *http.Response) (res PullsSubmitReview } return nil }(); err != nil { - return res, err + 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: @@ -29474,7 +31910,10 @@ func decodePullsSubmitReviewResponse(resp *http.Response) (res PullsSubmitReview } return nil }(); err != nil { - return res, err + 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: @@ -29507,7 +31946,10 @@ func decodePullsUpdateResponse(resp *http.Response) (res PullsUpdateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -29534,7 +31976,10 @@ func decodePullsUpdateResponse(resp *http.Response) (res PullsUpdateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -29561,7 +32006,10 @@ func decodePullsUpdateResponse(resp *http.Response) (res PullsUpdateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -29594,7 +32042,10 @@ func decodePullsUpdateBranchResponse(resp *http.Response) (res PullsUpdateBranch } return nil }(); err != nil { - return res, err + 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: @@ -29621,7 +32072,10 @@ func decodePullsUpdateBranchResponse(resp *http.Response) (res PullsUpdateBranch } return nil }(); err != nil { - return res, err + 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: @@ -29648,7 +32102,10 @@ func decodePullsUpdateBranchResponse(resp *http.Response) (res PullsUpdateBranch } return nil }(); err != nil { - return res, err + 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: @@ -29681,7 +32138,10 @@ func decodePullsUpdateReviewResponse(resp *http.Response) (res PullsUpdateReview } return nil }(); err != nil { - return res, err + 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: @@ -29708,7 +32168,10 @@ func decodePullsUpdateReviewResponse(resp *http.Response) (res PullsUpdateReview } return nil }(); err != nil { - return res, err + 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: @@ -29741,7 +32204,10 @@ func decodePullsUpdateReviewCommentResponse(resp *http.Response) (res PullReques } return nil }(); err != nil { - return res, err + 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: @@ -29774,7 +32240,10 @@ func decodeRateLimitGetResponse(resp *http.Response) (res RateLimitGetRes, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper RateLimitOverviewHeaders wrapper.Response = response @@ -29897,7 +32366,10 @@ func decodeRateLimitGetResponse(resp *http.Response) (res RateLimitGetRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -29930,7 +32402,10 @@ func decodeReactionsCreateForCommitCommentResponse(resp *http.Response) (res Rea } return nil }(); err != nil { - return res, err + 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: @@ -29957,7 +32432,10 @@ func decodeReactionsCreateForCommitCommentResponse(resp *http.Response) (res Rea } return nil }(); err != nil { - return res, err + 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: @@ -29984,7 +32462,10 @@ func decodeReactionsCreateForCommitCommentResponse(resp *http.Response) (res Rea } return nil }(); err != nil { - return res, err + 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: @@ -30011,7 +32492,10 @@ func decodeReactionsCreateForCommitCommentResponse(resp *http.Response) (res Rea } return nil }(); err != nil { - return res, err + 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: @@ -30044,7 +32528,10 @@ func decodeReactionsCreateForIssueResponse(resp *http.Response) (res ReactionsCr } return nil }(); err != nil { - return res, err + 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: @@ -30071,7 +32558,10 @@ func decodeReactionsCreateForIssueResponse(resp *http.Response) (res ReactionsCr } return nil }(); err != nil { - return res, err + 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: @@ -30098,7 +32588,10 @@ func decodeReactionsCreateForIssueResponse(resp *http.Response) (res ReactionsCr } return nil }(); err != nil { - return res, err + 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: @@ -30125,7 +32618,10 @@ func decodeReactionsCreateForIssueResponse(resp *http.Response) (res ReactionsCr } return nil }(); err != nil { - return res, err + 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: @@ -30158,7 +32654,10 @@ func decodeReactionsCreateForIssueCommentResponse(resp *http.Response) (res Reac } return nil }(); err != nil { - return res, err + 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: @@ -30185,7 +32684,10 @@ func decodeReactionsCreateForIssueCommentResponse(resp *http.Response) (res Reac } return nil }(); err != nil { - return res, err + 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: @@ -30212,7 +32714,10 @@ func decodeReactionsCreateForIssueCommentResponse(resp *http.Response) (res Reac } return nil }(); err != nil { - return res, err + 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: @@ -30239,7 +32744,10 @@ func decodeReactionsCreateForIssueCommentResponse(resp *http.Response) (res Reac } return nil }(); err != nil { - return res, err + 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: @@ -30272,7 +32780,10 @@ func decodeReactionsCreateForPullRequestReviewCommentResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -30299,7 +32810,10 @@ func decodeReactionsCreateForPullRequestReviewCommentResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -30326,7 +32840,10 @@ func decodeReactionsCreateForPullRequestReviewCommentResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -30353,7 +32870,10 @@ func decodeReactionsCreateForPullRequestReviewCommentResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -30386,7 +32906,10 @@ func decodeReactionsCreateForReleaseResponse(resp *http.Response) (res Reactions } return nil }(); err != nil { - return res, err + 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: @@ -30413,7 +32936,10 @@ func decodeReactionsCreateForReleaseResponse(resp *http.Response) (res Reactions } return nil }(); err != nil { - return res, err + 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: @@ -30440,7 +32966,10 @@ func decodeReactionsCreateForReleaseResponse(resp *http.Response) (res Reactions } return nil }(); err != nil { - return res, err + 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: @@ -30467,7 +32996,10 @@ func decodeReactionsCreateForReleaseResponse(resp *http.Response) (res Reactions } return nil }(); err != nil { - return res, err + 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: @@ -30500,7 +33032,10 @@ func decodeReactionsCreateForTeamDiscussionCommentInOrgResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -30527,7 +33062,10 @@ func decodeReactionsCreateForTeamDiscussionCommentInOrgResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -30560,7 +33098,10 @@ func decodeReactionsCreateForTeamDiscussionCommentLegacyResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -30593,7 +33134,10 @@ func decodeReactionsCreateForTeamDiscussionInOrgResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -30620,7 +33164,10 @@ func decodeReactionsCreateForTeamDiscussionInOrgResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -30653,7 +33200,10 @@ func decodeReactionsCreateForTeamDiscussionLegacyResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -30746,7 +33296,10 @@ func decodeReactionsDeleteLegacyResponse(resp *http.Response) (res ReactionsDele } return nil }(); err != nil { - return res, err + 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: @@ -30773,7 +33326,10 @@ func decodeReactionsDeleteLegacyResponse(resp *http.Response) (res ReactionsDele } return nil }(); err != nil { - return res, err + 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: @@ -30800,7 +33356,10 @@ func decodeReactionsDeleteLegacyResponse(resp *http.Response) (res ReactionsDele } return nil }(); err != nil { - return res, err + 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: @@ -30827,7 +33386,10 @@ func decodeReactionsDeleteLegacyResponse(resp *http.Response) (res ReactionsDele } return nil }(); err != nil { - return res, err + 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: @@ -30868,7 +33430,10 @@ func decodeReactionsListForCommitCommentResponse(resp *http.Response) (res React } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReactionsListForCommitCommentOKHeaders wrapper.Response = response @@ -30928,7 +33493,10 @@ func decodeReactionsListForCommitCommentResponse(resp *http.Response) (res React } return nil }(); err != nil { - return res, err + 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: @@ -30955,7 +33523,10 @@ func decodeReactionsListForCommitCommentResponse(resp *http.Response) (res React } return nil }(); err != nil { - return res, err + 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: @@ -30996,7 +33567,10 @@ func decodeReactionsListForIssueResponse(resp *http.Response) (res ReactionsList } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReactionsListForIssueOKHeaders wrapper.Response = response @@ -31056,7 +33630,10 @@ func decodeReactionsListForIssueResponse(resp *http.Response) (res ReactionsList } return nil }(); err != nil { - return res, err + 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: @@ -31083,7 +33660,10 @@ func decodeReactionsListForIssueResponse(resp *http.Response) (res ReactionsList } return nil }(); err != nil { - return res, err + 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: @@ -31110,7 +33690,10 @@ func decodeReactionsListForIssueResponse(resp *http.Response) (res ReactionsList } return nil }(); err != nil { - return res, err + 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: @@ -31151,7 +33734,10 @@ func decodeReactionsListForIssueCommentResponse(resp *http.Response) (res Reacti } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReactionsListForIssueCommentOKHeaders wrapper.Response = response @@ -31211,7 +33797,10 @@ func decodeReactionsListForIssueCommentResponse(resp *http.Response) (res Reacti } return nil }(); err != nil { - return res, err + 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: @@ -31238,7 +33827,10 @@ func decodeReactionsListForIssueCommentResponse(resp *http.Response) (res Reacti } return nil }(); err != nil { - return res, err + 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: @@ -31279,7 +33871,10 @@ func decodeReactionsListForPullRequestReviewCommentResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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 @@ -31339,7 +33934,10 @@ func decodeReactionsListForPullRequestReviewCommentResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -31366,7 +33964,10 @@ func decodeReactionsListForPullRequestReviewCommentResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -31407,7 +34008,10 @@ func decodeReactionsListForTeamDiscussionCommentInOrgResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReactionsListForTeamDiscussionCommentInOrgOKHeaders wrapper.Response = response @@ -31481,7 +34085,10 @@ func decodeReactionsListForTeamDiscussionCommentLegacyResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReactionsListForTeamDiscussionCommentLegacyOKHeaders wrapper.Response = response @@ -31555,7 +34162,10 @@ func decodeReactionsListForTeamDiscussionInOrgResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReactionsListForTeamDiscussionInOrgOKHeaders wrapper.Response = response @@ -31629,7 +34239,10 @@ func decodeReactionsListForTeamDiscussionLegacyResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReactionsListForTeamDiscussionLegacyOKHeaders wrapper.Response = response @@ -31701,7 +34314,10 @@ func decodeReposAcceptInvitationResponse(resp *http.Response) (res ReposAcceptIn } return nil }(); err != nil { - return res, err + 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: @@ -31728,7 +34344,10 @@ func decodeReposAcceptInvitationResponse(resp *http.Response) (res ReposAcceptIn } return nil }(); err != nil { - return res, err + 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: @@ -31755,7 +34374,10 @@ func decodeReposAcceptInvitationResponse(resp *http.Response) (res ReposAcceptIn } return nil }(); err != nil { - return res, err + 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: @@ -31788,7 +34410,10 @@ func decodeReposAddAppAccessRestrictionsResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -31815,7 +34440,10 @@ func decodeReposAddAppAccessRestrictionsResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -31848,7 +34476,10 @@ func decodeReposAddCollaboratorResponse(resp *http.Response) (res ReposAddCollab } return nil }(); err != nil { - return res, err + 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: @@ -31878,7 +34509,10 @@ func decodeReposAddCollaboratorResponse(resp *http.Response) (res ReposAddCollab } return nil }(); err != nil { - return res, err + 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: @@ -31905,7 +34539,10 @@ func decodeReposAddCollaboratorResponse(resp *http.Response) (res ReposAddCollab } return nil }(); err != nil { - return res, err + 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: @@ -31938,7 +34575,10 @@ func decodeReposAddStatusCheckContextsResponse(resp *http.Response) (res ReposAd } return nil }(); err != nil { - return res, err + 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: @@ -31965,7 +34605,10 @@ func decodeReposAddStatusCheckContextsResponse(resp *http.Response) (res ReposAd } return nil }(); err != nil { - return res, err + 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: @@ -31992,7 +34635,10 @@ func decodeReposAddStatusCheckContextsResponse(resp *http.Response) (res ReposAd } return nil }(); err != nil { - return res, err + 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: @@ -32019,7 +34665,10 @@ func decodeReposAddStatusCheckContextsResponse(resp *http.Response) (res ReposAd } return nil }(); err != nil { - return res, err + 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: @@ -32052,7 +34701,10 @@ func decodeReposAddTeamAccessRestrictionsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -32079,7 +34731,10 @@ func decodeReposAddTeamAccessRestrictionsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -32112,7 +34767,10 @@ func decodeReposAddUserAccessRestrictionsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -32139,7 +34797,10 @@ func decodeReposAddUserAccessRestrictionsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -32196,7 +34857,10 @@ func decodeReposCompareCommitsResponse(resp *http.Response) (res ReposCompareCom } return nil }(); err != nil { - return res, err + 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: @@ -32223,7 +34887,10 @@ func decodeReposCompareCommitsResponse(resp *http.Response) (res ReposCompareCom } return nil }(); err != nil { - return res, err + 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: @@ -32250,7 +34917,10 @@ func decodeReposCompareCommitsResponse(resp *http.Response) (res ReposCompareCom } return nil }(); err != nil { - return res, err + 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: @@ -32283,7 +34953,10 @@ func decodeReposCreateAutolinkResponse(resp *http.Response) (res ReposCreateAuto } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper AutolinkHeaders wrapper.Response = response @@ -32343,7 +35016,10 @@ func decodeReposCreateAutolinkResponse(resp *http.Response) (res ReposCreateAuto } return nil }(); err != nil { - return res, err + 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: @@ -32376,7 +35052,10 @@ func decodeReposCreateCommitCommentResponse(resp *http.Response) (res ReposCreat } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper CommitCommentHeaders wrapper.Response = response @@ -32436,7 +35115,10 @@ func decodeReposCreateCommitCommentResponse(resp *http.Response) (res ReposCreat } return nil }(); err != nil { - return res, err + 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: @@ -32463,7 +35145,10 @@ func decodeReposCreateCommitCommentResponse(resp *http.Response) (res ReposCreat } return nil }(); err != nil { - return res, err + 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: @@ -32496,7 +35181,10 @@ func decodeReposCreateCommitSignatureProtectionResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -32523,7 +35211,10 @@ func decodeReposCreateCommitSignatureProtectionResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -32556,7 +35247,10 @@ func decodeReposCreateCommitStatusResponse(resp *http.Response) (res StatusHeade } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper StatusHeaders wrapper.Response = response @@ -32622,7 +35316,10 @@ func decodeReposCreateDeployKeyResponse(resp *http.Response) (res ReposCreateDep } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper DeployKeyHeaders wrapper.Response = response @@ -32682,7 +35379,10 @@ func decodeReposCreateDeployKeyResponse(resp *http.Response) (res ReposCreateDep } return nil }(); err != nil { - return res, err + 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: @@ -32715,7 +35415,10 @@ func decodeReposCreateDeploymentResponse(resp *http.Response) (res ReposCreateDe } return nil }(); err != nil { - return res, err + 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: @@ -32742,7 +35445,10 @@ func decodeReposCreateDeploymentResponse(resp *http.Response) (res ReposCreateDe } return nil }(); err != nil { - return res, err + 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: @@ -32772,7 +35478,10 @@ func decodeReposCreateDeploymentResponse(resp *http.Response) (res ReposCreateDe } return nil }(); err != nil { - return res, err + 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: @@ -32805,7 +35514,10 @@ func decodeReposCreateDeploymentStatusResponse(resp *http.Response) (res ReposCr } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper DeploymentStatusHeaders wrapper.Response = response @@ -32865,7 +35577,10 @@ func decodeReposCreateDeploymentStatusResponse(resp *http.Response) (res ReposCr } return nil }(); err != nil { - return res, err + 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: @@ -32901,7 +35616,10 @@ func decodeReposCreateDispatchEventResponse(resp *http.Response) (res ReposCreat } return nil }(); err != nil { - return res, err + 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: @@ -32934,7 +35652,10 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper RepositoryHeaders wrapper.Response = response @@ -32997,7 +35718,10 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33024,7 +35748,10 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33051,7 +35778,10 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33078,7 +35808,10 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33105,7 +35838,10 @@ func decodeReposCreateForAuthenticatedUserResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33138,7 +35874,10 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } return nil }(); err != nil { - return res, err + 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: @@ -33165,7 +35904,10 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } return nil }(); err != nil { - return res, err + 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: @@ -33192,7 +35934,10 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } return nil }(); err != nil { - return res, err + 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: @@ -33219,7 +35964,10 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } return nil }(); err != nil { - return res, err + 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: @@ -33246,7 +35994,10 @@ func decodeReposCreateForkResponse(resp *http.Response) (res ReposCreateForkRes, } return nil }(); err != nil { - return res, err + 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: @@ -33279,7 +36030,10 @@ func decodeReposCreateInOrgResponse(resp *http.Response) (res ReposCreateInOrgRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper RepositoryHeaders wrapper.Response = response @@ -33339,7 +36093,10 @@ func decodeReposCreateInOrgResponse(resp *http.Response) (res ReposCreateInOrgRe } return nil }(); err != nil { - return res, err + 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: @@ -33366,7 +36123,10 @@ func decodeReposCreateInOrgResponse(resp *http.Response) (res ReposCreateInOrgRe } return nil }(); err != nil { - return res, err + 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: @@ -33399,7 +36159,10 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33426,7 +36189,10 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33453,7 +36219,10 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33480,7 +36249,10 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33507,7 +36279,10 @@ func decodeReposCreateOrUpdateFileContentsResponse(resp *http.Response) (res Rep } return nil }(); err != nil { - return res, err + 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: @@ -33540,7 +36315,10 @@ func decodeReposCreatePagesSiteResponse(resp *http.Response) (res ReposCreatePag } return nil }(); err != nil { - return res, err + 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: @@ -33567,7 +36345,10 @@ func decodeReposCreatePagesSiteResponse(resp *http.Response) (res ReposCreatePag } return nil }(); err != nil { - return res, err + 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: @@ -33594,7 +36375,10 @@ func decodeReposCreatePagesSiteResponse(resp *http.Response) (res ReposCreatePag } return nil }(); err != nil { - return res, err + 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: @@ -33621,7 +36405,10 @@ func decodeReposCreatePagesSiteResponse(resp *http.Response) (res ReposCreatePag } return nil }(); err != nil { - return res, err + 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: @@ -33654,7 +36441,10 @@ func decodeReposCreateReleaseResponse(resp *http.Response) (res ReposCreateRelea } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReleaseHeaders wrapper.Response = response @@ -33714,7 +36504,10 @@ func decodeReposCreateReleaseResponse(resp *http.Response) (res ReposCreateRelea } return nil }(); err != nil { - return res, err + 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: @@ -33741,7 +36534,10 @@ func decodeReposCreateReleaseResponse(resp *http.Response) (res ReposCreateRelea } return nil }(); err != nil { - return res, err + 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: @@ -33774,7 +36570,10 @@ func decodeReposCreateUsingTemplateResponse(resp *http.Response) (res Repository } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper RepositoryHeaders wrapper.Response = response @@ -33840,7 +36639,10 @@ func decodeReposCreateWebhookResponse(resp *http.Response) (res ReposCreateWebho } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper HookHeaders wrapper.Response = response @@ -33900,7 +36702,10 @@ func decodeReposCreateWebhookResponse(resp *http.Response) (res ReposCreateWebho } return nil }(); err != nil { - return res, err + 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: @@ -33927,7 +36732,10 @@ func decodeReposCreateWebhookResponse(resp *http.Response) (res ReposCreateWebho } return nil }(); err != nil { - return res, err + 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: @@ -33954,7 +36762,10 @@ func decodeReposCreateWebhookResponse(resp *http.Response) (res ReposCreateWebho } return nil }(); err != nil { - return res, err + 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: @@ -33993,7 +36804,10 @@ func decodeReposDeclineInvitationResponse(resp *http.Response) (res ReposDecline } return nil }(); err != nil { - return res, err + 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: @@ -34020,7 +36834,10 @@ func decodeReposDeclineInvitationResponse(resp *http.Response) (res ReposDecline } return nil }(); err != nil { - return res, err + 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: @@ -34047,7 +36864,10 @@ func decodeReposDeclineInvitationResponse(resp *http.Response) (res ReposDecline } return nil }(); err != nil { - return res, err + 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: @@ -34083,7 +36903,10 @@ func decodeReposDeleteResponse(resp *http.Response) (res ReposDeleteRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -34110,7 +36933,10 @@ func decodeReposDeleteResponse(resp *http.Response) (res ReposDeleteRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -34137,7 +36963,10 @@ func decodeReposDeleteResponse(resp *http.Response) (res ReposDeleteRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -34182,7 +37011,10 @@ func decodeReposDeleteAdminBranchProtectionResponse(resp *http.Response) (res Re } return nil }(); err != nil { - return res, err + 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: @@ -34227,7 +37059,10 @@ func decodeReposDeleteAutolinkResponse(resp *http.Response) (res ReposDeleteAuto } return nil }(); err != nil { - return res, err + 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: @@ -34263,7 +37098,10 @@ func decodeReposDeleteBranchProtectionResponse(resp *http.Response) (res ReposDe } return nil }(); err != nil { - return res, err + 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: @@ -34299,7 +37137,10 @@ func decodeReposDeleteCommitCommentResponse(resp *http.Response) (res ReposDelet } return nil }(); err != nil { - return res, err + 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: @@ -34335,7 +37176,10 @@ func decodeReposDeleteCommitSignatureProtectionResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -34380,7 +37224,10 @@ func decodeReposDeleteDeploymentResponse(resp *http.Response) (res ReposDeleteDe } return nil }(); err != nil { - return res, err + 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: @@ -34407,7 +37254,10 @@ func decodeReposDeleteDeploymentResponse(resp *http.Response) (res ReposDeleteDe } return nil }(); err != nil { - return res, err + 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: @@ -34440,7 +37290,10 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } return nil }(); err != nil { - return res, err + 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: @@ -34467,7 +37320,10 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } return nil }(); err != nil { - return res, err + 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: @@ -34494,7 +37350,10 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } return nil }(); err != nil { - return res, err + 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: @@ -34521,7 +37380,10 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } return nil }(); err != nil { - return res, err + 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: @@ -34548,7 +37410,10 @@ func decodeReposDeleteFileResponse(resp *http.Response) (res ReposDeleteFileRes, } return nil }(); err != nil { - return res, err + 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: @@ -34593,7 +37458,10 @@ func decodeReposDeletePagesSiteResponse(resp *http.Response) (res ReposDeletePag } return nil }(); err != nil { - return res, err + 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: @@ -34620,7 +37488,10 @@ func decodeReposDeletePagesSiteResponse(resp *http.Response) (res ReposDeletePag } return nil }(); err != nil { - return res, err + 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: @@ -34647,7 +37518,10 @@ func decodeReposDeletePagesSiteResponse(resp *http.Response) (res ReposDeletePag } return nil }(); err != nil { - return res, err + 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: @@ -34683,7 +37557,10 @@ func decodeReposDeletePullRequestReviewProtectionResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -34737,7 +37614,10 @@ func decodeReposDeleteWebhookResponse(resp *http.Response) (res ReposDeleteWebho } return nil }(); err != nil { - return res, err + 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: @@ -34888,7 +37768,10 @@ func decodeReposEnableLfsForRepoResponse(resp *http.Response) (res ReposEnableLf } return nil }(); err != nil { - return res, err + 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: @@ -34933,7 +37816,10 @@ func decodeReposGetResponse(resp *http.Response) (res ReposGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -34960,7 +37846,10 @@ func decodeReposGetResponse(resp *http.Response) (res ReposGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -34987,7 +37876,10 @@ func decodeReposGetResponse(resp *http.Response) (res ReposGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -35014,7 +37906,10 @@ func decodeReposGetResponse(resp *http.Response) (res ReposGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -35047,7 +37942,10 @@ func decodeReposGetAccessRestrictionsResponse(resp *http.Response) (res ReposGet } return nil }(); err != nil { - return res, err + 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: @@ -35074,7 +37972,10 @@ func decodeReposGetAccessRestrictionsResponse(resp *http.Response) (res ReposGet } return nil }(); err != nil { - return res, err + 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: @@ -35107,7 +38008,10 @@ func decodeReposGetAdminBranchProtectionResponse(resp *http.Response) (res Prote } return nil }(); err != nil { - return res, err + 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: @@ -35140,7 +38044,10 @@ func decodeReposGetAllStatusCheckContextsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -35167,7 +38074,10 @@ func decodeReposGetAllStatusCheckContextsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -35200,7 +38110,10 @@ func decodeReposGetAllTopicsResponse(resp *http.Response) (res ReposGetAllTopics } return nil }(); err != nil { - return res, err + 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: @@ -35227,7 +38140,10 @@ func decodeReposGetAllTopicsResponse(resp *http.Response) (res ReposGetAllTopics } return nil }(); err != nil { - return res, err + 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: @@ -35254,7 +38170,10 @@ func decodeReposGetAllTopicsResponse(resp *http.Response) (res ReposGetAllTopics } return nil }(); err != nil { - return res, err + 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: @@ -35287,7 +38206,10 @@ func decodeReposGetAppsWithAccessToProtectedBranchResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -35314,7 +38236,10 @@ func decodeReposGetAppsWithAccessToProtectedBranchResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -35347,7 +38272,10 @@ func decodeReposGetAutolinkResponse(resp *http.Response) (res ReposGetAutolinkRe } return nil }(); err != nil { - return res, err + 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: @@ -35374,7 +38302,10 @@ func decodeReposGetAutolinkResponse(resp *http.Response) (res ReposGetAutolinkRe } return nil }(); err != nil { - return res, err + 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: @@ -35407,7 +38338,10 @@ func decodeReposGetBranchResponse(resp *http.Response) (res ReposGetBranchRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35434,7 +38368,10 @@ func decodeReposGetBranchResponse(resp *http.Response) (res ReposGetBranchRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35461,7 +38398,10 @@ func decodeReposGetBranchResponse(resp *http.Response) (res ReposGetBranchRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35488,7 +38428,10 @@ func decodeReposGetBranchResponse(resp *http.Response) (res ReposGetBranchRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35521,7 +38464,10 @@ func decodeReposGetBranchProtectionResponse(resp *http.Response) (res ReposGetBr } return nil }(); err != nil { - return res, err + 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: @@ -35548,7 +38494,10 @@ func decodeReposGetBranchProtectionResponse(resp *http.Response) (res ReposGetBr } return nil }(); err != nil { - return res, err + 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: @@ -35581,7 +38530,10 @@ func decodeReposGetClonesResponse(resp *http.Response) (res ReposGetClonesRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35608,7 +38560,10 @@ func decodeReposGetClonesResponse(resp *http.Response) (res ReposGetClonesRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35641,7 +38596,10 @@ func decodeReposGetCodeFrequencyStatsResponse(resp *http.Response) (res ReposGet } return nil }(); err != nil { - return res, err + 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: @@ -35668,7 +38626,10 @@ func decodeReposGetCodeFrequencyStatsResponse(resp *http.Response) (res ReposGet } return nil }(); err != nil { - return res, err + 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: @@ -35704,7 +38665,10 @@ func decodeReposGetCollaboratorPermissionLevelResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -35731,7 +38695,10 @@ func decodeReposGetCollaboratorPermissionLevelResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -35764,7 +38731,10 @@ func decodeReposGetCombinedStatusForRefResponse(resp *http.Response) (res ReposG } return nil }(); err != nil { - return res, err + 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: @@ -35791,7 +38761,10 @@ func decodeReposGetCombinedStatusForRefResponse(resp *http.Response) (res ReposG } return nil }(); err != nil { - return res, err + 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: @@ -35824,7 +38797,10 @@ func decodeReposGetCommitResponse(resp *http.Response) (res ReposGetCommitRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35851,7 +38827,10 @@ func decodeReposGetCommitResponse(resp *http.Response) (res ReposGetCommitRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35878,7 +38857,10 @@ func decodeReposGetCommitResponse(resp *http.Response) (res ReposGetCommitRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35905,7 +38887,10 @@ func decodeReposGetCommitResponse(resp *http.Response) (res ReposGetCommitRes, e } return nil }(); err != nil { - return res, err + 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: @@ -35938,7 +38923,10 @@ func decodeReposGetCommitActivityStatsResponse(resp *http.Response) (res ReposGe } return nil }(); err != nil { - return res, err + 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: @@ -35965,7 +38953,10 @@ func decodeReposGetCommitActivityStatsResponse(resp *http.Response) (res ReposGe } return nil }(); err != nil { - return res, err + 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: @@ -36001,7 +38992,10 @@ func decodeReposGetCommitCommentResponse(resp *http.Response) (res ReposGetCommi } return nil }(); err != nil { - return res, err + 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: @@ -36028,7 +39022,10 @@ func decodeReposGetCommitCommentResponse(resp *http.Response) (res ReposGetCommi } return nil }(); err != nil { - return res, err + 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: @@ -36061,7 +39058,10 @@ func decodeReposGetCommitSignatureProtectionResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -36088,7 +39088,10 @@ func decodeReposGetCommitSignatureProtectionResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -36121,7 +39124,10 @@ func decodeReposGetCommunityProfileMetricsResponse(resp *http.Response) (res Com } return nil }(); err != nil { - return res, err + 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: @@ -36154,7 +39160,10 @@ func decodeReposGetContributorsStatsResponse(resp *http.Response) (res ReposGetC } return nil }(); err != nil { - return res, err + 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: @@ -36181,7 +39190,10 @@ func decodeReposGetContributorsStatsResponse(resp *http.Response) (res ReposGetC } return nil }(); err != nil { - return res, err + 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: @@ -36217,7 +39229,10 @@ func decodeReposGetDeployKeyResponse(resp *http.Response) (res ReposGetDeployKey } return nil }(); err != nil { - return res, err + 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: @@ -36244,7 +39259,10 @@ func decodeReposGetDeployKeyResponse(resp *http.Response) (res ReposGetDeployKey } return nil }(); err != nil { - return res, err + 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: @@ -36277,7 +39295,10 @@ func decodeReposGetDeploymentResponse(resp *http.Response) (res ReposGetDeployme } return nil }(); err != nil { - return res, err + 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: @@ -36304,7 +39325,10 @@ func decodeReposGetDeploymentResponse(resp *http.Response) (res ReposGetDeployme } return nil }(); err != nil { - return res, err + 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: @@ -36337,7 +39361,10 @@ func decodeReposGetDeploymentStatusResponse(resp *http.Response) (res ReposGetDe } return nil }(); err != nil { - return res, err + 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: @@ -36364,7 +39391,10 @@ func decodeReposGetDeploymentStatusResponse(resp *http.Response) (res ReposGetDe } return nil }(); err != nil { - return res, err + 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: @@ -36391,7 +39421,10 @@ func decodeReposGetDeploymentStatusResponse(resp *http.Response) (res ReposGetDe } return nil }(); err != nil { - return res, err + 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: @@ -36424,7 +39457,10 @@ func decodeReposGetLatestPagesBuildResponse(resp *http.Response) (res PageBuild, } return nil }(); err != nil { - return res, err + 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: @@ -36457,7 +39493,10 @@ func decodeReposGetLatestReleaseResponse(resp *http.Response) (res Release, err } return nil }(); err != nil { - return res, err + 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: @@ -36490,7 +39529,10 @@ func decodeReposGetPagesResponse(resp *http.Response) (res ReposGetPagesRes, err } return nil }(); err != nil { - return res, err + 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: @@ -36517,7 +39559,10 @@ func decodeReposGetPagesResponse(resp *http.Response) (res ReposGetPagesRes, err } return nil }(); err != nil { - return res, err + 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: @@ -36550,7 +39595,10 @@ func decodeReposGetPagesBuildResponse(resp *http.Response) (res PageBuild, err e } return nil }(); err != nil { - return res, err + 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: @@ -36583,7 +39631,10 @@ func decodeReposGetPagesHealthCheckResponse(resp *http.Response) (res ReposGetPa } return nil }(); err != nil { - return res, err + 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: @@ -36610,7 +39661,10 @@ func decodeReposGetPagesHealthCheckResponse(resp *http.Response) (res ReposGetPa } return nil }(); err != nil { - return res, err + 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: @@ -36640,7 +39694,10 @@ func decodeReposGetPagesHealthCheckResponse(resp *http.Response) (res ReposGetPa } return nil }(); err != nil { - return res, err + 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: @@ -36676,7 +39733,10 @@ func decodeReposGetParticipationStatsResponse(resp *http.Response) (res ReposGet } return nil }(); err != nil { - return res, err + 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: @@ -36703,7 +39763,10 @@ func decodeReposGetParticipationStatsResponse(resp *http.Response) (res ReposGet } return nil }(); err != nil { - return res, err + 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: @@ -36736,7 +39799,10 @@ func decodeReposGetPullRequestReviewProtectionResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -36769,7 +39835,10 @@ func decodeReposGetPunchCardStatsResponse(resp *http.Response) (res ReposGetPunc } return nil }(); err != nil { - return res, err + 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: @@ -36805,7 +39874,10 @@ func decodeReposGetReadmeResponse(resp *http.Response) (res ReposGetReadmeRes, e } return nil }(); err != nil { - return res, err + 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: @@ -36832,7 +39904,10 @@ func decodeReposGetReadmeResponse(resp *http.Response) (res ReposGetReadmeRes, e } return nil }(); err != nil { - return res, err + 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: @@ -36859,7 +39934,10 @@ func decodeReposGetReadmeResponse(resp *http.Response) (res ReposGetReadmeRes, e } return nil }(); err != nil { - return res, err + 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: @@ -36892,7 +39970,10 @@ func decodeReposGetReadmeInDirectoryResponse(resp *http.Response) (res ReposGetR } return nil }(); err != nil { - return res, err + 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: @@ -36919,7 +40000,10 @@ func decodeReposGetReadmeInDirectoryResponse(resp *http.Response) (res ReposGetR } return nil }(); err != nil { - return res, err + 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: @@ -36946,7 +40030,10 @@ func decodeReposGetReadmeInDirectoryResponse(resp *http.Response) (res ReposGetR } return nil }(); err != nil { - return res, err + 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: @@ -36979,7 +40066,10 @@ func decodeReposGetReleaseResponse(resp *http.Response) (res ReposGetReleaseRes, } return nil }(); err != nil { - return res, err + 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: @@ -37006,7 +40096,10 @@ func decodeReposGetReleaseResponse(resp *http.Response) (res ReposGetReleaseRes, } return nil }(); err != nil { - return res, err + 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: @@ -37039,7 +40132,10 @@ func decodeReposGetReleaseAssetResponse(resp *http.Response) (res ReposGetReleas } return nil }(); err != nil { - return res, err + 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: @@ -37069,7 +40165,10 @@ func decodeReposGetReleaseAssetResponse(resp *http.Response) (res ReposGetReleas } return nil }(); err != nil { - return res, err + 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: @@ -37096,7 +40195,10 @@ func decodeReposGetReleaseAssetResponse(resp *http.Response) (res ReposGetReleas } return nil }(); err != nil { - return res, err + 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: @@ -37129,7 +40231,10 @@ func decodeReposGetReleaseByTagResponse(resp *http.Response) (res ReposGetReleas } return nil }(); err != nil { - return res, err + 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: @@ -37156,7 +40261,10 @@ func decodeReposGetReleaseByTagResponse(resp *http.Response) (res ReposGetReleas } return nil }(); err != nil { - return res, err + 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: @@ -37189,7 +40297,10 @@ func decodeReposGetStatusChecksProtectionResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -37216,7 +40327,10 @@ func decodeReposGetStatusChecksProtectionResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -37249,7 +40363,10 @@ func decodeReposGetTeamsWithAccessToProtectedBranchResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -37276,7 +40393,10 @@ func decodeReposGetTeamsWithAccessToProtectedBranchResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -37309,7 +40429,10 @@ func decodeReposGetTopPathsResponse(resp *http.Response) (res ReposGetTopPathsRe } return nil }(); err != nil { - return res, err + 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: @@ -37336,7 +40459,10 @@ func decodeReposGetTopPathsResponse(resp *http.Response) (res ReposGetTopPathsRe } return nil }(); err != nil { - return res, err + 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: @@ -37369,7 +40495,10 @@ func decodeReposGetTopReferrersResponse(resp *http.Response) (res ReposGetTopRef } return nil }(); err != nil { - return res, err + 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: @@ -37396,7 +40525,10 @@ func decodeReposGetTopReferrersResponse(resp *http.Response) (res ReposGetTopRef } return nil }(); err != nil { - return res, err + 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: @@ -37429,7 +40561,10 @@ func decodeReposGetUsersWithAccessToProtectedBranchResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -37456,7 +40591,10 @@ func decodeReposGetUsersWithAccessToProtectedBranchResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -37489,7 +40627,10 @@ func decodeReposGetViewsResponse(resp *http.Response) (res ReposGetViewsRes, err } return nil }(); err != nil { - return res, err + 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: @@ -37516,7 +40657,10 @@ func decodeReposGetViewsResponse(resp *http.Response) (res ReposGetViewsRes, err } return nil }(); err != nil { - return res, err + 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: @@ -37549,7 +40693,10 @@ func decodeReposGetWebhookResponse(resp *http.Response) (res ReposGetWebhookRes, } return nil }(); err != nil { - return res, err + 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: @@ -37576,7 +40723,10 @@ func decodeReposGetWebhookResponse(resp *http.Response) (res ReposGetWebhookRes, } return nil }(); err != nil { - return res, err + 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: @@ -37609,7 +40759,10 @@ func decodeReposGetWebhookConfigForRepoResponse(resp *http.Response) (res Webhoo } return nil }(); err != nil { - return res, err + 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: @@ -37642,7 +40795,10 @@ func decodeReposGetWebhookDeliveryResponse(resp *http.Response) (res ReposGetWeb } return nil }(); err != nil { - return res, err + 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: @@ -37669,7 +40825,10 @@ func decodeReposGetWebhookDeliveryResponse(resp *http.Response) (res ReposGetWeb } return nil }(); err != nil { - return res, err + 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: @@ -37696,7 +40855,10 @@ func decodeReposGetWebhookDeliveryResponse(resp *http.Response) (res ReposGetWeb } return nil }(); err != nil { - return res, err + 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: @@ -37737,7 +40899,10 @@ func decodeReposListAutolinksResponse(resp *http.Response) (res []Autolink, err } return nil }(); err != nil { - return res, err + 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: @@ -37778,7 +40943,10 @@ func decodeReposListBranchesResponse(resp *http.Response) (res ReposListBranches } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListBranchesOKHeaders wrapper.Response = response @@ -37838,7 +41006,10 @@ func decodeReposListBranchesResponse(resp *http.Response) (res ReposListBranches } return nil }(); err != nil { - return res, err + 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: @@ -37871,7 +41042,10 @@ func decodeReposListBranchesForHeadCommitResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -37898,7 +41072,10 @@ func decodeReposListBranchesForHeadCommitResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -37939,7 +41116,10 @@ func decodeReposListCollaboratorsResponse(resp *http.Response) (res ReposListCol } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListCollaboratorsOKHeaders wrapper.Response = response @@ -37999,7 +41179,10 @@ func decodeReposListCollaboratorsResponse(resp *http.Response) (res ReposListCol } return nil }(); err != nil { - return res, err + 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: @@ -38040,7 +41223,10 @@ func decodeReposListCommentsForCommitResponse(resp *http.Response) (res ReposLis } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListCommentsForCommitOKHeaders wrapper.Response = response @@ -38114,7 +41300,10 @@ func decodeReposListCommitCommentsForRepoResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListCommitCommentsForRepoOKHeaders wrapper.Response = response @@ -38188,7 +41377,10 @@ func decodeReposListCommitStatusesForRefResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListCommitStatusesForRefOKHeaders wrapper.Response = response @@ -38248,7 +41440,10 @@ func decodeReposListCommitStatusesForRefResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -38289,7 +41484,10 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListCommitsOKHeaders wrapper.Response = response @@ -38349,7 +41547,10 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } return nil }(); err != nil { - return res, err + 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: @@ -38376,7 +41577,10 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } return nil }(); err != nil { - return res, err + 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: @@ -38403,7 +41607,10 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } return nil }(); err != nil { - return res, err + 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: @@ -38430,7 +41637,10 @@ func decodeReposListCommitsResponse(resp *http.Response) (res ReposListCommitsRe } return nil }(); err != nil { - return res, err + 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: @@ -38471,7 +41681,10 @@ func decodeReposListContributorsResponse(resp *http.Response) (res ReposListCont } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListContributorsOKHeaders wrapper.Response = response @@ -38534,7 +41747,10 @@ func decodeReposListContributorsResponse(resp *http.Response) (res ReposListCont } return nil }(); err != nil { - return res, err + 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: @@ -38561,7 +41777,10 @@ func decodeReposListContributorsResponse(resp *http.Response) (res ReposListCont } return nil }(); err != nil { - return res, err + 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: @@ -38602,7 +41821,10 @@ func decodeReposListDeployKeysResponse(resp *http.Response) (res ReposListDeploy } return nil }(); err != nil { - return res, err + 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 @@ -38676,7 +41898,10 @@ func decodeReposListDeploymentStatusesResponse(resp *http.Response) (res ReposLi } return nil }(); err != nil { - return res, err + 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 wrapper.Response = response @@ -38736,7 +41961,10 @@ func decodeReposListDeploymentStatusesResponse(resp *http.Response) (res ReposLi } return nil }(); err != nil { - return res, err + 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: @@ -38777,7 +42005,10 @@ func decodeReposListDeploymentsResponse(resp *http.Response) (res ReposListDeplo } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListDeploymentsOKHeaders wrapper.Response = response @@ -38843,7 +42074,10 @@ func decodeReposListForAuthenticatedUserResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -38873,7 +42107,10 @@ func decodeReposListForAuthenticatedUserResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -38900,7 +42137,10 @@ func decodeReposListForAuthenticatedUserResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -38927,7 +42167,10 @@ func decodeReposListForAuthenticatedUserResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -38968,7 +42211,10 @@ func decodeReposListForOrgResponse(resp *http.Response) (res ReposListForOrgOKHe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListForOrgOKHeaders wrapper.Response = response @@ -39042,7 +42288,10 @@ func decodeReposListForUserResponse(resp *http.Response) (res ReposListForUserOK } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListForUserOKHeaders wrapper.Response = response @@ -39116,7 +42365,10 @@ func decodeReposListForksResponse(resp *http.Response) (res ReposListForksRes, e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListForksOKHeaders wrapper.Response = response @@ -39176,7 +42428,10 @@ func decodeReposListForksResponse(resp *http.Response) (res ReposListForksRes, e } return nil }(); err != nil { - return res, err + 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: @@ -39217,7 +42472,10 @@ func decodeReposListInvitationsResponse(resp *http.Response) (res ReposListInvit } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListInvitationsOKHeaders wrapper.Response = response @@ -39291,7 +42549,10 @@ func decodeReposListInvitationsForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListInvitationsForAuthenticatedUserOKHeaders wrapper.Response = response @@ -39354,7 +42615,10 @@ func decodeReposListInvitationsForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -39381,7 +42645,10 @@ func decodeReposListInvitationsForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -39408,7 +42675,10 @@ func decodeReposListInvitationsForAuthenticatedUserResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -39441,7 +42711,10 @@ func decodeReposListLanguagesResponse(resp *http.Response) (res Language, err er } return nil }(); err != nil { - return res, err + 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: @@ -39482,7 +42755,10 @@ func decodeReposListPagesBuildsResponse(resp *http.Response) (res ReposListPages } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListPagesBuildsOKHeaders wrapper.Response = response @@ -39556,7 +42832,10 @@ func decodeReposListPublicResponse(resp *http.Response) (res ReposListPublicRes, } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListPublicOKHeaders wrapper.Response = response @@ -39619,7 +42898,10 @@ func decodeReposListPublicResponse(resp *http.Response) (res ReposListPublicRes, } return nil }(); err != nil { - return res, err + 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: @@ -39660,7 +42942,10 @@ func decodeReposListPullRequestsAssociatedWithCommitResponse(resp *http.Response } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListPullRequestsAssociatedWithCommitOKHeaders wrapper.Response = response @@ -39734,7 +43019,10 @@ func decodeReposListReleaseAssetsResponse(resp *http.Response) (res ReposListRel } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListReleaseAssetsOKHeaders wrapper.Response = response @@ -39808,7 +43096,10 @@ func decodeReposListReleasesResponse(resp *http.Response) (res ReposListReleases } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListReleasesOKHeaders wrapper.Response = response @@ -39868,7 +43159,10 @@ func decodeReposListReleasesResponse(resp *http.Response) (res ReposListReleases } return nil }(); err != nil { - return res, err + 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: @@ -39909,7 +43203,10 @@ func decodeReposListTagsResponse(resp *http.Response) (res ReposListTagsOKHeader } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListTagsOKHeaders wrapper.Response = response @@ -39983,7 +43280,10 @@ func decodeReposListTeamsResponse(resp *http.Response) (res ReposListTeamsOKHead } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListTeamsOKHeaders wrapper.Response = response @@ -40049,7 +43349,10 @@ func decodeReposListWebhookDeliveriesResponse(resp *http.Response) (res ReposLis } return nil }(); err != nil { - return res, err + 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: @@ -40076,7 +43379,10 @@ func decodeReposListWebhookDeliveriesResponse(resp *http.Response) (res ReposLis } return nil }(); err != nil { - return res, err + 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: @@ -40103,7 +43409,10 @@ func decodeReposListWebhookDeliveriesResponse(resp *http.Response) (res ReposLis } return nil }(); err != nil { - return res, err + 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: @@ -40144,7 +43453,10 @@ func decodeReposListWebhooksResponse(resp *http.Response) (res ReposListWebhooks } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper ReposListWebhooksOKHeaders wrapper.Response = response @@ -40204,7 +43516,10 @@ func decodeReposListWebhooksResponse(resp *http.Response) (res ReposListWebhooks } return nil }(); err != nil { - return res, err + 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: @@ -40237,7 +43552,10 @@ func decodeReposMergeResponse(resp *http.Response) (res ReposMergeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -40267,7 +43585,10 @@ func decodeReposMergeResponse(resp *http.Response) (res ReposMergeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -40300,7 +43621,10 @@ func decodeReposMergeResponse(resp *http.Response) (res ReposMergeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -40333,7 +43657,10 @@ func decodeReposMergeUpstreamResponse(resp *http.Response) (res ReposMergeUpstre } return nil }(); err != nil { - return res, err + 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: @@ -40375,7 +43702,10 @@ func decodeReposPingWebhookResponse(resp *http.Response) (res ReposPingWebhookRe } return nil }(); err != nil { - return res, err + 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: @@ -40408,7 +43738,10 @@ func decodeReposRedeliverWebhookDeliveryResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -40435,7 +43768,10 @@ func decodeReposRedeliverWebhookDeliveryResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -40462,7 +43798,10 @@ func decodeReposRedeliverWebhookDeliveryResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -40495,7 +43834,10 @@ func decodeReposRemoveAppAccessRestrictionsResponse(resp *http.Response) (res Re } return nil }(); err != nil { - return res, err + 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: @@ -40522,7 +43864,10 @@ func decodeReposRemoveAppAccessRestrictionsResponse(resp *http.Response) (res Re } return nil }(); err != nil { - return res, err + 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: @@ -40564,7 +43909,10 @@ func decodeReposRemoveStatusCheckContextsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -40591,7 +43939,10 @@ func decodeReposRemoveStatusCheckContextsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -40618,7 +43969,10 @@ func decodeReposRemoveStatusCheckContextsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -40660,7 +44014,10 @@ func decodeReposRemoveTeamAccessRestrictionsResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -40687,7 +44044,10 @@ func decodeReposRemoveTeamAccessRestrictionsResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -40720,7 +44080,10 @@ func decodeReposRemoveUserAccessRestrictionsResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -40747,7 +44110,10 @@ func decodeReposRemoveUserAccessRestrictionsResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -40780,7 +44146,10 @@ func decodeReposRenameBranchResponse(resp *http.Response) (res ReposRenameBranch } return nil }(); err != nil { - return res, err + 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: @@ -40807,7 +44176,10 @@ func decodeReposRenameBranchResponse(resp *http.Response) (res ReposRenameBranch } return nil }(); err != nil { - return res, err + 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: @@ -40834,7 +44206,10 @@ func decodeReposRenameBranchResponse(resp *http.Response) (res ReposRenameBranch } return nil }(); err != nil { - return res, err + 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: @@ -40861,7 +44236,10 @@ func decodeReposRenameBranchResponse(resp *http.Response) (res ReposRenameBranch } return nil }(); err != nil { - return res, err + 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: @@ -40894,7 +44272,10 @@ func decodeReposReplaceAllTopicsResponse(resp *http.Response) (res ReposReplaceA } return nil }(); err != nil { - return res, err + 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: @@ -40921,7 +44302,10 @@ func decodeReposReplaceAllTopicsResponse(resp *http.Response) (res ReposReplaceA } return nil }(); err != nil { - return res, err + 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: @@ -40948,7 +44332,10 @@ func decodeReposReplaceAllTopicsResponse(resp *http.Response) (res ReposReplaceA } return nil }(); err != nil { - return res, err + 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: @@ -40975,7 +44362,10 @@ func decodeReposReplaceAllTopicsResponse(resp *http.Response) (res ReposReplaceA } return nil }(); err != nil { - return res, err + 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: @@ -41008,7 +44398,10 @@ func decodeReposRequestPagesBuildResponse(resp *http.Response) (res PageBuildSta } return nil }(); err != nil { - return res, err + 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: @@ -41041,7 +44434,10 @@ func decodeReposSetAdminBranchProtectionResponse(resp *http.Response) (res Prote } return nil }(); err != nil { - return res, err + 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: @@ -41074,7 +44470,10 @@ func decodeReposSetAppAccessRestrictionsResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -41101,7 +44500,10 @@ func decodeReposSetAppAccessRestrictionsResponse(resp *http.Response) (res Repos } return nil }(); err != nil { - return res, err + 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: @@ -41134,7 +44536,10 @@ func decodeReposSetStatusCheckContextsResponse(resp *http.Response) (res ReposSe } return nil }(); err != nil { - return res, err + 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: @@ -41161,7 +44566,10 @@ func decodeReposSetStatusCheckContextsResponse(resp *http.Response) (res ReposSe } return nil }(); err != nil { - return res, err + 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: @@ -41188,7 +44596,10 @@ func decodeReposSetStatusCheckContextsResponse(resp *http.Response) (res ReposSe } return nil }(); err != nil { - return res, err + 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: @@ -41221,7 +44632,10 @@ func decodeReposSetTeamAccessRestrictionsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -41248,7 +44662,10 @@ func decodeReposSetTeamAccessRestrictionsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -41281,7 +44698,10 @@ func decodeReposSetUserAccessRestrictionsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -41308,7 +44728,10 @@ func decodeReposSetUserAccessRestrictionsResponse(resp *http.Response) (res Repo } return nil }(); err != nil { - return res, err + 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: @@ -41344,7 +44767,10 @@ func decodeReposTestPushWebhookResponse(resp *http.Response) (res ReposTestPushW } return nil }(); err != nil { - return res, err + 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: @@ -41377,7 +44803,10 @@ func decodeReposTransferResponse(resp *http.Response) (res MinimalRepository, er } return nil }(); err != nil { - return res, err + 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: @@ -41410,7 +44839,10 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -41437,7 +44869,10 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -41464,7 +44899,10 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -41491,7 +44929,10 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -41518,7 +44959,10 @@ func decodeReposUpdateResponse(resp *http.Response) (res ReposUpdateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -41551,7 +44995,10 @@ func decodeReposUpdateBranchProtectionResponse(resp *http.Response) (res ReposUp } return nil }(); err != nil { - return res, err + 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: @@ -41578,7 +45025,10 @@ func decodeReposUpdateBranchProtectionResponse(resp *http.Response) (res ReposUp } return nil }(); err != nil { - return res, err + 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: @@ -41605,7 +45055,10 @@ func decodeReposUpdateBranchProtectionResponse(resp *http.Response) (res ReposUp } return nil }(); err != nil { - return res, err + 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: @@ -41632,7 +45085,10 @@ func decodeReposUpdateBranchProtectionResponse(resp *http.Response) (res ReposUp } return nil }(); err != nil { - return res, err + 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: @@ -41665,7 +45121,10 @@ func decodeReposUpdateCommitCommentResponse(resp *http.Response) (res ReposUpdat } return nil }(); err != nil { - return res, err + 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: @@ -41692,7 +45151,10 @@ func decodeReposUpdateCommitCommentResponse(resp *http.Response) (res ReposUpdat } return nil }(); err != nil { - return res, err + 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: @@ -41725,7 +45187,10 @@ func decodeReposUpdateInvitationResponse(resp *http.Response) (res RepositoryInv } return nil }(); err != nil { - return res, err + 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: @@ -41758,7 +45223,10 @@ func decodeReposUpdatePullRequestReviewProtectionResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -41785,7 +45253,10 @@ func decodeReposUpdatePullRequestReviewProtectionResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -41818,7 +45289,10 @@ func decodeReposUpdateReleaseResponse(resp *http.Response) (res ReposUpdateRelea } return nil }(); err != nil { - return res, err + 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: @@ -41845,7 +45319,10 @@ func decodeReposUpdateReleaseResponse(resp *http.Response) (res ReposUpdateRelea } return nil }(); err != nil { - return res, err + 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: @@ -41878,7 +45355,10 @@ func decodeReposUpdateReleaseAssetResponse(resp *http.Response) (res ReleaseAsse } return nil }(); err != nil { - return res, err + 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: @@ -41911,7 +45391,10 @@ func decodeReposUpdateStatusCheckProtectionResponse(resp *http.Response) (res Re } return nil }(); err != nil { - return res, err + 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: @@ -41938,7 +45421,10 @@ func decodeReposUpdateStatusCheckProtectionResponse(resp *http.Response) (res Re } return nil }(); err != nil { - return res, err + 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: @@ -41965,7 +45451,10 @@ func decodeReposUpdateStatusCheckProtectionResponse(resp *http.Response) (res Re } return nil }(); err != nil { - return res, err + 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: @@ -41998,7 +45487,10 @@ func decodeReposUpdateWebhookResponse(resp *http.Response) (res ReposUpdateWebho } return nil }(); err != nil { - return res, err + 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: @@ -42025,7 +45517,10 @@ func decodeReposUpdateWebhookResponse(resp *http.Response) (res ReposUpdateWebho } return nil }(); err != nil { - return res, err + 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: @@ -42052,7 +45547,10 @@ func decodeReposUpdateWebhookResponse(resp *http.Response) (res ReposUpdateWebho } return nil }(); err != nil { - return res, err + 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: @@ -42085,7 +45583,10 @@ func decodeReposUpdateWebhookConfigForRepoResponse(resp *http.Response) (res Web } return nil }(); err != nil { - return res, err + 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: @@ -42124,7 +45625,10 @@ func decodeScimDeleteUserFromOrgResponse(resp *http.Response) (res ScimDeleteUse } return nil }(); err != nil { - return res, err + 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: @@ -42151,7 +45655,10 @@ func decodeScimDeleteUserFromOrgResponse(resp *http.Response) (res ScimDeleteUse } return nil }(); err != nil { - return res, err + 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: @@ -42184,7 +45691,10 @@ func decodeSearchCodeResponse(resp *http.Response) (res SearchCodeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -42214,7 +45724,10 @@ func decodeSearchCodeResponse(resp *http.Response) (res SearchCodeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -42241,7 +45754,10 @@ func decodeSearchCodeResponse(resp *http.Response) (res SearchCodeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -42268,7 +45784,10 @@ func decodeSearchCodeResponse(resp *http.Response) (res SearchCodeRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -42301,7 +45820,10 @@ func decodeSearchCommitsResponse(resp *http.Response) (res SearchCommitsRes, err } return nil }(); err != nil { - return res, err + 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: @@ -42331,7 +45853,10 @@ func decodeSearchCommitsResponse(resp *http.Response) (res SearchCommitsRes, err } return nil }(); err != nil { - return res, err + 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: @@ -42364,7 +45889,10 @@ func decodeSearchIssuesAndPullRequestsResponse(resp *http.Response) (res SearchI } return nil }(); err != nil { - return res, err + 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: @@ -42394,7 +45922,10 @@ func decodeSearchIssuesAndPullRequestsResponse(resp *http.Response) (res SearchI } return nil }(); err != nil { - return res, err + 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: @@ -42421,7 +45952,10 @@ func decodeSearchIssuesAndPullRequestsResponse(resp *http.Response) (res SearchI } return nil }(); err != nil { - return res, err + 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: @@ -42448,7 +45982,10 @@ func decodeSearchIssuesAndPullRequestsResponse(resp *http.Response) (res SearchI } return nil }(); err != nil { - return res, err + 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: @@ -42481,7 +46018,10 @@ func decodeSearchLabelsResponse(resp *http.Response) (res SearchLabelsRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -42511,7 +46051,10 @@ func decodeSearchLabelsResponse(resp *http.Response) (res SearchLabelsRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -42538,7 +46081,10 @@ func decodeSearchLabelsResponse(resp *http.Response) (res SearchLabelsRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -42565,7 +46111,10 @@ func decodeSearchLabelsResponse(resp *http.Response) (res SearchLabelsRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -42598,7 +46147,10 @@ func decodeSearchReposResponse(resp *http.Response) (res SearchReposRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -42628,7 +46180,10 @@ func decodeSearchReposResponse(resp *http.Response) (res SearchReposRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -42655,7 +46210,10 @@ func decodeSearchReposResponse(resp *http.Response) (res SearchReposRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -42688,7 +46246,10 @@ func decodeSearchTopicsResponse(resp *http.Response) (res SearchTopicsRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -42718,7 +46279,10 @@ func decodeSearchTopicsResponse(resp *http.Response) (res SearchTopicsRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -42751,7 +46315,10 @@ func decodeSearchUsersResponse(resp *http.Response) (res SearchUsersRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -42781,7 +46348,10 @@ func decodeSearchUsersResponse(resp *http.Response) (res SearchUsersRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -42808,7 +46378,10 @@ func decodeSearchUsersResponse(resp *http.Response) (res SearchUsersRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -42841,7 +46414,10 @@ func decodeSecretScanningGetAlertResponse(resp *http.Response) (res SecretScanni } return nil }(); err != nil { - return res, err + 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: @@ -42871,7 +46447,10 @@ func decodeSecretScanningGetAlertResponse(resp *http.Response) (res SecretScanni } return nil }(); err != nil { - return res, err + 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: @@ -42912,7 +46491,10 @@ func decodeSecretScanningListAlertsForOrgResponse(resp *http.Response) (res Secr } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper SecretScanningListAlertsForOrgOKHeaders wrapper.Response = response @@ -42972,7 +46554,10 @@ func decodeSecretScanningListAlertsForOrgResponse(resp *http.Response) (res Secr } return nil }(); err != nil { - return res, err + 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: @@ -42999,7 +46584,10 @@ func decodeSecretScanningListAlertsForOrgResponse(resp *http.Response) (res Secr } return nil }(); err != nil { - return res, err + 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: @@ -43032,7 +46620,10 @@ func decodeSecretScanningListAlertsForRepoResponse(resp *http.Response) (res Sec } return nil }(); err != nil { - return res, err + 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: @@ -43062,7 +46653,10 @@ func decodeSecretScanningListAlertsForRepoResponse(resp *http.Response) (res Sec } return nil }(); err != nil { - return res, err + 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: @@ -43095,7 +46689,10 @@ func decodeSecretScanningUpdateAlertResponse(resp *http.Response) (res SecretSca } return nil }(); err != nil { - return res, err + 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: @@ -43128,7 +46725,10 @@ func decodeSecretScanningUpdateAlertResponse(resp *http.Response) (res SecretSca } return nil }(); err != nil { - return res, err + 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: @@ -43164,7 +46764,10 @@ func decodeTeamsAddMemberLegacyResponse(resp *http.Response) (res TeamsAddMember } return nil }(); err != nil { - return res, err + 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: @@ -43203,7 +46806,10 @@ func decodeTeamsAddOrUpdateMembershipForUserInOrgResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -43242,7 +46848,10 @@ func decodeTeamsAddOrUpdateMembershipForUserLegacyResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -43272,7 +46881,10 @@ func decodeTeamsAddOrUpdateMembershipForUserLegacyResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -43311,7 +46923,10 @@ func decodeTeamsAddOrUpdateProjectPermissionsInOrgResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -43347,7 +46962,10 @@ func decodeTeamsAddOrUpdateProjectPermissionsLegacyResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -43374,7 +46992,10 @@ func decodeTeamsAddOrUpdateProjectPermissionsLegacyResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -43401,7 +47022,10 @@ func decodeTeamsAddOrUpdateProjectPermissionsLegacyResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -43446,7 +47070,10 @@ func decodeTeamsAddOrUpdateRepoPermissionsLegacyResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -43473,7 +47100,10 @@ func decodeTeamsAddOrUpdateRepoPermissionsLegacyResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -43506,7 +47136,10 @@ func decodeTeamsCheckPermissionsForProjectInOrgResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -43542,7 +47175,10 @@ func decodeTeamsCheckPermissionsForProjectLegacyResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -43578,7 +47214,10 @@ func decodeTeamsCheckPermissionsForRepoInOrgResponse(resp *http.Response) (res T } return nil }(); err != nil { - return res, err + 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: @@ -43617,7 +47256,10 @@ func decodeTeamsCheckPermissionsForRepoLegacyResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -43656,7 +47298,10 @@ func decodeTeamsCreateResponse(resp *http.Response) (res TeamsCreateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -43683,7 +47328,10 @@ func decodeTeamsCreateResponse(resp *http.Response) (res TeamsCreateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -43710,7 +47358,10 @@ func decodeTeamsCreateResponse(resp *http.Response) (res TeamsCreateRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -43743,7 +47394,10 @@ func decodeTeamsCreateDiscussionCommentInOrgResponse(resp *http.Response) (res T } return nil }(); err != nil { - return res, err + 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: @@ -43776,7 +47430,10 @@ func decodeTeamsCreateDiscussionCommentLegacyResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -43809,7 +47466,10 @@ func decodeTeamsCreateDiscussionInOrgResponse(resp *http.Response) (res TeamDisc } return nil }(); err != nil { - return res, err + 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: @@ -43842,7 +47502,10 @@ func decodeTeamsCreateDiscussionLegacyResponse(resp *http.Response) (res TeamDis } return nil }(); err != nil { - return res, err + 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: @@ -43875,7 +47538,10 @@ func decodeTeamsCreateOrUpdateIdpGroupConnectionsInOrgResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -43908,7 +47574,10 @@ func decodeTeamsCreateOrUpdateIdpGroupConnectionsLegacyResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -43935,7 +47604,10 @@ func decodeTeamsCreateOrUpdateIdpGroupConnectionsLegacyResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -43962,7 +47634,10 @@ func decodeTeamsCreateOrUpdateIdpGroupConnectionsLegacyResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -44043,7 +47718,10 @@ func decodeTeamsDeleteLegacyResponse(resp *http.Response) (res TeamsDeleteLegacy } return nil }(); err != nil { - return res, err + 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: @@ -44070,7 +47748,10 @@ func decodeTeamsDeleteLegacyResponse(resp *http.Response) (res TeamsDeleteLegacy } return nil }(); err != nil { - return res, err + 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: @@ -44103,7 +47784,10 @@ func decodeTeamsGetByNameResponse(resp *http.Response) (res TeamsGetByNameRes, e } return nil }(); err != nil { - return res, err + 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: @@ -44130,7 +47814,10 @@ func decodeTeamsGetByNameResponse(resp *http.Response) (res TeamsGetByNameRes, e } return nil }(); err != nil { - return res, err + 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: @@ -44163,7 +47850,10 @@ func decodeTeamsGetDiscussionCommentInOrgResponse(resp *http.Response) (res Team } return nil }(); err != nil { - return res, err + 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: @@ -44196,7 +47886,10 @@ func decodeTeamsGetDiscussionCommentLegacyResponse(resp *http.Response) (res Tea } return nil }(); err != nil { - return res, err + 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: @@ -44229,7 +47922,10 @@ func decodeTeamsGetDiscussionInOrgResponse(resp *http.Response) (res TeamDiscuss } return nil }(); err != nil { - return res, err + 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: @@ -44262,7 +47958,10 @@ func decodeTeamsGetDiscussionLegacyResponse(resp *http.Response) (res TeamDiscus } return nil }(); err != nil { - return res, err + 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: @@ -44295,7 +47994,10 @@ func decodeTeamsGetLegacyResponse(resp *http.Response) (res TeamsGetLegacyRes, e } return nil }(); err != nil { - return res, err + 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: @@ -44322,7 +48024,10 @@ func decodeTeamsGetLegacyResponse(resp *http.Response) (res TeamsGetLegacyRes, e } return nil }(); err != nil { - return res, err + 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: @@ -44367,7 +48072,10 @@ func decodeTeamsGetMembershipForUserInOrgResponse(resp *http.Response) (res Team } return nil }(); err != nil { - return res, err + 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: @@ -44403,7 +48111,10 @@ func decodeTeamsGetMembershipForUserLegacyResponse(resp *http.Response) (res Tea } return nil }(); err != nil { - return res, err + 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: @@ -44430,7 +48141,10 @@ func decodeTeamsGetMembershipForUserLegacyResponse(resp *http.Response) (res Tea } return nil }(); err != nil { - return res, err + 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: @@ -44471,7 +48185,10 @@ func decodeTeamsListResponse(resp *http.Response) (res TeamsListRes, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListOKHeaders wrapper.Response = response @@ -44531,7 +48248,10 @@ func decodeTeamsListResponse(resp *http.Response) (res TeamsListRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -44572,7 +48292,10 @@ func decodeTeamsListChildInOrgResponse(resp *http.Response) (res TeamsListChildI } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListChildInOrgOKHeaders wrapper.Response = response @@ -44646,7 +48369,10 @@ func decodeTeamsListChildLegacyResponse(resp *http.Response) (res TeamsListChild } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListChildLegacyOKHeaders wrapper.Response = response @@ -44706,7 +48432,10 @@ func decodeTeamsListChildLegacyResponse(resp *http.Response) (res TeamsListChild } return nil }(); err != nil { - return res, err + 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: @@ -44733,7 +48462,10 @@ func decodeTeamsListChildLegacyResponse(resp *http.Response) (res TeamsListChild } return nil }(); err != nil { - return res, err + 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: @@ -44760,7 +48492,10 @@ func decodeTeamsListChildLegacyResponse(resp *http.Response) (res TeamsListChild } return nil }(); err != nil { - return res, err + 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: @@ -44801,7 +48536,10 @@ func decodeTeamsListDiscussionCommentsInOrgResponse(resp *http.Response) (res Te } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListDiscussionCommentsInOrgOKHeaders wrapper.Response = response @@ -44875,7 +48613,10 @@ func decodeTeamsListDiscussionCommentsLegacyResponse(resp *http.Response) (res T } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListDiscussionCommentsLegacyOKHeaders wrapper.Response = response @@ -44949,7 +48690,10 @@ func decodeTeamsListDiscussionsInOrgResponse(resp *http.Response) (res TeamsList } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListDiscussionsInOrgOKHeaders wrapper.Response = response @@ -45023,7 +48767,10 @@ func decodeTeamsListDiscussionsLegacyResponse(resp *http.Response) (res TeamsLis } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListDiscussionsLegacyOKHeaders wrapper.Response = response @@ -45097,7 +48844,10 @@ func decodeTeamsListForAuthenticatedUserResponse(resp *http.Response) (res Teams } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListForAuthenticatedUserOKHeaders wrapper.Response = response @@ -45160,7 +48910,10 @@ func decodeTeamsListForAuthenticatedUserResponse(resp *http.Response) (res Teams } return nil }(); err != nil { - return res, err + 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: @@ -45187,7 +48940,10 @@ func decodeTeamsListForAuthenticatedUserResponse(resp *http.Response) (res Teams } return nil }(); err != nil { - return res, err + 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: @@ -45220,7 +48976,10 @@ func decodeTeamsListIdpGroupsForLegacyResponse(resp *http.Response) (res TeamsLi } return nil }(); err != nil { - return res, err + 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: @@ -45247,7 +49006,10 @@ func decodeTeamsListIdpGroupsForLegacyResponse(resp *http.Response) (res TeamsLi } return nil }(); err != nil { - return res, err + 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: @@ -45274,7 +49036,10 @@ func decodeTeamsListIdpGroupsForLegacyResponse(resp *http.Response) (res TeamsLi } return nil }(); err != nil { - return res, err + 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: @@ -45307,7 +49072,10 @@ func decodeTeamsListIdpGroupsForOrgResponse(resp *http.Response) (res GroupMappi } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper GroupMappingHeaders wrapper.Response = response @@ -45373,7 +49141,10 @@ func decodeTeamsListIdpGroupsInOrgResponse(resp *http.Response) (res GroupMappin } return nil }(); err != nil { - return res, err + 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: @@ -45414,7 +49185,10 @@ func decodeTeamsListMembersInOrgResponse(resp *http.Response) (res TeamsListMemb } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListMembersInOrgOKHeaders wrapper.Response = response @@ -45488,7 +49262,10 @@ func decodeTeamsListMembersLegacyResponse(resp *http.Response) (res TeamsListMem } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListMembersLegacyOKHeaders wrapper.Response = response @@ -45548,7 +49325,10 @@ func decodeTeamsListMembersLegacyResponse(resp *http.Response) (res TeamsListMem } return nil }(); err != nil { - return res, err + 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: @@ -45589,7 +49369,10 @@ func decodeTeamsListPendingInvitationsInOrgResponse(resp *http.Response) (res Te } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListPendingInvitationsInOrgOKHeaders wrapper.Response = response @@ -45663,7 +49446,10 @@ func decodeTeamsListPendingInvitationsLegacyResponse(resp *http.Response) (res T } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListPendingInvitationsLegacyOKHeaders wrapper.Response = response @@ -45737,7 +49523,10 @@ func decodeTeamsListProjectsInOrgResponse(resp *http.Response) (res TeamsListPro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListProjectsInOrgOKHeaders wrapper.Response = response @@ -45811,7 +49600,10 @@ func decodeTeamsListProjectsLegacyResponse(resp *http.Response) (res TeamsListPr } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListProjectsLegacyOKHeaders wrapper.Response = response @@ -45871,7 +49663,10 @@ func decodeTeamsListProjectsLegacyResponse(resp *http.Response) (res TeamsListPr } return nil }(); err != nil { - return res, err + 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: @@ -45912,7 +49707,10 @@ func decodeTeamsListReposInOrgResponse(resp *http.Response) (res TeamsListReposI } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListReposInOrgOKHeaders wrapper.Response = response @@ -45986,7 +49784,10 @@ func decodeTeamsListReposLegacyResponse(resp *http.Response) (res TeamsListRepos } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper TeamsListReposLegacyOKHeaders wrapper.Response = response @@ -46046,7 +49847,10 @@ func decodeTeamsListReposLegacyResponse(resp *http.Response) (res TeamsListRepos } return nil }(); err != nil { - return res, err + 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: @@ -46127,7 +49931,10 @@ func decodeTeamsRemoveProjectLegacyResponse(resp *http.Response) (res TeamsRemov } return nil }(); err != nil { - return res, err + 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: @@ -46154,7 +49961,10 @@ func decodeTeamsRemoveProjectLegacyResponse(resp *http.Response) (res TeamsRemov } return nil }(); err != nil { - return res, err + 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: @@ -46181,7 +49991,10 @@ func decodeTeamsRemoveProjectLegacyResponse(resp *http.Response) (res TeamsRemov } return nil }(); err != nil { - return res, err + 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: @@ -46232,40 +50045,46 @@ func decodeTeamsUpdateDiscussionCommentInOrgResponse(resp *http.Response) (res T } return nil }(); 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 decodeTeamsUpdateDiscussionCommentLegacyResponse(resp *http.Response) (res TeamDiscussionComment, 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 - } - return response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeTeamsUpdateDiscussionCommentLegacyResponse(resp *http.Response) (res TeamDiscussionComment, 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 TeamDiscussionComment - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return res, err + } + + d := jx.DecodeBytes(b) + var response TeamDiscussionComment + 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: @@ -46298,7 +50117,10 @@ func decodeTeamsUpdateDiscussionInOrgResponse(resp *http.Response) (res TeamDisc } return nil }(); err != nil { - return res, err + 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: @@ -46331,7 +50153,10 @@ func decodeTeamsUpdateDiscussionLegacyResponse(resp *http.Response) (res TeamDis } return nil }(); err != nil { - return res, err + 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: @@ -46364,7 +50189,10 @@ func decodeTeamsUpdateInOrgResponse(resp *http.Response) (res TeamFull, err erro } return nil }(); err != nil { - return res, err + 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: @@ -46397,7 +50225,10 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } return nil }(); err != nil { - return res, err + 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: @@ -46424,7 +50255,10 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } return nil }(); err != nil { - return res, err + 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: @@ -46451,7 +50285,10 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } return nil }(); err != nil { - return res, err + 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: @@ -46478,7 +50315,10 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } return nil }(); err != nil { - return res, err + 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: @@ -46505,7 +50345,10 @@ func decodeTeamsUpdateLegacyResponse(resp *http.Response) (res TeamsUpdateLegacy } return nil }(); err != nil { - return res, err + 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: @@ -46538,7 +50381,10 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } return nil }(); err != nil { - return res, err + 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: @@ -46568,7 +50414,10 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } return nil }(); err != nil { - return res, err + 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: @@ -46595,7 +50444,10 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } return nil }(); err != nil { - return res, err + 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: @@ -46622,7 +50474,10 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } return nil }(); err != nil { - return res, err + 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: @@ -46649,7 +50504,10 @@ func decodeUsersAddEmailForAuthenticatedResponse(resp *http.Response) (res Users } return nil }(); err != nil { - return res, err + 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: @@ -46688,7 +50546,10 @@ func decodeUsersBlockResponse(resp *http.Response) (res UsersBlockRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -46715,7 +50576,10 @@ func decodeUsersBlockResponse(resp *http.Response) (res UsersBlockRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -46742,7 +50606,10 @@ func decodeUsersBlockResponse(resp *http.Response) (res UsersBlockRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -46769,7 +50636,10 @@ func decodeUsersBlockResponse(resp *http.Response) (res UsersBlockRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -46808,7 +50678,10 @@ func decodeUsersCheckBlockedResponse(resp *http.Response) (res UsersCheckBlocked } return nil }(); err != nil { - return res, err + 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: @@ -46835,7 +50708,10 @@ func decodeUsersCheckBlockedResponse(resp *http.Response) (res UsersCheckBlocked } return nil }(); err != nil { - return res, err + 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: @@ -46862,7 +50738,10 @@ func decodeUsersCheckBlockedResponse(resp *http.Response) (res UsersCheckBlocked } return nil }(); err != nil { - return res, err + 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: @@ -46913,7 +50792,10 @@ func decodeUsersCheckPersonIsFollowedByAuthenticatedResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -46940,7 +50822,10 @@ func decodeUsersCheckPersonIsFollowedByAuthenticatedResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -46967,7 +50852,10 @@ func decodeUsersCheckPersonIsFollowedByAuthenticatedResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -47000,7 +50888,10 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } return nil }(); err != nil { - return res, err + 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: @@ -47030,7 +50921,10 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } return nil }(); err != nil { - return res, err + 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: @@ -47057,7 +50951,10 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } return nil }(); err != nil { - return res, err + 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: @@ -47084,7 +50981,10 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } return nil }(); err != nil { - return res, err + 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: @@ -47111,7 +51011,10 @@ func decodeUsersCreateGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } return nil }(); err != nil { - return res, err + 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: @@ -47144,7 +51047,10 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -47174,7 +51080,10 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -47201,7 +51110,10 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -47228,7 +51140,10 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -47255,7 +51170,10 @@ func decodeUsersCreatePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -47294,7 +51212,10 @@ func decodeUsersDeleteEmailForAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + 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: @@ -47321,7 +51242,10 @@ func decodeUsersDeleteEmailForAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + 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: @@ -47348,7 +51272,10 @@ func decodeUsersDeleteEmailForAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + 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: @@ -47375,7 +51302,10 @@ func decodeUsersDeleteEmailForAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + 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: @@ -47414,7 +51344,10 @@ func decodeUsersDeleteGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } return nil }(); err != nil { - return res, err + 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: @@ -47441,7 +51374,10 @@ func decodeUsersDeleteGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } return nil }(); err != nil { - return res, err + 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: @@ -47468,7 +51404,10 @@ func decodeUsersDeleteGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } return nil }(); err != nil { - return res, err + 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: @@ -47495,7 +51434,10 @@ func decodeUsersDeleteGpgKeyForAuthenticatedResponse(resp *http.Response) (res U } return nil }(); err != nil { - return res, err + 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: @@ -47534,7 +51476,10 @@ func decodeUsersDeletePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -47561,7 +51506,10 @@ func decodeUsersDeletePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -47588,7 +51536,10 @@ func decodeUsersDeletePublicSSHKeyForAuthenticatedResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -47627,7 +51578,10 @@ func decodeUsersFollowResponse(resp *http.Response) (res UsersFollowRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -47654,7 +51608,10 @@ func decodeUsersFollowResponse(resp *http.Response) (res UsersFollowRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -47681,7 +51638,10 @@ func decodeUsersFollowResponse(resp *http.Response) (res UsersFollowRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -47714,7 +51674,10 @@ func decodeUsersGetAuthenticatedResponse(resp *http.Response) (res UsersGetAuthe } return nil }(); err != nil { - return res, err + 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: @@ -47744,7 +51707,10 @@ func decodeUsersGetAuthenticatedResponse(resp *http.Response) (res UsersGetAuthe } return nil }(); err != nil { - return res, err + 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: @@ -47771,7 +51737,10 @@ func decodeUsersGetAuthenticatedResponse(resp *http.Response) (res UsersGetAuthe } return nil }(); err != nil { - return res, err + 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: @@ -47804,7 +51773,10 @@ func decodeUsersGetByUsernameResponse(resp *http.Response) (res UsersGetByUserna } return nil }(); err != nil { - return res, err + 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: @@ -47831,7 +51803,10 @@ func decodeUsersGetByUsernameResponse(resp *http.Response) (res UsersGetByUserna } return nil }(); err != nil { - return res, err + 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: @@ -47858,7 +51833,10 @@ func decodeUsersGetByUsernameResponse(resp *http.Response) (res UsersGetByUserna } return nil }(); err != nil { - return res, err + 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: @@ -47891,7 +51869,10 @@ func decodeUsersGetContextForUserResponse(resp *http.Response) (res UsersGetCont } return nil }(); err != nil { - return res, err + 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: @@ -47918,7 +51899,10 @@ func decodeUsersGetContextForUserResponse(resp *http.Response) (res UsersGetCont } return nil }(); err != nil { - return res, err + 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: @@ -47945,7 +51929,10 @@ func decodeUsersGetContextForUserResponse(resp *http.Response) (res UsersGetCont } return nil }(); err != nil { - return res, err + 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: @@ -47978,7 +51965,10 @@ func decodeUsersGetGpgKeyForAuthenticatedResponse(resp *http.Response) (res User } return nil }(); err != nil { - return res, err + 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: @@ -48008,7 +51998,10 @@ func decodeUsersGetGpgKeyForAuthenticatedResponse(resp *http.Response) (res User } return nil }(); err != nil { - return res, err + 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: @@ -48035,7 +52028,10 @@ func decodeUsersGetGpgKeyForAuthenticatedResponse(resp *http.Response) (res User } return nil }(); err != nil { - return res, err + 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: @@ -48062,7 +52058,10 @@ func decodeUsersGetGpgKeyForAuthenticatedResponse(resp *http.Response) (res User } return nil }(); err != nil { - return res, err + 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: @@ -48095,7 +52094,10 @@ func decodeUsersGetPublicSSHKeyForAuthenticatedResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -48125,7 +52127,10 @@ func decodeUsersGetPublicSSHKeyForAuthenticatedResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -48152,7 +52157,10 @@ func decodeUsersGetPublicSSHKeyForAuthenticatedResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -48179,7 +52187,10 @@ func decodeUsersGetPublicSSHKeyForAuthenticatedResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -48220,7 +52231,10 @@ func decodeUsersListResponse(resp *http.Response) (res UsersListRes, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListOKHeaders wrapper.Response = response @@ -48289,7 +52303,10 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } return nil }(); err != nil { - return res, err + 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: @@ -48319,7 +52336,10 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } return nil }(); err != nil { - return res, err + 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: @@ -48346,7 +52366,10 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } return nil }(); err != nil { - return res, err + 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: @@ -48373,7 +52396,10 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } return nil }(); err != nil { - return res, err + 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: @@ -48400,7 +52426,10 @@ func decodeUsersListBlockedByAuthenticatedResponse(resp *http.Response) (res Use } return nil }(); err != nil { - return res, err + 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: @@ -48441,7 +52470,10 @@ func decodeUsersListEmailsForAuthenticatedResponse(resp *http.Response) (res Use } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListEmailsForAuthenticatedOKHeaders wrapper.Response = response @@ -48504,7 +52536,10 @@ func decodeUsersListEmailsForAuthenticatedResponse(resp *http.Response) (res Use } return nil }(); err != nil { - return res, err + 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: @@ -48531,7 +52566,10 @@ func decodeUsersListEmailsForAuthenticatedResponse(resp *http.Response) (res Use } return nil }(); err != nil { - return res, err + 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: @@ -48558,7 +52596,10 @@ func decodeUsersListEmailsForAuthenticatedResponse(resp *http.Response) (res Use } return nil }(); err != nil { - return res, err + 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: @@ -48599,7 +52640,10 @@ func decodeUsersListFollowedByAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListFollowedByAuthenticatedOKHeaders wrapper.Response = response @@ -48662,7 +52706,10 @@ func decodeUsersListFollowedByAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + 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: @@ -48689,7 +52736,10 @@ func decodeUsersListFollowedByAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + 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: @@ -48730,7 +52780,10 @@ func decodeUsersListFollowersForAuthenticatedUserResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListFollowersForAuthenticatedUserOKHeaders wrapper.Response = response @@ -48793,7 +52846,10 @@ func decodeUsersListFollowersForAuthenticatedUserResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -48820,7 +52876,10 @@ func decodeUsersListFollowersForAuthenticatedUserResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -48861,7 +52920,10 @@ func decodeUsersListFollowersForUserResponse(resp *http.Response) (res UsersList } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListFollowersForUserOKHeaders wrapper.Response = response @@ -48935,7 +52997,10 @@ func decodeUsersListFollowingForUserResponse(resp *http.Response) (res UsersList } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListFollowingForUserOKHeaders wrapper.Response = response @@ -49009,7 +53074,10 @@ func decodeUsersListGpgKeysForAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListGpgKeysForAuthenticatedOKHeaders wrapper.Response = response @@ -49072,7 +53140,10 @@ func decodeUsersListGpgKeysForAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + 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: @@ -49099,7 +53170,10 @@ func decodeUsersListGpgKeysForAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + 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: @@ -49126,7 +53200,10 @@ func decodeUsersListGpgKeysForAuthenticatedResponse(resp *http.Response) (res Us } return nil }(); err != nil { - return res, err + 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: @@ -49167,7 +53244,10 @@ func decodeUsersListGpgKeysForUserResponse(resp *http.Response) (res UsersListGp } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListGpgKeysForUserOKHeaders wrapper.Response = response @@ -49241,7 +53321,10 @@ func decodeUsersListPublicEmailsForAuthenticatedResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListPublicEmailsForAuthenticatedOKHeaders wrapper.Response = response @@ -49304,7 +53387,10 @@ func decodeUsersListPublicEmailsForAuthenticatedResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -49331,7 +53417,10 @@ func decodeUsersListPublicEmailsForAuthenticatedResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -49358,7 +53447,10 @@ func decodeUsersListPublicEmailsForAuthenticatedResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -49399,7 +53491,10 @@ func decodeUsersListPublicKeysForUserResponse(resp *http.Response) (res UsersLis } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListPublicKeysForUserOKHeaders wrapper.Response = response @@ -49473,7 +53568,10 @@ func decodeUsersListPublicSSHKeysForAuthenticatedResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper UsersListPublicSSHKeysForAuthenticatedOKHeaders wrapper.Response = response @@ -49536,7 +53634,10 @@ func decodeUsersListPublicSSHKeysForAuthenticatedResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -49563,7 +53664,10 @@ func decodeUsersListPublicSSHKeysForAuthenticatedResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -49590,7 +53694,10 @@ func decodeUsersListPublicSSHKeysForAuthenticatedResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -49623,7 +53730,10 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -49653,7 +53763,10 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -49680,7 +53793,10 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -49707,7 +53823,10 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -49734,7 +53853,10 @@ func decodeUsersSetPrimaryEmailVisibilityForAuthenticatedResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -49773,7 +53895,10 @@ func decodeUsersUnblockResponse(resp *http.Response) (res UsersUnblockRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -49800,7 +53925,10 @@ func decodeUsersUnblockResponse(resp *http.Response) (res UsersUnblockRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -49827,7 +53955,10 @@ func decodeUsersUnblockResponse(resp *http.Response) (res UsersUnblockRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -49866,7 +53997,10 @@ func decodeUsersUnfollowResponse(resp *http.Response) (res UsersUnfollowRes, err } return nil }(); err != nil { - return res, err + 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: @@ -49893,7 +54027,10 @@ func decodeUsersUnfollowResponse(resp *http.Response) (res UsersUnfollowRes, err } return nil }(); err != nil { - return res, err + 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: @@ -49920,7 +54057,10 @@ func decodeUsersUnfollowResponse(resp *http.Response) (res UsersUnfollowRes, err } return nil }(); err != nil { - return res, err + 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: @@ -49953,7 +54093,10 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } return nil }(); err != nil { - return res, err + 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: @@ -49983,7 +54126,10 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } return nil }(); err != nil { - return res, err + 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: @@ -50010,7 +54156,10 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } return nil }(); err != nil { - return res, err + 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: @@ -50037,7 +54186,10 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } return nil }(); err != nil { - return res, err + 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: @@ -50064,7 +54216,10 @@ func decodeUsersUpdateAuthenticatedResponse(resp *http.Response) (res UsersUpdat } return nil }(); err != nil { - return res, err + 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: diff --git a/examples/ex_gotd/oas_request_decoders_gen.go b/examples/ex_gotd/oas_request_decoders_gen.go index 555242647..c446c8059 100644 --- a/examples/ex_gotd/oas_request_decoders_gen.go +++ b/examples/ex_gotd/oas_request_decoders_gen.go @@ -63,6 +63,9 @@ func (s *Server) decodeAddStickerToSetRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -126,6 +129,9 @@ func (s *Server) decodeAnswerCallbackQueryRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -189,6 +195,9 @@ func (s *Server) decodeAnswerInlineQueryRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -252,6 +261,9 @@ func (s *Server) decodeAnswerPreCheckoutQueryRequest(r *http.Request) ( }(); err != nil { 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) @@ -307,6 +319,9 @@ func (s *Server) decodeAnswerShippingQueryRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -370,6 +385,9 @@ func (s *Server) decodeAnswerWebAppQueryRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -433,6 +451,9 @@ func (s *Server) decodeApproveChatJoinRequestRequest(r *http.Request) ( }(); err != nil { 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) @@ -488,6 +509,9 @@ func (s *Server) decodeBanChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -543,6 +567,9 @@ func (s *Server) decodeBanChatSenderChatRequest(r *http.Request) ( }(); err != nil { 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) @@ -598,6 +625,9 @@ func (s *Server) decodeCopyMessageRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -661,6 +691,9 @@ func (s *Server) decodeCreateChatInviteLinkRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -724,6 +757,9 @@ func (s *Server) decodeCreateNewStickerSetRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -787,6 +823,9 @@ func (s *Server) decodeDeclineChatJoinRequestRequest(r *http.Request) ( }(); err != nil { 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) @@ -842,6 +881,9 @@ func (s *Server) decodeDeleteChatPhotoRequest(r *http.Request) ( }(); err != nil { 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) @@ -897,6 +939,9 @@ func (s *Server) decodeDeleteChatStickerSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -952,6 +997,9 @@ func (s *Server) decodeDeleteMessageRequest(r *http.Request) ( }(); err != nil { 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) @@ -1011,6 +1059,9 @@ func (s *Server) decodeDeleteMyCommandsRequest(r *http.Request) ( }(); err != nil { 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) @@ -1066,6 +1117,9 @@ func (s *Server) decodeDeleteStickerFromSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -1125,6 +1179,9 @@ func (s *Server) decodeDeleteWebhookRequest(r *http.Request) ( }(); err != nil { 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) @@ -1180,6 +1237,9 @@ func (s *Server) decodeEditChatInviteLinkRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1243,6 +1303,9 @@ func (s *Server) decodeEditMessageCaptionRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1306,6 +1369,9 @@ func (s *Server) decodeEditMessageLiveLocationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1369,6 +1435,9 @@ func (s *Server) decodeEditMessageMediaRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1432,6 +1501,9 @@ func (s *Server) decodeEditMessageReplyMarkupRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1495,6 +1567,9 @@ func (s *Server) decodeEditMessageTextRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1558,6 +1633,9 @@ func (s *Server) decodeExportChatInviteLinkRequest(r *http.Request) ( }(); err != nil { 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) @@ -1613,6 +1691,9 @@ func (s *Server) decodeForwardMessageRequest(r *http.Request) ( }(); err != nil { 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) @@ -1668,6 +1749,9 @@ func (s *Server) decodeGetChatRequest(r *http.Request) ( }(); err != nil { 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) @@ -1723,6 +1807,9 @@ func (s *Server) decodeGetChatAdministratorsRequest(r *http.Request) ( }(); err != nil { 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) @@ -1778,6 +1865,9 @@ func (s *Server) decodeGetChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -1833,6 +1923,9 @@ func (s *Server) decodeGetChatMemberCountRequest(r *http.Request) ( }(); err != nil { 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) @@ -1892,6 +1985,9 @@ func (s *Server) decodeGetChatMenuButtonRequest(r *http.Request) ( }(); err != nil { 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) @@ -1947,6 +2043,9 @@ func (s *Server) decodeGetFileRequest(r *http.Request) ( }(); err != nil { 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) @@ -2002,6 +2101,9 @@ func (s *Server) decodeGetGameHighScoresRequest(r *http.Request) ( }(); err != nil { 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) @@ -2061,6 +2163,9 @@ func (s *Server) decodeGetMyCommandsRequest(r *http.Request) ( }(); err != nil { 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) @@ -2120,6 +2225,9 @@ func (s *Server) decodeGetMyDefaultAdministratorRightsRequest(r *http.Request) ( }(); err != nil { 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) @@ -2175,6 +2283,9 @@ func (s *Server) decodeGetStickerSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -2234,6 +2345,9 @@ func (s *Server) decodeGetUpdatesRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -2304,6 +2418,9 @@ func (s *Server) decodeGetUserProfilePhotosRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2367,6 +2484,9 @@ func (s *Server) decodeLeaveChatRequest(r *http.Request) ( }(); err != nil { 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) @@ -2422,6 +2542,9 @@ func (s *Server) decodePinChatMessageRequest(r *http.Request) ( }(); err != nil { 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) @@ -2477,6 +2600,9 @@ func (s *Server) decodePromoteChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -2532,6 +2658,9 @@ func (s *Server) decodeRestrictChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -2587,6 +2716,9 @@ func (s *Server) decodeRevokeChatInviteLinkRequest(r *http.Request) ( }(); err != nil { 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) @@ -2642,6 +2774,9 @@ func (s *Server) decodeSendAnimationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2705,6 +2840,9 @@ func (s *Server) decodeSendAudioRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2768,6 +2906,9 @@ func (s *Server) decodeSendChatActionRequest(r *http.Request) ( }(); err != nil { 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) @@ -2823,6 +2964,9 @@ func (s *Server) decodeSendContactRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2886,6 +3030,9 @@ func (s *Server) decodeSendDiceRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2949,6 +3096,9 @@ func (s *Server) decodeSendDocumentRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3012,6 +3162,9 @@ func (s *Server) decodeSendGameRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3075,6 +3228,9 @@ func (s *Server) decodeSendInvoiceRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3138,6 +3294,9 @@ func (s *Server) decodeSendLocationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3201,6 +3360,9 @@ func (s *Server) decodeSendMediaGroupRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3264,6 +3426,9 @@ func (s *Server) decodeSendMessageRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3327,6 +3492,9 @@ func (s *Server) decodeSendPhotoRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3390,6 +3558,9 @@ func (s *Server) decodeSendPollRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3453,6 +3624,9 @@ func (s *Server) decodeSendStickerRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3516,6 +3690,9 @@ func (s *Server) decodeSendVenueRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3579,6 +3756,9 @@ func (s *Server) decodeSendVideoRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3642,6 +3822,9 @@ func (s *Server) decodeSendVideoNoteRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3705,6 +3888,9 @@ func (s *Server) decodeSendVoiceRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3768,6 +3954,9 @@ func (s *Server) decodeSetChatAdministratorCustomTitleRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3831,6 +4020,9 @@ func (s *Server) decodeSetChatDescriptionRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3898,6 +4090,9 @@ func (s *Server) decodeSetChatMenuButtonRequest(r *http.Request) ( }(); err != nil { 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) @@ -3953,6 +4148,9 @@ func (s *Server) decodeSetChatPermissionsRequest(r *http.Request) ( }(); err != nil { 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) @@ -4008,6 +4206,9 @@ func (s *Server) decodeSetChatPhotoRequest(r *http.Request) ( }(); err != nil { 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) @@ -4063,6 +4264,9 @@ func (s *Server) decodeSetChatStickerSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -4118,6 +4322,9 @@ func (s *Server) decodeSetChatTitleRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4181,6 +4388,9 @@ func (s *Server) decodeSetGameScoreRequest(r *http.Request) ( }(); err != nil { 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) @@ -4236,6 +4446,9 @@ func (s *Server) decodeSetMyCommandsRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4303,6 +4516,9 @@ func (s *Server) decodeSetMyDefaultAdministratorRightsRequest(r *http.Request) ( }(); err != nil { 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) @@ -4358,6 +4574,9 @@ func (s *Server) decodeSetPassportDataErrorsRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4421,6 +4640,9 @@ func (s *Server) decodeSetStickerPositionInSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -4476,6 +4698,9 @@ func (s *Server) decodeSetStickerSetThumbRequest(r *http.Request) ( }(); err != nil { 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) @@ -4531,6 +4756,9 @@ func (s *Server) decodeSetWebhookRequest(r *http.Request) ( }(); err != nil { 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) @@ -4586,6 +4814,9 @@ func (s *Server) decodeStopMessageLiveLocationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4649,6 +4880,9 @@ func (s *Server) decodeStopPollRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4712,6 +4946,9 @@ func (s *Server) decodeUnbanChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -4767,6 +5004,9 @@ func (s *Server) decodeUnbanChatSenderChatRequest(r *http.Request) ( }(); err != nil { 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) @@ -4822,6 +5062,9 @@ func (s *Server) decodeUnpinAllChatMessagesRequest(r *http.Request) ( }(); err != nil { 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) @@ -4877,6 +5120,9 @@ func (s *Server) decodeUnpinChatMessageRequest(r *http.Request) ( }(); err != nil { 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) @@ -4932,6 +5178,9 @@ func (s *Server) decodeUploadStickerFileRequest(r *http.Request) ( }(); err != nil { 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) diff --git a/examples/ex_gotd/oas_response_decoders_gen.go b/examples/ex_gotd/oas_response_decoders_gen.go index d3d41c093..3869d9dc3 100644 --- a/examples/ex_gotd/oas_response_decoders_gen.go +++ b/examples/ex_gotd/oas_response_decoders_gen.go @@ -36,7 +36,10 @@ func decodeAddStickerToSetResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -64,7 +67,10 @@ func decodeAddStickerToSetResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -103,7 +109,10 @@ func decodeAnswerCallbackQueryResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + 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: @@ -131,7 +140,10 @@ func decodeAnswerCallbackQueryResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -170,7 +182,10 @@ func decodeAnswerInlineQueryResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -198,7 +213,10 @@ func decodeAnswerInlineQueryResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -237,7 +255,10 @@ func decodeAnswerPreCheckoutQueryResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -265,7 +286,10 @@ func decodeAnswerPreCheckoutQueryResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -304,7 +328,10 @@ func decodeAnswerShippingQueryResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + 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: @@ -332,7 +359,10 @@ func decodeAnswerShippingQueryResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -371,7 +401,10 @@ func decodeAnswerWebAppQueryResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -399,7 +432,10 @@ func decodeAnswerWebAppQueryResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -438,7 +474,10 @@ func decodeApproveChatJoinRequestResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -466,7 +505,10 @@ func decodeApproveChatJoinRequestResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -505,7 +547,10 @@ func decodeBanChatMemberResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -533,7 +578,10 @@ func decodeBanChatMemberResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -572,7 +620,10 @@ func decodeBanChatSenderChatResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -600,7 +651,10 @@ func decodeBanChatSenderChatResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -639,7 +693,10 @@ func decodeCloseResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -667,7 +724,10 @@ func decodeCloseResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -706,7 +766,10 @@ func decodeCopyMessageResponse(resp *http.Response) (res ResultMessageId, err er } return nil }(); err != nil { - return res, err + 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: @@ -734,7 +797,10 @@ func decodeCopyMessageResponse(resp *http.Response) (res ResultMessageId, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -773,7 +839,10 @@ func decodeCreateChatInviteLinkResponse(resp *http.Response) (res ResultChatInvi } return nil }(); err != nil { - return res, err + 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: @@ -801,7 +870,10 @@ func decodeCreateChatInviteLinkResponse(resp *http.Response) (res ResultChatInvi } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -840,7 +912,10 @@ func decodeCreateNewStickerSetResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + 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: @@ -868,7 +943,10 @@ func decodeCreateNewStickerSetResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -907,7 +985,10 @@ func decodeDeclineChatJoinRequestResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -935,7 +1016,10 @@ func decodeDeclineChatJoinRequestResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -974,7 +1058,10 @@ func decodeDeleteChatPhotoResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -1002,7 +1089,10 @@ func decodeDeleteChatPhotoResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1041,7 +1131,10 @@ func decodeDeleteChatStickerSetResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + 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: @@ -1069,7 +1162,10 @@ func decodeDeleteChatStickerSetResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1108,7 +1204,10 @@ func decodeDeleteMessageResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1136,7 +1235,10 @@ func decodeDeleteMessageResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1175,7 +1277,10 @@ func decodeDeleteMyCommandsResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -1203,7 +1308,10 @@ func decodeDeleteMyCommandsResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1242,7 +1350,10 @@ func decodeDeleteStickerFromSetResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + 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: @@ -1270,7 +1381,10 @@ func decodeDeleteStickerFromSetResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1309,7 +1423,10 @@ func decodeDeleteWebhookResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1337,7 +1454,10 @@ func decodeDeleteWebhookResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1376,7 +1496,10 @@ func decodeEditChatInviteLinkResponse(resp *http.Response) (res ResultChatInvite } return nil }(); err != nil { - return res, err + 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: @@ -1404,7 +1527,10 @@ func decodeEditChatInviteLinkResponse(resp *http.Response) (res ResultChatInvite } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1443,7 +1569,10 @@ func decodeEditMessageCaptionResponse(resp *http.Response) (res ResultMessageOrB } return nil }(); err != nil { - return res, err + 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: @@ -1471,7 +1600,10 @@ func decodeEditMessageCaptionResponse(resp *http.Response) (res ResultMessageOrB } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1510,7 +1642,10 @@ func decodeEditMessageLiveLocationResponse(resp *http.Response) (res ResultMessa } return nil }(); err != nil { - return res, err + 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: @@ -1538,7 +1673,10 @@ func decodeEditMessageLiveLocationResponse(resp *http.Response) (res ResultMessa } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1577,7 +1715,10 @@ func decodeEditMessageMediaResponse(resp *http.Response) (res ResultMessageOrBoo } return nil }(); err != nil { - return res, err + 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: @@ -1605,7 +1746,10 @@ func decodeEditMessageMediaResponse(resp *http.Response) (res ResultMessageOrBoo } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1644,7 +1788,10 @@ func decodeEditMessageReplyMarkupResponse(resp *http.Response) (res ResultMessag } return nil }(); err != nil { - return res, err + 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: @@ -1672,7 +1819,10 @@ func decodeEditMessageReplyMarkupResponse(resp *http.Response) (res ResultMessag } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1711,7 +1861,10 @@ func decodeEditMessageTextResponse(resp *http.Response) (res ResultMessageOrBool } return nil }(); err != nil { - return res, err + 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: @@ -1739,7 +1892,10 @@ func decodeEditMessageTextResponse(resp *http.Response) (res ResultMessageOrBool } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1778,7 +1934,10 @@ func decodeExportChatInviteLinkResponse(resp *http.Response) (res ResultString, } return nil }(); err != nil { - return res, err + 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: @@ -1806,7 +1965,10 @@ func decodeExportChatInviteLinkResponse(resp *http.Response) (res ResultString, } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1845,7 +2007,10 @@ func decodeForwardMessageResponse(resp *http.Response) (res ResultMessage, err e } return nil }(); err != nil { - return res, err + 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: @@ -1873,7 +2038,10 @@ func decodeForwardMessageResponse(resp *http.Response) (res ResultMessage, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1912,7 +2080,10 @@ func decodeGetChatResponse(resp *http.Response) (res ResultChat, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1940,7 +2111,10 @@ func decodeGetChatResponse(resp *http.Response) (res ResultChat, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1979,7 +2153,10 @@ func decodeGetChatAdministratorsResponse(resp *http.Response) (res ResultArrayOf } return nil }(); err != nil { - return res, err + 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: @@ -2007,7 +2184,10 @@ func decodeGetChatAdministratorsResponse(resp *http.Response) (res ResultArrayOf } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2046,7 +2226,10 @@ func decodeGetChatMemberResponse(resp *http.Response) (res ResultChatMember, err } return nil }(); err != nil { - return res, err + 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: @@ -2074,7 +2257,10 @@ func decodeGetChatMemberResponse(resp *http.Response) (res ResultChatMember, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2113,7 +2299,10 @@ func decodeGetChatMemberCountResponse(resp *http.Response) (res ResultInt, err e } return nil }(); err != nil { - return res, err + 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: @@ -2141,7 +2330,10 @@ func decodeGetChatMemberCountResponse(resp *http.Response) (res ResultInt, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2180,7 +2372,10 @@ func decodeGetChatMenuButtonResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -2208,7 +2403,10 @@ func decodeGetChatMenuButtonResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2247,7 +2445,10 @@ func decodeGetFileResponse(resp *http.Response) (res ResultFile, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2275,7 +2476,10 @@ func decodeGetFileResponse(resp *http.Response) (res ResultFile, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2314,7 +2518,10 @@ func decodeGetGameHighScoresResponse(resp *http.Response) (res ResultArrayOfGame } return nil }(); err != nil { - return res, err + 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: @@ -2342,7 +2549,10 @@ func decodeGetGameHighScoresResponse(resp *http.Response) (res ResultArrayOfGame } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2381,7 +2591,10 @@ func decodeGetMeResponse(resp *http.Response) (res ResultUser, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2409,7 +2622,10 @@ func decodeGetMeResponse(resp *http.Response) (res ResultUser, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2448,7 +2664,10 @@ func decodeGetMyCommandsResponse(resp *http.Response) (res ResultArrayOfBotComma } return nil }(); err != nil { - return res, err + 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: @@ -2476,7 +2695,10 @@ func decodeGetMyCommandsResponse(resp *http.Response) (res ResultArrayOfBotComma } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2515,7 +2737,10 @@ func decodeGetMyDefaultAdministratorRightsResponse(resp *http.Response) (res Res } return nil }(); err != nil { - return res, err + 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: @@ -2543,7 +2768,10 @@ func decodeGetMyDefaultAdministratorRightsResponse(resp *http.Response) (res Res } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2582,7 +2810,10 @@ func decodeGetStickerSetResponse(resp *http.Response) (res ResultStickerSet, err } return nil }(); err != nil { - return res, err + 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: @@ -2610,7 +2841,10 @@ func decodeGetStickerSetResponse(resp *http.Response) (res ResultStickerSet, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2649,7 +2883,10 @@ func decodeGetUpdatesResponse(resp *http.Response) (res ResultArrayOfUpdate, err } return nil }(); err != nil { - return res, err + 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: @@ -2677,7 +2914,10 @@ func decodeGetUpdatesResponse(resp *http.Response) (res ResultArrayOfUpdate, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2716,7 +2956,10 @@ func decodeGetUserProfilePhotosResponse(resp *http.Response) (res ResultUserProf } return nil }(); err != nil { - return res, err + 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: @@ -2744,7 +2987,10 @@ func decodeGetUserProfilePhotosResponse(resp *http.Response) (res ResultUserProf } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2783,7 +3029,10 @@ func decodeGetWebhookInfoResponse(resp *http.Response) (res ResultWebhookInfo, e } return nil }(); err != nil { - return res, err + 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: @@ -2811,7 +3060,10 @@ func decodeGetWebhookInfoResponse(resp *http.Response) (res ResultWebhookInfo, e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2850,7 +3102,10 @@ func decodeLeaveChatResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2878,7 +3133,10 @@ func decodeLeaveChatResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2917,7 +3175,10 @@ func decodeLogOutResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2945,7 +3206,10 @@ func decodeLogOutResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2984,7 +3248,10 @@ func decodePinChatMessageResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -3012,7 +3279,10 @@ func decodePinChatMessageResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3051,7 +3321,10 @@ func decodePromoteChatMemberResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -3079,7 +3352,10 @@ func decodePromoteChatMemberResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3118,7 +3394,10 @@ func decodeRestrictChatMemberResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + 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: @@ -3146,7 +3425,10 @@ func decodeRestrictChatMemberResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3185,7 +3467,10 @@ func decodeRevokeChatInviteLinkResponse(resp *http.Response) (res ResultChatInvi } return nil }(); err != nil { - return res, err + 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: @@ -3213,7 +3498,10 @@ func decodeRevokeChatInviteLinkResponse(resp *http.Response) (res ResultChatInvi } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3252,7 +3540,10 @@ func decodeSendAnimationResponse(resp *http.Response) (res ResultMessage, err er } return nil }(); err != nil { - return res, err + 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: @@ -3280,7 +3571,10 @@ func decodeSendAnimationResponse(resp *http.Response) (res ResultMessage, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3319,7 +3613,10 @@ func decodeSendAudioResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -3347,7 +3644,10 @@ func decodeSendAudioResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3386,7 +3686,10 @@ func decodeSendChatActionResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -3414,7 +3717,10 @@ func decodeSendChatActionResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3453,7 +3759,10 @@ func decodeSendContactResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + 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: @@ -3481,7 +3790,10 @@ func decodeSendContactResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3520,7 +3832,10 @@ func decodeSendDiceResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -3548,7 +3863,10 @@ func decodeSendDiceResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3587,7 +3905,10 @@ func decodeSendDocumentResponse(resp *http.Response) (res ResultMessage, err err } return nil }(); err != nil { - return res, err + 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: @@ -3615,7 +3936,10 @@ func decodeSendDocumentResponse(resp *http.Response) (res ResultMessage, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3654,7 +3978,10 @@ func decodeSendGameResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -3682,7 +4009,10 @@ func decodeSendGameResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3721,7 +4051,10 @@ func decodeSendInvoiceResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + 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: @@ -3749,7 +4082,10 @@ func decodeSendInvoiceResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3788,7 +4124,10 @@ func decodeSendLocationResponse(resp *http.Response) (res ResultMessage, err err } return nil }(); err != nil { - return res, err + 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: @@ -3816,7 +4155,10 @@ func decodeSendLocationResponse(resp *http.Response) (res ResultMessage, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3855,7 +4197,10 @@ func decodeSendMediaGroupResponse(resp *http.Response) (res ResultArrayOfMessage } return nil }(); err != nil { - return res, err + 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: @@ -3883,7 +4228,10 @@ func decodeSendMediaGroupResponse(resp *http.Response) (res ResultArrayOfMessage } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3922,7 +4270,10 @@ func decodeSendMessageResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + 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: @@ -3950,7 +4301,10 @@ func decodeSendMessageResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3989,7 +4343,10 @@ func decodeSendPhotoResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -4017,7 +4374,10 @@ func decodeSendPhotoResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4056,7 +4416,10 @@ func decodeSendPollResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -4084,7 +4447,10 @@ func decodeSendPollResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4123,7 +4489,10 @@ func decodeSendStickerResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + 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: @@ -4151,7 +4520,10 @@ func decodeSendStickerResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4190,7 +4562,10 @@ func decodeSendVenueResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -4218,7 +4593,10 @@ func decodeSendVenueResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4257,7 +4635,10 @@ func decodeSendVideoResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -4285,7 +4666,10 @@ func decodeSendVideoResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4324,7 +4708,10 @@ func decodeSendVideoNoteResponse(resp *http.Response) (res ResultMessage, err er } return nil }(); err != nil { - return res, err + 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: @@ -4352,7 +4739,10 @@ func decodeSendVideoNoteResponse(resp *http.Response) (res ResultMessage, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4391,7 +4781,10 @@ func decodeSendVoiceResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -4419,7 +4812,10 @@ func decodeSendVoiceResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4458,7 +4854,10 @@ func decodeSetChatAdministratorCustomTitleResponse(resp *http.Response) (res Res } return nil }(); err != nil { - return res, err + 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: @@ -4486,7 +4885,10 @@ func decodeSetChatAdministratorCustomTitleResponse(resp *http.Response) (res Res } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4525,7 +4927,10 @@ func decodeSetChatDescriptionResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + 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: @@ -4553,7 +4958,10 @@ func decodeSetChatDescriptionResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4592,7 +5000,10 @@ func decodeSetChatMenuButtonResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -4620,7 +5031,10 @@ func decodeSetChatMenuButtonResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4659,7 +5073,10 @@ func decodeSetChatPermissionsResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + 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: @@ -4687,7 +5104,10 @@ func decodeSetChatPermissionsResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4726,7 +5146,10 @@ func decodeSetChatPhotoResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -4754,7 +5177,10 @@ func decodeSetChatPhotoResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4793,7 +5219,10 @@ func decodeSetChatStickerSetResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -4821,7 +5250,10 @@ func decodeSetChatStickerSetResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4860,7 +5292,10 @@ func decodeSetChatTitleResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -4888,7 +5323,10 @@ func decodeSetChatTitleResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4927,7 +5365,10 @@ func decodeSetGameScoreResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -4955,7 +5396,10 @@ func decodeSetGameScoreResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4994,7 +5438,10 @@ func decodeSetMyCommandsResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -5022,7 +5469,10 @@ func decodeSetMyCommandsResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5061,7 +5511,10 @@ func decodeSetMyDefaultAdministratorRightsResponse(resp *http.Response) (res Res } return nil }(); err != nil { - return res, err + 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: @@ -5089,7 +5542,10 @@ func decodeSetMyDefaultAdministratorRightsResponse(resp *http.Response) (res Res } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5128,7 +5584,10 @@ func decodeSetPassportDataErrorsResponse(resp *http.Response) (res Result, err e } return nil }(); err != nil { - return res, err + 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: @@ -5156,7 +5615,10 @@ func decodeSetPassportDataErrorsResponse(resp *http.Response) (res Result, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5195,7 +5657,10 @@ func decodeSetStickerPositionInSetResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -5223,7 +5688,10 @@ func decodeSetStickerPositionInSetResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5262,7 +5730,10 @@ func decodeSetStickerSetThumbResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + 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: @@ -5290,7 +5761,10 @@ func decodeSetStickerSetThumbResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5329,7 +5803,10 @@ func decodeSetWebhookResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -5357,7 +5834,10 @@ func decodeSetWebhookResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5396,7 +5876,10 @@ func decodeStopMessageLiveLocationResponse(resp *http.Response) (res ResultMessa } return nil }(); err != nil { - return res, err + 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: @@ -5424,7 +5907,10 @@ func decodeStopMessageLiveLocationResponse(resp *http.Response) (res ResultMessa } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5463,7 +5949,10 @@ func decodeStopPollResponse(resp *http.Response) (res ResultPoll, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -5491,7 +5980,10 @@ func decodeStopPollResponse(resp *http.Response) (res ResultPoll, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5530,7 +6022,10 @@ func decodeUnbanChatMemberResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -5558,7 +6053,10 @@ func decodeUnbanChatMemberResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5597,7 +6095,10 @@ func decodeUnbanChatSenderChatResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + 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: @@ -5625,7 +6126,10 @@ func decodeUnbanChatSenderChatResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5664,7 +6168,10 @@ func decodeUnpinAllChatMessagesResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + 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: @@ -5692,7 +6199,10 @@ func decodeUnpinAllChatMessagesResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5731,7 +6241,10 @@ func decodeUnpinChatMessageResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -5759,7 +6272,10 @@ func decodeUnpinChatMessageResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5798,7 +6314,10 @@ func decodeUploadStickerFileResponse(resp *http.Response) (res ResultFile, err e } return nil }(); err != nil { - return res, err + 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: @@ -5826,7 +6345,10 @@ func decodeUploadStickerFileResponse(resp *http.Response) (res ResultFile, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } 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 5f945be1e..fc39040c4 100644 --- a/examples/ex_k8s/oas_response_decoders_gen.go +++ b/examples/ex_k8s/oas_response_decoders_gen.go @@ -37,7 +37,10 @@ func decodeGetAPIVersionsResponse(resp *http.Response) (res GetAPIVersionsRes, e } return nil }(); err != nil { - return res, err + 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: @@ -73,7 +76,10 @@ func decodeGetAdmissionregistrationAPIGroupResponse(resp *http.Response) (res Ge } return nil }(); err != nil { - return res, err + 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: @@ -109,7 +115,10 @@ func decodeGetAdmissionregistrationV1APIResourcesResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -145,7 +154,10 @@ func decodeGetApiextensionsAPIGroupResponse(resp *http.Response) (res GetApiexte } return nil }(); err != nil { - return res, err + 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: @@ -181,7 +193,10 @@ func decodeGetApiextensionsV1APIResourcesResponse(resp *http.Response) (res GetA } return nil }(); err != nil { - return res, err + 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: @@ -217,7 +232,10 @@ func decodeGetApiregistrationAPIGroupResponse(resp *http.Response) (res GetApire } return nil }(); err != nil { - return res, err + 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: @@ -253,7 +271,10 @@ func decodeGetApiregistrationV1APIResourcesResponse(resp *http.Response) (res Ge } return nil }(); err != nil { - return res, err + 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: @@ -289,7 +310,10 @@ func decodeGetAppsAPIGroupResponse(resp *http.Response) (res GetAppsAPIGroupRes, } return nil }(); err != nil { - return res, err + 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: @@ -325,7 +349,10 @@ func decodeGetAppsV1APIResourcesResponse(resp *http.Response) (res GetAppsV1APIR } return nil }(); err != nil { - return res, err + 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: @@ -361,7 +388,10 @@ func decodeGetAuthenticationAPIGroupResponse(resp *http.Response) (res GetAuthen } return nil }(); err != nil { - return res, err + 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: @@ -397,7 +427,10 @@ func decodeGetAuthenticationV1APIResourcesResponse(resp *http.Response) (res Get } return nil }(); err != nil { - return res, err + 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: @@ -433,7 +466,10 @@ func decodeGetAuthorizationAPIGroupResponse(resp *http.Response) (res GetAuthori } return nil }(); err != nil { - return res, err + 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: @@ -469,7 +505,10 @@ func decodeGetAuthorizationV1APIResourcesResponse(resp *http.Response) (res GetA } return nil }(); err != nil { - return res, err + 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: @@ -505,7 +544,10 @@ func decodeGetAutoscalingAPIGroupResponse(resp *http.Response) (res GetAutoscali } return nil }(); err != nil { - return res, err + 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: @@ -541,7 +583,10 @@ func decodeGetAutoscalingV1APIResourcesResponse(resp *http.Response) (res GetAut } return nil }(); err != nil { - return res, err + 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: @@ -577,7 +622,10 @@ func decodeGetAutoscalingV2beta1APIResourcesResponse(resp *http.Response) (res G } return nil }(); err != nil { - return res, err + 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: @@ -613,7 +661,10 @@ func decodeGetAutoscalingV2beta2APIResourcesResponse(resp *http.Response) (res G } return nil }(); err != nil { - return res, err + 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: @@ -649,7 +700,10 @@ func decodeGetBatchAPIGroupResponse(resp *http.Response) (res GetBatchAPIGroupRe } return nil }(); err != nil { - return res, err + 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: @@ -685,7 +739,10 @@ func decodeGetBatchV1APIResourcesResponse(resp *http.Response) (res GetBatchV1AP } return nil }(); err != nil { - return res, err + 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: @@ -721,7 +778,10 @@ func decodeGetBatchV1beta1APIResourcesResponse(resp *http.Response) (res GetBatc } return nil }(); err != nil { - return res, err + 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: @@ -757,7 +817,10 @@ func decodeGetCertificatesAPIGroupResponse(resp *http.Response) (res GetCertific } return nil }(); err != nil { - return res, err + 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: @@ -793,7 +856,10 @@ func decodeGetCertificatesV1APIResourcesResponse(resp *http.Response) (res GetCe } return nil }(); err != nil { - return res, err + 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: @@ -829,7 +895,10 @@ func decodeGetCodeVersionResponse(resp *http.Response) (res GetCodeVersionRes, e } return nil }(); err != nil { - return res, err + 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: @@ -865,7 +934,10 @@ func decodeGetCoordinationAPIGroupResponse(resp *http.Response) (res GetCoordina } return nil }(); err != nil { - return res, err + 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: @@ -901,7 +973,10 @@ func decodeGetCoordinationV1APIResourcesResponse(resp *http.Response) (res GetCo } return nil }(); err != nil { - return res, err + 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: @@ -937,7 +1012,10 @@ func decodeGetCoreAPIVersionsResponse(resp *http.Response) (res GetCoreAPIVersio } return nil }(); err != nil { - return res, err + 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: @@ -973,7 +1051,10 @@ func decodeGetCoreV1APIResourcesResponse(resp *http.Response) (res GetCoreV1APIR } return nil }(); err != nil { - return res, err + 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: @@ -1009,7 +1090,10 @@ func decodeGetDiscoveryAPIGroupResponse(resp *http.Response) (res GetDiscoveryAP } return nil }(); err != nil { - return res, err + 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: @@ -1045,7 +1129,10 @@ func decodeGetDiscoveryV1APIResourcesResponse(resp *http.Response) (res GetDisco } return nil }(); err != nil { - return res, err + 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: @@ -1081,7 +1168,10 @@ func decodeGetDiscoveryV1beta1APIResourcesResponse(resp *http.Response) (res Get } return nil }(); err != nil { - return res, err + 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: @@ -1117,7 +1207,10 @@ func decodeGetEventsAPIGroupResponse(resp *http.Response) (res GetEventsAPIGroup } return nil }(); err != nil { - return res, err + 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: @@ -1153,7 +1246,10 @@ func decodeGetEventsV1APIResourcesResponse(resp *http.Response) (res GetEventsV1 } return nil }(); err != nil { - return res, err + 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: @@ -1189,7 +1285,10 @@ func decodeGetEventsV1beta1APIResourcesResponse(resp *http.Response) (res GetEve } return nil }(); err != nil { - return res, err + 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: @@ -1225,7 +1324,10 @@ func decodeGetFlowcontrolApiserverAPIGroupResponse(resp *http.Response) (res Get } return nil }(); err != nil { - return res, err + 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: @@ -1261,7 +1363,10 @@ func decodeGetFlowcontrolApiserverV1beta1APIResourcesResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -1297,7 +1402,10 @@ func decodeGetFlowcontrolApiserverV1beta2APIResourcesResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -1333,7 +1441,10 @@ func decodeGetInternalApiserverAPIGroupResponse(resp *http.Response) (res GetInt } return nil }(); err != nil { - return res, err + 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: @@ -1369,7 +1480,10 @@ func decodeGetInternalApiserverV1alpha1APIResourcesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -1405,7 +1519,10 @@ func decodeGetNetworkingAPIGroupResponse(resp *http.Response) (res GetNetworking } return nil }(); err != nil { - return res, err + 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: @@ -1441,7 +1558,10 @@ func decodeGetNetworkingV1APIResourcesResponse(resp *http.Response) (res GetNetw } return nil }(); err != nil { - return res, err + 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: @@ -1477,7 +1597,10 @@ func decodeGetNodeAPIGroupResponse(resp *http.Response) (res GetNodeAPIGroupRes, } return nil }(); err != nil { - return res, err + 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: @@ -1513,7 +1636,10 @@ func decodeGetNodeV1APIResourcesResponse(resp *http.Response) (res GetNodeV1APIR } return nil }(); err != nil { - return res, err + 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: @@ -1549,7 +1675,10 @@ func decodeGetNodeV1alpha1APIResourcesResponse(resp *http.Response) (res GetNode } return nil }(); err != nil { - return res, err + 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: @@ -1585,7 +1714,10 @@ func decodeGetNodeV1beta1APIResourcesResponse(resp *http.Response) (res GetNodeV } return nil }(); err != nil { - return res, err + 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: @@ -1621,7 +1753,10 @@ func decodeGetPolicyAPIGroupResponse(resp *http.Response) (res GetPolicyAPIGroup } return nil }(); err != nil { - return res, err + 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: @@ -1657,7 +1792,10 @@ func decodeGetPolicyV1APIResourcesResponse(resp *http.Response) (res GetPolicyV1 } return nil }(); err != nil { - return res, err + 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: @@ -1693,7 +1831,10 @@ func decodeGetPolicyV1beta1APIResourcesResponse(resp *http.Response) (res GetPol } return nil }(); err != nil { - return res, err + 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: @@ -1729,7 +1870,10 @@ func decodeGetRbacAuthorizationAPIGroupResponse(resp *http.Response) (res GetRba } return nil }(); err != nil { - return res, err + 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: @@ -1765,7 +1909,10 @@ func decodeGetRbacAuthorizationV1APIResourcesResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -1801,7 +1948,10 @@ func decodeGetSchedulingAPIGroupResponse(resp *http.Response) (res GetScheduling } return nil }(); err != nil { - return res, err + 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: @@ -1837,7 +1987,10 @@ func decodeGetSchedulingV1APIResourcesResponse(resp *http.Response) (res GetSche } return nil }(); err != nil { - return res, err + 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: @@ -1873,7 +2026,10 @@ func decodeGetServiceAccountIssuerOpenIDConfigurationResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -1909,7 +2065,10 @@ func decodeGetStorageAPIGroupResponse(resp *http.Response) (res GetStorageAPIGro } return nil }(); err != nil { - return res, err + 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: @@ -1945,7 +2104,10 @@ func decodeGetStorageV1APIResourcesResponse(resp *http.Response) (res GetStorage } return nil }(); err != nil { - return res, err + 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: @@ -1981,7 +2143,10 @@ func decodeGetStorageV1alpha1APIResourcesResponse(resp *http.Response) (res GetS } return nil }(); err != nil { - return res, err + 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: @@ -2017,7 +2182,10 @@ func decodeGetStorageV1beta1APIResourcesResponse(resp *http.Response) (res GetSt } return nil }(); err != nil { - return res, err + 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: @@ -2053,7 +2221,10 @@ func decodeListAdmissionregistrationV1MutatingWebhookConfigurationResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -2089,7 +2260,10 @@ func decodeListAdmissionregistrationV1ValidatingWebhookConfigurationResponse(res } return nil }(); err != nil { - return res, err + 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: @@ -2125,7 +2299,10 @@ func decodeListApiextensionsV1CustomResourceDefinitionResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -2161,7 +2338,10 @@ func decodeListApiregistrationV1APIServiceResponse(resp *http.Response) (res Lis } return nil }(); err != nil { - return res, err + 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: @@ -2197,7 +2377,10 @@ func decodeListAppsV1ControllerRevisionForAllNamespacesResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -2233,7 +2416,10 @@ func decodeListAppsV1DaemonSetForAllNamespacesResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -2269,7 +2455,10 @@ func decodeListAppsV1DeploymentForAllNamespacesResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -2305,7 +2494,10 @@ func decodeListAppsV1NamespacedControllerRevisionResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -2341,7 +2533,10 @@ func decodeListAppsV1NamespacedDaemonSetResponse(resp *http.Response) (res ListA } return nil }(); err != nil { - return res, err + 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: @@ -2377,7 +2572,10 @@ func decodeListAppsV1NamespacedDeploymentResponse(resp *http.Response) (res List } return nil }(); err != nil { - return res, err + 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: @@ -2413,7 +2611,10 @@ func decodeListAppsV1NamespacedReplicaSetResponse(resp *http.Response) (res List } return nil }(); err != nil { - return res, err + 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: @@ -2449,7 +2650,10 @@ func decodeListAppsV1NamespacedStatefulSetResponse(resp *http.Response) (res Lis } return nil }(); err != nil { - return res, err + 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: @@ -2485,7 +2689,10 @@ func decodeListAppsV1ReplicaSetForAllNamespacesResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -2521,7 +2728,10 @@ func decodeListAppsV1StatefulSetForAllNamespacesResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -2557,7 +2767,10 @@ func decodeListAutoscalingV1HorizontalPodAutoscalerForAllNamespacesResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -2593,7 +2806,10 @@ func decodeListAutoscalingV1NamespacedHorizontalPodAutoscalerResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -2629,7 +2845,10 @@ func decodeListAutoscalingV2beta1HorizontalPodAutoscalerForAllNamespacesResponse } return nil }(); err != nil { - return res, err + 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: @@ -2665,7 +2884,10 @@ func decodeListAutoscalingV2beta1NamespacedHorizontalPodAutoscalerResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -2701,7 +2923,10 @@ func decodeListAutoscalingV2beta2HorizontalPodAutoscalerForAllNamespacesResponse } return nil }(); err != nil { - return res, err + 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: @@ -2737,7 +2962,10 @@ func decodeListAutoscalingV2beta2NamespacedHorizontalPodAutoscalerResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -2773,7 +3001,10 @@ func decodeListBatchV1CronJobForAllNamespacesResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -2809,7 +3040,10 @@ func decodeListBatchV1JobForAllNamespacesResponse(resp *http.Response) (res List } return nil }(); err != nil { - return res, err + 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: @@ -2845,7 +3079,10 @@ func decodeListBatchV1NamespacedCronJobResponse(resp *http.Response) (res ListBa } return nil }(); err != nil { - return res, err + 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: @@ -2881,7 +3118,10 @@ func decodeListBatchV1NamespacedJobResponse(resp *http.Response) (res ListBatchV } return nil }(); err != nil { - return res, err + 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: @@ -2917,7 +3157,10 @@ func decodeListBatchV1beta1CronJobForAllNamespacesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -2953,7 +3196,10 @@ func decodeListBatchV1beta1NamespacedCronJobResponse(resp *http.Response) (res L } return nil }(); err != nil { - return res, err + 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: @@ -2989,7 +3235,10 @@ func decodeListCertificatesV1CertificateSigningRequestResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -3025,7 +3274,10 @@ func decodeListCoordinationV1LeaseForAllNamespacesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -3061,7 +3313,10 @@ func decodeListCoordinationV1NamespacedLeaseResponse(resp *http.Response) (res L } return nil }(); err != nil { - return res, err + 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: @@ -3097,7 +3352,10 @@ func decodeListCoreV1ComponentStatusResponse(resp *http.Response) (res ListCoreV } return nil }(); err != nil { - return res, err + 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: @@ -3133,7 +3391,10 @@ func decodeListCoreV1ConfigMapForAllNamespacesResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -3169,7 +3430,10 @@ func decodeListCoreV1EndpointsForAllNamespacesResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -3205,7 +3469,10 @@ func decodeListCoreV1EventForAllNamespacesResponse(resp *http.Response) (res Lis } return nil }(); err != nil { - return res, err + 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: @@ -3241,7 +3508,10 @@ func decodeListCoreV1LimitRangeForAllNamespacesResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -3277,7 +3547,10 @@ func decodeListCoreV1NamespaceResponse(resp *http.Response) (res ListCoreV1Names } return nil }(); err != nil { - return res, err + 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: @@ -3313,7 +3586,10 @@ func decodeListCoreV1NamespacedConfigMapResponse(resp *http.Response) (res ListC } return nil }(); err != nil { - return res, err + 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: @@ -3349,7 +3625,10 @@ func decodeListCoreV1NamespacedEndpointsResponse(resp *http.Response) (res ListC } return nil }(); err != nil { - return res, err + 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: @@ -3385,7 +3664,10 @@ func decodeListCoreV1NamespacedEventResponse(resp *http.Response) (res ListCoreV } return nil }(); err != nil { - return res, err + 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: @@ -3421,7 +3703,10 @@ func decodeListCoreV1NamespacedLimitRangeResponse(resp *http.Response) (res List } return nil }(); err != nil { - return res, err + 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: @@ -3457,7 +3742,10 @@ func decodeListCoreV1NamespacedPersistentVolumeClaimResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -3493,7 +3781,10 @@ func decodeListCoreV1NamespacedPodResponse(resp *http.Response) (res ListCoreV1N } return nil }(); err != nil { - return res, err + 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: @@ -3529,7 +3820,10 @@ func decodeListCoreV1NamespacedPodTemplateResponse(resp *http.Response) (res Lis } return nil }(); err != nil { - return res, err + 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: @@ -3565,7 +3859,10 @@ func decodeListCoreV1NamespacedReplicationControllerResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -3601,7 +3898,10 @@ func decodeListCoreV1NamespacedResourceQuotaResponse(resp *http.Response) (res L } return nil }(); err != nil { - return res, err + 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: @@ -3637,7 +3937,10 @@ func decodeListCoreV1NamespacedSecretResponse(resp *http.Response) (res ListCore } return nil }(); err != nil { - return res, err + 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: @@ -3673,7 +3976,10 @@ func decodeListCoreV1NamespacedServiceResponse(resp *http.Response) (res ListCor } return nil }(); err != nil { - return res, err + 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: @@ -3709,7 +4015,10 @@ func decodeListCoreV1NamespacedServiceAccountResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -3745,7 +4054,10 @@ func decodeListCoreV1NodeResponse(resp *http.Response) (res ListCoreV1NodeRes, e } return nil }(); err != nil { - return res, err + 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: @@ -3781,7 +4093,10 @@ func decodeListCoreV1PersistentVolumeResponse(resp *http.Response) (res ListCore } return nil }(); err != nil { - return res, err + 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: @@ -3817,7 +4132,10 @@ func decodeListCoreV1PersistentVolumeClaimForAllNamespacesResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -3853,7 +4171,10 @@ func decodeListCoreV1PodForAllNamespacesResponse(resp *http.Response) (res ListC } return nil }(); err != nil { - return res, err + 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: @@ -3889,7 +4210,10 @@ func decodeListCoreV1PodTemplateForAllNamespacesResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -3925,7 +4249,10 @@ func decodeListCoreV1ReplicationControllerForAllNamespacesResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -3961,7 +4288,10 @@ func decodeListCoreV1ResourceQuotaForAllNamespacesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -3997,7 +4327,10 @@ func decodeListCoreV1SecretForAllNamespacesResponse(resp *http.Response) (res Li } return nil }(); err != nil { - return res, err + 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: @@ -4033,7 +4366,10 @@ func decodeListCoreV1ServiceAccountForAllNamespacesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -4069,7 +4405,10 @@ func decodeListCoreV1ServiceForAllNamespacesResponse(resp *http.Response) (res L } return nil }(); err != nil { - return res, err + 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: @@ -4105,7 +4444,10 @@ func decodeListDiscoveryV1EndpointSliceForAllNamespacesResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -4141,7 +4483,10 @@ func decodeListDiscoveryV1NamespacedEndpointSliceResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -4177,7 +4522,10 @@ func decodeListDiscoveryV1beta1EndpointSliceForAllNamespacesResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -4213,7 +4561,10 @@ func decodeListDiscoveryV1beta1NamespacedEndpointSliceResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -4249,7 +4600,10 @@ func decodeListEventsV1EventForAllNamespacesResponse(resp *http.Response) (res L } return nil }(); err != nil { - return res, err + 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: @@ -4285,7 +4639,10 @@ func decodeListEventsV1NamespacedEventResponse(resp *http.Response) (res ListEve } return nil }(); err != nil { - return res, err + 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: @@ -4321,7 +4678,10 @@ func decodeListEventsV1beta1EventForAllNamespacesResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -4357,7 +4717,10 @@ func decodeListEventsV1beta1NamespacedEventResponse(resp *http.Response) (res Li } return nil }(); err != nil { - return res, err + 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: @@ -4393,7 +4756,10 @@ func decodeListFlowcontrolApiserverV1beta1FlowSchemaResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -4429,7 +4795,10 @@ func decodeListFlowcontrolApiserverV1beta1PriorityLevelConfigurationResponse(res } return nil }(); err != nil { - return res, err + 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: @@ -4465,7 +4834,10 @@ func decodeListFlowcontrolApiserverV1beta2FlowSchemaResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -4501,7 +4873,10 @@ func decodeListFlowcontrolApiserverV1beta2PriorityLevelConfigurationResponse(res } return nil }(); err != nil { - return res, err + 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: @@ -4537,7 +4912,10 @@ func decodeListInternalApiserverV1alpha1StorageVersionResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -4573,7 +4951,10 @@ func decodeListNetworkingV1IngressClassResponse(resp *http.Response) (res ListNe } return nil }(); err != nil { - return res, err + 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: @@ -4609,7 +4990,10 @@ func decodeListNetworkingV1IngressForAllNamespacesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -4645,7 +5029,10 @@ func decodeListNetworkingV1NamespacedIngressResponse(resp *http.Response) (res L } return nil }(); err != nil { - return res, err + 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: @@ -4681,7 +5068,10 @@ func decodeListNetworkingV1NamespacedNetworkPolicyResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -4717,7 +5107,10 @@ func decodeListNetworkingV1NetworkPolicyForAllNamespacesResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -4753,7 +5146,10 @@ func decodeListNodeV1RuntimeClassResponse(resp *http.Response) (res ListNodeV1Ru } return nil }(); err != nil { - return res, err + 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: @@ -4789,7 +5185,10 @@ func decodeListNodeV1alpha1RuntimeClassResponse(resp *http.Response) (res ListNo } return nil }(); err != nil { - return res, err + 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: @@ -4825,7 +5224,10 @@ func decodeListNodeV1beta1RuntimeClassResponse(resp *http.Response) (res ListNod } return nil }(); err != nil { - return res, err + 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: @@ -4861,7 +5263,10 @@ func decodeListPolicyV1NamespacedPodDisruptionBudgetResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -4897,7 +5302,10 @@ func decodeListPolicyV1PodDisruptionBudgetForAllNamespacesResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -4933,7 +5341,10 @@ func decodeListPolicyV1beta1NamespacedPodDisruptionBudgetResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -4969,7 +5380,10 @@ func decodeListPolicyV1beta1PodDisruptionBudgetForAllNamespacesResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -5005,7 +5419,10 @@ func decodeListPolicyV1beta1PodSecurityPolicyResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -5041,7 +5458,10 @@ func decodeListRbacAuthorizationV1ClusterRoleResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -5077,7 +5497,10 @@ func decodeListRbacAuthorizationV1ClusterRoleBindingResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -5113,7 +5536,10 @@ func decodeListRbacAuthorizationV1NamespacedRoleResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -5149,7 +5575,10 @@ func decodeListRbacAuthorizationV1NamespacedRoleBindingResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -5185,7 +5614,10 @@ func decodeListRbacAuthorizationV1RoleBindingForAllNamespacesResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -5221,7 +5653,10 @@ func decodeListRbacAuthorizationV1RoleForAllNamespacesResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -5257,7 +5692,10 @@ func decodeListSchedulingV1PriorityClassResponse(resp *http.Response) (res ListS } return nil }(); err != nil { - return res, err + 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: @@ -5293,7 +5731,10 @@ func decodeListStorageV1CSIDriverResponse(resp *http.Response) (res ListStorageV } return nil }(); err != nil { - return res, err + 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: @@ -5329,7 +5770,10 @@ func decodeListStorageV1CSINodeResponse(resp *http.Response) (res ListStorageV1C } return nil }(); err != nil { - return res, err + 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: @@ -5365,7 +5809,10 @@ func decodeListStorageV1StorageClassResponse(resp *http.Response) (res ListStora } return nil }(); err != nil { - return res, err + 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: @@ -5401,7 +5848,10 @@ func decodeListStorageV1VolumeAttachmentResponse(resp *http.Response) (res ListS } return nil }(); err != nil { - return res, err + 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: @@ -5437,7 +5887,10 @@ func decodeListStorageV1alpha1CSIStorageCapacityForAllNamespacesResponse(resp *h } return nil }(); err != nil { - return res, err + 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: @@ -5473,7 +5926,10 @@ func decodeListStorageV1alpha1NamespacedCSIStorageCapacityResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -5509,7 +5965,10 @@ func decodeListStorageV1beta1CSIStorageCapacityForAllNamespacesResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -5545,7 +6004,10 @@ func decodeListStorageV1beta1NamespacedCSIStorageCapacityResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -5599,7 +6061,10 @@ func decodeReadAdmissionregistrationV1MutatingWebhookConfigurationResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -5635,7 +6100,10 @@ func decodeReadAdmissionregistrationV1ValidatingWebhookConfigurationResponse(res } return nil }(); err != nil { - return res, err + 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: @@ -5671,7 +6139,10 @@ func decodeReadApiextensionsV1CustomResourceDefinitionResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -5707,7 +6178,10 @@ func decodeReadApiextensionsV1CustomResourceDefinitionStatusResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -5743,7 +6217,10 @@ func decodeReadApiregistrationV1APIServiceResponse(resp *http.Response) (res Rea } return nil }(); err != nil { - return res, err + 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: @@ -5779,7 +6256,10 @@ func decodeReadApiregistrationV1APIServiceStatusResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -5815,7 +6295,10 @@ func decodeReadAppsV1NamespacedControllerRevisionResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -5851,7 +6334,10 @@ func decodeReadAppsV1NamespacedDaemonSetResponse(resp *http.Response) (res ReadA } return nil }(); err != nil { - return res, err + 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: @@ -5887,7 +6373,10 @@ func decodeReadAppsV1NamespacedDaemonSetStatusResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -5923,7 +6412,10 @@ func decodeReadAppsV1NamespacedDeploymentResponse(resp *http.Response) (res Read } return nil }(); err != nil { - return res, err + 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: @@ -5959,7 +6451,10 @@ func decodeReadAppsV1NamespacedDeploymentScaleResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -5995,7 +6490,10 @@ func decodeReadAppsV1NamespacedDeploymentStatusResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -6031,7 +6529,10 @@ func decodeReadAppsV1NamespacedReplicaSetResponse(resp *http.Response) (res Read } return nil }(); err != nil { - return res, err + 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: @@ -6067,7 +6568,10 @@ func decodeReadAppsV1NamespacedReplicaSetScaleResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -6103,7 +6607,10 @@ func decodeReadAppsV1NamespacedReplicaSetStatusResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -6139,7 +6646,10 @@ func decodeReadAppsV1NamespacedStatefulSetResponse(resp *http.Response) (res Rea } return nil }(); err != nil { - return res, err + 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: @@ -6175,7 +6685,10 @@ func decodeReadAppsV1NamespacedStatefulSetScaleResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -6211,7 +6724,10 @@ func decodeReadAppsV1NamespacedStatefulSetStatusResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -6247,7 +6763,10 @@ func decodeReadAutoscalingV1NamespacedHorizontalPodAutoscalerResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -6283,7 +6802,10 @@ func decodeReadAutoscalingV1NamespacedHorizontalPodAutoscalerStatusResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -6319,7 +6841,10 @@ func decodeReadAutoscalingV2beta1NamespacedHorizontalPodAutoscalerResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -6355,7 +6880,10 @@ func decodeReadAutoscalingV2beta1NamespacedHorizontalPodAutoscalerStatusResponse } return nil }(); err != nil { - return res, err + 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: @@ -6391,7 +6919,10 @@ func decodeReadAutoscalingV2beta2NamespacedHorizontalPodAutoscalerResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -6427,7 +6958,10 @@ func decodeReadAutoscalingV2beta2NamespacedHorizontalPodAutoscalerStatusResponse } return nil }(); err != nil { - return res, err + 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: @@ -6463,7 +6997,10 @@ func decodeReadBatchV1NamespacedCronJobResponse(resp *http.Response) (res ReadBa } return nil }(); err != nil { - return res, err + 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: @@ -6499,7 +7036,10 @@ func decodeReadBatchV1NamespacedCronJobStatusResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -6535,7 +7075,10 @@ func decodeReadBatchV1NamespacedJobResponse(resp *http.Response) (res ReadBatchV } return nil }(); err != nil { - return res, err + 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: @@ -6571,7 +7114,10 @@ func decodeReadBatchV1NamespacedJobStatusResponse(resp *http.Response) (res Read } return nil }(); err != nil { - return res, err + 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: @@ -6607,7 +7153,10 @@ func decodeReadBatchV1beta1NamespacedCronJobResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -6643,7 +7192,10 @@ func decodeReadBatchV1beta1NamespacedCronJobStatusResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -6679,7 +7231,10 @@ func decodeReadCertificatesV1CertificateSigningRequestResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -6715,7 +7270,10 @@ func decodeReadCertificatesV1CertificateSigningRequestApprovalResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: @@ -6751,7 +7309,10 @@ func decodeReadCertificatesV1CertificateSigningRequestStatusResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -6787,7 +7348,10 @@ func decodeReadCoordinationV1NamespacedLeaseResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -6823,7 +7387,10 @@ func decodeReadCoreV1ComponentStatusResponse(resp *http.Response) (res ReadCoreV } return nil }(); err != nil { - return res, err + 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: @@ -6859,7 +7426,10 @@ func decodeReadCoreV1NamespaceResponse(resp *http.Response) (res ReadCoreV1Names } return nil }(); err != nil { - return res, err + 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: @@ -6895,7 +7465,10 @@ func decodeReadCoreV1NamespaceStatusResponse(resp *http.Response) (res ReadCoreV } return nil }(); err != nil { - return res, err + 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: @@ -6931,7 +7504,10 @@ func decodeReadCoreV1NamespacedConfigMapResponse(resp *http.Response) (res ReadC } return nil }(); err != nil { - return res, err + 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: @@ -6967,7 +7543,10 @@ func decodeReadCoreV1NamespacedEndpointsResponse(resp *http.Response) (res ReadC } return nil }(); err != nil { - return res, err + 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: @@ -7003,7 +7582,10 @@ func decodeReadCoreV1NamespacedEventResponse(resp *http.Response) (res ReadCoreV } return nil }(); err != nil { - return res, err + 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: @@ -7039,7 +7621,10 @@ func decodeReadCoreV1NamespacedLimitRangeResponse(resp *http.Response) (res Read } return nil }(); err != nil { - return res, err + 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: @@ -7075,7 +7660,10 @@ func decodeReadCoreV1NamespacedPersistentVolumeClaimResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -7111,7 +7699,10 @@ func decodeReadCoreV1NamespacedPersistentVolumeClaimStatusResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -7147,7 +7738,10 @@ func decodeReadCoreV1NamespacedPodResponse(resp *http.Response) (res ReadCoreV1N } return nil }(); err != nil { - return res, err + 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: @@ -7183,7 +7777,10 @@ func decodeReadCoreV1NamespacedPodEphemeralcontainersResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -7219,7 +7816,10 @@ func decodeReadCoreV1NamespacedPodLogResponse(resp *http.Response) (res ReadCore } return nil }(); err != nil { - return res, err + 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 case ct == "text/plain": @@ -7263,7 +7863,10 @@ func decodeReadCoreV1NamespacedPodStatusResponse(resp *http.Response) (res ReadC } return nil }(); err != nil { - return res, err + 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: @@ -7299,7 +7902,10 @@ func decodeReadCoreV1NamespacedPodTemplateResponse(resp *http.Response) (res Rea } return nil }(); err != nil { - return res, err + 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: @@ -7335,7 +7941,10 @@ func decodeReadCoreV1NamespacedReplicationControllerResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -7371,7 +7980,10 @@ func decodeReadCoreV1NamespacedReplicationControllerScaleResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -7407,7 +8019,10 @@ func decodeReadCoreV1NamespacedReplicationControllerStatusResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -7443,7 +8058,10 @@ func decodeReadCoreV1NamespacedResourceQuotaResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -7479,7 +8097,10 @@ func decodeReadCoreV1NamespacedResourceQuotaStatusResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -7515,7 +8136,10 @@ func decodeReadCoreV1NamespacedSecretResponse(resp *http.Response) (res ReadCore } return nil }(); err != nil { - return res, err + 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: @@ -7551,7 +8175,10 @@ func decodeReadCoreV1NamespacedServiceResponse(resp *http.Response) (res ReadCor } return nil }(); err != nil { - return res, err + 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: @@ -7587,7 +8214,10 @@ func decodeReadCoreV1NamespacedServiceAccountResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7623,7 +8253,10 @@ func decodeReadCoreV1NamespacedServiceStatusResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -7659,7 +8292,10 @@ func decodeReadCoreV1NodeResponse(resp *http.Response) (res ReadCoreV1NodeRes, e } return nil }(); err != nil { - return res, err + 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: @@ -7695,7 +8331,10 @@ func decodeReadCoreV1NodeStatusResponse(resp *http.Response) (res ReadCoreV1Node } return nil }(); err != nil { - return res, err + 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: @@ -7731,7 +8370,10 @@ func decodeReadCoreV1PersistentVolumeResponse(resp *http.Response) (res ReadCore } return nil }(); err != nil { - return res, err + 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: @@ -7767,7 +8409,10 @@ func decodeReadCoreV1PersistentVolumeStatusResponse(resp *http.Response) (res Re } return nil }(); err != nil { - return res, err + 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: @@ -7803,7 +8448,10 @@ func decodeReadDiscoveryV1NamespacedEndpointSliceResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -7839,7 +8487,10 @@ func decodeReadDiscoveryV1beta1NamespacedEndpointSliceResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -7875,7 +8526,10 @@ func decodeReadEventsV1NamespacedEventResponse(resp *http.Response) (res ReadEve } return nil }(); err != nil { - return res, err + 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: @@ -7911,7 +8565,10 @@ func decodeReadEventsV1beta1NamespacedEventResponse(resp *http.Response) (res Re } return nil }(); err != nil { - return res, err + 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: @@ -7947,7 +8604,10 @@ func decodeReadFlowcontrolApiserverV1beta1FlowSchemaResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -7983,7 +8643,10 @@ func decodeReadFlowcontrolApiserverV1beta1FlowSchemaStatusResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -8019,7 +8682,10 @@ func decodeReadFlowcontrolApiserverV1beta1PriorityLevelConfigurationResponse(res } return nil }(); err != nil { - return res, err + 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: @@ -8055,7 +8721,10 @@ func decodeReadFlowcontrolApiserverV1beta1PriorityLevelConfigurationStatusRespon } return nil }(); err != nil { - return res, err + 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: @@ -8091,7 +8760,10 @@ func decodeReadFlowcontrolApiserverV1beta2FlowSchemaResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -8127,7 +8799,10 @@ func decodeReadFlowcontrolApiserverV1beta2FlowSchemaStatusResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -8163,7 +8838,10 @@ func decodeReadFlowcontrolApiserverV1beta2PriorityLevelConfigurationResponse(res } return nil }(); err != nil { - return res, err + 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: @@ -8199,7 +8877,10 @@ func decodeReadFlowcontrolApiserverV1beta2PriorityLevelConfigurationStatusRespon } return nil }(); err != nil { - return res, err + 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: @@ -8235,7 +8916,10 @@ func decodeReadInternalApiserverV1alpha1StorageVersionResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -8271,7 +8955,10 @@ func decodeReadInternalApiserverV1alpha1StorageVersionStatusResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -8307,7 +8994,10 @@ func decodeReadNetworkingV1IngressClassResponse(resp *http.Response) (res ReadNe } return nil }(); err != nil { - return res, err + 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: @@ -8343,7 +9033,10 @@ func decodeReadNetworkingV1NamespacedIngressResponse(resp *http.Response) (res R } return nil }(); err != nil { - return res, err + 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: @@ -8379,7 +9072,10 @@ func decodeReadNetworkingV1NamespacedIngressStatusResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -8415,7 +9111,10 @@ func decodeReadNetworkingV1NamespacedNetworkPolicyResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -8451,7 +9150,10 @@ func decodeReadNodeV1RuntimeClassResponse(resp *http.Response) (res ReadNodeV1Ru } return nil }(); err != nil { - return res, err + 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: @@ -8487,7 +9189,10 @@ func decodeReadNodeV1alpha1RuntimeClassResponse(resp *http.Response) (res ReadNo } return nil }(); err != nil { - return res, err + 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: @@ -8523,7 +9228,10 @@ func decodeReadNodeV1beta1RuntimeClassResponse(resp *http.Response) (res ReadNod } return nil }(); err != nil { - return res, err + 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: @@ -8559,7 +9267,10 @@ func decodeReadPolicyV1NamespacedPodDisruptionBudgetResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -8595,7 +9306,10 @@ func decodeReadPolicyV1NamespacedPodDisruptionBudgetStatusResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -8631,7 +9345,10 @@ func decodeReadPolicyV1beta1NamespacedPodDisruptionBudgetResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -8667,7 +9384,10 @@ func decodeReadPolicyV1beta1NamespacedPodDisruptionBudgetStatusResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -8703,7 +9423,10 @@ func decodeReadPolicyV1beta1PodSecurityPolicyResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -8739,7 +9462,10 @@ func decodeReadRbacAuthorizationV1ClusterRoleResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -8775,7 +9501,10 @@ func decodeReadRbacAuthorizationV1ClusterRoleBindingResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -8811,7 +9540,10 @@ func decodeReadRbacAuthorizationV1NamespacedRoleResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -8847,7 +9579,10 @@ func decodeReadRbacAuthorizationV1NamespacedRoleBindingResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -8883,7 +9618,10 @@ func decodeReadSchedulingV1PriorityClassResponse(resp *http.Response) (res ReadS } return nil }(); err != nil { - return res, err + 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: @@ -8919,7 +9657,10 @@ func decodeReadStorageV1CSIDriverResponse(resp *http.Response) (res ReadStorageV } return nil }(); err != nil { - return res, err + 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: @@ -8955,7 +9696,10 @@ func decodeReadStorageV1CSINodeResponse(resp *http.Response) (res ReadStorageV1C } return nil }(); err != nil { - return res, err + 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: @@ -8991,7 +9735,10 @@ func decodeReadStorageV1StorageClassResponse(resp *http.Response) (res ReadStora } return nil }(); err != nil { - return res, err + 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: @@ -9027,7 +9774,10 @@ func decodeReadStorageV1VolumeAttachmentResponse(resp *http.Response) (res ReadS } return nil }(); err != nil { - return res, err + 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: @@ -9063,7 +9813,10 @@ func decodeReadStorageV1VolumeAttachmentStatusResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -9099,7 +9852,10 @@ func decodeReadStorageV1alpha1NamespacedCSIStorageCapacityResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -9135,7 +9891,10 @@ func decodeReadStorageV1beta1NamespacedCSIStorageCapacityResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -9171,7 +9930,10 @@ func decodeWatchAdmissionregistrationV1MutatingWebhookConfigurationResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -9207,7 +9969,10 @@ func decodeWatchAdmissionregistrationV1MutatingWebhookConfigurationListResponse( } return nil }(); err != nil { - return res, err + 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: @@ -9243,7 +10008,10 @@ func decodeWatchAdmissionregistrationV1ValidatingWebhookConfigurationResponse(re } return nil }(); err != nil { - return res, err + 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: @@ -9279,7 +10047,10 @@ func decodeWatchAdmissionregistrationV1ValidatingWebhookConfigurationListRespons } return nil }(); err != nil { - return res, err + 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: @@ -9315,7 +10086,10 @@ func decodeWatchApiextensionsV1CustomResourceDefinitionResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -9351,7 +10125,10 @@ func decodeWatchApiextensionsV1CustomResourceDefinitionListResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -9387,7 +10164,10 @@ func decodeWatchApiregistrationV1APIServiceResponse(resp *http.Response) (res Wa } return nil }(); err != nil { - return res, err + 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: @@ -9423,7 +10203,10 @@ func decodeWatchApiregistrationV1APIServiceListResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -9459,7 +10242,10 @@ func decodeWatchAppsV1ControllerRevisionListForAllNamespacesResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -9495,7 +10281,10 @@ func decodeWatchAppsV1DaemonSetListForAllNamespacesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -9531,7 +10320,10 @@ func decodeWatchAppsV1DeploymentListForAllNamespacesResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -9567,7 +10359,10 @@ func decodeWatchAppsV1NamespacedControllerRevisionResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -9603,7 +10398,10 @@ func decodeWatchAppsV1NamespacedControllerRevisionListResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -9639,7 +10437,10 @@ func decodeWatchAppsV1NamespacedDaemonSetResponse(resp *http.Response) (res Watc } return nil }(); err != nil { - return res, err + 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: @@ -9675,7 +10476,10 @@ func decodeWatchAppsV1NamespacedDaemonSetListResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -9711,7 +10515,10 @@ func decodeWatchAppsV1NamespacedDeploymentResponse(resp *http.Response) (res Wat } return nil }(); err != nil { - return res, err + 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: @@ -9747,7 +10554,10 @@ func decodeWatchAppsV1NamespacedDeploymentListResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -9783,7 +10593,10 @@ func decodeWatchAppsV1NamespacedReplicaSetResponse(resp *http.Response) (res Wat } return nil }(); err != nil { - return res, err + 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: @@ -9819,7 +10632,10 @@ func decodeWatchAppsV1NamespacedReplicaSetListResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -9855,7 +10671,10 @@ func decodeWatchAppsV1NamespacedStatefulSetResponse(resp *http.Response) (res Wa } return nil }(); err != nil { - return res, err + 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: @@ -9891,7 +10710,10 @@ func decodeWatchAppsV1NamespacedStatefulSetListResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -9927,7 +10749,10 @@ func decodeWatchAppsV1ReplicaSetListForAllNamespacesResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -9963,7 +10788,10 @@ func decodeWatchAppsV1StatefulSetListForAllNamespacesResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -9999,7 +10827,10 @@ func decodeWatchAutoscalingV1HorizontalPodAutoscalerListForAllNamespacesResponse } return nil }(); err != nil { - return res, err + 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: @@ -10035,7 +10866,10 @@ func decodeWatchAutoscalingV1NamespacedHorizontalPodAutoscalerResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: @@ -10071,7 +10905,10 @@ func decodeWatchAutoscalingV1NamespacedHorizontalPodAutoscalerListResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -10107,7 +10944,10 @@ func decodeWatchAutoscalingV2beta1HorizontalPodAutoscalerListForAllNamespacesRes } return nil }(); err != nil { - return res, err + 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: @@ -10143,7 +10983,10 @@ func decodeWatchAutoscalingV2beta1NamespacedHorizontalPodAutoscalerResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -10179,7 +11022,10 @@ func decodeWatchAutoscalingV2beta1NamespacedHorizontalPodAutoscalerListResponse( } return nil }(); err != nil { - return res, err + 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: @@ -10215,7 +11061,10 @@ func decodeWatchAutoscalingV2beta2HorizontalPodAutoscalerListForAllNamespacesRes } return nil }(); err != nil { - return res, err + 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: @@ -10251,7 +11100,10 @@ func decodeWatchAutoscalingV2beta2NamespacedHorizontalPodAutoscalerResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -10287,7 +11139,10 @@ func decodeWatchAutoscalingV2beta2NamespacedHorizontalPodAutoscalerListResponse( } return nil }(); err != nil { - return res, err + 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: @@ -10323,7 +11178,10 @@ func decodeWatchBatchV1CronJobListForAllNamespacesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -10359,7 +11217,10 @@ func decodeWatchBatchV1JobListForAllNamespacesResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -10395,7 +11256,10 @@ func decodeWatchBatchV1NamespacedCronJobResponse(resp *http.Response) (res Watch } return nil }(); err != nil { - return res, err + 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: @@ -10431,7 +11295,10 @@ func decodeWatchBatchV1NamespacedCronJobListResponse(resp *http.Response) (res W } return nil }(); err != nil { - return res, err + 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: @@ -10467,7 +11334,10 @@ func decodeWatchBatchV1NamespacedJobResponse(resp *http.Response) (res WatchBatc } return nil }(); err != nil { - return res, err + 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: @@ -10503,7 +11373,10 @@ func decodeWatchBatchV1NamespacedJobListResponse(resp *http.Response) (res Watch } return nil }(); err != nil { - return res, err + 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: @@ -10539,7 +11412,10 @@ func decodeWatchBatchV1beta1CronJobListForAllNamespacesResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -10575,7 +11451,10 @@ func decodeWatchBatchV1beta1NamespacedCronJobResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -10611,7 +11490,10 @@ func decodeWatchBatchV1beta1NamespacedCronJobListResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -10647,7 +11529,10 @@ func decodeWatchCertificatesV1CertificateSigningRequestResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -10683,7 +11568,10 @@ func decodeWatchCertificatesV1CertificateSigningRequestListResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -10719,7 +11607,10 @@ func decodeWatchCoordinationV1LeaseListForAllNamespacesResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -10755,7 +11646,10 @@ func decodeWatchCoordinationV1NamespacedLeaseResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -10791,7 +11685,10 @@ func decodeWatchCoordinationV1NamespacedLeaseListResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -10827,7 +11724,10 @@ func decodeWatchCoreV1ConfigMapListForAllNamespacesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -10863,7 +11763,10 @@ func decodeWatchCoreV1EndpointsListForAllNamespacesResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -10899,7 +11802,10 @@ func decodeWatchCoreV1EventListForAllNamespacesResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -10935,7 +11841,10 @@ func decodeWatchCoreV1LimitRangeListForAllNamespacesResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -10971,7 +11880,10 @@ func decodeWatchCoreV1NamespaceResponse(resp *http.Response) (res WatchCoreV1Nam } return nil }(); err != nil { - return res, err + 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: @@ -11007,7 +11919,10 @@ func decodeWatchCoreV1NamespaceListResponse(resp *http.Response) (res WatchCoreV } return nil }(); err != nil { - return res, err + 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: @@ -11043,7 +11958,10 @@ func decodeWatchCoreV1NamespacedConfigMapResponse(resp *http.Response) (res Watc } return nil }(); err != nil { - return res, err + 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: @@ -11079,7 +11997,10 @@ func decodeWatchCoreV1NamespacedConfigMapListResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -11115,7 +12036,10 @@ func decodeWatchCoreV1NamespacedEndpointsResponse(resp *http.Response) (res Watc } return nil }(); err != nil { - return res, err + 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: @@ -11151,7 +12075,10 @@ func decodeWatchCoreV1NamespacedEndpointsListResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -11187,7 +12114,10 @@ func decodeWatchCoreV1NamespacedEventResponse(resp *http.Response) (res WatchCor } return nil }(); err != nil { - return res, err + 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: @@ -11223,7 +12153,10 @@ func decodeWatchCoreV1NamespacedEventListResponse(resp *http.Response) (res Watc } return nil }(); err != nil { - return res, err + 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: @@ -11259,7 +12192,10 @@ func decodeWatchCoreV1NamespacedLimitRangeResponse(resp *http.Response) (res Wat } return nil }(); err != nil { - return res, err + 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: @@ -11295,7 +12231,10 @@ func decodeWatchCoreV1NamespacedLimitRangeListResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -11331,7 +12270,10 @@ func decodeWatchCoreV1NamespacedPersistentVolumeClaimResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -11367,7 +12309,10 @@ func decodeWatchCoreV1NamespacedPersistentVolumeClaimListResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -11403,7 +12348,10 @@ func decodeWatchCoreV1NamespacedPodResponse(resp *http.Response) (res WatchCoreV } return nil }(); err != nil { - return res, err + 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: @@ -11439,7 +12387,10 @@ func decodeWatchCoreV1NamespacedPodListResponse(resp *http.Response) (res WatchC } return nil }(); err != nil { - return res, err + 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: @@ -11475,7 +12426,10 @@ func decodeWatchCoreV1NamespacedPodTemplateResponse(resp *http.Response) (res Wa } return nil }(); err != nil { - return res, err + 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: @@ -11511,7 +12465,10 @@ func decodeWatchCoreV1NamespacedPodTemplateListResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -11547,7 +12504,10 @@ func decodeWatchCoreV1NamespacedReplicationControllerResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -11583,7 +12543,10 @@ func decodeWatchCoreV1NamespacedReplicationControllerListResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -11619,7 +12582,10 @@ func decodeWatchCoreV1NamespacedResourceQuotaResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -11655,7 +12621,10 @@ func decodeWatchCoreV1NamespacedResourceQuotaListResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -11691,7 +12660,10 @@ func decodeWatchCoreV1NamespacedSecretResponse(resp *http.Response) (res WatchCo } return nil }(); err != nil { - return res, err + 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: @@ -11727,7 +12699,10 @@ func decodeWatchCoreV1NamespacedSecretListResponse(resp *http.Response) (res Wat } return nil }(); err != nil { - return res, err + 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: @@ -11763,7 +12738,10 @@ func decodeWatchCoreV1NamespacedServiceResponse(resp *http.Response) (res WatchC } return nil }(); err != nil { - return res, err + 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: @@ -11799,7 +12777,10 @@ func decodeWatchCoreV1NamespacedServiceAccountResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -11835,7 +12816,10 @@ func decodeWatchCoreV1NamespacedServiceAccountListResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -11871,7 +12855,10 @@ func decodeWatchCoreV1NamespacedServiceListResponse(resp *http.Response) (res Wa } return nil }(); err != nil { - return res, err + 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: @@ -11907,7 +12894,10 @@ func decodeWatchCoreV1NodeResponse(resp *http.Response) (res WatchCoreV1NodeRes, } return nil }(); err != nil { - return res, err + 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: @@ -11943,7 +12933,10 @@ func decodeWatchCoreV1NodeListResponse(resp *http.Response) (res WatchCoreV1Node } return nil }(); err != nil { - return res, err + 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: @@ -11979,7 +12972,10 @@ func decodeWatchCoreV1PersistentVolumeResponse(resp *http.Response) (res WatchCo } return nil }(); err != nil { - return res, err + 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: @@ -12015,7 +13011,10 @@ func decodeWatchCoreV1PersistentVolumeClaimListForAllNamespacesResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -12051,7 +13050,10 @@ func decodeWatchCoreV1PersistentVolumeListResponse(resp *http.Response) (res Wat } return nil }(); err != nil { - return res, err + 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: @@ -12087,7 +13089,10 @@ func decodeWatchCoreV1PodListForAllNamespacesResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -12123,7 +13128,10 @@ func decodeWatchCoreV1PodTemplateListForAllNamespacesResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -12159,7 +13167,10 @@ func decodeWatchCoreV1ReplicationControllerListForAllNamespacesResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -12195,7 +13206,10 @@ func decodeWatchCoreV1ResourceQuotaListForAllNamespacesResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -12231,7 +13245,10 @@ func decodeWatchCoreV1SecretListForAllNamespacesResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -12267,7 +13284,10 @@ func decodeWatchCoreV1ServiceAccountListForAllNamespacesResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -12303,7 +13323,10 @@ func decodeWatchCoreV1ServiceListForAllNamespacesResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -12339,7 +13362,10 @@ func decodeWatchDiscoveryV1EndpointSliceListForAllNamespacesResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -12375,7 +13401,10 @@ func decodeWatchDiscoveryV1NamespacedEndpointSliceResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -12411,7 +13440,10 @@ func decodeWatchDiscoveryV1NamespacedEndpointSliceListResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -12447,7 +13479,10 @@ func decodeWatchDiscoveryV1beta1EndpointSliceListForAllNamespacesResponse(resp * } return nil }(); err != nil { - return res, err + 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: @@ -12483,7 +13518,10 @@ func decodeWatchDiscoveryV1beta1NamespacedEndpointSliceResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -12519,7 +13557,10 @@ func decodeWatchDiscoveryV1beta1NamespacedEndpointSliceListResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -12555,7 +13596,10 @@ func decodeWatchEventsV1EventListForAllNamespacesResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -12591,7 +13635,10 @@ func decodeWatchEventsV1NamespacedEventResponse(resp *http.Response) (res WatchE } return nil }(); err != nil { - return res, err + 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: @@ -12627,7 +13674,10 @@ func decodeWatchEventsV1NamespacedEventListResponse(resp *http.Response) (res Wa } return nil }(); err != nil { - return res, err + 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: @@ -12663,7 +13713,10 @@ func decodeWatchEventsV1beta1EventListForAllNamespacesResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -12699,7 +13752,10 @@ func decodeWatchEventsV1beta1NamespacedEventResponse(resp *http.Response) (res W } return nil }(); err != nil { - return res, err + 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: @@ -12735,7 +13791,10 @@ func decodeWatchEventsV1beta1NamespacedEventListResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -12771,7 +13830,10 @@ func decodeWatchFlowcontrolApiserverV1beta1FlowSchemaResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -12807,7 +13869,10 @@ func decodeWatchFlowcontrolApiserverV1beta1FlowSchemaListResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -12843,7 +13908,10 @@ func decodeWatchFlowcontrolApiserverV1beta1PriorityLevelConfigurationResponse(re } return nil }(); err != nil { - return res, err + 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: @@ -12879,7 +13947,10 @@ func decodeWatchFlowcontrolApiserverV1beta1PriorityLevelConfigurationListRespons } return nil }(); err != nil { - return res, err + 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: @@ -12915,7 +13986,10 @@ func decodeWatchFlowcontrolApiserverV1beta2FlowSchemaResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -12951,7 +14025,10 @@ func decodeWatchFlowcontrolApiserverV1beta2FlowSchemaListResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -12987,7 +14064,10 @@ func decodeWatchFlowcontrolApiserverV1beta2PriorityLevelConfigurationResponse(re } return nil }(); err != nil { - return res, err + 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: @@ -13023,7 +14103,10 @@ func decodeWatchFlowcontrolApiserverV1beta2PriorityLevelConfigurationListRespons } return nil }(); err != nil { - return res, err + 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: @@ -13059,7 +14142,10 @@ func decodeWatchInternalApiserverV1alpha1StorageVersionResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -13095,7 +14181,10 @@ func decodeWatchInternalApiserverV1alpha1StorageVersionListResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -13131,7 +14220,10 @@ func decodeWatchNetworkingV1IngressClassResponse(resp *http.Response) (res Watch } return nil }(); err != nil { - return res, err + 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: @@ -13167,7 +14259,10 @@ func decodeWatchNetworkingV1IngressClassListResponse(resp *http.Response) (res W } return nil }(); err != nil { - return res, err + 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: @@ -13203,7 +14298,10 @@ func decodeWatchNetworkingV1IngressListForAllNamespacesResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -13239,7 +14337,10 @@ func decodeWatchNetworkingV1NamespacedIngressResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -13275,7 +14376,10 @@ func decodeWatchNetworkingV1NamespacedIngressListResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -13311,7 +14415,10 @@ func decodeWatchNetworkingV1NamespacedNetworkPolicyResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -13347,7 +14454,10 @@ func decodeWatchNetworkingV1NamespacedNetworkPolicyListResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -13383,7 +14493,10 @@ func decodeWatchNetworkingV1NetworkPolicyListForAllNamespacesResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -13419,7 +14532,10 @@ func decodeWatchNodeV1RuntimeClassResponse(resp *http.Response) (res WatchNodeV1 } return nil }(); err != nil { - return res, err + 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: @@ -13455,7 +14571,10 @@ func decodeWatchNodeV1RuntimeClassListResponse(resp *http.Response) (res WatchNo } return nil }(); err != nil { - return res, err + 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: @@ -13491,7 +14610,10 @@ func decodeWatchNodeV1alpha1RuntimeClassResponse(resp *http.Response) (res Watch } return nil }(); err != nil { - return res, err + 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: @@ -13527,7 +14649,10 @@ func decodeWatchNodeV1alpha1RuntimeClassListResponse(resp *http.Response) (res W } return nil }(); err != nil { - return res, err + 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: @@ -13563,7 +14688,10 @@ func decodeWatchNodeV1beta1RuntimeClassResponse(resp *http.Response) (res WatchN } return nil }(); err != nil { - return res, err + 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: @@ -13599,7 +14727,10 @@ func decodeWatchNodeV1beta1RuntimeClassListResponse(resp *http.Response) (res Wa } return nil }(); err != nil { - return res, err + 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: @@ -13635,7 +14766,10 @@ func decodeWatchPolicyV1NamespacedPodDisruptionBudgetResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -13671,7 +14805,10 @@ func decodeWatchPolicyV1NamespacedPodDisruptionBudgetListResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -13707,7 +14844,10 @@ func decodeWatchPolicyV1PodDisruptionBudgetListForAllNamespacesResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -13743,7 +14883,10 @@ func decodeWatchPolicyV1beta1NamespacedPodDisruptionBudgetResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -13779,7 +14922,10 @@ func decodeWatchPolicyV1beta1NamespacedPodDisruptionBudgetListResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: @@ -13815,7 +14961,10 @@ func decodeWatchPolicyV1beta1PodDisruptionBudgetListForAllNamespacesResponse(res } return nil }(); err != nil { - return res, err + 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: @@ -13851,7 +15000,10 @@ func decodeWatchPolicyV1beta1PodSecurityPolicyResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -13887,7 +15039,10 @@ func decodeWatchPolicyV1beta1PodSecurityPolicyListResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -13923,7 +15078,10 @@ func decodeWatchRbacAuthorizationV1ClusterRoleResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -13959,7 +15117,10 @@ func decodeWatchRbacAuthorizationV1ClusterRoleBindingResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -13995,7 +15156,10 @@ func decodeWatchRbacAuthorizationV1ClusterRoleBindingListResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -14031,7 +15195,10 @@ func decodeWatchRbacAuthorizationV1ClusterRoleListResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -14067,7 +15234,10 @@ func decodeWatchRbacAuthorizationV1NamespacedRoleResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -14103,7 +15273,10 @@ func decodeWatchRbacAuthorizationV1NamespacedRoleBindingResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -14139,7 +15312,10 @@ func decodeWatchRbacAuthorizationV1NamespacedRoleBindingListResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -14175,7 +15351,10 @@ func decodeWatchRbacAuthorizationV1NamespacedRoleListResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -14211,7 +15390,10 @@ func decodeWatchRbacAuthorizationV1RoleBindingListForAllNamespacesResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -14247,7 +15429,10 @@ func decodeWatchRbacAuthorizationV1RoleListForAllNamespacesResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -14283,7 +15468,10 @@ func decodeWatchSchedulingV1PriorityClassResponse(resp *http.Response) (res Watc } return nil }(); err != nil { - return res, err + 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: @@ -14319,7 +15507,10 @@ func decodeWatchSchedulingV1PriorityClassListResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -14355,7 +15546,10 @@ func decodeWatchStorageV1CSIDriverResponse(resp *http.Response) (res WatchStorag } return nil }(); err != nil { - return res, err + 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: @@ -14391,7 +15585,10 @@ func decodeWatchStorageV1CSIDriverListResponse(resp *http.Response) (res WatchSt } return nil }(); err != nil { - return res, err + 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: @@ -14427,7 +15624,10 @@ func decodeWatchStorageV1CSINodeResponse(resp *http.Response) (res WatchStorageV } return nil }(); err != nil { - return res, err + 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: @@ -14463,7 +15663,10 @@ func decodeWatchStorageV1CSINodeListResponse(resp *http.Response) (res WatchStor } return nil }(); err != nil { - return res, err + 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: @@ -14499,7 +15702,10 @@ func decodeWatchStorageV1StorageClassResponse(resp *http.Response) (res WatchSto } return nil }(); err != nil { - return res, err + 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: @@ -14535,7 +15741,10 @@ func decodeWatchStorageV1StorageClassListResponse(resp *http.Response) (res Watc } return nil }(); err != nil { - return res, err + 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: @@ -14571,7 +15780,10 @@ func decodeWatchStorageV1VolumeAttachmentResponse(resp *http.Response) (res Watc } return nil }(); err != nil { - return res, err + 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: @@ -14607,7 +15819,10 @@ func decodeWatchStorageV1VolumeAttachmentListResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -14643,7 +15858,10 @@ func decodeWatchStorageV1alpha1CSIStorageCapacityListForAllNamespacesResponse(re } return nil }(); err != nil { - return res, err + 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: @@ -14679,7 +15897,10 @@ func decodeWatchStorageV1alpha1NamespacedCSIStorageCapacityResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -14715,7 +15936,10 @@ func decodeWatchStorageV1alpha1NamespacedCSIStorageCapacityListResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -14751,7 +15975,10 @@ func decodeWatchStorageV1beta1CSIStorageCapacityListForAllNamespacesResponse(res } return nil }(); err != nil { - return res, err + 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: @@ -14787,7 +16014,10 @@ func decodeWatchStorageV1beta1NamespacedCSIStorageCapacityResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -14823,7 +16053,10 @@ func decodeWatchStorageV1beta1NamespacedCSIStorageCapacityListResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: diff --git a/examples/ex_manga/oas_response_decoders_gen.go b/examples/ex_manga/oas_response_decoders_gen.go index 421bb9d76..20f3b1e62 100644 --- a/examples/ex_manga/oas_response_decoders_gen.go +++ b/examples/ex_manga/oas_response_decoders_gen.go @@ -38,7 +38,10 @@ func decodeGetBookResponse(resp *http.Response) (res GetBookRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -155,7 +158,10 @@ func decodeSearchResponse(resp *http.Response) (res SearchRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -191,7 +197,10 @@ func decodeSearchByTagIDResponse(resp *http.Response) (res SearchByTagIDRes, err } return nil }(); err != nil { - return res, err + 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: diff --git a/examples/ex_petstore/oas_response_decoders_gen.go b/examples/ex_petstore/oas_response_decoders_gen.go index 0406c9514..f2ddd2450 100644 --- a/examples/ex_petstore/oas_response_decoders_gen.go +++ b/examples/ex_petstore/oas_response_decoders_gen.go @@ -41,7 +41,10 @@ func decodeCreatePetsResponse(resp *http.Response) (res CreatePetsRes, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -75,7 +78,10 @@ func decodeListPetsResponse(resp *http.Response) (res ListPetsRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } var wrapper PetsHeaders wrapper.Response = response @@ -135,7 +141,10 @@ func decodeListPetsResponse(resp *http.Response) (res ListPetsRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -169,7 +178,10 @@ func decodeShowPetByIdResponse(resp *http.Response) (res ShowPetByIdRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -196,7 +208,10 @@ func decodeShowPetByIdResponse(resp *http.Response) (res ShowPetByIdRes, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } 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 abe80a151..827ac939a 100644 --- a/examples/ex_petstore_expanded/oas_request_decoders_gen.go +++ b/examples/ex_petstore_expanded/oas_request_decoders_gen.go @@ -63,6 +63,9 @@ func (s *Server) decodeAddPetRequest(r *http.Request) ( }(); err != nil { 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) diff --git a/examples/ex_petstore_expanded/oas_response_decoders_gen.go b/examples/ex_petstore_expanded/oas_response_decoders_gen.go index b64a0b5e8..3a276e1a3 100644 --- a/examples/ex_petstore_expanded/oas_response_decoders_gen.go +++ b/examples/ex_petstore_expanded/oas_response_decoders_gen.go @@ -36,7 +36,10 @@ func decodeAddPetResponse(resp *http.Response) (res AddPetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -63,7 +66,10 @@ func decodeAddPetResponse(resp *http.Response) (res AddPetRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -100,7 +106,10 @@ func decodeDeletePetResponse(resp *http.Response) (res DeletePetRes, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -134,7 +143,10 @@ func decodeFindPetByIDResponse(resp *http.Response) (res FindPetByIDRes, err err } return nil }(); err != nil { - return res, err + 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: @@ -161,7 +173,10 @@ func decodeFindPetByIDResponse(resp *http.Response) (res FindPetByIDRes, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -195,7 +210,10 @@ func decodeFindPetsResponse(resp *http.Response) (res FindPetsRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -222,7 +240,10 @@ func decodeFindPetsResponse(resp *http.Response) (res FindPetsRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } 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 719d75e7c..d716adc6f 100644 --- a/examples/ex_route_params/oas_response_decoders_gen.go +++ b/examples/ex_route_params/oas_response_decoders_gen.go @@ -38,7 +38,10 @@ func decodeDataGetResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -73,7 +76,10 @@ func decodeDataGetAnyResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -108,7 +114,10 @@ func decodeDataGetIDResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: diff --git a/examples/ex_telegram/oas_request_decoders_gen.go b/examples/ex_telegram/oas_request_decoders_gen.go index 5a5c5e690..0567dcba8 100644 --- a/examples/ex_telegram/oas_request_decoders_gen.go +++ b/examples/ex_telegram/oas_request_decoders_gen.go @@ -63,6 +63,9 @@ func (s *Server) decodeAddStickerToSetRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -126,6 +129,9 @@ func (s *Server) decodeAnswerCallbackQueryRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -189,6 +195,9 @@ func (s *Server) decodeAnswerInlineQueryRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -252,6 +261,9 @@ func (s *Server) decodeAnswerPreCheckoutQueryRequest(r *http.Request) ( }(); err != nil { 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) @@ -307,6 +319,9 @@ func (s *Server) decodeAnswerShippingQueryRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -370,6 +385,9 @@ func (s *Server) decodeApproveChatJoinRequestRequest(r *http.Request) ( }(); err != nil { 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) @@ -425,6 +443,9 @@ func (s *Server) decodeBanChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -480,6 +501,9 @@ func (s *Server) decodeBanChatSenderChatRequest(r *http.Request) ( }(); err != nil { 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) @@ -535,6 +559,9 @@ func (s *Server) decodeCopyMessageRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -598,6 +625,9 @@ func (s *Server) decodeCreateChatInviteLinkRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -661,6 +691,9 @@ func (s *Server) decodeCreateNewStickerSetRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -724,6 +757,9 @@ func (s *Server) decodeDeclineChatJoinRequestRequest(r *http.Request) ( }(); err != nil { 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) @@ -779,6 +815,9 @@ func (s *Server) decodeDeleteChatPhotoRequest(r *http.Request) ( }(); err != nil { 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) @@ -834,6 +873,9 @@ func (s *Server) decodeDeleteChatStickerSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -889,6 +931,9 @@ func (s *Server) decodeDeleteMessageRequest(r *http.Request) ( }(); err != nil { 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) @@ -948,6 +993,9 @@ func (s *Server) decodeDeleteMyCommandsRequest(r *http.Request) ( }(); err != nil { 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) @@ -1003,6 +1051,9 @@ func (s *Server) decodeDeleteStickerFromSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -1062,6 +1113,9 @@ func (s *Server) decodeDeleteWebhookRequest(r *http.Request) ( }(); err != nil { 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) @@ -1117,6 +1171,9 @@ func (s *Server) decodeEditChatInviteLinkRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1180,6 +1237,9 @@ func (s *Server) decodeEditMessageCaptionRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1243,6 +1303,9 @@ func (s *Server) decodeEditMessageLiveLocationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1306,6 +1369,9 @@ func (s *Server) decodeEditMessageMediaRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1369,6 +1435,9 @@ func (s *Server) decodeEditMessageReplyMarkupRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1432,6 +1501,9 @@ func (s *Server) decodeEditMessageTextRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -1495,6 +1567,9 @@ func (s *Server) decodeExportChatInviteLinkRequest(r *http.Request) ( }(); err != nil { 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) @@ -1550,6 +1625,9 @@ func (s *Server) decodeForwardMessageRequest(r *http.Request) ( }(); err != nil { 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) @@ -1605,6 +1683,9 @@ func (s *Server) decodeGetChatRequest(r *http.Request) ( }(); err != nil { 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) @@ -1660,6 +1741,9 @@ func (s *Server) decodeGetChatAdministratorsRequest(r *http.Request) ( }(); err != nil { 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) @@ -1715,6 +1799,9 @@ func (s *Server) decodeGetChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -1770,6 +1857,9 @@ func (s *Server) decodeGetChatMemberCountRequest(r *http.Request) ( }(); err != nil { 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) @@ -1825,6 +1915,9 @@ func (s *Server) decodeGetFileRequest(r *http.Request) ( }(); err != nil { 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) @@ -1880,6 +1973,9 @@ func (s *Server) decodeGetGameHighScoresRequest(r *http.Request) ( }(); err != nil { 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) @@ -1939,6 +2035,9 @@ func (s *Server) decodeGetMyCommandsRequest(r *http.Request) ( }(); err != nil { 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) @@ -1994,6 +2093,9 @@ func (s *Server) decodeGetStickerSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -2053,6 +2155,9 @@ func (s *Server) decodeGetUpdatesRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -2123,6 +2228,9 @@ func (s *Server) decodeGetUserProfilePhotosRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2186,6 +2294,9 @@ func (s *Server) decodeLeaveChatRequest(r *http.Request) ( }(); err != nil { 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) @@ -2241,6 +2352,9 @@ func (s *Server) decodePinChatMessageRequest(r *http.Request) ( }(); err != nil { 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) @@ -2296,6 +2410,9 @@ func (s *Server) decodePromoteChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -2351,6 +2468,9 @@ func (s *Server) decodeRestrictChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -2406,6 +2526,9 @@ func (s *Server) decodeRevokeChatInviteLinkRequest(r *http.Request) ( }(); err != nil { 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) @@ -2461,6 +2584,9 @@ func (s *Server) decodeSendAnimationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2524,6 +2650,9 @@ func (s *Server) decodeSendAudioRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2587,6 +2716,9 @@ func (s *Server) decodeSendChatActionRequest(r *http.Request) ( }(); err != nil { 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) @@ -2642,6 +2774,9 @@ func (s *Server) decodeSendContactRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2705,6 +2840,9 @@ func (s *Server) decodeSendDiceRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2768,6 +2906,9 @@ func (s *Server) decodeSendDocumentRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2831,6 +2972,9 @@ func (s *Server) decodeSendGameRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2894,6 +3038,9 @@ func (s *Server) decodeSendInvoiceRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -2957,6 +3104,9 @@ func (s *Server) decodeSendLocationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3020,6 +3170,9 @@ func (s *Server) decodeSendMediaGroupRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3083,6 +3236,9 @@ func (s *Server) decodeSendMessageRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3146,6 +3302,9 @@ func (s *Server) decodeSendPhotoRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3209,6 +3368,9 @@ func (s *Server) decodeSendPollRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3272,6 +3434,9 @@ func (s *Server) decodeSendStickerRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3335,6 +3500,9 @@ func (s *Server) decodeSendVenueRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3398,6 +3566,9 @@ func (s *Server) decodeSendVideoRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3461,6 +3632,9 @@ func (s *Server) decodeSendVideoNoteRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3524,6 +3698,9 @@ func (s *Server) decodeSendVoiceRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3587,6 +3764,9 @@ func (s *Server) decodeSetChatAdministratorCustomTitleRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3650,6 +3830,9 @@ func (s *Server) decodeSetChatDescriptionRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3713,6 +3896,9 @@ func (s *Server) decodeSetChatPermissionsRequest(r *http.Request) ( }(); err != nil { 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) @@ -3768,6 +3954,9 @@ func (s *Server) decodeSetChatPhotoRequest(r *http.Request) ( }(); err != nil { 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) @@ -3823,6 +4012,9 @@ func (s *Server) decodeSetChatStickerSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -3878,6 +4070,9 @@ func (s *Server) decodeSetChatTitleRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -3941,6 +4136,9 @@ func (s *Server) decodeSetGameScoreRequest(r *http.Request) ( }(); err != nil { 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) @@ -3996,6 +4194,9 @@ func (s *Server) decodeSetMyCommandsRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4059,6 +4260,9 @@ func (s *Server) decodeSetPassportDataErrorsRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4122,6 +4326,9 @@ func (s *Server) decodeSetStickerPositionInSetRequest(r *http.Request) ( }(); err != nil { 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) @@ -4177,6 +4384,9 @@ func (s *Server) decodeSetStickerSetThumbRequest(r *http.Request) ( }(); err != nil { 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) @@ -4232,6 +4442,9 @@ func (s *Server) decodeSetWebhookRequest(r *http.Request) ( }(); err != nil { 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) @@ -4287,6 +4500,9 @@ func (s *Server) decodeStopMessageLiveLocationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4350,6 +4566,9 @@ func (s *Server) decodeStopPollRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -4413,6 +4632,9 @@ func (s *Server) decodeUnbanChatMemberRequest(r *http.Request) ( }(); err != nil { 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) @@ -4468,6 +4690,9 @@ func (s *Server) decodeUnbanChatSenderChatRequest(r *http.Request) ( }(); err != nil { 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) @@ -4523,6 +4748,9 @@ func (s *Server) decodeUnpinAllChatMessagesRequest(r *http.Request) ( }(); err != nil { 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) @@ -4578,6 +4806,9 @@ func (s *Server) decodeUnpinChatMessageRequest(r *http.Request) ( }(); err != nil { 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) @@ -4633,6 +4864,9 @@ func (s *Server) decodeUploadStickerFileRequest(r *http.Request) ( }(); err != nil { 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) diff --git a/examples/ex_telegram/oas_response_decoders_gen.go b/examples/ex_telegram/oas_response_decoders_gen.go index 3a24995df..2581ea119 100644 --- a/examples/ex_telegram/oas_response_decoders_gen.go +++ b/examples/ex_telegram/oas_response_decoders_gen.go @@ -36,7 +36,10 @@ func decodeAddStickerToSetResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -64,7 +67,10 @@ func decodeAddStickerToSetResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -103,7 +109,10 @@ func decodeAnswerCallbackQueryResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + 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: @@ -131,7 +140,10 @@ func decodeAnswerCallbackQueryResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -170,7 +182,10 @@ func decodeAnswerInlineQueryResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -198,7 +213,10 @@ func decodeAnswerInlineQueryResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -237,7 +255,10 @@ func decodeAnswerPreCheckoutQueryResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -265,7 +286,10 @@ func decodeAnswerPreCheckoutQueryResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -304,7 +328,10 @@ func decodeAnswerShippingQueryResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + 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: @@ -332,7 +359,10 @@ func decodeAnswerShippingQueryResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -371,7 +401,10 @@ func decodeApproveChatJoinRequestResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -399,7 +432,10 @@ func decodeApproveChatJoinRequestResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -438,7 +474,10 @@ func decodeBanChatMemberResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -466,7 +505,10 @@ func decodeBanChatMemberResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -505,7 +547,10 @@ func decodeBanChatSenderChatResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -533,7 +578,10 @@ func decodeBanChatSenderChatResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -572,7 +620,10 @@ func decodeCloseResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -600,7 +651,10 @@ func decodeCloseResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -639,7 +693,10 @@ func decodeCopyMessageResponse(resp *http.Response) (res ResultMessageId, err er } return nil }(); err != nil { - return res, err + 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: @@ -667,7 +724,10 @@ func decodeCopyMessageResponse(resp *http.Response) (res ResultMessageId, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -706,7 +766,10 @@ func decodeCreateChatInviteLinkResponse(resp *http.Response) (res ResultChatInvi } return nil }(); err != nil { - return res, err + 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: @@ -734,7 +797,10 @@ func decodeCreateChatInviteLinkResponse(resp *http.Response) (res ResultChatInvi } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -773,7 +839,10 @@ func decodeCreateNewStickerSetResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + 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: @@ -801,7 +870,10 @@ func decodeCreateNewStickerSetResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -840,7 +912,10 @@ func decodeDeclineChatJoinRequestResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -868,7 +943,10 @@ func decodeDeclineChatJoinRequestResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -907,7 +985,10 @@ func decodeDeleteChatPhotoResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -935,7 +1016,10 @@ func decodeDeleteChatPhotoResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -974,7 +1058,10 @@ func decodeDeleteChatStickerSetResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + 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: @@ -1002,7 +1089,10 @@ func decodeDeleteChatStickerSetResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1041,7 +1131,10 @@ func decodeDeleteMessageResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1069,7 +1162,10 @@ func decodeDeleteMessageResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1108,7 +1204,10 @@ func decodeDeleteMyCommandsResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -1136,7 +1235,10 @@ func decodeDeleteMyCommandsResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1175,7 +1277,10 @@ func decodeDeleteStickerFromSetResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + 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: @@ -1203,7 +1308,10 @@ func decodeDeleteStickerFromSetResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1242,7 +1350,10 @@ func decodeDeleteWebhookResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1270,7 +1381,10 @@ func decodeDeleteWebhookResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1309,7 +1423,10 @@ func decodeEditChatInviteLinkResponse(resp *http.Response) (res ResultChatInvite } return nil }(); err != nil { - return res, err + 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: @@ -1337,7 +1454,10 @@ func decodeEditChatInviteLinkResponse(resp *http.Response) (res ResultChatInvite } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1376,7 +1496,10 @@ func decodeEditMessageCaptionResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + 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: @@ -1404,7 +1527,10 @@ func decodeEditMessageCaptionResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1443,7 +1569,10 @@ func decodeEditMessageLiveLocationResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -1471,7 +1600,10 @@ func decodeEditMessageLiveLocationResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1510,7 +1642,10 @@ func decodeEditMessageMediaResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -1538,7 +1673,10 @@ func decodeEditMessageMediaResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1577,7 +1715,10 @@ func decodeEditMessageReplyMarkupResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -1605,7 +1746,10 @@ func decodeEditMessageReplyMarkupResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1644,7 +1788,10 @@ func decodeEditMessageTextResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -1672,7 +1819,10 @@ func decodeEditMessageTextResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1711,7 +1861,10 @@ func decodeExportChatInviteLinkResponse(resp *http.Response) (res ResultString, } return nil }(); err != nil { - return res, err + 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: @@ -1739,7 +1892,10 @@ func decodeExportChatInviteLinkResponse(resp *http.Response) (res ResultString, } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1778,7 +1934,10 @@ func decodeForwardMessageResponse(resp *http.Response) (res ResultMessage, err e } return nil }(); err != nil { - return res, err + 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: @@ -1806,7 +1965,10 @@ func decodeForwardMessageResponse(resp *http.Response) (res ResultMessage, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1845,7 +2007,10 @@ func decodeGetChatResponse(resp *http.Response) (res ResultChat, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -1873,7 +2038,10 @@ func decodeGetChatResponse(resp *http.Response) (res ResultChat, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1912,7 +2080,10 @@ func decodeGetChatAdministratorsResponse(resp *http.Response) (res ResultArrayOf } return nil }(); err != nil { - return res, err + 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: @@ -1940,7 +2111,10 @@ func decodeGetChatAdministratorsResponse(resp *http.Response) (res ResultArrayOf } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -1979,7 +2153,10 @@ func decodeGetChatMemberResponse(resp *http.Response) (res ResultChatMember, err } return nil }(); err != nil { - return res, err + 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: @@ -2007,7 +2184,10 @@ func decodeGetChatMemberResponse(resp *http.Response) (res ResultChatMember, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2046,7 +2226,10 @@ func decodeGetChatMemberCountResponse(resp *http.Response) (res ResultInt, err e } return nil }(); err != nil { - return res, err + 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: @@ -2074,7 +2257,10 @@ func decodeGetChatMemberCountResponse(resp *http.Response) (res ResultInt, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2113,7 +2299,10 @@ func decodeGetFileResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2141,7 +2330,10 @@ func decodeGetFileResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2180,7 +2372,10 @@ func decodeGetGameHighScoresResponse(resp *http.Response) (res ResultArrayOfGame } return nil }(); err != nil { - return res, err + 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: @@ -2208,7 +2403,10 @@ func decodeGetGameHighScoresResponse(resp *http.Response) (res ResultArrayOfGame } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2247,7 +2445,10 @@ func decodeGetMeResponse(resp *http.Response) (res ResultUser, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2275,7 +2476,10 @@ func decodeGetMeResponse(resp *http.Response) (res ResultUser, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2314,7 +2518,10 @@ func decodeGetMyCommandsResponse(resp *http.Response) (res ResultArrayOfBotComma } return nil }(); err != nil { - return res, err + 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: @@ -2342,7 +2549,10 @@ func decodeGetMyCommandsResponse(resp *http.Response) (res ResultArrayOfBotComma } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2381,7 +2591,10 @@ func decodeGetStickerSetResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2409,7 +2622,10 @@ func decodeGetStickerSetResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2448,7 +2664,10 @@ func decodeGetUpdatesResponse(resp *http.Response) (res ResultArrayOfUpdate, err } return nil }(); err != nil { - return res, err + 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: @@ -2476,7 +2695,10 @@ func decodeGetUpdatesResponse(resp *http.Response) (res ResultArrayOfUpdate, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2515,7 +2737,10 @@ func decodeGetUserProfilePhotosResponse(resp *http.Response) (res ResultUserProf } return nil }(); err != nil { - return res, err + 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: @@ -2543,7 +2768,10 @@ func decodeGetUserProfilePhotosResponse(resp *http.Response) (res ResultUserProf } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2582,7 +2810,10 @@ func decodeGetWebhookInfoResponse(resp *http.Response) (res ResultWebhookInfo, e } return nil }(); err != nil { - return res, err + 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: @@ -2610,7 +2841,10 @@ func decodeGetWebhookInfoResponse(resp *http.Response) (res ResultWebhookInfo, e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2649,7 +2883,10 @@ func decodeLeaveChatResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2677,7 +2914,10 @@ func decodeLeaveChatResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2716,7 +2956,10 @@ func decodeLogOutResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2744,7 +2987,10 @@ func decodeLogOutResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2783,7 +3029,10 @@ func decodePinChatMessageResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2811,7 +3060,10 @@ func decodePinChatMessageResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2850,7 +3102,10 @@ func decodePromoteChatMemberResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -2878,7 +3133,10 @@ func decodePromoteChatMemberResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2917,7 +3175,10 @@ func decodeRestrictChatMemberResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + 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: @@ -2945,7 +3206,10 @@ func decodeRestrictChatMemberResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -2984,7 +3248,10 @@ func decodeRevokeChatInviteLinkResponse(resp *http.Response) (res ResultChatInvi } return nil }(); err != nil { - return res, err + 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: @@ -3012,7 +3279,10 @@ func decodeRevokeChatInviteLinkResponse(resp *http.Response) (res ResultChatInvi } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3051,7 +3321,10 @@ func decodeSendAnimationResponse(resp *http.Response) (res ResultMessage, err er } return nil }(); err != nil { - return res, err + 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: @@ -3079,7 +3352,10 @@ func decodeSendAnimationResponse(resp *http.Response) (res ResultMessage, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3118,7 +3394,10 @@ func decodeSendAudioResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -3146,7 +3425,10 @@ func decodeSendAudioResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3185,7 +3467,10 @@ func decodeSendChatActionResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -3213,7 +3498,10 @@ func decodeSendChatActionResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3252,7 +3540,10 @@ func decodeSendContactResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + 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: @@ -3280,7 +3571,10 @@ func decodeSendContactResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3319,7 +3613,10 @@ func decodeSendDiceResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -3347,7 +3644,10 @@ func decodeSendDiceResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3386,7 +3686,10 @@ func decodeSendDocumentResponse(resp *http.Response) (res ResultMessage, err err } return nil }(); err != nil { - return res, err + 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: @@ -3414,7 +3717,10 @@ func decodeSendDocumentResponse(resp *http.Response) (res ResultMessage, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3453,7 +3759,10 @@ func decodeSendGameResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -3481,7 +3790,10 @@ func decodeSendGameResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3520,7 +3832,10 @@ func decodeSendInvoiceResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + 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: @@ -3548,7 +3863,10 @@ func decodeSendInvoiceResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3587,7 +3905,10 @@ func decodeSendLocationResponse(resp *http.Response) (res ResultMessage, err err } return nil }(); err != nil { - return res, err + 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: @@ -3615,7 +3936,10 @@ func decodeSendLocationResponse(resp *http.Response) (res ResultMessage, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3654,7 +3978,10 @@ func decodeSendMediaGroupResponse(resp *http.Response) (res ResultArrayOfMessage } return nil }(); err != nil { - return res, err + 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: @@ -3682,7 +4009,10 @@ func decodeSendMediaGroupResponse(resp *http.Response) (res ResultArrayOfMessage } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3721,7 +4051,10 @@ func decodeSendMessageResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + 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: @@ -3749,7 +4082,10 @@ func decodeSendMessageResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3788,7 +4124,10 @@ func decodeSendPhotoResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -3816,7 +4155,10 @@ func decodeSendPhotoResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3855,7 +4197,10 @@ func decodeSendPollResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -3883,7 +4228,10 @@ func decodeSendPollResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3922,7 +4270,10 @@ func decodeSendStickerResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + 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: @@ -3950,7 +4301,10 @@ func decodeSendStickerResponse(resp *http.Response) (res ResultMessage, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -3989,7 +4343,10 @@ func decodeSendVenueResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -4017,7 +4374,10 @@ func decodeSendVenueResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4056,7 +4416,10 @@ func decodeSendVideoResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -4084,7 +4447,10 @@ func decodeSendVideoResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4123,7 +4489,10 @@ func decodeSendVideoNoteResponse(resp *http.Response) (res ResultMessage, err er } return nil }(); err != nil { - return res, err + 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: @@ -4151,7 +4520,10 @@ func decodeSendVideoNoteResponse(resp *http.Response) (res ResultMessage, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4190,7 +4562,10 @@ func decodeSendVoiceResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + 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: @@ -4218,7 +4593,10 @@ func decodeSendVoiceResponse(resp *http.Response) (res ResultMessage, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4257,7 +4635,10 @@ func decodeSetChatAdministratorCustomTitleResponse(resp *http.Response) (res Res } return nil }(); err != nil { - return res, err + 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: @@ -4285,7 +4666,10 @@ func decodeSetChatAdministratorCustomTitleResponse(resp *http.Response) (res Res } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4324,7 +4708,10 @@ func decodeSetChatDescriptionResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + 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: @@ -4352,7 +4739,10 @@ func decodeSetChatDescriptionResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4391,7 +4781,10 @@ func decodeSetChatPermissionsResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + 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: @@ -4419,7 +4812,10 @@ func decodeSetChatPermissionsResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4458,7 +4854,10 @@ func decodeSetChatPhotoResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -4486,7 +4885,10 @@ func decodeSetChatPhotoResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4525,7 +4927,10 @@ func decodeSetChatStickerSetResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + 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: @@ -4553,7 +4958,10 @@ func decodeSetChatStickerSetResponse(resp *http.Response) (res Result, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4592,7 +5000,10 @@ func decodeSetChatTitleResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -4620,7 +5031,10 @@ func decodeSetChatTitleResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4659,7 +5073,10 @@ func decodeSetGameScoreResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -4687,7 +5104,10 @@ func decodeSetGameScoreResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4726,7 +5146,10 @@ func decodeSetMyCommandsResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -4754,7 +5177,10 @@ func decodeSetMyCommandsResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4793,7 +5219,10 @@ func decodeSetPassportDataErrorsResponse(resp *http.Response) (res Result, err e } return nil }(); err != nil { - return res, err + 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: @@ -4821,7 +5250,10 @@ func decodeSetPassportDataErrorsResponse(resp *http.Response) (res Result, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4860,7 +5292,10 @@ func decodeSetStickerPositionInSetResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -4888,7 +5323,10 @@ func decodeSetStickerPositionInSetResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4927,7 +5365,10 @@ func decodeSetStickerSetThumbResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + 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: @@ -4955,7 +5396,10 @@ func decodeSetStickerSetThumbResponse(resp *http.Response) (res Result, err erro } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -4994,7 +5438,10 @@ func decodeSetWebhookResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -5022,7 +5469,10 @@ func decodeSetWebhookResponse(resp *http.Response) (res Result, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5061,7 +5511,10 @@ func decodeStopMessageLiveLocationResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + 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: @@ -5089,7 +5542,10 @@ func decodeStopMessageLiveLocationResponse(resp *http.Response) (res Result, err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5128,7 +5584,10 @@ func decodeStopPollResponse(resp *http.Response) (res ResultPoll, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -5156,7 +5615,10 @@ func decodeStopPollResponse(resp *http.Response) (res ResultPoll, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5195,7 +5657,10 @@ func decodeUnbanChatMemberResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -5223,7 +5688,10 @@ func decodeUnbanChatMemberResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5262,7 +5730,10 @@ func decodeUnbanChatSenderChatResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + 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: @@ -5290,7 +5761,10 @@ func decodeUnbanChatSenderChatResponse(resp *http.Response) (res Result, err err } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5329,7 +5803,10 @@ func decodeUnpinAllChatMessagesResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + 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: @@ -5357,7 +5834,10 @@ func decodeUnpinAllChatMessagesResponse(resp *http.Response) (res Result, err er } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5396,7 +5876,10 @@ func decodeUnpinChatMessageResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + 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: @@ -5424,7 +5907,10 @@ func decodeUnpinChatMessageResponse(resp *http.Response) (res Result, err error) } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -5463,7 +5949,10 @@ func decodeUploadStickerFileResponse(resp *http.Response) (res ResultFile, err e } return nil }(); err != nil { - return res, err + 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: @@ -5491,7 +5980,10 @@ func decodeUploadStickerFileResponse(resp *http.Response) (res ResultFile, err e } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } 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 473ee6ef4..c419c95f0 100644 --- a/examples/ex_test_format/oas_request_decoders_gen.go +++ b/examples/ex_test_format/oas_request_decoders_gen.go @@ -71,6 +71,9 @@ func (s *Server) decodeTestQueryParameterRequest(r *http.Request) ( }(); err != nil { 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) @@ -131,6 +134,9 @@ func (s *Server) decodeTestRequestAnyRequest(r *http.Request) ( }(); err != nil { 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) @@ -190,6 +196,9 @@ func (s *Server) decodeTestRequestBooleanRequest(r *http.Request) ( }(); err != nil { 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) @@ -258,6 +267,9 @@ func (s *Server) decodeTestRequestBooleanArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -334,6 +346,9 @@ func (s *Server) decodeTestRequestBooleanArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -415,6 +430,9 @@ func (s *Server) decodeTestRequestBooleanNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -481,6 +499,9 @@ func (s *Server) decodeTestRequestBooleanNullableArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -555,6 +576,9 @@ func (s *Server) decodeTestRequestBooleanNullableArrayArrayRequest(r *http.Reque }(); err != nil { 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 { @@ -638,6 +662,9 @@ func (s *Server) decodeTestRequestEmptyStructRequest(r *http.Request) ( }(); err != nil { 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) @@ -697,6 +724,9 @@ func (s *Server) decodeTestRequestFormatTestRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -771,6 +801,9 @@ func (s *Server) decodeTestRequestIntegerRequest(r *http.Request) ( }(); err != nil { 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) @@ -839,6 +872,9 @@ func (s *Server) decodeTestRequestIntegerArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -915,6 +951,9 @@ func (s *Server) decodeTestRequestIntegerArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -996,6 +1035,9 @@ func (s *Server) decodeTestRequestIntegerInt32Request(r *http.Request) ( }(); err != nil { 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) @@ -1064,6 +1106,9 @@ func (s *Server) decodeTestRequestIntegerInt32ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -1140,6 +1185,9 @@ func (s *Server) decodeTestRequestIntegerInt32ArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -1221,6 +1269,9 @@ func (s *Server) decodeTestRequestIntegerInt32NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -1287,6 +1338,9 @@ func (s *Server) decodeTestRequestIntegerInt32NullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -1361,6 +1415,9 @@ func (s *Server) decodeTestRequestIntegerInt32NullableArrayArrayRequest(r *http. }(); err != nil { 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 { @@ -1442,6 +1499,9 @@ func (s *Server) decodeTestRequestIntegerInt64Request(r *http.Request) ( }(); err != nil { 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) @@ -1510,6 +1570,9 @@ func (s *Server) decodeTestRequestIntegerInt64ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -1586,6 +1649,9 @@ func (s *Server) decodeTestRequestIntegerInt64ArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -1667,6 +1733,9 @@ func (s *Server) decodeTestRequestIntegerInt64NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -1733,6 +1802,9 @@ func (s *Server) decodeTestRequestIntegerInt64NullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -1807,6 +1879,9 @@ func (s *Server) decodeTestRequestIntegerInt64NullableArrayArrayRequest(r *http. }(); err != nil { 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 { @@ -1888,6 +1963,9 @@ func (s *Server) decodeTestRequestIntegerNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -1954,6 +2032,9 @@ func (s *Server) decodeTestRequestIntegerNullableArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -2028,6 +2109,9 @@ func (s *Server) decodeTestRequestIntegerNullableArrayArrayRequest(r *http.Reque }(); err != nil { 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 { @@ -2109,6 +2193,9 @@ func (s *Server) decodeTestRequestIntegerUintRequest(r *http.Request) ( }(); err != nil { 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) @@ -2168,6 +2255,9 @@ func (s *Server) decodeTestRequestIntegerUint32Request(r *http.Request) ( }(); err != nil { 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) @@ -2236,6 +2326,9 @@ func (s *Server) decodeTestRequestIntegerUint32ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -2312,6 +2405,9 @@ func (s *Server) decodeTestRequestIntegerUint32ArrayArrayRequest(r *http.Request }(); err != nil { 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 { @@ -2393,6 +2489,9 @@ func (s *Server) decodeTestRequestIntegerUint32NullableRequest(r *http.Request) }(); err != nil { 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) @@ -2459,6 +2558,9 @@ func (s *Server) decodeTestRequestIntegerUint32NullableArrayRequest(r *http.Requ }(); err != nil { 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) @@ -2533,6 +2635,9 @@ func (s *Server) decodeTestRequestIntegerUint32NullableArrayArrayRequest(r *http }(); err != nil { 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 { @@ -2614,6 +2719,9 @@ func (s *Server) decodeTestRequestIntegerUint64Request(r *http.Request) ( }(); err != nil { 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) @@ -2682,6 +2790,9 @@ func (s *Server) decodeTestRequestIntegerUint64ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -2758,6 +2869,9 @@ func (s *Server) decodeTestRequestIntegerUint64ArrayArrayRequest(r *http.Request }(); err != nil { 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 { @@ -2839,6 +2953,9 @@ func (s *Server) decodeTestRequestIntegerUint64NullableRequest(r *http.Request) }(); err != nil { 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) @@ -2905,6 +3022,9 @@ func (s *Server) decodeTestRequestIntegerUint64NullableArrayRequest(r *http.Requ }(); err != nil { 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) @@ -2979,6 +3099,9 @@ func (s *Server) decodeTestRequestIntegerUint64NullableArrayArrayRequest(r *http }(); err != nil { 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 { @@ -3069,6 +3192,9 @@ func (s *Server) decodeTestRequestIntegerUintArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -3145,6 +3271,9 @@ func (s *Server) decodeTestRequestIntegerUintArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -3226,6 +3355,9 @@ func (s *Server) decodeTestRequestIntegerUintNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -3292,6 +3424,9 @@ func (s *Server) decodeTestRequestIntegerUintNullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -3366,6 +3501,9 @@ func (s *Server) decodeTestRequestIntegerUintNullableArrayArrayRequest(r *http.R }(); err != nil { 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 { @@ -3447,6 +3585,9 @@ func (s *Server) decodeTestRequestIntegerUnixRequest(r *http.Request) ( }(); err != nil { 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) @@ -3515,6 +3656,9 @@ func (s *Server) decodeTestRequestIntegerUnixArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -3591,6 +3735,9 @@ func (s *Server) decodeTestRequestIntegerUnixArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -3672,6 +3819,9 @@ func (s *Server) decodeTestRequestIntegerUnixMicroRequest(r *http.Request) ( }(); err != nil { 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) @@ -3740,6 +3890,9 @@ func (s *Server) decodeTestRequestIntegerUnixMicroArrayRequest(r *http.Request) }(); err != nil { 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) @@ -3816,6 +3969,9 @@ func (s *Server) decodeTestRequestIntegerUnixMicroArrayArrayRequest(r *http.Requ }(); err != nil { 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 { @@ -3897,6 +4053,9 @@ func (s *Server) decodeTestRequestIntegerUnixMicroNullableRequest(r *http.Reques }(); err != nil { 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) @@ -3963,6 +4122,9 @@ func (s *Server) decodeTestRequestIntegerUnixMicroNullableArrayRequest(r *http.R }(); err != nil { 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) @@ -4037,6 +4199,9 @@ func (s *Server) decodeTestRequestIntegerUnixMicroNullableArrayArrayRequest(r *h }(); err != nil { 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 { @@ -4118,6 +4283,9 @@ func (s *Server) decodeTestRequestIntegerUnixMilliRequest(r *http.Request) ( }(); err != nil { 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) @@ -4186,6 +4354,9 @@ func (s *Server) decodeTestRequestIntegerUnixMilliArrayRequest(r *http.Request) }(); err != nil { 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) @@ -4262,6 +4433,9 @@ func (s *Server) decodeTestRequestIntegerUnixMilliArrayArrayRequest(r *http.Requ }(); err != nil { 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 { @@ -4343,6 +4517,9 @@ func (s *Server) decodeTestRequestIntegerUnixMilliNullableRequest(r *http.Reques }(); err != nil { 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) @@ -4409,6 +4586,9 @@ func (s *Server) decodeTestRequestIntegerUnixMilliNullableArrayRequest(r *http.R }(); err != nil { 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) @@ -4483,6 +4663,9 @@ func (s *Server) decodeTestRequestIntegerUnixMilliNullableArrayArrayRequest(r *h }(); err != nil { 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 { @@ -4564,6 +4747,9 @@ func (s *Server) decodeTestRequestIntegerUnixNanoRequest(r *http.Request) ( }(); err != nil { 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) @@ -4632,6 +4818,9 @@ func (s *Server) decodeTestRequestIntegerUnixNanoArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -4708,6 +4897,9 @@ func (s *Server) decodeTestRequestIntegerUnixNanoArrayArrayRequest(r *http.Reque }(); err != nil { 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 { @@ -4789,6 +4981,9 @@ func (s *Server) decodeTestRequestIntegerUnixNanoNullableRequest(r *http.Request }(); err != nil { 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) @@ -4855,6 +5050,9 @@ func (s *Server) decodeTestRequestIntegerUnixNanoNullableArrayRequest(r *http.Re }(); err != nil { 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) @@ -4929,6 +5127,9 @@ func (s *Server) decodeTestRequestIntegerUnixNanoNullableArrayArrayRequest(r *ht }(); err != nil { 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 { @@ -5010,6 +5211,9 @@ func (s *Server) decodeTestRequestIntegerUnixNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -5076,6 +5280,9 @@ func (s *Server) decodeTestRequestIntegerUnixNullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -5150,6 +5357,9 @@ func (s *Server) decodeTestRequestIntegerUnixNullableArrayArrayRequest(r *http.R }(); err != nil { 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 { @@ -5231,6 +5441,9 @@ func (s *Server) decodeTestRequestIntegerUnixSecondsRequest(r *http.Request) ( }(); err != nil { 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) @@ -5299,6 +5512,9 @@ func (s *Server) decodeTestRequestIntegerUnixSecondsArrayRequest(r *http.Request }(); err != nil { 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) @@ -5375,6 +5591,9 @@ func (s *Server) decodeTestRequestIntegerUnixSecondsArrayArrayRequest(r *http.Re }(); err != nil { 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 { @@ -5456,6 +5675,9 @@ func (s *Server) decodeTestRequestIntegerUnixSecondsNullableRequest(r *http.Requ }(); err != nil { 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) @@ -5522,6 +5744,9 @@ func (s *Server) decodeTestRequestIntegerUnixSecondsNullableArrayRequest(r *http }(); err != nil { 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) @@ -5596,6 +5821,9 @@ func (s *Server) decodeTestRequestIntegerUnixSecondsNullableArrayArrayRequest(r }(); err != nil { 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 { @@ -5677,6 +5905,9 @@ func (s *Server) decodeTestRequestNullRequest(r *http.Request) ( }(); err != nil { 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) @@ -5743,6 +5974,9 @@ func (s *Server) decodeTestRequestNullArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -5817,6 +6051,9 @@ func (s *Server) decodeTestRequestNullArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -5898,6 +6135,9 @@ func (s *Server) decodeTestRequestNullNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -5964,6 +6204,9 @@ func (s *Server) decodeTestRequestNullNullableArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -6038,6 +6281,9 @@ func (s *Server) decodeTestRequestNullNullableArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -6119,6 +6365,9 @@ func (s *Server) decodeTestRequestNumberRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -6202,6 +6451,9 @@ func (s *Server) decodeTestRequestNumberArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -6300,6 +6552,9 @@ func (s *Server) decodeTestRequestNumberArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -6398,6 +6653,9 @@ func (s *Server) decodeTestRequestNumberDoubleRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -6481,6 +6739,9 @@ func (s *Server) decodeTestRequestNumberDoubleArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -6579,6 +6840,9 @@ func (s *Server) decodeTestRequestNumberDoubleArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -6677,6 +6941,9 @@ func (s *Server) decodeTestRequestNumberDoubleNullableRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -6758,6 +7025,9 @@ func (s *Server) decodeTestRequestNumberDoubleNullableArrayRequest(r *http.Reque }(); err != nil { 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 { @@ -6854,6 +7124,9 @@ func (s *Server) decodeTestRequestNumberDoubleNullableArrayArrayRequest(r *http. }(); err != nil { 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 { @@ -6952,6 +7225,9 @@ func (s *Server) decodeTestRequestNumberFloatRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -7035,6 +7311,9 @@ func (s *Server) decodeTestRequestNumberFloatArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -7133,6 +7412,9 @@ func (s *Server) decodeTestRequestNumberFloatArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -7231,6 +7513,9 @@ func (s *Server) decodeTestRequestNumberFloatNullableRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -7312,6 +7597,9 @@ func (s *Server) decodeTestRequestNumberFloatNullableArrayRequest(r *http.Reques }(); err != nil { 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 { @@ -7408,6 +7696,9 @@ func (s *Server) decodeTestRequestNumberFloatNullableArrayArrayRequest(r *http.R }(); err != nil { 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 { @@ -7506,6 +7797,9 @@ func (s *Server) decodeTestRequestNumberInt32Request(r *http.Request) ( }(); err != nil { 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) @@ -7574,6 +7868,9 @@ func (s *Server) decodeTestRequestNumberInt32ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -7650,6 +7947,9 @@ func (s *Server) decodeTestRequestNumberInt32ArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -7731,6 +8031,9 @@ func (s *Server) decodeTestRequestNumberInt32NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -7797,6 +8100,9 @@ func (s *Server) decodeTestRequestNumberInt32NullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -7871,6 +8177,9 @@ func (s *Server) decodeTestRequestNumberInt32NullableArrayArrayRequest(r *http.R }(); err != nil { 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 { @@ -7952,6 +8261,9 @@ func (s *Server) decodeTestRequestNumberInt64Request(r *http.Request) ( }(); err != nil { 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) @@ -8020,6 +8332,9 @@ func (s *Server) decodeTestRequestNumberInt64ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -8096,6 +8411,9 @@ func (s *Server) decodeTestRequestNumberInt64ArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -8177,6 +8495,9 @@ func (s *Server) decodeTestRequestNumberInt64NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -8243,6 +8564,9 @@ func (s *Server) decodeTestRequestNumberInt64NullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -8317,6 +8641,9 @@ func (s *Server) decodeTestRequestNumberInt64NullableArrayArrayRequest(r *http.R }(); err != nil { 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 { @@ -8398,6 +8725,9 @@ func (s *Server) decodeTestRequestNumberNullableRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -8479,6 +8809,9 @@ func (s *Server) decodeTestRequestNumberNullableArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -8575,6 +8908,9 @@ func (s *Server) decodeTestRequestNumberNullableArrayArrayRequest(r *http.Reques }(); err != nil { 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 { @@ -8671,6 +9007,9 @@ func (s *Server) decodeTestRequestRequiredAnyRequest(r *http.Request) ( }(); err != nil { 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) @@ -8728,6 +9067,9 @@ func (s *Server) decodeTestRequestRequiredBooleanRequest(r *http.Request) ( }(); err != nil { 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) @@ -8793,6 +9135,9 @@ func (s *Server) decodeTestRequestRequiredBooleanArrayRequest(r *http.Request) ( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -8874,6 +9219,9 @@ func (s *Server) decodeTestRequestRequiredBooleanArrayArrayRequest(r *http.Reque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -8954,6 +9302,9 @@ func (s *Server) decodeTestRequestRequiredBooleanNullableRequest(r *http.Request }(); err != nil { 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) @@ -9017,6 +9368,9 @@ func (s *Server) decodeTestRequestRequiredBooleanNullableArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -9096,6 +9450,9 @@ func (s *Server) decodeTestRequestRequiredBooleanNullableArrayArrayRequest(r *ht }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -9176,6 +9533,9 @@ func (s *Server) decodeTestRequestRequiredEmptyStructRequest(r *http.Request) ( }(); err != nil { 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) @@ -9231,6 +9591,9 @@ func (s *Server) decodeTestRequestRequiredFormatTestRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -9296,6 +9659,9 @@ func (s *Server) decodeTestRequestRequiredIntegerRequest(r *http.Request) ( }(); err != nil { 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) @@ -9361,6 +9727,9 @@ func (s *Server) decodeTestRequestRequiredIntegerArrayRequest(r *http.Request) ( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -9442,6 +9811,9 @@ func (s *Server) decodeTestRequestRequiredIntegerArrayArrayRequest(r *http.Reque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -9524,6 +9896,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32Request(r *http.Request) ( }(); err != nil { 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) @@ -9589,6 +9964,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32ArrayRequest(r *http.Reque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -9670,6 +10048,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32ArrayArrayRequest(r *http. }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -9750,6 +10131,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32NullableRequest(r *http.Re }(); err != nil { 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) @@ -9813,6 +10197,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32NullableArrayRequest(r *ht }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -9892,6 +10279,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt32NullableArrayArrayRequest( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -9974,6 +10364,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64Request(r *http.Request) ( }(); err != nil { 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) @@ -10039,6 +10432,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64ArrayRequest(r *http.Reque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -10120,6 +10516,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64ArrayArrayRequest(r *http. }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -10200,6 +10599,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64NullableRequest(r *http.Re }(); err != nil { 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) @@ -10263,6 +10665,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64NullableArrayRequest(r *ht }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -10342,6 +10747,9 @@ func (s *Server) decodeTestRequestRequiredIntegerInt64NullableArrayArrayRequest( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -10422,6 +10830,9 @@ func (s *Server) decodeTestRequestRequiredIntegerNullableRequest(r *http.Request }(); err != nil { 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) @@ -10485,6 +10896,9 @@ func (s *Server) decodeTestRequestRequiredIntegerNullableArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -10564,6 +10978,9 @@ func (s *Server) decodeTestRequestRequiredIntegerNullableArrayArrayRequest(r *ht }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -10646,6 +11063,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUintRequest(r *http.Request) ( }(); err != nil { 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) @@ -10703,6 +11123,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32Request(r *http.Request) }(); err != nil { 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) @@ -10768,6 +11191,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32ArrayRequest(r *http.Requ }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -10849,6 +11275,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32ArrayArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -10929,6 +11358,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32NullableRequest(r *http.R }(); err != nil { 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) @@ -10992,6 +11424,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32NullableArrayRequest(r *h }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11071,6 +11506,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint32NullableArrayArrayRequest }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11153,6 +11591,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64Request(r *http.Request) }(); err != nil { 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) @@ -11218,6 +11659,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64ArrayRequest(r *http.Requ }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11299,6 +11743,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64ArrayArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11379,6 +11826,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64NullableRequest(r *http.R }(); err != nil { 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) @@ -11442,6 +11892,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64NullableArrayRequest(r *h }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11521,6 +11974,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUint64NullableArrayArrayRequest }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11611,6 +12067,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUintArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11692,6 +12151,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUintArrayArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11772,6 +12234,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUintNullableRequest(r *http.Req }(); err != nil { 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) @@ -11835,6 +12300,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUintNullableArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11914,6 +12382,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUintNullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -11996,6 +12467,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixRequest(r *http.Request) ( }(); err != nil { 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) @@ -12061,6 +12535,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -12142,6 +12619,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixArrayArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -12224,6 +12704,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroRequest(r *http.Reques }(); err != nil { 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) @@ -12289,6 +12772,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -12370,6 +12856,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroArrayArrayRequest(r *h }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -12450,6 +12939,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroNullableRequest(r *htt }(); err != nil { 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) @@ -12513,6 +13005,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroNullableArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -12592,6 +13087,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMicroNullableArrayArrayRequ }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -12674,6 +13172,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliRequest(r *http.Reques }(); err != nil { 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) @@ -12739,6 +13240,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -12820,6 +13324,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliArrayArrayRequest(r *h }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -12900,6 +13407,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliNullableRequest(r *htt }(); err != nil { 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) @@ -12963,6 +13473,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliNullableArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -13042,6 +13555,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixMilliNullableArrayArrayRequ }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -13124,6 +13640,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoRequest(r *http.Request }(); err != nil { 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) @@ -13189,6 +13708,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -13270,6 +13792,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoArrayArrayRequest(r *ht }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -13350,6 +13875,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoNullableRequest(r *http }(); err != nil { 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) @@ -13413,6 +13941,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoNullableArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -13492,6 +14023,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNanoNullableArrayArrayReque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -13572,6 +14106,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNullableRequest(r *http.Req }(); err != nil { 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) @@ -13635,6 +14172,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNullableArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -13714,6 +14254,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixNullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -13796,6 +14339,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsRequest(r *http.Requ }(); err != nil { 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) @@ -13861,6 +14407,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -13942,6 +14491,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -14022,6 +14574,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsNullableRequest(r *h }(); err != nil { 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) @@ -14085,6 +14640,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsNullableArrayRequest }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -14164,6 +14722,9 @@ func (s *Server) decodeTestRequestRequiredIntegerUnixSecondsNullableArrayArrayRe }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -14244,6 +14805,9 @@ func (s *Server) decodeTestRequestRequiredNullRequest(r *http.Request) ( }(); err != nil { 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) @@ -14307,6 +14871,9 @@ func (s *Server) decodeTestRequestRequiredNullArrayRequest(r *http.Request) ( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -14386,6 +14953,9 @@ func (s *Server) decodeTestRequestRequiredNullArrayArrayRequest(r *http.Request) }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -14466,6 +15036,9 @@ func (s *Server) decodeTestRequestRequiredNullNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -14529,6 +15102,9 @@ func (s *Server) decodeTestRequestRequiredNullNullableArrayRequest(r *http.Reque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -14608,6 +15184,9 @@ func (s *Server) decodeTestRequestRequiredNullNullableArrayArrayRequest(r *http. }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -14690,6 +15269,9 @@ func (s *Server) decodeTestRequestRequiredNumberRequest(r *http.Request) ( }(); err != nil { 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 { if err := (validate.Float{}).Validate(float64(request)); err != nil { return errors.Wrap(err, "float") @@ -14763,6 +15345,9 @@ func (s *Server) decodeTestRequestRequiredNumberArrayRequest(r *http.Request) ( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -14861,6 +15446,9 @@ func (s *Server) decodeTestRequestRequiredNumberArrayArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -14960,6 +15548,9 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleRequest(r *http.Request) ( }(); err != nil { 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 { if err := (validate.Float{}).Validate(float64(request)); err != nil { return errors.Wrap(err, "float") @@ -15033,6 +15624,9 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleArrayRequest(r *http.Reque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -15131,6 +15725,9 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleArrayArrayRequest(r *http. }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -15228,6 +15825,9 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleNullableRequest(r *http.Re }(); err != nil { 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 { if err := (validate.Float{}).Validate(float64(request.Value)); err != nil { return errors.Wrap(err, "float") @@ -15299,6 +15899,9 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleNullableArrayRequest(r *ht }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -15395,6 +15998,9 @@ func (s *Server) decodeTestRequestRequiredNumberDoubleNullableArrayArrayRequest( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -15494,6 +16100,9 @@ func (s *Server) decodeTestRequestRequiredNumberFloatRequest(r *http.Request) ( }(); err != nil { 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 { if err := (validate.Float{}).Validate(float64(request)); err != nil { return errors.Wrap(err, "float") @@ -15567,6 +16176,9 @@ func (s *Server) decodeTestRequestRequiredNumberFloatArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -15665,6 +16277,9 @@ func (s *Server) decodeTestRequestRequiredNumberFloatArrayArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -15762,6 +16377,9 @@ func (s *Server) decodeTestRequestRequiredNumberFloatNullableRequest(r *http.Req }(); err != nil { 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 { if err := (validate.Float{}).Validate(float64(request.Value)); err != nil { return errors.Wrap(err, "float") @@ -15833,6 +16451,9 @@ func (s *Server) decodeTestRequestRequiredNumberFloatNullableArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -15929,6 +16550,9 @@ func (s *Server) decodeTestRequestRequiredNumberFloatNullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -16028,6 +16652,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt32Request(r *http.Request) ( }(); err != nil { 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) @@ -16093,6 +16720,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt32ArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -16174,6 +16804,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt32ArrayArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -16254,6 +16887,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt32NullableRequest(r *http.Req }(); err != nil { 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) @@ -16317,6 +16953,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt32NullableArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -16396,6 +17035,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt32NullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -16478,6 +17120,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt64Request(r *http.Request) ( }(); err != nil { 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) @@ -16543,6 +17188,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt64ArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -16624,6 +17272,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt64ArrayArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -16704,6 +17355,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt64NullableRequest(r *http.Req }(); err != nil { 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) @@ -16767,6 +17421,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt64NullableArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -16846,6 +17503,9 @@ func (s *Server) decodeTestRequestRequiredNumberInt64NullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -16926,6 +17586,9 @@ func (s *Server) decodeTestRequestRequiredNumberNullableRequest(r *http.Request) }(); err != nil { 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 { if err := (validate.Float{}).Validate(float64(request.Value)); err != nil { return errors.Wrap(err, "float") @@ -16997,6 +17660,9 @@ func (s *Server) decodeTestRequestRequiredNumberNullableArrayRequest(r *http.Req }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -17093,6 +17759,9 @@ func (s *Server) decodeTestRequestRequiredNumberNullableArrayArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -17192,6 +17861,9 @@ func (s *Server) decodeTestRequestRequiredStringRequest(r *http.Request) ( }(); err != nil { 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) @@ -17257,6 +17929,9 @@ func (s *Server) decodeTestRequestRequiredStringArrayRequest(r *http.Request) ( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -17338,6 +18013,9 @@ func (s *Server) decodeTestRequestRequiredStringArrayArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -17420,6 +18098,9 @@ func (s *Server) decodeTestRequestRequiredStringBinaryRequest(r *http.Request) ( }(); err != nil { 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) @@ -17485,6 +18166,9 @@ func (s *Server) decodeTestRequestRequiredStringBinaryArrayRequest(r *http.Reque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -17566,6 +18250,9 @@ func (s *Server) decodeTestRequestRequiredStringBinaryArrayArrayRequest(r *http. }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -17646,6 +18333,9 @@ func (s *Server) decodeTestRequestRequiredStringBinaryNullableRequest(r *http.Re }(); err != nil { 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) @@ -17709,6 +18399,9 @@ func (s *Server) decodeTestRequestRequiredStringBinaryNullableArrayRequest(r *ht }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -17788,6 +18481,9 @@ func (s *Server) decodeTestRequestRequiredStringBinaryNullableArrayArrayRequest( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -17870,6 +18566,9 @@ func (s *Server) decodeTestRequestRequiredStringByteRequest(r *http.Request) ( }(); err != nil { 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) @@ -17935,6 +18634,9 @@ func (s *Server) decodeTestRequestRequiredStringByteArrayRequest(r *http.Request }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -18016,6 +18718,9 @@ func (s *Server) decodeTestRequestRequiredStringByteArrayArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -18098,6 +18803,9 @@ func (s *Server) decodeTestRequestRequiredStringByteNullableRequest(r *http.Requ }(); err != nil { 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) @@ -18163,6 +18871,9 @@ func (s *Server) decodeTestRequestRequiredStringByteNullableArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -18244,6 +18955,9 @@ func (s *Server) decodeTestRequestRequiredStringByteNullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -18326,6 +19040,9 @@ func (s *Server) decodeTestRequestRequiredStringDateRequest(r *http.Request) ( }(); err != nil { 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) @@ -18391,6 +19108,9 @@ func (s *Server) decodeTestRequestRequiredStringDateArrayRequest(r *http.Request }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -18472,6 +19192,9 @@ func (s *Server) decodeTestRequestRequiredStringDateArrayArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -18552,6 +19275,9 @@ func (s *Server) decodeTestRequestRequiredStringDateNullableRequest(r *http.Requ }(); err != nil { 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) @@ -18615,6 +19341,9 @@ func (s *Server) decodeTestRequestRequiredStringDateNullableArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -18694,6 +19423,9 @@ func (s *Server) decodeTestRequestRequiredStringDateNullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -18776,6 +19508,9 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeRequest(r *http.Request) }(); err != nil { 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) @@ -18841,6 +19576,9 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeArrayRequest(r *http.Req }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -18922,6 +19660,9 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeArrayArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -19002,6 +19743,9 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeNullableRequest(r *http. }(); err != nil { 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) @@ -19065,6 +19809,9 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeNullableArrayRequest(r * }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -19144,6 +19891,9 @@ func (s *Server) decodeTestRequestRequiredStringDateTimeNullableArrayArrayReques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -19226,6 +19976,9 @@ func (s *Server) decodeTestRequestRequiredStringDurationRequest(r *http.Request) }(); err != nil { 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) @@ -19291,6 +20044,9 @@ func (s *Server) decodeTestRequestRequiredStringDurationArrayRequest(r *http.Req }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -19372,6 +20128,9 @@ func (s *Server) decodeTestRequestRequiredStringDurationArrayArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -19452,6 +20211,9 @@ func (s *Server) decodeTestRequestRequiredStringDurationNullableRequest(r *http. }(); err != nil { 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) @@ -19515,6 +20277,9 @@ func (s *Server) decodeTestRequestRequiredStringDurationNullableArrayRequest(r * }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -19594,6 +20359,9 @@ func (s *Server) decodeTestRequestRequiredStringDurationNullableArrayArrayReques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -19676,6 +20444,9 @@ func (s *Server) decodeTestRequestRequiredStringEmailRequest(r *http.Request) ( }(); err != nil { 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 { if err := (validate.String{ MinLength: 0, @@ -19757,6 +20528,9 @@ func (s *Server) decodeTestRequestRequiredStringEmailArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -19863,6 +20637,9 @@ func (s *Server) decodeTestRequestRequiredStringEmailArrayArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -19968,6 +20745,9 @@ func (s *Server) decodeTestRequestRequiredStringEmailNullableRequest(r *http.Req }(); err != nil { 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 { if err := (validate.String{ MinLength: 0, @@ -20047,6 +20827,9 @@ func (s *Server) decodeTestRequestRequiredStringEmailNullableArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -20151,6 +20934,9 @@ func (s *Server) decodeTestRequestRequiredStringEmailNullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -20258,6 +21044,9 @@ func (s *Server) decodeTestRequestRequiredStringHostnameRequest(r *http.Request) }(); err != nil { 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 { if err := (validate.String{ MinLength: 0, @@ -20339,6 +21128,9 @@ func (s *Server) decodeTestRequestRequiredStringHostnameArrayRequest(r *http.Req }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -20445,6 +21237,9 @@ func (s *Server) decodeTestRequestRequiredStringHostnameArrayArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -20550,6 +21345,9 @@ func (s *Server) decodeTestRequestRequiredStringHostnameNullableRequest(r *http. }(); err != nil { 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 { if err := (validate.String{ MinLength: 0, @@ -20629,6 +21427,9 @@ func (s *Server) decodeTestRequestRequiredStringHostnameNullableArrayRequest(r * }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -20733,6 +21534,9 @@ func (s *Server) decodeTestRequestRequiredStringHostnameNullableArrayArrayReques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -20840,6 +21644,9 @@ func (s *Server) decodeTestRequestRequiredStringIPRequest(r *http.Request) ( }(); err != nil { 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) @@ -20905,6 +21712,9 @@ func (s *Server) decodeTestRequestRequiredStringIPArrayRequest(r *http.Request) }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -20986,6 +21796,9 @@ func (s *Server) decodeTestRequestRequiredStringIPArrayArrayRequest(r *http.Requ }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -21066,6 +21879,9 @@ func (s *Server) decodeTestRequestRequiredStringIPNullableRequest(r *http.Reques }(); err != nil { 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) @@ -21129,6 +21945,9 @@ func (s *Server) decodeTestRequestRequiredStringIPNullableArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -21208,6 +22027,9 @@ func (s *Server) decodeTestRequestRequiredStringIPNullableArrayArrayRequest(r *h }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -21290,6 +22112,9 @@ func (s *Server) decodeTestRequestRequiredStringInt32Request(r *http.Request) ( }(); err != nil { 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) @@ -21355,6 +22180,9 @@ func (s *Server) decodeTestRequestRequiredStringInt32ArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -21436,6 +22264,9 @@ func (s *Server) decodeTestRequestRequiredStringInt32ArrayArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -21516,6 +22347,9 @@ func (s *Server) decodeTestRequestRequiredStringInt32NullableRequest(r *http.Req }(); err != nil { 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) @@ -21579,6 +22413,9 @@ func (s *Server) decodeTestRequestRequiredStringInt32NullableArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -21658,6 +22495,9 @@ func (s *Server) decodeTestRequestRequiredStringInt32NullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -21740,6 +22580,9 @@ func (s *Server) decodeTestRequestRequiredStringInt64Request(r *http.Request) ( }(); err != nil { 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) @@ -21805,6 +22648,9 @@ func (s *Server) decodeTestRequestRequiredStringInt64ArrayRequest(r *http.Reques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -21886,6 +22732,9 @@ func (s *Server) decodeTestRequestRequiredStringInt64ArrayArrayRequest(r *http.R }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -21966,6 +22815,9 @@ func (s *Server) decodeTestRequestRequiredStringInt64NullableRequest(r *http.Req }(); err != nil { 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) @@ -22029,6 +22881,9 @@ func (s *Server) decodeTestRequestRequiredStringInt64NullableArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -22108,6 +22963,9 @@ func (s *Server) decodeTestRequestRequiredStringInt64NullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -22190,6 +23048,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv4Request(r *http.Request) ( }(); err != nil { 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) @@ -22255,6 +23116,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv4ArrayRequest(r *http.Request }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -22336,6 +23200,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv4ArrayArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -22416,6 +23283,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv4NullableRequest(r *http.Requ }(); err != nil { 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) @@ -22479,6 +23349,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv4NullableArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -22558,6 +23431,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv4NullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -22640,6 +23516,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv6Request(r *http.Request) ( }(); err != nil { 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) @@ -22705,6 +23584,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv6ArrayRequest(r *http.Request }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -22786,6 +23668,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv6ArrayArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -22866,6 +23751,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv6NullableRequest(r *http.Requ }(); err != nil { 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) @@ -22929,6 +23817,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv6NullableArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23008,6 +23899,9 @@ func (s *Server) decodeTestRequestRequiredStringIpv6NullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23088,6 +23982,9 @@ func (s *Server) decodeTestRequestRequiredStringNullableRequest(r *http.Request) }(); err != nil { 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) @@ -23151,6 +24048,9 @@ func (s *Server) decodeTestRequestRequiredStringNullableArrayRequest(r *http.Req }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23230,6 +24130,9 @@ func (s *Server) decodeTestRequestRequiredStringNullableArrayArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23312,6 +24215,9 @@ func (s *Server) decodeTestRequestRequiredStringPasswordRequest(r *http.Request) }(); err != nil { 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) @@ -23377,6 +24283,9 @@ func (s *Server) decodeTestRequestRequiredStringPasswordArrayRequest(r *http.Req }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23458,6 +24367,9 @@ func (s *Server) decodeTestRequestRequiredStringPasswordArrayArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23538,6 +24450,9 @@ func (s *Server) decodeTestRequestRequiredStringPasswordNullableRequest(r *http. }(); err != nil { 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) @@ -23601,6 +24516,9 @@ func (s *Server) decodeTestRequestRequiredStringPasswordNullableArrayRequest(r * }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23680,6 +24598,9 @@ func (s *Server) decodeTestRequestRequiredStringPasswordNullableArrayArrayReques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23762,6 +24683,9 @@ func (s *Server) decodeTestRequestRequiredStringTimeRequest(r *http.Request) ( }(); err != nil { 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) @@ -23827,6 +24751,9 @@ func (s *Server) decodeTestRequestRequiredStringTimeArrayRequest(r *http.Request }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23908,6 +24835,9 @@ func (s *Server) decodeTestRequestRequiredStringTimeArrayArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -23988,6 +24918,9 @@ func (s *Server) decodeTestRequestRequiredStringTimeNullableRequest(r *http.Requ }(); err != nil { 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) @@ -24051,6 +24984,9 @@ func (s *Server) decodeTestRequestRequiredStringTimeNullableArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -24130,6 +25066,9 @@ func (s *Server) decodeTestRequestRequiredStringTimeNullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -24212,6 +25151,9 @@ func (s *Server) decodeTestRequestRequiredStringURIRequest(r *http.Request) ( }(); err != nil { 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) @@ -24277,6 +25219,9 @@ func (s *Server) decodeTestRequestRequiredStringURIArrayRequest(r *http.Request) }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -24358,6 +25303,9 @@ func (s *Server) decodeTestRequestRequiredStringURIArrayArrayRequest(r *http.Req }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -24438,6 +25386,9 @@ func (s *Server) decodeTestRequestRequiredStringURINullableRequest(r *http.Reque }(); err != nil { 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) @@ -24501,6 +25452,9 @@ func (s *Server) decodeTestRequestRequiredStringURINullableArrayRequest(r *http. }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -24580,6 +25534,9 @@ func (s *Server) decodeTestRequestRequiredStringURINullableArrayArrayRequest(r * }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -24662,6 +25619,9 @@ func (s *Server) decodeTestRequestRequiredStringUUIDRequest(r *http.Request) ( }(); err != nil { 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) @@ -24727,6 +25687,9 @@ func (s *Server) decodeTestRequestRequiredStringUUIDArrayRequest(r *http.Request }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -24808,6 +25771,9 @@ func (s *Server) decodeTestRequestRequiredStringUUIDArrayArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -24888,6 +25854,9 @@ func (s *Server) decodeTestRequestRequiredStringUUIDNullableRequest(r *http.Requ }(); err != nil { 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) @@ -24951,6 +25920,9 @@ func (s *Server) decodeTestRequestRequiredStringUUIDNullableArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -25030,6 +26002,9 @@ func (s *Server) decodeTestRequestRequiredStringUUIDNullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -25112,6 +26087,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixRequest(r *http.Request) ( }(); err != nil { 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) @@ -25177,6 +26155,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixArrayRequest(r *http.Request }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -25258,6 +26239,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixArrayArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -25340,6 +26324,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroRequest(r *http.Request }(); err != nil { 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) @@ -25405,6 +26392,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -25486,6 +26476,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroArrayArrayRequest(r *ht }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -25566,6 +26559,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroNullableRequest(r *http }(); err != nil { 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) @@ -25629,6 +26625,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroNullableArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -25708,6 +26707,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMicroNullableArrayArrayReque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -25790,6 +26792,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliRequest(r *http.Request }(); err != nil { 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) @@ -25855,6 +26860,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliArrayRequest(r *http.Re }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -25936,6 +26944,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliArrayArrayRequest(r *ht }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -26016,6 +27027,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliNullableRequest(r *http }(); err != nil { 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) @@ -26079,6 +27093,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliNullableArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -26158,6 +27175,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixMilliNullableArrayArrayReque }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -26240,6 +27260,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoRequest(r *http.Request) }(); err != nil { 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) @@ -26305,6 +27328,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoArrayRequest(r *http.Req }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -26386,6 +27412,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoArrayArrayRequest(r *htt }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -26466,6 +27495,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoNullableRequest(r *http. }(); err != nil { 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) @@ -26529,6 +27561,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoNullableArrayRequest(r * }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -26608,6 +27643,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixNanoNullableArrayArrayReques }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -26688,6 +27726,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixNullableRequest(r *http.Requ }(); err != nil { 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) @@ -26751,6 +27792,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixNullableArrayRequest(r *http }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -26830,6 +27874,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixNullableArrayArrayRequest(r }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -26912,6 +27959,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsRequest(r *http.Reque }(); err != nil { 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) @@ -26977,6 +28027,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsArrayRequest(r *http. }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -27058,6 +28111,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsArrayArrayRequest(r * }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -27138,6 +28194,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsNullableRequest(r *ht }(); err != nil { 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) @@ -27201,6 +28260,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsNullableArrayRequest( }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -27280,6 +28342,9 @@ func (s *Server) decodeTestRequestRequiredStringUnixSecondsNullableArrayArrayReq }(); err != nil { 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 { if request == nil { return errors.New("nil is invalid value") @@ -27364,6 +28429,9 @@ func (s *Server) decodeTestRequestStringRequest(r *http.Request) ( }(); err != nil { 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) @@ -27432,6 +28500,9 @@ func (s *Server) decodeTestRequestStringArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -27508,6 +28579,9 @@ func (s *Server) decodeTestRequestStringArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -27589,6 +28663,9 @@ func (s *Server) decodeTestRequestStringBinaryRequest(r *http.Request) ( }(); err != nil { 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) @@ -27657,6 +28734,9 @@ func (s *Server) decodeTestRequestStringBinaryArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -27733,6 +28813,9 @@ func (s *Server) decodeTestRequestStringBinaryArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -27814,6 +28897,9 @@ func (s *Server) decodeTestRequestStringBinaryNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -27880,6 +28966,9 @@ func (s *Server) decodeTestRequestStringBinaryNullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -27954,6 +29043,9 @@ func (s *Server) decodeTestRequestStringBinaryNullableArrayArrayRequest(r *http. }(); err != nil { 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 { @@ -28036,6 +29128,9 @@ func (s *Server) decodeTestRequestStringByteRequest(r *http.Request) ( }(); err != nil { 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) @@ -28104,6 +29199,9 @@ func (s *Server) decodeTestRequestStringByteArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -28180,6 +29278,9 @@ func (s *Server) decodeTestRequestStringByteArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -28261,6 +29362,9 @@ func (s *Server) decodeTestRequestStringByteNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -28329,6 +29433,9 @@ func (s *Server) decodeTestRequestStringByteNullableArrayRequest(r *http.Request }(); err != nil { 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) @@ -28405,6 +29512,9 @@ func (s *Server) decodeTestRequestStringByteNullableArrayArrayRequest(r *http.Re }(); err != nil { 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 { @@ -28486,6 +29596,9 @@ func (s *Server) decodeTestRequestStringDateRequest(r *http.Request) ( }(); err != nil { 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) @@ -28554,6 +29667,9 @@ func (s *Server) decodeTestRequestStringDateArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -28630,6 +29746,9 @@ func (s *Server) decodeTestRequestStringDateArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -28711,6 +29830,9 @@ func (s *Server) decodeTestRequestStringDateNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -28777,6 +29899,9 @@ func (s *Server) decodeTestRequestStringDateNullableArrayRequest(r *http.Request }(); err != nil { 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) @@ -28851,6 +29976,9 @@ func (s *Server) decodeTestRequestStringDateNullableArrayArrayRequest(r *http.Re }(); err != nil { 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 { @@ -28932,6 +30060,9 @@ func (s *Server) decodeTestRequestStringDateTimeRequest(r *http.Request) ( }(); err != nil { 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) @@ -29000,6 +30131,9 @@ func (s *Server) decodeTestRequestStringDateTimeArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -29076,6 +30210,9 @@ func (s *Server) decodeTestRequestStringDateTimeArrayArrayRequest(r *http.Reques }(); err != nil { 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 { @@ -29157,6 +30294,9 @@ func (s *Server) decodeTestRequestStringDateTimeNullableRequest(r *http.Request) }(); err != nil { 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) @@ -29223,6 +30363,9 @@ func (s *Server) decodeTestRequestStringDateTimeNullableArrayRequest(r *http.Req }(); err != nil { 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) @@ -29297,6 +30440,9 @@ func (s *Server) decodeTestRequestStringDateTimeNullableArrayArrayRequest(r *htt }(); err != nil { 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 { @@ -29378,6 +30524,9 @@ func (s *Server) decodeTestRequestStringDurationRequest(r *http.Request) ( }(); err != nil { 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) @@ -29446,6 +30595,9 @@ func (s *Server) decodeTestRequestStringDurationArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -29522,6 +30674,9 @@ func (s *Server) decodeTestRequestStringDurationArrayArrayRequest(r *http.Reques }(); err != nil { 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 { @@ -29603,6 +30758,9 @@ func (s *Server) decodeTestRequestStringDurationNullableRequest(r *http.Request) }(); err != nil { 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) @@ -29669,6 +30827,9 @@ func (s *Server) decodeTestRequestStringDurationNullableArrayRequest(r *http.Req }(); err != nil { 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) @@ -29743,6 +30904,9 @@ func (s *Server) decodeTestRequestStringDurationNullableArrayArrayRequest(r *htt }(); err != nil { 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 { @@ -29824,6 +30988,9 @@ func (s *Server) decodeTestRequestStringEmailRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -29915,6 +31082,9 @@ func (s *Server) decodeTestRequestStringEmailArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -30021,6 +31191,9 @@ func (s *Server) decodeTestRequestStringEmailArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -30127,6 +31300,9 @@ func (s *Server) decodeTestRequestStringEmailNullableRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -30216,6 +31392,9 @@ func (s *Server) decodeTestRequestStringEmailNullableArrayRequest(r *http.Reques }(); err != nil { 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 { @@ -30320,6 +31499,9 @@ func (s *Server) decodeTestRequestStringEmailNullableArrayArrayRequest(r *http.R }(); err != nil { 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 { @@ -30426,6 +31608,9 @@ func (s *Server) decodeTestRequestStringHostnameRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -30517,6 +31702,9 @@ func (s *Server) decodeTestRequestStringHostnameArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -30623,6 +31811,9 @@ func (s *Server) decodeTestRequestStringHostnameArrayArrayRequest(r *http.Reques }(); err != nil { 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 { @@ -30729,6 +31920,9 @@ func (s *Server) decodeTestRequestStringHostnameNullableRequest(r *http.Request) }(); err != nil { 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 { if request.Set { if err := func() error { @@ -30818,6 +32012,9 @@ func (s *Server) decodeTestRequestStringHostnameNullableArrayRequest(r *http.Req }(); err != nil { 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 { @@ -30922,6 +32119,9 @@ func (s *Server) decodeTestRequestStringHostnameNullableArrayArrayRequest(r *htt }(); err != nil { 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 { @@ -31028,6 +32228,9 @@ func (s *Server) decodeTestRequestStringIPRequest(r *http.Request) ( }(); err != nil { 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) @@ -31096,6 +32299,9 @@ func (s *Server) decodeTestRequestStringIPArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -31172,6 +32378,9 @@ func (s *Server) decodeTestRequestStringIPArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -31253,6 +32462,9 @@ func (s *Server) decodeTestRequestStringIPNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -31319,6 +32531,9 @@ func (s *Server) decodeTestRequestStringIPNullableArrayRequest(r *http.Request) }(); err != nil { 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) @@ -31393,6 +32608,9 @@ func (s *Server) decodeTestRequestStringIPNullableArrayArrayRequest(r *http.Requ }(); err != nil { 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 { @@ -31474,6 +32692,9 @@ func (s *Server) decodeTestRequestStringInt32Request(r *http.Request) ( }(); err != nil { 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) @@ -31542,6 +32763,9 @@ func (s *Server) decodeTestRequestStringInt32ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -31618,6 +32842,9 @@ func (s *Server) decodeTestRequestStringInt32ArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -31699,6 +32926,9 @@ func (s *Server) decodeTestRequestStringInt32NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -31765,6 +32995,9 @@ func (s *Server) decodeTestRequestStringInt32NullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -31839,6 +33072,9 @@ func (s *Server) decodeTestRequestStringInt32NullableArrayArrayRequest(r *http.R }(); err != nil { 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 { @@ -31920,6 +33156,9 @@ func (s *Server) decodeTestRequestStringInt64Request(r *http.Request) ( }(); err != nil { 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) @@ -31988,6 +33227,9 @@ func (s *Server) decodeTestRequestStringInt64ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -32064,6 +33306,9 @@ func (s *Server) decodeTestRequestStringInt64ArrayArrayRequest(r *http.Request) }(); err != nil { 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 { @@ -32145,6 +33390,9 @@ func (s *Server) decodeTestRequestStringInt64NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -32211,6 +33459,9 @@ func (s *Server) decodeTestRequestStringInt64NullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -32285,6 +33536,9 @@ func (s *Server) decodeTestRequestStringInt64NullableArrayArrayRequest(r *http.R }(); err != nil { 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 { @@ -32366,6 +33620,9 @@ func (s *Server) decodeTestRequestStringIpv4Request(r *http.Request) ( }(); err != nil { 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) @@ -32434,6 +33691,9 @@ func (s *Server) decodeTestRequestStringIpv4ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -32510,6 +33770,9 @@ func (s *Server) decodeTestRequestStringIpv4ArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -32591,6 +33854,9 @@ func (s *Server) decodeTestRequestStringIpv4NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -32657,6 +33923,9 @@ func (s *Server) decodeTestRequestStringIpv4NullableArrayRequest(r *http.Request }(); err != nil { 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) @@ -32731,6 +34000,9 @@ func (s *Server) decodeTestRequestStringIpv4NullableArrayArrayRequest(r *http.Re }(); err != nil { 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 { @@ -32812,6 +34084,9 @@ func (s *Server) decodeTestRequestStringIpv6Request(r *http.Request) ( }(); err != nil { 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) @@ -32880,6 +34155,9 @@ func (s *Server) decodeTestRequestStringIpv6ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -32956,6 +34234,9 @@ func (s *Server) decodeTestRequestStringIpv6ArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -33037,6 +34318,9 @@ func (s *Server) decodeTestRequestStringIpv6NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -33103,6 +34387,9 @@ func (s *Server) decodeTestRequestStringIpv6NullableArrayRequest(r *http.Request }(); err != nil { 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) @@ -33177,6 +34464,9 @@ func (s *Server) decodeTestRequestStringIpv6NullableArrayArrayRequest(r *http.Re }(); err != nil { 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 { @@ -33258,6 +34548,9 @@ func (s *Server) decodeTestRequestStringNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -33324,6 +34617,9 @@ func (s *Server) decodeTestRequestStringNullableArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -33398,6 +34694,9 @@ func (s *Server) decodeTestRequestStringNullableArrayArrayRequest(r *http.Reques }(); err != nil { 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 { @@ -33479,6 +34778,9 @@ func (s *Server) decodeTestRequestStringPasswordRequest(r *http.Request) ( }(); err != nil { 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) @@ -33547,6 +34849,9 @@ func (s *Server) decodeTestRequestStringPasswordArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -33623,6 +34928,9 @@ func (s *Server) decodeTestRequestStringPasswordArrayArrayRequest(r *http.Reques }(); err != nil { 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 { @@ -33704,6 +35012,9 @@ func (s *Server) decodeTestRequestStringPasswordNullableRequest(r *http.Request) }(); err != nil { 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) @@ -33770,6 +35081,9 @@ func (s *Server) decodeTestRequestStringPasswordNullableArrayRequest(r *http.Req }(); err != nil { 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) @@ -33844,6 +35158,9 @@ func (s *Server) decodeTestRequestStringPasswordNullableArrayArrayRequest(r *htt }(); err != nil { 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 { @@ -33925,6 +35242,9 @@ func (s *Server) decodeTestRequestStringTimeRequest(r *http.Request) ( }(); err != nil { 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) @@ -33993,6 +35313,9 @@ func (s *Server) decodeTestRequestStringTimeArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -34069,6 +35392,9 @@ func (s *Server) decodeTestRequestStringTimeArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -34150,6 +35476,9 @@ func (s *Server) decodeTestRequestStringTimeNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -34216,6 +35545,9 @@ func (s *Server) decodeTestRequestStringTimeNullableArrayRequest(r *http.Request }(); err != nil { 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) @@ -34290,6 +35622,9 @@ func (s *Server) decodeTestRequestStringTimeNullableArrayArrayRequest(r *http.Re }(); err != nil { 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 { @@ -34371,6 +35706,9 @@ func (s *Server) decodeTestRequestStringURIRequest(r *http.Request) ( }(); err != nil { 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) @@ -34439,6 +35777,9 @@ func (s *Server) decodeTestRequestStringURIArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -34515,6 +35856,9 @@ func (s *Server) decodeTestRequestStringURIArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -34596,6 +35940,9 @@ func (s *Server) decodeTestRequestStringURINullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -34662,6 +36009,9 @@ func (s *Server) decodeTestRequestStringURINullableArrayRequest(r *http.Request) }(); err != nil { 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) @@ -34736,6 +36086,9 @@ func (s *Server) decodeTestRequestStringURINullableArrayArrayRequest(r *http.Req }(); err != nil { 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 { @@ -34817,6 +36170,9 @@ func (s *Server) decodeTestRequestStringUUIDRequest(r *http.Request) ( }(); err != nil { 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) @@ -34885,6 +36241,9 @@ func (s *Server) decodeTestRequestStringUUIDArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -34961,6 +36320,9 @@ func (s *Server) decodeTestRequestStringUUIDArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -35042,6 +36404,9 @@ func (s *Server) decodeTestRequestStringUUIDNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -35108,6 +36473,9 @@ func (s *Server) decodeTestRequestStringUUIDNullableArrayRequest(r *http.Request }(); err != nil { 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) @@ -35182,6 +36550,9 @@ func (s *Server) decodeTestRequestStringUUIDNullableArrayArrayRequest(r *http.Re }(); err != nil { 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 { @@ -35263,6 +36634,9 @@ func (s *Server) decodeTestRequestStringUnixRequest(r *http.Request) ( }(); err != nil { 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) @@ -35331,6 +36705,9 @@ func (s *Server) decodeTestRequestStringUnixArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -35407,6 +36784,9 @@ func (s *Server) decodeTestRequestStringUnixArrayArrayRequest(r *http.Request) ( }(); err != nil { 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 { @@ -35488,6 +36868,9 @@ func (s *Server) decodeTestRequestStringUnixMicroRequest(r *http.Request) ( }(); err != nil { 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) @@ -35556,6 +36939,9 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -35632,6 +37018,9 @@ func (s *Server) decodeTestRequestStringUnixMicroArrayArrayRequest(r *http.Reque }(); err != nil { 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 { @@ -35713,6 +37102,9 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableRequest(r *http.Request }(); err != nil { 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) @@ -35779,6 +37171,9 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayRequest(r *http.Re }(); err != nil { 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) @@ -35853,6 +37248,9 @@ func (s *Server) decodeTestRequestStringUnixMicroNullableArrayArrayRequest(r *ht }(); err != nil { 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 { @@ -35934,6 +37332,9 @@ func (s *Server) decodeTestRequestStringUnixMilliRequest(r *http.Request) ( }(); err != nil { 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) @@ -36002,6 +37403,9 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -36078,6 +37482,9 @@ func (s *Server) decodeTestRequestStringUnixMilliArrayArrayRequest(r *http.Reque }(); err != nil { 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 { @@ -36159,6 +37566,9 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableRequest(r *http.Request }(); err != nil { 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) @@ -36225,6 +37635,9 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayRequest(r *http.Re }(); err != nil { 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) @@ -36299,6 +37712,9 @@ func (s *Server) decodeTestRequestStringUnixMilliNullableArrayArrayRequest(r *ht }(); err != nil { 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 { @@ -36380,6 +37796,9 @@ func (s *Server) decodeTestRequestStringUnixNanoRequest(r *http.Request) ( }(); err != nil { 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) @@ -36448,6 +37867,9 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -36524,6 +37946,9 @@ func (s *Server) decodeTestRequestStringUnixNanoArrayArrayRequest(r *http.Reques }(); err != nil { 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 { @@ -36605,6 +38030,9 @@ func (s *Server) decodeTestRequestStringUnixNanoNullableRequest(r *http.Request) }(); err != nil { 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) @@ -36671,6 +38099,9 @@ func (s *Server) decodeTestRequestStringUnixNanoNullableArrayRequest(r *http.Req }(); err != nil { 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) @@ -36745,6 +38176,9 @@ func (s *Server) decodeTestRequestStringUnixNanoNullableArrayArrayRequest(r *htt }(); err != nil { 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 { @@ -36826,6 +38260,9 @@ func (s *Server) decodeTestRequestStringUnixNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -36892,6 +38329,9 @@ func (s *Server) decodeTestRequestStringUnixNullableArrayRequest(r *http.Request }(); err != nil { 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) @@ -36966,6 +38406,9 @@ func (s *Server) decodeTestRequestStringUnixNullableArrayArrayRequest(r *http.Re }(); err != nil { 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 { @@ -37047,6 +38490,9 @@ func (s *Server) decodeTestRequestStringUnixSecondsRequest(r *http.Request) ( }(); err != nil { 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) @@ -37115,6 +38561,9 @@ func (s *Server) decodeTestRequestStringUnixSecondsArrayRequest(r *http.Request) }(); err != nil { 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) @@ -37191,6 +38640,9 @@ func (s *Server) decodeTestRequestStringUnixSecondsArrayArrayRequest(r *http.Req }(); err != nil { 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 { @@ -37272,6 +38724,9 @@ func (s *Server) decodeTestRequestStringUnixSecondsNullableRequest(r *http.Reque }(); err != nil { 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) @@ -37338,6 +38793,9 @@ func (s *Server) decodeTestRequestStringUnixSecondsNullableArrayRequest(r *http. }(); err != nil { 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) @@ -37412,6 +38870,9 @@ func (s *Server) decodeTestRequestStringUnixSecondsNullableArrayArrayRequest(r * }(); err != nil { 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 { @@ -37491,6 +38952,9 @@ func (s *Server) decodeTestResponseAnyRequest(r *http.Request) ( }(); err != nil { 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) @@ -37548,6 +39012,9 @@ func (s *Server) decodeTestResponseBooleanRequest(r *http.Request) ( }(); err != nil { 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) @@ -37605,6 +39072,9 @@ func (s *Server) decodeTestResponseBooleanArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -37662,6 +39132,9 @@ func (s *Server) decodeTestResponseBooleanArrayArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -37719,6 +39192,9 @@ func (s *Server) decodeTestResponseBooleanNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -37776,6 +39252,9 @@ func (s *Server) decodeTestResponseBooleanNullableArrayRequest(r *http.Request) }(); err != nil { 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) @@ -37833,6 +39312,9 @@ func (s *Server) decodeTestResponseBooleanNullableArrayArrayRequest(r *http.Requ }(); err != nil { 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) @@ -37890,6 +39372,9 @@ func (s *Server) decodeTestResponseEmptyStructRequest(r *http.Request) ( }(); err != nil { 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) @@ -37947,6 +39432,9 @@ func (s *Server) decodeTestResponseFormatTestRequest(r *http.Request) ( }(); err != nil { 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) @@ -38004,6 +39492,9 @@ func (s *Server) decodeTestResponseIntegerRequest(r *http.Request) ( }(); err != nil { 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) @@ -38061,6 +39552,9 @@ func (s *Server) decodeTestResponseIntegerArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -38118,6 +39612,9 @@ func (s *Server) decodeTestResponseIntegerArrayArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -38175,6 +39672,9 @@ func (s *Server) decodeTestResponseIntegerInt32Request(r *http.Request) ( }(); err != nil { 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) @@ -38232,6 +39732,9 @@ func (s *Server) decodeTestResponseIntegerInt32ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -38289,6 +39792,9 @@ func (s *Server) decodeTestResponseIntegerInt32ArrayArrayRequest(r *http.Request }(); err != nil { 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) @@ -38346,6 +39852,9 @@ func (s *Server) decodeTestResponseIntegerInt32NullableRequest(r *http.Request) }(); err != nil { 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) @@ -38403,6 +39912,9 @@ func (s *Server) decodeTestResponseIntegerInt32NullableArrayRequest(r *http.Requ }(); err != nil { 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) @@ -38460,6 +39972,9 @@ func (s *Server) decodeTestResponseIntegerInt32NullableArrayArrayRequest(r *http }(); err != nil { 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) @@ -38517,6 +40032,9 @@ func (s *Server) decodeTestResponseIntegerInt64Request(r *http.Request) ( }(); err != nil { 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) @@ -38574,6 +40092,9 @@ func (s *Server) decodeTestResponseIntegerInt64ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -38631,6 +40152,9 @@ func (s *Server) decodeTestResponseIntegerInt64ArrayArrayRequest(r *http.Request }(); err != nil { 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) @@ -38688,6 +40212,9 @@ func (s *Server) decodeTestResponseIntegerInt64NullableRequest(r *http.Request) }(); err != nil { 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) @@ -38745,6 +40272,9 @@ func (s *Server) decodeTestResponseIntegerInt64NullableArrayRequest(r *http.Requ }(); err != nil { 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) @@ -38802,6 +40332,9 @@ func (s *Server) decodeTestResponseIntegerInt64NullableArrayArrayRequest(r *http }(); err != nil { 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) @@ -38859,6 +40392,9 @@ func (s *Server) decodeTestResponseIntegerNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -38916,6 +40452,9 @@ func (s *Server) decodeTestResponseIntegerNullableArrayRequest(r *http.Request) }(); err != nil { 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) @@ -38973,6 +40512,9 @@ func (s *Server) decodeTestResponseIntegerNullableArrayArrayRequest(r *http.Requ }(); err != nil { 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) @@ -39030,6 +40572,9 @@ func (s *Server) decodeTestResponseIntegerUintRequest(r *http.Request) ( }(); err != nil { 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) @@ -39087,6 +40632,9 @@ func (s *Server) decodeTestResponseIntegerUint32Request(r *http.Request) ( }(); err != nil { 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) @@ -39144,6 +40692,9 @@ func (s *Server) decodeTestResponseIntegerUint32ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -39201,6 +40752,9 @@ func (s *Server) decodeTestResponseIntegerUint32ArrayArrayRequest(r *http.Reques }(); err != nil { 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) @@ -39258,6 +40812,9 @@ func (s *Server) decodeTestResponseIntegerUint32NullableRequest(r *http.Request) }(); err != nil { 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) @@ -39315,6 +40872,9 @@ func (s *Server) decodeTestResponseIntegerUint32NullableArrayRequest(r *http.Req }(); err != nil { 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) @@ -39372,6 +40932,9 @@ func (s *Server) decodeTestResponseIntegerUint32NullableArrayArrayRequest(r *htt }(); err != nil { 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) @@ -39429,6 +40992,9 @@ func (s *Server) decodeTestResponseIntegerUint64Request(r *http.Request) ( }(); err != nil { 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) @@ -39486,6 +41052,9 @@ func (s *Server) decodeTestResponseIntegerUint64ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -39543,6 +41112,9 @@ func (s *Server) decodeTestResponseIntegerUint64ArrayArrayRequest(r *http.Reques }(); err != nil { 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) @@ -39600,6 +41172,9 @@ func (s *Server) decodeTestResponseIntegerUint64NullableRequest(r *http.Request) }(); err != nil { 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) @@ -39657,6 +41232,9 @@ func (s *Server) decodeTestResponseIntegerUint64NullableArrayRequest(r *http.Req }(); err != nil { 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) @@ -39714,6 +41292,9 @@ func (s *Server) decodeTestResponseIntegerUint64NullableArrayArrayRequest(r *htt }(); err != nil { 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) @@ -39771,6 +41352,9 @@ func (s *Server) decodeTestResponseIntegerUintArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -39828,6 +41412,9 @@ func (s *Server) decodeTestResponseIntegerUintArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -39885,6 +41472,9 @@ func (s *Server) decodeTestResponseIntegerUintNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -39942,6 +41532,9 @@ func (s *Server) decodeTestResponseIntegerUintNullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -39999,6 +41592,9 @@ func (s *Server) decodeTestResponseIntegerUintNullableArrayArrayRequest(r *http. }(); err != nil { 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) @@ -40056,6 +41652,9 @@ func (s *Server) decodeTestResponseIntegerUnixRequest(r *http.Request) ( }(); err != nil { 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) @@ -40113,6 +41712,9 @@ func (s *Server) decodeTestResponseIntegerUnixArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -40170,6 +41772,9 @@ func (s *Server) decodeTestResponseIntegerUnixArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -40227,6 +41832,9 @@ func (s *Server) decodeTestResponseIntegerUnixMicroRequest(r *http.Request) ( }(); err != nil { 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) @@ -40284,6 +41892,9 @@ func (s *Server) decodeTestResponseIntegerUnixMicroArrayRequest(r *http.Request) }(); err != nil { 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) @@ -40341,6 +41952,9 @@ func (s *Server) decodeTestResponseIntegerUnixMicroArrayArrayRequest(r *http.Req }(); err != nil { 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) @@ -40398,6 +42012,9 @@ func (s *Server) decodeTestResponseIntegerUnixMicroNullableRequest(r *http.Reque }(); err != nil { 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) @@ -40455,6 +42072,9 @@ func (s *Server) decodeTestResponseIntegerUnixMicroNullableArrayRequest(r *http. }(); err != nil { 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) @@ -40512,6 +42132,9 @@ func (s *Server) decodeTestResponseIntegerUnixMicroNullableArrayArrayRequest(r * }(); err != nil { 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) @@ -40569,6 +42192,9 @@ func (s *Server) decodeTestResponseIntegerUnixMilliRequest(r *http.Request) ( }(); err != nil { 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) @@ -40626,6 +42252,9 @@ func (s *Server) decodeTestResponseIntegerUnixMilliArrayRequest(r *http.Request) }(); err != nil { 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) @@ -40683,6 +42312,9 @@ func (s *Server) decodeTestResponseIntegerUnixMilliArrayArrayRequest(r *http.Req }(); err != nil { 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) @@ -40740,6 +42372,9 @@ func (s *Server) decodeTestResponseIntegerUnixMilliNullableRequest(r *http.Reque }(); err != nil { 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) @@ -40797,6 +42432,9 @@ func (s *Server) decodeTestResponseIntegerUnixMilliNullableArrayRequest(r *http. }(); err != nil { 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) @@ -40854,6 +42492,9 @@ func (s *Server) decodeTestResponseIntegerUnixMilliNullableArrayArrayRequest(r * }(); err != nil { 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) @@ -40911,6 +42552,9 @@ func (s *Server) decodeTestResponseIntegerUnixNanoRequest(r *http.Request) ( }(); err != nil { 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) @@ -40968,6 +42612,9 @@ func (s *Server) decodeTestResponseIntegerUnixNanoArrayRequest(r *http.Request) }(); err != nil { 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) @@ -41025,6 +42672,9 @@ func (s *Server) decodeTestResponseIntegerUnixNanoArrayArrayRequest(r *http.Requ }(); err != nil { 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) @@ -41082,6 +42732,9 @@ func (s *Server) decodeTestResponseIntegerUnixNanoNullableRequest(r *http.Reques }(); err != nil { 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) @@ -41139,6 +42792,9 @@ func (s *Server) decodeTestResponseIntegerUnixNanoNullableArrayRequest(r *http.R }(); err != nil { 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) @@ -41196,6 +42852,9 @@ func (s *Server) decodeTestResponseIntegerUnixNanoNullableArrayArrayRequest(r *h }(); err != nil { 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) @@ -41253,6 +42912,9 @@ func (s *Server) decodeTestResponseIntegerUnixNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -41310,6 +42972,9 @@ func (s *Server) decodeTestResponseIntegerUnixNullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -41367,6 +43032,9 @@ func (s *Server) decodeTestResponseIntegerUnixNullableArrayArrayRequest(r *http. }(); err != nil { 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) @@ -41424,6 +43092,9 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsRequest(r *http.Request) ( }(); err != nil { 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) @@ -41481,6 +43152,9 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsArrayRequest(r *http.Reques }(); err != nil { 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) @@ -41538,6 +43212,9 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsArrayArrayRequest(r *http.R }(); err != nil { 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) @@ -41595,6 +43272,9 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsNullableRequest(r *http.Req }(); err != nil { 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) @@ -41652,6 +43332,9 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsNullableArrayRequest(r *htt }(); err != nil { 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) @@ -41709,6 +43392,9 @@ func (s *Server) decodeTestResponseIntegerUnixSecondsNullableArrayArrayRequest(r }(); err != nil { 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) @@ -41766,6 +43452,9 @@ func (s *Server) decodeTestResponseNullRequest(r *http.Request) ( }(); err != nil { 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) @@ -41823,6 +43512,9 @@ func (s *Server) decodeTestResponseNullArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -41880,6 +43572,9 @@ func (s *Server) decodeTestResponseNullArrayArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -41937,6 +43632,9 @@ func (s *Server) decodeTestResponseNullNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -41994,6 +43692,9 @@ func (s *Server) decodeTestResponseNullNullableArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -42051,6 +43752,9 @@ func (s *Server) decodeTestResponseNullNullableArrayArrayRequest(r *http.Request }(); err != nil { 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) @@ -42108,6 +43812,9 @@ func (s *Server) decodeTestResponseNumberRequest(r *http.Request) ( }(); err != nil { 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) @@ -42165,6 +43872,9 @@ func (s *Server) decodeTestResponseNumberArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -42222,6 +43932,9 @@ func (s *Server) decodeTestResponseNumberArrayArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -42279,6 +43992,9 @@ func (s *Server) decodeTestResponseNumberDoubleRequest(r *http.Request) ( }(); err != nil { 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) @@ -42336,6 +44052,9 @@ func (s *Server) decodeTestResponseNumberDoubleArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -42393,6 +44112,9 @@ func (s *Server) decodeTestResponseNumberDoubleArrayArrayRequest(r *http.Request }(); err != nil { 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) @@ -42450,6 +44172,9 @@ func (s *Server) decodeTestResponseNumberDoubleNullableRequest(r *http.Request) }(); err != nil { 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) @@ -42507,6 +44232,9 @@ func (s *Server) decodeTestResponseNumberDoubleNullableArrayRequest(r *http.Requ }(); err != nil { 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) @@ -42564,6 +44292,9 @@ func (s *Server) decodeTestResponseNumberDoubleNullableArrayArrayRequest(r *http }(); err != nil { 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) @@ -42621,6 +44352,9 @@ func (s *Server) decodeTestResponseNumberFloatRequest(r *http.Request) ( }(); err != nil { 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) @@ -42678,6 +44412,9 @@ func (s *Server) decodeTestResponseNumberFloatArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -42735,6 +44472,9 @@ func (s *Server) decodeTestResponseNumberFloatArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -42792,6 +44532,9 @@ func (s *Server) decodeTestResponseNumberFloatNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -42849,6 +44592,9 @@ func (s *Server) decodeTestResponseNumberFloatNullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -42906,6 +44652,9 @@ func (s *Server) decodeTestResponseNumberFloatNullableArrayArrayRequest(r *http. }(); err != nil { 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) @@ -42963,6 +44712,9 @@ func (s *Server) decodeTestResponseNumberInt32Request(r *http.Request) ( }(); err != nil { 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) @@ -43020,6 +44772,9 @@ func (s *Server) decodeTestResponseNumberInt32ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -43077,6 +44832,9 @@ func (s *Server) decodeTestResponseNumberInt32ArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -43134,6 +44892,9 @@ func (s *Server) decodeTestResponseNumberInt32NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -43191,6 +44952,9 @@ func (s *Server) decodeTestResponseNumberInt32NullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -43248,6 +45012,9 @@ func (s *Server) decodeTestResponseNumberInt32NullableArrayArrayRequest(r *http. }(); err != nil { 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) @@ -43305,6 +45072,9 @@ func (s *Server) decodeTestResponseNumberInt64Request(r *http.Request) ( }(); err != nil { 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) @@ -43362,6 +45132,9 @@ func (s *Server) decodeTestResponseNumberInt64ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -43419,6 +45192,9 @@ func (s *Server) decodeTestResponseNumberInt64ArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -43476,6 +45252,9 @@ func (s *Server) decodeTestResponseNumberInt64NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -43533,6 +45312,9 @@ func (s *Server) decodeTestResponseNumberInt64NullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -43590,6 +45372,9 @@ func (s *Server) decodeTestResponseNumberInt64NullableArrayArrayRequest(r *http. }(); err != nil { 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) @@ -43647,6 +45432,9 @@ func (s *Server) decodeTestResponseNumberNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -43704,6 +45492,9 @@ func (s *Server) decodeTestResponseNumberNullableArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -43761,6 +45552,9 @@ func (s *Server) decodeTestResponseNumberNullableArrayArrayRequest(r *http.Reque }(); err != nil { 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) @@ -43818,6 +45612,9 @@ func (s *Server) decodeTestResponseStringRequest(r *http.Request) ( }(); err != nil { 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) @@ -43875,6 +45672,9 @@ func (s *Server) decodeTestResponseStringArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -43932,6 +45732,9 @@ func (s *Server) decodeTestResponseStringArrayArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -43989,6 +45792,9 @@ func (s *Server) decodeTestResponseStringBinaryRequest(r *http.Request) ( }(); err != nil { 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) @@ -44046,6 +45852,9 @@ func (s *Server) decodeTestResponseStringBinaryArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -44103,6 +45912,9 @@ func (s *Server) decodeTestResponseStringBinaryArrayArrayRequest(r *http.Request }(); err != nil { 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) @@ -44160,6 +45972,9 @@ func (s *Server) decodeTestResponseStringBinaryNullableRequest(r *http.Request) }(); err != nil { 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) @@ -44217,6 +46032,9 @@ func (s *Server) decodeTestResponseStringBinaryNullableArrayRequest(r *http.Requ }(); err != nil { 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) @@ -44274,6 +46092,9 @@ func (s *Server) decodeTestResponseStringBinaryNullableArrayArrayRequest(r *http }(); err != nil { 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) @@ -44331,6 +46152,9 @@ func (s *Server) decodeTestResponseStringByteRequest(r *http.Request) ( }(); err != nil { 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) @@ -44388,6 +46212,9 @@ func (s *Server) decodeTestResponseStringByteArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -44445,6 +46272,9 @@ func (s *Server) decodeTestResponseStringByteArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -44502,6 +46332,9 @@ func (s *Server) decodeTestResponseStringByteNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -44559,6 +46392,9 @@ func (s *Server) decodeTestResponseStringByteNullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -44616,6 +46452,9 @@ func (s *Server) decodeTestResponseStringByteNullableArrayArrayRequest(r *http.R }(); err != nil { 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) @@ -44673,6 +46512,9 @@ func (s *Server) decodeTestResponseStringDateRequest(r *http.Request) ( }(); err != nil { 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) @@ -44730,6 +46572,9 @@ func (s *Server) decodeTestResponseStringDateArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -44787,6 +46632,9 @@ func (s *Server) decodeTestResponseStringDateArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -44844,6 +46692,9 @@ func (s *Server) decodeTestResponseStringDateNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -44901,6 +46752,9 @@ func (s *Server) decodeTestResponseStringDateNullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -44958,6 +46812,9 @@ func (s *Server) decodeTestResponseStringDateNullableArrayArrayRequest(r *http.R }(); err != nil { 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) @@ -45015,6 +46872,9 @@ func (s *Server) decodeTestResponseStringDateTimeRequest(r *http.Request) ( }(); err != nil { 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) @@ -45072,6 +46932,9 @@ func (s *Server) decodeTestResponseStringDateTimeArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -45129,6 +46992,9 @@ func (s *Server) decodeTestResponseStringDateTimeArrayArrayRequest(r *http.Reque }(); err != nil { 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) @@ -45186,6 +47052,9 @@ func (s *Server) decodeTestResponseStringDateTimeNullableRequest(r *http.Request }(); err != nil { 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) @@ -45243,6 +47112,9 @@ func (s *Server) decodeTestResponseStringDateTimeNullableArrayRequest(r *http.Re }(); err != nil { 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) @@ -45300,6 +47172,9 @@ func (s *Server) decodeTestResponseStringDateTimeNullableArrayArrayRequest(r *ht }(); err != nil { 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) @@ -45357,6 +47232,9 @@ func (s *Server) decodeTestResponseStringDurationRequest(r *http.Request) ( }(); err != nil { 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) @@ -45414,6 +47292,9 @@ func (s *Server) decodeTestResponseStringDurationArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -45471,6 +47352,9 @@ func (s *Server) decodeTestResponseStringDurationArrayArrayRequest(r *http.Reque }(); err != nil { 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) @@ -45528,6 +47412,9 @@ func (s *Server) decodeTestResponseStringDurationNullableRequest(r *http.Request }(); err != nil { 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) @@ -45585,6 +47472,9 @@ func (s *Server) decodeTestResponseStringDurationNullableArrayRequest(r *http.Re }(); err != nil { 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) @@ -45642,6 +47532,9 @@ func (s *Server) decodeTestResponseStringDurationNullableArrayArrayRequest(r *ht }(); err != nil { 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) @@ -45699,6 +47592,9 @@ func (s *Server) decodeTestResponseStringEmailRequest(r *http.Request) ( }(); err != nil { 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) @@ -45756,6 +47652,9 @@ func (s *Server) decodeTestResponseStringEmailArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -45813,6 +47712,9 @@ func (s *Server) decodeTestResponseStringEmailArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -45870,6 +47772,9 @@ func (s *Server) decodeTestResponseStringEmailNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -45927,6 +47832,9 @@ func (s *Server) decodeTestResponseStringEmailNullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -45984,6 +47892,9 @@ func (s *Server) decodeTestResponseStringEmailNullableArrayArrayRequest(r *http. }(); err != nil { 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) @@ -46041,6 +47952,9 @@ func (s *Server) decodeTestResponseStringHostnameRequest(r *http.Request) ( }(); err != nil { 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) @@ -46098,6 +48012,9 @@ func (s *Server) decodeTestResponseStringHostnameArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -46155,6 +48072,9 @@ func (s *Server) decodeTestResponseStringHostnameArrayArrayRequest(r *http.Reque }(); err != nil { 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) @@ -46212,6 +48132,9 @@ func (s *Server) decodeTestResponseStringHostnameNullableRequest(r *http.Request }(); err != nil { 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) @@ -46269,6 +48192,9 @@ func (s *Server) decodeTestResponseStringHostnameNullableArrayRequest(r *http.Re }(); err != nil { 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) @@ -46326,6 +48252,9 @@ func (s *Server) decodeTestResponseStringHostnameNullableArrayArrayRequest(r *ht }(); err != nil { 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) @@ -46383,6 +48312,9 @@ func (s *Server) decodeTestResponseStringIPRequest(r *http.Request) ( }(); err != nil { 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) @@ -46440,6 +48372,9 @@ func (s *Server) decodeTestResponseStringIPArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -46497,6 +48432,9 @@ func (s *Server) decodeTestResponseStringIPArrayArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -46554,6 +48492,9 @@ func (s *Server) decodeTestResponseStringIPNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -46611,6 +48552,9 @@ func (s *Server) decodeTestResponseStringIPNullableArrayRequest(r *http.Request) }(); err != nil { 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) @@ -46668,6 +48612,9 @@ func (s *Server) decodeTestResponseStringIPNullableArrayArrayRequest(r *http.Req }(); err != nil { 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) @@ -46725,6 +48672,9 @@ func (s *Server) decodeTestResponseStringInt32Request(r *http.Request) ( }(); err != nil { 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) @@ -46782,6 +48732,9 @@ func (s *Server) decodeTestResponseStringInt32ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -46839,6 +48792,9 @@ func (s *Server) decodeTestResponseStringInt32ArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -46896,6 +48852,9 @@ func (s *Server) decodeTestResponseStringInt32NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -46953,6 +48912,9 @@ func (s *Server) decodeTestResponseStringInt32NullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -47010,6 +48972,9 @@ func (s *Server) decodeTestResponseStringInt32NullableArrayArrayRequest(r *http. }(); err != nil { 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) @@ -47067,6 +49032,9 @@ func (s *Server) decodeTestResponseStringInt64Request(r *http.Request) ( }(); err != nil { 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) @@ -47124,6 +49092,9 @@ func (s *Server) decodeTestResponseStringInt64ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -47181,6 +49152,9 @@ func (s *Server) decodeTestResponseStringInt64ArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -47238,6 +49212,9 @@ func (s *Server) decodeTestResponseStringInt64NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -47295,6 +49272,9 @@ func (s *Server) decodeTestResponseStringInt64NullableArrayRequest(r *http.Reque }(); err != nil { 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) @@ -47352,6 +49332,9 @@ func (s *Server) decodeTestResponseStringInt64NullableArrayArrayRequest(r *http. }(); err != nil { 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) @@ -47409,6 +49392,9 @@ func (s *Server) decodeTestResponseStringIpv4Request(r *http.Request) ( }(); err != nil { 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) @@ -47466,6 +49452,9 @@ func (s *Server) decodeTestResponseStringIpv4ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -47523,6 +49512,9 @@ func (s *Server) decodeTestResponseStringIpv4ArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -47580,6 +49572,9 @@ func (s *Server) decodeTestResponseStringIpv4NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -47637,6 +49632,9 @@ func (s *Server) decodeTestResponseStringIpv4NullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -47694,6 +49692,9 @@ func (s *Server) decodeTestResponseStringIpv4NullableArrayArrayRequest(r *http.R }(); err != nil { 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) @@ -47751,6 +49752,9 @@ func (s *Server) decodeTestResponseStringIpv6Request(r *http.Request) ( }(); err != nil { 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) @@ -47808,6 +49812,9 @@ func (s *Server) decodeTestResponseStringIpv6ArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -47865,6 +49872,9 @@ func (s *Server) decodeTestResponseStringIpv6ArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -47922,6 +49932,9 @@ func (s *Server) decodeTestResponseStringIpv6NullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -47979,6 +49992,9 @@ func (s *Server) decodeTestResponseStringIpv6NullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -48036,6 +50052,9 @@ func (s *Server) decodeTestResponseStringIpv6NullableArrayArrayRequest(r *http.R }(); err != nil { 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) @@ -48093,6 +50112,9 @@ func (s *Server) decodeTestResponseStringNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -48150,6 +50172,9 @@ func (s *Server) decodeTestResponseStringNullableArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -48207,6 +50232,9 @@ func (s *Server) decodeTestResponseStringNullableArrayArrayRequest(r *http.Reque }(); err != nil { 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) @@ -48264,6 +50292,9 @@ func (s *Server) decodeTestResponseStringPasswordRequest(r *http.Request) ( }(); err != nil { 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) @@ -48321,6 +50352,9 @@ func (s *Server) decodeTestResponseStringPasswordArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -48378,6 +50412,9 @@ func (s *Server) decodeTestResponseStringPasswordArrayArrayRequest(r *http.Reque }(); err != nil { 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) @@ -48435,6 +50472,9 @@ func (s *Server) decodeTestResponseStringPasswordNullableRequest(r *http.Request }(); err != nil { 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) @@ -48492,6 +50532,9 @@ func (s *Server) decodeTestResponseStringPasswordNullableArrayRequest(r *http.Re }(); err != nil { 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) @@ -48549,6 +50592,9 @@ func (s *Server) decodeTestResponseStringPasswordNullableArrayArrayRequest(r *ht }(); err != nil { 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) @@ -48606,6 +50652,9 @@ func (s *Server) decodeTestResponseStringTimeRequest(r *http.Request) ( }(); err != nil { 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) @@ -48663,6 +50712,9 @@ func (s *Server) decodeTestResponseStringTimeArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -48720,6 +50772,9 @@ func (s *Server) decodeTestResponseStringTimeArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -48777,6 +50832,9 @@ func (s *Server) decodeTestResponseStringTimeNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -48834,6 +50892,9 @@ func (s *Server) decodeTestResponseStringTimeNullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -48891,6 +50952,9 @@ func (s *Server) decodeTestResponseStringTimeNullableArrayArrayRequest(r *http.R }(); err != nil { 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) @@ -48948,6 +51012,9 @@ func (s *Server) decodeTestResponseStringURIRequest(r *http.Request) ( }(); err != nil { 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) @@ -49005,6 +51072,9 @@ func (s *Server) decodeTestResponseStringURIArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -49062,6 +51132,9 @@ func (s *Server) decodeTestResponseStringURIArrayArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -49119,6 +51192,9 @@ func (s *Server) decodeTestResponseStringURINullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -49176,6 +51252,9 @@ func (s *Server) decodeTestResponseStringURINullableArrayRequest(r *http.Request }(); err != nil { 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) @@ -49233,6 +51312,9 @@ func (s *Server) decodeTestResponseStringURINullableArrayArrayRequest(r *http.Re }(); err != nil { 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) @@ -49290,6 +51372,9 @@ func (s *Server) decodeTestResponseStringUUIDRequest(r *http.Request) ( }(); err != nil { 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) @@ -49347,6 +51432,9 @@ func (s *Server) decodeTestResponseStringUUIDArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -49404,6 +51492,9 @@ func (s *Server) decodeTestResponseStringUUIDArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -49461,6 +51552,9 @@ func (s *Server) decodeTestResponseStringUUIDNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -49518,6 +51612,9 @@ func (s *Server) decodeTestResponseStringUUIDNullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -49575,6 +51672,9 @@ func (s *Server) decodeTestResponseStringUUIDNullableArrayArrayRequest(r *http.R }(); err != nil { 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) @@ -49632,6 +51732,9 @@ func (s *Server) decodeTestResponseStringUnixRequest(r *http.Request) ( }(); err != nil { 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) @@ -49689,6 +51792,9 @@ func (s *Server) decodeTestResponseStringUnixArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -49746,6 +51852,9 @@ func (s *Server) decodeTestResponseStringUnixArrayArrayRequest(r *http.Request) }(); err != nil { 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) @@ -49803,6 +51912,9 @@ func (s *Server) decodeTestResponseStringUnixMicroRequest(r *http.Request) ( }(); err != nil { 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) @@ -49860,6 +51972,9 @@ func (s *Server) decodeTestResponseStringUnixMicroArrayRequest(r *http.Request) }(); err != nil { 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) @@ -49917,6 +52032,9 @@ func (s *Server) decodeTestResponseStringUnixMicroArrayArrayRequest(r *http.Requ }(); err != nil { 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) @@ -49974,6 +52092,9 @@ func (s *Server) decodeTestResponseStringUnixMicroNullableRequest(r *http.Reques }(); err != nil { 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) @@ -50031,6 +52152,9 @@ func (s *Server) decodeTestResponseStringUnixMicroNullableArrayRequest(r *http.R }(); err != nil { 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) @@ -50088,6 +52212,9 @@ func (s *Server) decodeTestResponseStringUnixMicroNullableArrayArrayRequest(r *h }(); err != nil { 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) @@ -50145,6 +52272,9 @@ func (s *Server) decodeTestResponseStringUnixMilliRequest(r *http.Request) ( }(); err != nil { 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) @@ -50202,6 +52332,9 @@ func (s *Server) decodeTestResponseStringUnixMilliArrayRequest(r *http.Request) }(); err != nil { 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) @@ -50259,6 +52392,9 @@ func (s *Server) decodeTestResponseStringUnixMilliArrayArrayRequest(r *http.Requ }(); err != nil { 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) @@ -50316,6 +52452,9 @@ func (s *Server) decodeTestResponseStringUnixMilliNullableRequest(r *http.Reques }(); err != nil { 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) @@ -50373,6 +52512,9 @@ func (s *Server) decodeTestResponseStringUnixMilliNullableArrayRequest(r *http.R }(); err != nil { 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) @@ -50430,6 +52572,9 @@ func (s *Server) decodeTestResponseStringUnixMilliNullableArrayArrayRequest(r *h }(); err != nil { 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) @@ -50487,6 +52632,9 @@ func (s *Server) decodeTestResponseStringUnixNanoRequest(r *http.Request) ( }(); err != nil { 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) @@ -50544,6 +52692,9 @@ func (s *Server) decodeTestResponseStringUnixNanoArrayRequest(r *http.Request) ( }(); err != nil { 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) @@ -50601,6 +52752,9 @@ func (s *Server) decodeTestResponseStringUnixNanoArrayArrayRequest(r *http.Reque }(); err != nil { 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) @@ -50658,6 +52812,9 @@ func (s *Server) decodeTestResponseStringUnixNanoNullableRequest(r *http.Request }(); err != nil { 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) @@ -50715,6 +52872,9 @@ func (s *Server) decodeTestResponseStringUnixNanoNullableArrayRequest(r *http.Re }(); err != nil { 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) @@ -50772,6 +52932,9 @@ func (s *Server) decodeTestResponseStringUnixNanoNullableArrayArrayRequest(r *ht }(); err != nil { 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) @@ -50829,6 +52992,9 @@ func (s *Server) decodeTestResponseStringUnixNullableRequest(r *http.Request) ( }(); err != nil { 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) @@ -50886,6 +53052,9 @@ func (s *Server) decodeTestResponseStringUnixNullableArrayRequest(r *http.Reques }(); err != nil { 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) @@ -50943,6 +53112,9 @@ func (s *Server) decodeTestResponseStringUnixNullableArrayArrayRequest(r *http.R }(); err != nil { 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) @@ -51000,6 +53172,9 @@ func (s *Server) decodeTestResponseStringUnixSecondsRequest(r *http.Request) ( }(); err != nil { 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) @@ -51057,6 +53232,9 @@ func (s *Server) decodeTestResponseStringUnixSecondsArrayRequest(r *http.Request }(); err != nil { 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) @@ -51114,6 +53292,9 @@ func (s *Server) decodeTestResponseStringUnixSecondsArrayArrayRequest(r *http.Re }(); err != nil { 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) @@ -51171,6 +53352,9 @@ func (s *Server) decodeTestResponseStringUnixSecondsNullableRequest(r *http.Requ }(); err != nil { 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) @@ -51228,6 +53412,9 @@ func (s *Server) decodeTestResponseStringUnixSecondsNullableArrayRequest(r *http }(); err != nil { 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) @@ -51285,6 +53472,9 @@ func (s *Server) decodeTestResponseStringUnixSecondsNullableArrayArrayRequest(r }(); err != nil { 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) diff --git a/examples/ex_test_format/oas_response_decoders_gen.go b/examples/ex_test_format/oas_response_decoders_gen.go index a7f65edc0..d92ee8752 100644 --- a/examples/ex_test_format/oas_response_decoders_gen.go +++ b/examples/ex_test_format/oas_response_decoders_gen.go @@ -41,7 +41,10 @@ func decodeTestQueryParameterResponse(resp *http.Response) (res Error, err error } return nil }(); err != nil { - return res, err + 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: @@ -74,7 +77,10 @@ func decodeTestRequestAnyResponse(resp *http.Response) (res Error, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -107,7 +113,10 @@ func decodeTestRequestBooleanResponse(resp *http.Response) (res Error, err error } return nil }(); err != nil { - return res, err + 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: @@ -140,7 +149,10 @@ func decodeTestRequestBooleanArrayResponse(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -173,7 +185,10 @@ func decodeTestRequestBooleanArrayArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -206,7 +221,10 @@ func decodeTestRequestBooleanNullableResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -239,7 +257,10 @@ func decodeTestRequestBooleanNullableArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -272,7 +293,10 @@ func decodeTestRequestBooleanNullableArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -305,7 +329,10 @@ func decodeTestRequestEmptyStructResponse(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -338,7 +365,10 @@ func decodeTestRequestFormatTestResponse(resp *http.Response) (res Error, err er } return nil }(); err != nil { - return res, err + 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: @@ -371,7 +401,10 @@ func decodeTestRequestIntegerResponse(resp *http.Response) (res Error, err error } return nil }(); err != nil { - return res, err + 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: @@ -404,7 +437,10 @@ func decodeTestRequestIntegerArrayResponse(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -437,7 +473,10 @@ func decodeTestRequestIntegerArrayArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -470,7 +509,10 @@ func decodeTestRequestIntegerInt32Response(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -503,7 +545,10 @@ func decodeTestRequestIntegerInt32ArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -536,7 +581,10 @@ func decodeTestRequestIntegerInt32ArrayArrayResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -569,7 +617,10 @@ func decodeTestRequestIntegerInt32NullableResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -602,7 +653,10 @@ func decodeTestRequestIntegerInt32NullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -635,7 +689,10 @@ func decodeTestRequestIntegerInt32NullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -668,7 +725,10 @@ func decodeTestRequestIntegerInt64Response(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -701,7 +761,10 @@ func decodeTestRequestIntegerInt64ArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -734,7 +797,10 @@ func decodeTestRequestIntegerInt64ArrayArrayResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -767,7 +833,10 @@ func decodeTestRequestIntegerInt64NullableResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -800,7 +869,10 @@ func decodeTestRequestIntegerInt64NullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -833,7 +905,10 @@ func decodeTestRequestIntegerInt64NullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -866,7 +941,10 @@ func decodeTestRequestIntegerNullableResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -899,7 +977,10 @@ func decodeTestRequestIntegerNullableArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -932,7 +1013,10 @@ func decodeTestRequestIntegerNullableArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -965,7 +1049,10 @@ func decodeTestRequestIntegerUintResponse(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -998,7 +1085,10 @@ func decodeTestRequestIntegerUint32Response(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -1031,7 +1121,10 @@ func decodeTestRequestIntegerUint32ArrayResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -1064,7 +1157,10 @@ func decodeTestRequestIntegerUint32ArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -1097,7 +1193,10 @@ func decodeTestRequestIntegerUint32NullableResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -1130,7 +1229,10 @@ func decodeTestRequestIntegerUint32NullableArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -1163,7 +1265,10 @@ func decodeTestRequestIntegerUint32NullableArrayArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -1196,7 +1301,10 @@ func decodeTestRequestIntegerUint64Response(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -1229,7 +1337,10 @@ func decodeTestRequestIntegerUint64ArrayResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -1262,7 +1373,10 @@ func decodeTestRequestIntegerUint64ArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -1295,7 +1409,10 @@ func decodeTestRequestIntegerUint64NullableResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -1328,7 +1445,10 @@ func decodeTestRequestIntegerUint64NullableArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -1361,7 +1481,10 @@ func decodeTestRequestIntegerUint64NullableArrayArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -1394,7 +1517,10 @@ func decodeTestRequestIntegerUintArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -1427,7 +1553,10 @@ func decodeTestRequestIntegerUintArrayArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -1460,7 +1589,10 @@ func decodeTestRequestIntegerUintNullableResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -1493,7 +1625,10 @@ func decodeTestRequestIntegerUintNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -1526,7 +1661,10 @@ func decodeTestRequestIntegerUintNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -1559,7 +1697,10 @@ func decodeTestRequestIntegerUnixResponse(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -1592,7 +1733,10 @@ func decodeTestRequestIntegerUnixArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -1625,7 +1769,10 @@ func decodeTestRequestIntegerUnixArrayArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -1658,7 +1805,10 @@ func decodeTestRequestIntegerUnixMicroResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -1691,7 +1841,10 @@ func decodeTestRequestIntegerUnixMicroArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -1724,7 +1877,10 @@ func decodeTestRequestIntegerUnixMicroArrayArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -1757,7 +1913,10 @@ func decodeTestRequestIntegerUnixMicroNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -1790,7 +1949,10 @@ func decodeTestRequestIntegerUnixMicroNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -1823,7 +1985,10 @@ func decodeTestRequestIntegerUnixMicroNullableArrayArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -1856,7 +2021,10 @@ func decodeTestRequestIntegerUnixMilliResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -1889,7 +2057,10 @@ func decodeTestRequestIntegerUnixMilliArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -1922,7 +2093,10 @@ func decodeTestRequestIntegerUnixMilliArrayArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -1955,7 +2129,10 @@ func decodeTestRequestIntegerUnixMilliNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -1988,7 +2165,10 @@ func decodeTestRequestIntegerUnixMilliNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -2021,7 +2201,10 @@ func decodeTestRequestIntegerUnixMilliNullableArrayArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -2054,7 +2237,10 @@ func decodeTestRequestIntegerUnixNanoResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -2087,7 +2273,10 @@ func decodeTestRequestIntegerUnixNanoArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -2120,7 +2309,10 @@ func decodeTestRequestIntegerUnixNanoArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -2153,7 +2345,10 @@ func decodeTestRequestIntegerUnixNanoNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -2186,7 +2381,10 @@ func decodeTestRequestIntegerUnixNanoNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -2219,7 +2417,10 @@ func decodeTestRequestIntegerUnixNanoNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -2252,7 +2453,10 @@ func decodeTestRequestIntegerUnixNullableResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -2285,7 +2489,10 @@ func decodeTestRequestIntegerUnixNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -2318,7 +2525,10 @@ func decodeTestRequestIntegerUnixNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -2351,7 +2561,10 @@ func decodeTestRequestIntegerUnixSecondsResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -2384,7 +2597,10 @@ func decodeTestRequestIntegerUnixSecondsArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -2417,7 +2633,10 @@ func decodeTestRequestIntegerUnixSecondsArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -2450,7 +2669,10 @@ func decodeTestRequestIntegerUnixSecondsNullableResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -2483,7 +2705,10 @@ func decodeTestRequestIntegerUnixSecondsNullableArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -2516,7 +2741,10 @@ func decodeTestRequestIntegerUnixSecondsNullableArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -2549,7 +2777,10 @@ func decodeTestRequestNullResponse(resp *http.Response) (res Error, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -2582,7 +2813,10 @@ func decodeTestRequestNullArrayResponse(resp *http.Response) (res Error, err err } return nil }(); err != nil { - return res, err + 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: @@ -2615,7 +2849,10 @@ func decodeTestRequestNullArrayArrayResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -2648,7 +2885,10 @@ func decodeTestRequestNullNullableResponse(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -2681,7 +2921,10 @@ func decodeTestRequestNullNullableArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -2714,7 +2957,10 @@ func decodeTestRequestNullNullableArrayArrayResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -2747,7 +2993,10 @@ func decodeTestRequestNumberResponse(resp *http.Response) (res Error, err error) } return nil }(); err != nil { - return res, err + 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: @@ -2780,7 +3029,10 @@ func decodeTestRequestNumberArrayResponse(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -2813,7 +3065,10 @@ func decodeTestRequestNumberArrayArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -2846,7 +3101,10 @@ func decodeTestRequestNumberDoubleResponse(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -2879,7 +3137,10 @@ func decodeTestRequestNumberDoubleArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -2912,7 +3173,10 @@ func decodeTestRequestNumberDoubleArrayArrayResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -2945,7 +3209,10 @@ func decodeTestRequestNumberDoubleNullableResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -2978,7 +3245,10 @@ func decodeTestRequestNumberDoubleNullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -3011,7 +3281,10 @@ func decodeTestRequestNumberDoubleNullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -3044,7 +3317,10 @@ func decodeTestRequestNumberFloatResponse(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -3077,7 +3353,10 @@ func decodeTestRequestNumberFloatArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -3110,7 +3389,10 @@ func decodeTestRequestNumberFloatArrayArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -3143,7 +3425,10 @@ func decodeTestRequestNumberFloatNullableResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -3176,7 +3461,10 @@ func decodeTestRequestNumberFloatNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -3209,7 +3497,10 @@ func decodeTestRequestNumberFloatNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -3242,7 +3533,10 @@ func decodeTestRequestNumberInt32Response(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -3275,7 +3569,10 @@ func decodeTestRequestNumberInt32ArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -3308,7 +3605,10 @@ func decodeTestRequestNumberInt32ArrayArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -3341,7 +3641,10 @@ func decodeTestRequestNumberInt32NullableResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -3374,7 +3677,10 @@ func decodeTestRequestNumberInt32NullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -3407,7 +3713,10 @@ func decodeTestRequestNumberInt32NullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -3440,7 +3749,10 @@ func decodeTestRequestNumberInt64Response(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -3473,7 +3785,10 @@ func decodeTestRequestNumberInt64ArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -3506,7 +3821,10 @@ func decodeTestRequestNumberInt64ArrayArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -3539,7 +3857,10 @@ func decodeTestRequestNumberInt64NullableResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -3572,7 +3893,10 @@ func decodeTestRequestNumberInt64NullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -3605,7 +3929,10 @@ func decodeTestRequestNumberInt64NullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -3638,7 +3965,10 @@ func decodeTestRequestNumberNullableResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -3671,7 +4001,10 @@ func decodeTestRequestNumberNullableArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -3704,7 +4037,10 @@ func decodeTestRequestNumberNullableArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -3737,7 +4073,10 @@ func decodeTestRequestRequiredAnyResponse(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -3770,7 +4109,10 @@ func decodeTestRequestRequiredBooleanResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -3803,7 +4145,10 @@ func decodeTestRequestRequiredBooleanArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -3836,7 +4181,10 @@ func decodeTestRequestRequiredBooleanArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -3869,7 +4217,10 @@ func decodeTestRequestRequiredBooleanNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -3902,7 +4253,10 @@ func decodeTestRequestRequiredBooleanNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -3935,7 +4289,10 @@ func decodeTestRequestRequiredBooleanNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -3968,7 +4325,10 @@ func decodeTestRequestRequiredEmptyStructResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -4001,7 +4361,10 @@ func decodeTestRequestRequiredFormatTestResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -4034,7 +4397,10 @@ func decodeTestRequestRequiredIntegerResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -4067,7 +4433,10 @@ func decodeTestRequestRequiredIntegerArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -4100,7 +4469,10 @@ func decodeTestRequestRequiredIntegerArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -4133,7 +4505,10 @@ func decodeTestRequestRequiredIntegerInt32Response(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -4166,7 +4541,10 @@ func decodeTestRequestRequiredIntegerInt32ArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -4199,7 +4577,10 @@ func decodeTestRequestRequiredIntegerInt32ArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -4232,7 +4613,10 @@ func decodeTestRequestRequiredIntegerInt32NullableResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -4265,7 +4649,10 @@ func decodeTestRequestRequiredIntegerInt32NullableArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -4298,7 +4685,10 @@ func decodeTestRequestRequiredIntegerInt32NullableArrayArrayResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -4331,7 +4721,10 @@ func decodeTestRequestRequiredIntegerInt64Response(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -4364,7 +4757,10 @@ func decodeTestRequestRequiredIntegerInt64ArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -4397,7 +4793,10 @@ func decodeTestRequestRequiredIntegerInt64ArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -4430,7 +4829,10 @@ func decodeTestRequestRequiredIntegerInt64NullableResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -4463,7 +4865,10 @@ func decodeTestRequestRequiredIntegerInt64NullableArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -4496,7 +4901,10 @@ func decodeTestRequestRequiredIntegerInt64NullableArrayArrayResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -4529,7 +4937,10 @@ func decodeTestRequestRequiredIntegerNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -4562,7 +4973,10 @@ func decodeTestRequestRequiredIntegerNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -4595,7 +5009,10 @@ func decodeTestRequestRequiredIntegerNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -4628,7 +5045,10 @@ func decodeTestRequestRequiredIntegerUintResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -4661,7 +5081,10 @@ func decodeTestRequestRequiredIntegerUint32Response(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -4694,7 +5117,10 @@ func decodeTestRequestRequiredIntegerUint32ArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -4727,7 +5153,10 @@ func decodeTestRequestRequiredIntegerUint32ArrayArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -4760,7 +5189,10 @@ func decodeTestRequestRequiredIntegerUint32NullableResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -4793,7 +5225,10 @@ func decodeTestRequestRequiredIntegerUint32NullableArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -4826,7 +5261,10 @@ func decodeTestRequestRequiredIntegerUint32NullableArrayArrayResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -4859,7 +5297,10 @@ func decodeTestRequestRequiredIntegerUint64Response(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -4892,7 +5333,10 @@ func decodeTestRequestRequiredIntegerUint64ArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -4925,7 +5369,10 @@ func decodeTestRequestRequiredIntegerUint64ArrayArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -4958,7 +5405,10 @@ func decodeTestRequestRequiredIntegerUint64NullableResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -4991,7 +5441,10 @@ func decodeTestRequestRequiredIntegerUint64NullableArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -5024,7 +5477,10 @@ func decodeTestRequestRequiredIntegerUint64NullableArrayArrayResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -5057,7 +5513,10 @@ func decodeTestRequestRequiredIntegerUintArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -5090,7 +5549,10 @@ func decodeTestRequestRequiredIntegerUintArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -5123,7 +5585,10 @@ func decodeTestRequestRequiredIntegerUintNullableResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -5156,7 +5621,10 @@ func decodeTestRequestRequiredIntegerUintNullableArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -5189,7 +5657,10 @@ func decodeTestRequestRequiredIntegerUintNullableArrayArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -5222,7 +5693,10 @@ func decodeTestRequestRequiredIntegerUnixResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -5255,7 +5729,10 @@ func decodeTestRequestRequiredIntegerUnixArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -5288,7 +5765,10 @@ func decodeTestRequestRequiredIntegerUnixArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -5321,7 +5801,10 @@ func decodeTestRequestRequiredIntegerUnixMicroResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -5354,7 +5837,10 @@ func decodeTestRequestRequiredIntegerUnixMicroArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -5387,7 +5873,10 @@ func decodeTestRequestRequiredIntegerUnixMicroArrayArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -5420,7 +5909,10 @@ func decodeTestRequestRequiredIntegerUnixMicroNullableResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -5453,7 +5945,10 @@ func decodeTestRequestRequiredIntegerUnixMicroNullableArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -5486,7 +5981,10 @@ func decodeTestRequestRequiredIntegerUnixMicroNullableArrayArrayResponse(resp *h } return nil }(); err != nil { - return res, err + 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: @@ -5519,7 +6017,10 @@ func decodeTestRequestRequiredIntegerUnixMilliResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -5552,7 +6053,10 @@ func decodeTestRequestRequiredIntegerUnixMilliArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -5585,7 +6089,10 @@ func decodeTestRequestRequiredIntegerUnixMilliArrayArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -5618,7 +6125,10 @@ func decodeTestRequestRequiredIntegerUnixMilliNullableResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -5651,7 +6161,10 @@ func decodeTestRequestRequiredIntegerUnixMilliNullableArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -5684,7 +6197,10 @@ func decodeTestRequestRequiredIntegerUnixMilliNullableArrayArrayResponse(resp *h } return nil }(); err != nil { - return res, err + 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: @@ -5717,7 +6233,10 @@ func decodeTestRequestRequiredIntegerUnixNanoResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -5750,7 +6269,10 @@ func decodeTestRequestRequiredIntegerUnixNanoArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -5783,7 +6305,10 @@ func decodeTestRequestRequiredIntegerUnixNanoArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -5816,7 +6341,10 @@ func decodeTestRequestRequiredIntegerUnixNanoNullableResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -5849,7 +6377,10 @@ func decodeTestRequestRequiredIntegerUnixNanoNullableArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -5882,7 +6413,10 @@ func decodeTestRequestRequiredIntegerUnixNanoNullableArrayArrayResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -5915,7 +6449,10 @@ func decodeTestRequestRequiredIntegerUnixNullableResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -5948,7 +6485,10 @@ func decodeTestRequestRequiredIntegerUnixNullableArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -5981,7 +6521,10 @@ func decodeTestRequestRequiredIntegerUnixNullableArrayArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -6014,7 +6557,10 @@ func decodeTestRequestRequiredIntegerUnixSecondsResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -6047,7 +6593,10 @@ func decodeTestRequestRequiredIntegerUnixSecondsArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -6080,7 +6629,10 @@ func decodeTestRequestRequiredIntegerUnixSecondsArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -6113,7 +6665,10 @@ func decodeTestRequestRequiredIntegerUnixSecondsNullableResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -6146,7 +6701,10 @@ func decodeTestRequestRequiredIntegerUnixSecondsNullableArrayResponse(resp *http } return nil }(); err != nil { - return res, err + 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: @@ -6179,7 +6737,10 @@ func decodeTestRequestRequiredIntegerUnixSecondsNullableArrayArrayResponse(resp } return nil }(); err != nil { - return res, err + 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: @@ -6212,7 +6773,10 @@ func decodeTestRequestRequiredNullResponse(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -6245,7 +6809,10 @@ func decodeTestRequestRequiredNullArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -6278,7 +6845,10 @@ func decodeTestRequestRequiredNullArrayArrayResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -6311,7 +6881,10 @@ func decodeTestRequestRequiredNullNullableResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -6344,7 +6917,10 @@ func decodeTestRequestRequiredNullNullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -6377,7 +6953,10 @@ func decodeTestRequestRequiredNullNullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -6410,7 +6989,10 @@ func decodeTestRequestRequiredNumberResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -6443,7 +7025,10 @@ func decodeTestRequestRequiredNumberArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -6476,7 +7061,10 @@ func decodeTestRequestRequiredNumberArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -6509,7 +7097,10 @@ func decodeTestRequestRequiredNumberDoubleResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -6542,7 +7133,10 @@ func decodeTestRequestRequiredNumberDoubleArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -6575,7 +7169,10 @@ func decodeTestRequestRequiredNumberDoubleArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -6608,7 +7205,10 @@ func decodeTestRequestRequiredNumberDoubleNullableResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -6641,7 +7241,10 @@ func decodeTestRequestRequiredNumberDoubleNullableArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -6674,7 +7277,10 @@ func decodeTestRequestRequiredNumberDoubleNullableArrayArrayResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -6707,7 +7313,10 @@ func decodeTestRequestRequiredNumberFloatResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -6740,7 +7349,10 @@ func decodeTestRequestRequiredNumberFloatArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -6773,7 +7385,10 @@ func decodeTestRequestRequiredNumberFloatArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -6806,7 +7421,10 @@ func decodeTestRequestRequiredNumberFloatNullableResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -6839,7 +7457,10 @@ func decodeTestRequestRequiredNumberFloatNullableArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -6872,7 +7493,10 @@ func decodeTestRequestRequiredNumberFloatNullableArrayArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -6905,7 +7529,10 @@ func decodeTestRequestRequiredNumberInt32Response(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -6938,7 +7565,10 @@ func decodeTestRequestRequiredNumberInt32ArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -6971,7 +7601,10 @@ func decodeTestRequestRequiredNumberInt32ArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -7004,7 +7637,10 @@ func decodeTestRequestRequiredNumberInt32NullableResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -7037,7 +7673,10 @@ func decodeTestRequestRequiredNumberInt32NullableArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -7070,7 +7709,10 @@ func decodeTestRequestRequiredNumberInt32NullableArrayArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -7103,7 +7745,10 @@ func decodeTestRequestRequiredNumberInt64Response(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -7136,7 +7781,10 @@ func decodeTestRequestRequiredNumberInt64ArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7169,7 +7817,10 @@ func decodeTestRequestRequiredNumberInt64ArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -7202,7 +7853,10 @@ func decodeTestRequestRequiredNumberInt64NullableResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -7235,7 +7889,10 @@ func decodeTestRequestRequiredNumberInt64NullableArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -7268,7 +7925,10 @@ func decodeTestRequestRequiredNumberInt64NullableArrayArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -7301,7 +7961,10 @@ func decodeTestRequestRequiredNumberNullableResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -7334,7 +7997,10 @@ func decodeTestRequestRequiredNumberNullableArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -7367,7 +8033,10 @@ func decodeTestRequestRequiredNumberNullableArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -7400,7 +8069,10 @@ func decodeTestRequestRequiredStringResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -7433,7 +8105,10 @@ func decodeTestRequestRequiredStringArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -7466,7 +8141,10 @@ func decodeTestRequestRequiredStringArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7499,7 +8177,10 @@ func decodeTestRequestRequiredStringBinaryResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -7532,7 +8213,10 @@ func decodeTestRequestRequiredStringBinaryArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -7565,7 +8249,10 @@ func decodeTestRequestRequiredStringBinaryArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -7598,7 +8285,10 @@ func decodeTestRequestRequiredStringBinaryNullableResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -7631,7 +8321,10 @@ func decodeTestRequestRequiredStringBinaryNullableArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -7664,7 +8357,10 @@ func decodeTestRequestRequiredStringBinaryNullableArrayArrayResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -7697,7 +8393,10 @@ func decodeTestRequestRequiredStringByteResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -7730,7 +8429,10 @@ func decodeTestRequestRequiredStringByteArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7763,7 +8465,10 @@ func decodeTestRequestRequiredStringByteArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -7796,7 +8501,10 @@ func decodeTestRequestRequiredStringByteNullableResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -7829,7 +8537,10 @@ func decodeTestRequestRequiredStringByteNullableArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -7862,7 +8573,10 @@ func decodeTestRequestRequiredStringByteNullableArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -7895,7 +8609,10 @@ func decodeTestRequestRequiredStringDateResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -7928,7 +8645,10 @@ func decodeTestRequestRequiredStringDateArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -7961,7 +8681,10 @@ func decodeTestRequestRequiredStringDateArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -7994,7 +8717,10 @@ func decodeTestRequestRequiredStringDateNullableResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -8027,7 +8753,10 @@ func decodeTestRequestRequiredStringDateNullableArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -8060,7 +8789,10 @@ func decodeTestRequestRequiredStringDateNullableArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -8093,7 +8825,10 @@ func decodeTestRequestRequiredStringDateTimeResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -8126,7 +8861,10 @@ func decodeTestRequestRequiredStringDateTimeArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -8159,7 +8897,10 @@ func decodeTestRequestRequiredStringDateTimeArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -8192,7 +8933,10 @@ func decodeTestRequestRequiredStringDateTimeNullableResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -8225,7 +8969,10 @@ func decodeTestRequestRequiredStringDateTimeNullableArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -8258,7 +9005,10 @@ func decodeTestRequestRequiredStringDateTimeNullableArrayArrayResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: @@ -8291,7 +9041,10 @@ func decodeTestRequestRequiredStringDurationResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -8324,7 +9077,10 @@ func decodeTestRequestRequiredStringDurationArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -8357,7 +9113,10 @@ func decodeTestRequestRequiredStringDurationArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -8390,7 +9149,10 @@ func decodeTestRequestRequiredStringDurationNullableResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -8423,7 +9185,10 @@ func decodeTestRequestRequiredStringDurationNullableArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -8456,7 +9221,10 @@ func decodeTestRequestRequiredStringDurationNullableArrayArrayResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: @@ -8489,7 +9257,10 @@ func decodeTestRequestRequiredStringEmailResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -8522,7 +9293,10 @@ func decodeTestRequestRequiredStringEmailArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -8555,7 +9329,10 @@ func decodeTestRequestRequiredStringEmailArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -8588,7 +9365,10 @@ func decodeTestRequestRequiredStringEmailNullableResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -8621,7 +9401,10 @@ func decodeTestRequestRequiredStringEmailNullableArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -8654,7 +9437,10 @@ func decodeTestRequestRequiredStringEmailNullableArrayArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -8687,7 +9473,10 @@ func decodeTestRequestRequiredStringHostnameResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -8720,7 +9509,10 @@ func decodeTestRequestRequiredStringHostnameArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -8753,7 +9545,10 @@ func decodeTestRequestRequiredStringHostnameArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -8786,7 +9581,10 @@ func decodeTestRequestRequiredStringHostnameNullableResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -8819,7 +9617,10 @@ func decodeTestRequestRequiredStringHostnameNullableArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -8852,7 +9653,10 @@ func decodeTestRequestRequiredStringHostnameNullableArrayArrayResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: @@ -8885,7 +9689,10 @@ func decodeTestRequestRequiredStringIPResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -8918,7 +9725,10 @@ func decodeTestRequestRequiredStringIPArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -8951,7 +9761,10 @@ func decodeTestRequestRequiredStringIPArrayArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -8984,7 +9797,10 @@ func decodeTestRequestRequiredStringIPNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -9017,7 +9833,10 @@ func decodeTestRequestRequiredStringIPNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -9050,7 +9869,10 @@ func decodeTestRequestRequiredStringIPNullableArrayArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -9083,7 +9905,10 @@ func decodeTestRequestRequiredStringInt32Response(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -9116,7 +9941,10 @@ func decodeTestRequestRequiredStringInt32ArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -9149,7 +9977,10 @@ func decodeTestRequestRequiredStringInt32ArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -9182,7 +10013,10 @@ func decodeTestRequestRequiredStringInt32NullableResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -9215,7 +10049,10 @@ func decodeTestRequestRequiredStringInt32NullableArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -9248,7 +10085,10 @@ func decodeTestRequestRequiredStringInt32NullableArrayArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -9281,7 +10121,10 @@ func decodeTestRequestRequiredStringInt64Response(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -9314,7 +10157,10 @@ func decodeTestRequestRequiredStringInt64ArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -9347,7 +10193,10 @@ func decodeTestRequestRequiredStringInt64ArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -9380,7 +10229,10 @@ func decodeTestRequestRequiredStringInt64NullableResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -9413,7 +10265,10 @@ func decodeTestRequestRequiredStringInt64NullableArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -9446,7 +10301,10 @@ func decodeTestRequestRequiredStringInt64NullableArrayArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -9479,7 +10337,10 @@ func decodeTestRequestRequiredStringIpv4Response(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -9512,7 +10373,10 @@ func decodeTestRequestRequiredStringIpv4ArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -9545,7 +10409,10 @@ func decodeTestRequestRequiredStringIpv4ArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -9578,7 +10445,10 @@ func decodeTestRequestRequiredStringIpv4NullableResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -9611,7 +10481,10 @@ func decodeTestRequestRequiredStringIpv4NullableArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -9644,7 +10517,10 @@ func decodeTestRequestRequiredStringIpv4NullableArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -9677,7 +10553,10 @@ func decodeTestRequestRequiredStringIpv6Response(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -9710,7 +10589,10 @@ func decodeTestRequestRequiredStringIpv6ArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -9743,7 +10625,10 @@ func decodeTestRequestRequiredStringIpv6ArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -9776,7 +10661,10 @@ func decodeTestRequestRequiredStringIpv6NullableResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -9809,7 +10697,10 @@ func decodeTestRequestRequiredStringIpv6NullableArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -9842,7 +10733,10 @@ func decodeTestRequestRequiredStringIpv6NullableArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -9875,7 +10769,10 @@ func decodeTestRequestRequiredStringNullableResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -9908,7 +10805,10 @@ func decodeTestRequestRequiredStringNullableArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -9941,7 +10841,10 @@ func decodeTestRequestRequiredStringNullableArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -9974,7 +10877,10 @@ func decodeTestRequestRequiredStringPasswordResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -10007,7 +10913,10 @@ func decodeTestRequestRequiredStringPasswordArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -10040,7 +10949,10 @@ func decodeTestRequestRequiredStringPasswordArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -10073,7 +10985,10 @@ func decodeTestRequestRequiredStringPasswordNullableResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -10106,7 +11021,10 @@ func decodeTestRequestRequiredStringPasswordNullableArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -10139,7 +11057,10 @@ func decodeTestRequestRequiredStringPasswordNullableArrayArrayResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: @@ -10172,7 +11093,10 @@ func decodeTestRequestRequiredStringTimeResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -10205,7 +11129,10 @@ func decodeTestRequestRequiredStringTimeArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -10238,7 +11165,10 @@ func decodeTestRequestRequiredStringTimeArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -10271,7 +11201,10 @@ func decodeTestRequestRequiredStringTimeNullableResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -10304,7 +11237,10 @@ func decodeTestRequestRequiredStringTimeNullableArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -10337,7 +11273,10 @@ func decodeTestRequestRequiredStringTimeNullableArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -10370,7 +11309,10 @@ func decodeTestRequestRequiredStringURIResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -10403,7 +11345,10 @@ func decodeTestRequestRequiredStringURIArrayResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -10436,7 +11381,10 @@ func decodeTestRequestRequiredStringURIArrayArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -10469,7 +11417,10 @@ func decodeTestRequestRequiredStringURINullableResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -10502,7 +11453,10 @@ func decodeTestRequestRequiredStringURINullableArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -10535,7 +11489,10 @@ func decodeTestRequestRequiredStringURINullableArrayArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -10568,7 +11525,10 @@ func decodeTestRequestRequiredStringUUIDResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -10601,7 +11561,10 @@ func decodeTestRequestRequiredStringUUIDArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -10634,7 +11597,10 @@ func decodeTestRequestRequiredStringUUIDArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -10667,7 +11633,10 @@ func decodeTestRequestRequiredStringUUIDNullableResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -10700,7 +11669,10 @@ func decodeTestRequestRequiredStringUUIDNullableArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -10733,7 +11705,10 @@ func decodeTestRequestRequiredStringUUIDNullableArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -10766,7 +11741,10 @@ func decodeTestRequestRequiredStringUnixResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -10799,7 +11777,10 @@ func decodeTestRequestRequiredStringUnixArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -10832,7 +11813,10 @@ func decodeTestRequestRequiredStringUnixArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -10865,7 +11849,10 @@ func decodeTestRequestRequiredStringUnixMicroResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -10898,7 +11885,10 @@ func decodeTestRequestRequiredStringUnixMicroArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -10931,7 +11921,10 @@ func decodeTestRequestRequiredStringUnixMicroArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -10964,7 +11957,10 @@ func decodeTestRequestRequiredStringUnixMicroNullableResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -10997,7 +11993,10 @@ func decodeTestRequestRequiredStringUnixMicroNullableArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -11030,7 +12029,10 @@ func decodeTestRequestRequiredStringUnixMicroNullableArrayArrayResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -11063,7 +12065,10 @@ func decodeTestRequestRequiredStringUnixMilliResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -11096,7 +12101,10 @@ func decodeTestRequestRequiredStringUnixMilliArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -11129,7 +12137,10 @@ func decodeTestRequestRequiredStringUnixMilliArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -11162,7 +12173,10 @@ func decodeTestRequestRequiredStringUnixMilliNullableResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -11195,7 +12209,10 @@ func decodeTestRequestRequiredStringUnixMilliNullableArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -11228,7 +12245,10 @@ func decodeTestRequestRequiredStringUnixMilliNullableArrayArrayResponse(resp *ht } return nil }(); err != nil { - return res, err + 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: @@ -11261,7 +12281,10 @@ func decodeTestRequestRequiredStringUnixNanoResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -11294,7 +12317,10 @@ func decodeTestRequestRequiredStringUnixNanoArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -11327,7 +12353,10 @@ func decodeTestRequestRequiredStringUnixNanoArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -11360,7 +12389,10 @@ func decodeTestRequestRequiredStringUnixNanoNullableResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -11393,7 +12425,10 @@ func decodeTestRequestRequiredStringUnixNanoNullableArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -11426,7 +12461,10 @@ func decodeTestRequestRequiredStringUnixNanoNullableArrayArrayResponse(resp *htt } return nil }(); err != nil { - return res, err + 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: @@ -11459,7 +12497,10 @@ func decodeTestRequestRequiredStringUnixNullableResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -11492,7 +12533,10 @@ func decodeTestRequestRequiredStringUnixNullableArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -11525,7 +12569,10 @@ func decodeTestRequestRequiredStringUnixNullableArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: @@ -11558,7 +12605,10 @@ func decodeTestRequestRequiredStringUnixSecondsResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -11591,7 +12641,10 @@ func decodeTestRequestRequiredStringUnixSecondsArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -11624,7 +12677,10 @@ func decodeTestRequestRequiredStringUnixSecondsArrayArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -11657,7 +12713,10 @@ func decodeTestRequestRequiredStringUnixSecondsNullableResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -11690,7 +12749,10 @@ func decodeTestRequestRequiredStringUnixSecondsNullableArrayResponse(resp *http. } return nil }(); err != nil { - return res, err + 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: @@ -11723,7 +12785,10 @@ func decodeTestRequestRequiredStringUnixSecondsNullableArrayArrayResponse(resp * } return nil }(); err != nil { - return res, err + 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: @@ -11756,7 +12821,10 @@ func decodeTestRequestStringResponse(resp *http.Response) (res Error, err error) } return nil }(); err != nil { - return res, err + 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: @@ -11789,7 +12857,10 @@ func decodeTestRequestStringArrayResponse(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -11822,7 +12893,10 @@ func decodeTestRequestStringArrayArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -11855,7 +12929,10 @@ func decodeTestRequestStringBinaryResponse(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -11888,7 +12965,10 @@ func decodeTestRequestStringBinaryArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -11921,7 +13001,10 @@ func decodeTestRequestStringBinaryArrayArrayResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -11954,7 +13037,10 @@ func decodeTestRequestStringBinaryNullableResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -11987,7 +13073,10 @@ func decodeTestRequestStringBinaryNullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -12020,7 +13109,10 @@ func decodeTestRequestStringBinaryNullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -12053,7 +13145,10 @@ func decodeTestRequestStringByteResponse(resp *http.Response) (res Error, err er } return nil }(); err != nil { - return res, err + 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: @@ -12086,7 +13181,10 @@ func decodeTestRequestStringByteArrayResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -12119,7 +13217,10 @@ func decodeTestRequestStringByteArrayArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -12152,7 +13253,10 @@ func decodeTestRequestStringByteNullableResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -12185,7 +13289,10 @@ func decodeTestRequestStringByteNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -12218,7 +13325,10 @@ func decodeTestRequestStringByteNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -12251,7 +13361,10 @@ func decodeTestRequestStringDateResponse(resp *http.Response) (res Error, err er } return nil }(); err != nil { - return res, err + 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: @@ -12284,7 +13397,10 @@ func decodeTestRequestStringDateArrayResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -12317,7 +13433,10 @@ func decodeTestRequestStringDateArrayArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -12350,7 +13469,10 @@ func decodeTestRequestStringDateNullableResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -12383,7 +13505,10 @@ func decodeTestRequestStringDateNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -12416,7 +13541,10 @@ func decodeTestRequestStringDateNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -12449,7 +13577,10 @@ func decodeTestRequestStringDateTimeResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -12482,7 +13613,10 @@ func decodeTestRequestStringDateTimeArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -12515,7 +13649,10 @@ func decodeTestRequestStringDateTimeArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -12548,7 +13685,10 @@ func decodeTestRequestStringDateTimeNullableResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -12581,7 +13721,10 @@ func decodeTestRequestStringDateTimeNullableArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -12614,7 +13757,10 @@ func decodeTestRequestStringDateTimeNullableArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -12647,7 +13793,10 @@ func decodeTestRequestStringDurationResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -12680,7 +13829,10 @@ func decodeTestRequestStringDurationArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -12713,7 +13865,10 @@ func decodeTestRequestStringDurationArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -12746,7 +13901,10 @@ func decodeTestRequestStringDurationNullableResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -12779,7 +13937,10 @@ func decodeTestRequestStringDurationNullableArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -12812,7 +13973,10 @@ func decodeTestRequestStringDurationNullableArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -12845,7 +14009,10 @@ func decodeTestRequestStringEmailResponse(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -12878,7 +14045,10 @@ func decodeTestRequestStringEmailArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -12911,7 +14081,10 @@ func decodeTestRequestStringEmailArrayArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -12944,7 +14117,10 @@ func decodeTestRequestStringEmailNullableResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -12977,7 +14153,10 @@ func decodeTestRequestStringEmailNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -13010,7 +14189,10 @@ func decodeTestRequestStringEmailNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -13043,7 +14225,10 @@ func decodeTestRequestStringHostnameResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -13076,7 +14261,10 @@ func decodeTestRequestStringHostnameArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -13109,7 +14297,10 @@ func decodeTestRequestStringHostnameArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -13142,7 +14333,10 @@ func decodeTestRequestStringHostnameNullableResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -13175,7 +14369,10 @@ func decodeTestRequestStringHostnameNullableArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -13208,7 +14405,10 @@ func decodeTestRequestStringHostnameNullableArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -13241,7 +14441,10 @@ func decodeTestRequestStringIPResponse(resp *http.Response) (res Error, err erro } return nil }(); err != nil { - return res, err + 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: @@ -13274,7 +14477,10 @@ func decodeTestRequestStringIPArrayResponse(resp *http.Response) (res Error, err } return nil }(); err != nil { - return res, err + 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: @@ -13307,7 +14513,10 @@ func decodeTestRequestStringIPArrayArrayResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -13340,7 +14549,10 @@ func decodeTestRequestStringIPNullableResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -13373,7 +14585,10 @@ func decodeTestRequestStringIPNullableArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -13406,7 +14621,10 @@ func decodeTestRequestStringIPNullableArrayArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -13439,7 +14657,10 @@ func decodeTestRequestStringInt32Response(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -13472,7 +14693,10 @@ func decodeTestRequestStringInt32ArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -13505,7 +14729,10 @@ func decodeTestRequestStringInt32ArrayArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -13538,7 +14765,10 @@ func decodeTestRequestStringInt32NullableResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -13571,7 +14801,10 @@ func decodeTestRequestStringInt32NullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -13604,7 +14837,10 @@ func decodeTestRequestStringInt32NullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -13637,7 +14873,10 @@ func decodeTestRequestStringInt64Response(resp *http.Response) (res Error, err e } return nil }(); err != nil { - return res, err + 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: @@ -13670,7 +14909,10 @@ func decodeTestRequestStringInt64ArrayResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -13703,7 +14945,10 @@ func decodeTestRequestStringInt64ArrayArrayResponse(resp *http.Response) (res Er } return nil }(); err != nil { - return res, err + 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: @@ -13736,7 +14981,10 @@ func decodeTestRequestStringInt64NullableResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -13769,7 +15017,10 @@ func decodeTestRequestStringInt64NullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -13802,7 +15053,10 @@ func decodeTestRequestStringInt64NullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -13835,7 +15089,10 @@ func decodeTestRequestStringIpv4Response(resp *http.Response) (res Error, err er } return nil }(); err != nil { - return res, err + 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: @@ -13868,7 +15125,10 @@ func decodeTestRequestStringIpv4ArrayResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -13901,7 +15161,10 @@ func decodeTestRequestStringIpv4ArrayArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -13934,7 +15197,10 @@ func decodeTestRequestStringIpv4NullableResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -13967,7 +15233,10 @@ func decodeTestRequestStringIpv4NullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -14000,7 +15269,10 @@ func decodeTestRequestStringIpv4NullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -14033,7 +15305,10 @@ func decodeTestRequestStringIpv6Response(resp *http.Response) (res Error, err er } return nil }(); err != nil { - return res, err + 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: @@ -14066,7 +15341,10 @@ func decodeTestRequestStringIpv6ArrayResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -14099,7 +15377,10 @@ func decodeTestRequestStringIpv6ArrayArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -14132,7 +15413,10 @@ func decodeTestRequestStringIpv6NullableResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -14165,7 +15449,10 @@ func decodeTestRequestStringIpv6NullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -14198,7 +15485,10 @@ func decodeTestRequestStringIpv6NullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -14231,7 +15521,10 @@ func decodeTestRequestStringNullableResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -14264,7 +15557,10 @@ func decodeTestRequestStringNullableArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -14297,7 +15593,10 @@ func decodeTestRequestStringNullableArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -14330,7 +15629,10 @@ func decodeTestRequestStringPasswordResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -14363,7 +15665,10 @@ func decodeTestRequestStringPasswordArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -14396,7 +15701,10 @@ func decodeTestRequestStringPasswordArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -14429,7 +15737,10 @@ func decodeTestRequestStringPasswordNullableResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -14462,7 +15773,10 @@ func decodeTestRequestStringPasswordNullableArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -14495,7 +15809,10 @@ func decodeTestRequestStringPasswordNullableArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -14528,7 +15845,10 @@ func decodeTestRequestStringTimeResponse(resp *http.Response) (res Error, err er } return nil }(); err != nil { - return res, err + 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: @@ -14561,7 +15881,10 @@ func decodeTestRequestStringTimeArrayResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -14594,7 +15917,10 @@ func decodeTestRequestStringTimeArrayArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -14627,7 +15953,10 @@ func decodeTestRequestStringTimeNullableResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -14660,7 +15989,10 @@ func decodeTestRequestStringTimeNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -14693,7 +16025,10 @@ func decodeTestRequestStringTimeNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -14726,7 +16061,10 @@ func decodeTestRequestStringURIResponse(resp *http.Response) (res Error, err err } return nil }(); err != nil { - return res, err + 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: @@ -14759,7 +16097,10 @@ func decodeTestRequestStringURIArrayResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -14792,7 +16133,10 @@ func decodeTestRequestStringURIArrayArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -14825,7 +16169,10 @@ func decodeTestRequestStringURINullableResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -14858,7 +16205,10 @@ func decodeTestRequestStringURINullableArrayResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -14891,7 +16241,10 @@ func decodeTestRequestStringURINullableArrayArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -14924,7 +16277,10 @@ func decodeTestRequestStringUUIDResponse(resp *http.Response) (res Error, err er } return nil }(); err != nil { - return res, err + 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: @@ -14957,7 +16313,10 @@ func decodeTestRequestStringUUIDArrayResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -14990,7 +16349,10 @@ func decodeTestRequestStringUUIDArrayArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -15023,7 +16385,10 @@ func decodeTestRequestStringUUIDNullableResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -15056,7 +16421,10 @@ func decodeTestRequestStringUUIDNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -15089,7 +16457,10 @@ func decodeTestRequestStringUUIDNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -15122,7 +16493,10 @@ func decodeTestRequestStringUnixResponse(resp *http.Response) (res Error, err er } return nil }(); err != nil { - return res, err + 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: @@ -15155,7 +16529,10 @@ func decodeTestRequestStringUnixArrayResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -15188,7 +16565,10 @@ func decodeTestRequestStringUnixArrayArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -15221,7 +16601,10 @@ func decodeTestRequestStringUnixMicroResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -15254,7 +16637,10 @@ func decodeTestRequestStringUnixMicroArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -15287,7 +16673,10 @@ func decodeTestRequestStringUnixMicroArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -15320,7 +16709,10 @@ func decodeTestRequestStringUnixMicroNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -15353,7 +16745,10 @@ func decodeTestRequestStringUnixMicroNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -15386,7 +16781,10 @@ func decodeTestRequestStringUnixMicroNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -15419,7 +16817,10 @@ func decodeTestRequestStringUnixMilliResponse(resp *http.Response) (res Error, e } return nil }(); err != nil { - return res, err + 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: @@ -15452,7 +16853,10 @@ func decodeTestRequestStringUnixMilliArrayResponse(resp *http.Response) (res Err } return nil }(); err != nil { - return res, err + 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: @@ -15485,7 +16889,10 @@ func decodeTestRequestStringUnixMilliArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -15518,7 +16925,10 @@ func decodeTestRequestStringUnixMilliNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -15551,7 +16961,10 @@ func decodeTestRequestStringUnixMilliNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -15584,7 +16997,10 @@ func decodeTestRequestStringUnixMilliNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -15617,7 +17033,10 @@ func decodeTestRequestStringUnixNanoResponse(resp *http.Response) (res Error, er } return nil }(); err != nil { - return res, err + 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: @@ -15650,7 +17069,10 @@ func decodeTestRequestStringUnixNanoArrayResponse(resp *http.Response) (res Erro } return nil }(); err != nil { - return res, err + 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: @@ -15683,7 +17105,10 @@ func decodeTestRequestStringUnixNanoArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -15716,7 +17141,10 @@ func decodeTestRequestStringUnixNanoNullableResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -15749,7 +17177,10 @@ func decodeTestRequestStringUnixNanoNullableArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -15782,7 +17213,10 @@ func decodeTestRequestStringUnixNanoNullableArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -15815,7 +17249,10 @@ func decodeTestRequestStringUnixNullableResponse(resp *http.Response) (res Error } return nil }(); err != nil { - return res, err + 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: @@ -15848,7 +17285,10 @@ func decodeTestRequestStringUnixNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -15881,7 +17321,10 @@ func decodeTestRequestStringUnixNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -15914,7 +17357,10 @@ func decodeTestRequestStringUnixSecondsResponse(resp *http.Response) (res Error, } return nil }(); err != nil { - return res, err + 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: @@ -15947,7 +17393,10 @@ func decodeTestRequestStringUnixSecondsArrayResponse(resp *http.Response) (res E } return nil }(); err != nil { - return res, err + 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: @@ -15980,7 +17429,10 @@ func decodeTestRequestStringUnixSecondsArrayArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -16013,7 +17465,10 @@ func decodeTestRequestStringUnixSecondsNullableResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -16046,7 +17501,10 @@ func decodeTestRequestStringUnixSecondsNullableArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -16079,7 +17537,10 @@ func decodeTestRequestStringUnixSecondsNullableArrayArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -16114,7 +17575,10 @@ func decodeTestResponseAnyResponse(resp *http.Response) (res jx.Raw, err error) } return nil }(); err != nil { - return res, err + 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: @@ -16149,7 +17613,10 @@ func decodeTestResponseBooleanResponse(resp *http.Response) (res bool, err error } return nil }(); err != nil { - return res, err + 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: @@ -16192,7 +17659,10 @@ func decodeTestResponseBooleanArrayResponse(resp *http.Response) (res []bool, er } return nil }(); err != nil { - return res, err + 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: @@ -16243,7 +17713,10 @@ func decodeTestResponseBooleanArrayArrayResponse(resp *http.Response) (res [][]b } return nil }(); err != nil { - return res, err + 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: @@ -16276,7 +17749,10 @@ func decodeTestResponseBooleanNullableResponse(resp *http.Response) (res NilBool } return nil }(); err != nil { - return res, err + 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: @@ -16317,7 +17793,10 @@ func decodeTestResponseBooleanNullableArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -16366,7 +17845,10 @@ func decodeTestResponseBooleanNullableArrayArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -16399,7 +17881,10 @@ func decodeTestResponseEmptyStructResponse(resp *http.Response) (res TestRespons } return nil }(); err != nil { - return res, err + 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: @@ -16432,7 +17917,10 @@ func decodeTestResponseFormatTestResponse(resp *http.Response) (res TestResponse } return nil }(); err != nil { - return res, err + 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: @@ -16467,7 +17955,10 @@ func decodeTestResponseIntegerResponse(resp *http.Response) (res int, err error) } return nil }(); err != nil { - return res, err + 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: @@ -16510,7 +18001,10 @@ func decodeTestResponseIntegerArrayResponse(resp *http.Response) (res []int, err } return nil }(); err != nil { - return res, err + 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: @@ -16561,7 +18055,10 @@ func decodeTestResponseIntegerArrayArrayResponse(resp *http.Response) (res [][]i } return nil }(); err != nil { - return res, err + 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: @@ -16596,7 +18093,10 @@ func decodeTestResponseIntegerInt32Response(resp *http.Response) (res int32, err } return nil }(); err != nil { - return res, err + 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: @@ -16639,7 +18139,10 @@ func decodeTestResponseIntegerInt32ArrayResponse(resp *http.Response) (res []int } return nil }(); err != nil { - return res, err + 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: @@ -16690,7 +18193,10 @@ func decodeTestResponseIntegerInt32ArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -16723,7 +18229,10 @@ func decodeTestResponseIntegerInt32NullableResponse(resp *http.Response) (res Ni } return nil }(); err != nil { - return res, err + 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: @@ -16764,7 +18273,10 @@ func decodeTestResponseIntegerInt32NullableArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -16813,7 +18325,10 @@ func decodeTestResponseIntegerInt32NullableArrayArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -16848,7 +18363,10 @@ func decodeTestResponseIntegerInt64Response(resp *http.Response) (res int64, err } return nil }(); err != nil { - return res, err + 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: @@ -16891,7 +18409,10 @@ func decodeTestResponseIntegerInt64ArrayResponse(resp *http.Response) (res []int } return nil }(); err != nil { - return res, err + 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: @@ -16942,7 +18463,10 @@ func decodeTestResponseIntegerInt64ArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -16975,7 +18499,10 @@ func decodeTestResponseIntegerInt64NullableResponse(resp *http.Response) (res Ni } return nil }(); err != nil { - return res, err + 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: @@ -17016,7 +18543,10 @@ func decodeTestResponseIntegerInt64NullableArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -17065,7 +18595,10 @@ func decodeTestResponseIntegerInt64NullableArrayArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -17098,7 +18631,10 @@ func decodeTestResponseIntegerNullableResponse(resp *http.Response) (res NilInt, } return nil }(); err != nil { - return res, err + 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: @@ -17139,7 +18675,10 @@ func decodeTestResponseIntegerNullableArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -17188,7 +18727,10 @@ func decodeTestResponseIntegerNullableArrayArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -17223,7 +18765,10 @@ func decodeTestResponseIntegerUintResponse(resp *http.Response) (res uint, err e } return nil }(); err != nil { - return res, err + 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: @@ -17258,7 +18803,10 @@ func decodeTestResponseIntegerUint32Response(resp *http.Response) (res uint32, e } return nil }(); err != nil { - return res, err + 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: @@ -17301,7 +18849,10 @@ func decodeTestResponseIntegerUint32ArrayResponse(resp *http.Response) (res []ui } return nil }(); err != nil { - return res, err + 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: @@ -17352,7 +18903,10 @@ func decodeTestResponseIntegerUint32ArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -17385,7 +18939,10 @@ func decodeTestResponseIntegerUint32NullableResponse(resp *http.Response) (res N } return nil }(); err != nil { - return res, err + 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: @@ -17426,7 +18983,10 @@ func decodeTestResponseIntegerUint32NullableArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -17475,7 +19035,10 @@ func decodeTestResponseIntegerUint32NullableArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -17510,7 +19073,10 @@ func decodeTestResponseIntegerUint64Response(resp *http.Response) (res uint64, e } return nil }(); err != nil { - return res, err + 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: @@ -17553,7 +19119,10 @@ func decodeTestResponseIntegerUint64ArrayResponse(resp *http.Response) (res []ui } return nil }(); err != nil { - return res, err + 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: @@ -17604,7 +19173,10 @@ func decodeTestResponseIntegerUint64ArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -17637,7 +19209,10 @@ func decodeTestResponseIntegerUint64NullableResponse(resp *http.Response) (res N } return nil }(); err != nil { - return res, err + 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: @@ -17678,7 +19253,10 @@ func decodeTestResponseIntegerUint64NullableArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -17727,7 +19305,10 @@ func decodeTestResponseIntegerUint64NullableArrayArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -17770,7 +19351,10 @@ func decodeTestResponseIntegerUintArrayResponse(resp *http.Response) (res []uint } return nil }(); err != nil { - return res, err + 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: @@ -17821,7 +19405,10 @@ func decodeTestResponseIntegerUintArrayArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -17854,7 +19441,10 @@ func decodeTestResponseIntegerUintNullableResponse(resp *http.Response) (res Nil } return nil }(); err != nil { - return res, err + 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: @@ -17895,7 +19485,10 @@ func decodeTestResponseIntegerUintNullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -17944,7 +19537,10 @@ func decodeTestResponseIntegerUintNullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -17979,7 +19575,10 @@ func decodeTestResponseIntegerUnixResponse(resp *http.Response) (res time.Time, } return nil }(); err != nil { - return res, err + 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: @@ -18022,7 +19621,10 @@ func decodeTestResponseIntegerUnixArrayResponse(resp *http.Response) (res []time } return nil }(); err != nil { - return res, err + 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: @@ -18073,7 +19675,10 @@ func decodeTestResponseIntegerUnixArrayArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -18108,7 +19713,10 @@ func decodeTestResponseIntegerUnixMicroResponse(resp *http.Response) (res time.T } return nil }(); err != nil { - return res, err + 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: @@ -18151,7 +19759,10 @@ func decodeTestResponseIntegerUnixMicroArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -18202,7 +19813,10 @@ func decodeTestResponseIntegerUnixMicroArrayArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -18235,7 +19849,10 @@ func decodeTestResponseIntegerUnixMicroNullableResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -18276,7 +19893,10 @@ func decodeTestResponseIntegerUnixMicroNullableArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -18325,7 +19945,10 @@ func decodeTestResponseIntegerUnixMicroNullableArrayArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -18360,7 +19983,10 @@ func decodeTestResponseIntegerUnixMilliResponse(resp *http.Response) (res time.T } return nil }(); err != nil { - return res, err + 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: @@ -18403,7 +20029,10 @@ func decodeTestResponseIntegerUnixMilliArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -18454,7 +20083,10 @@ func decodeTestResponseIntegerUnixMilliArrayArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -18487,7 +20119,10 @@ func decodeTestResponseIntegerUnixMilliNullableResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -18528,7 +20163,10 @@ func decodeTestResponseIntegerUnixMilliNullableArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -18577,7 +20215,10 @@ func decodeTestResponseIntegerUnixMilliNullableArrayArrayResponse(resp *http.Res } return nil }(); err != nil { - return res, err + 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: @@ -18612,7 +20253,10 @@ func decodeTestResponseIntegerUnixNanoResponse(resp *http.Response) (res time.Ti } return nil }(); err != nil { - return res, err + 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: @@ -18655,7 +20299,10 @@ func decodeTestResponseIntegerUnixNanoArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -18706,7 +20353,10 @@ func decodeTestResponseIntegerUnixNanoArrayArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -18739,7 +20389,10 @@ func decodeTestResponseIntegerUnixNanoNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -18780,7 +20433,10 @@ func decodeTestResponseIntegerUnixNanoNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -18829,7 +20485,10 @@ func decodeTestResponseIntegerUnixNanoNullableArrayArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -18862,7 +20521,10 @@ func decodeTestResponseIntegerUnixNullableResponse(resp *http.Response) (res Nil } return nil }(); err != nil { - return res, err + 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: @@ -18903,7 +20565,10 @@ func decodeTestResponseIntegerUnixNullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -18952,7 +20617,10 @@ func decodeTestResponseIntegerUnixNullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -18987,7 +20655,10 @@ func decodeTestResponseIntegerUnixSecondsResponse(resp *http.Response) (res time } return nil }(); err != nil { - return res, err + 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: @@ -19030,7 +20701,10 @@ func decodeTestResponseIntegerUnixSecondsArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -19081,7 +20755,10 @@ func decodeTestResponseIntegerUnixSecondsArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -19114,7 +20791,10 @@ func decodeTestResponseIntegerUnixSecondsNullableResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -19155,7 +20835,10 @@ func decodeTestResponseIntegerUnixSecondsNullableArrayResponse(resp *http.Respon } return nil }(); err != nil { - return res, err + 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: @@ -19204,7 +20887,10 @@ func decodeTestResponseIntegerUnixSecondsNullableArrayArrayResponse(resp *http.R } return nil }(); err != nil { - return res, err + 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: @@ -19237,7 +20923,10 @@ func decodeTestResponseNullResponse(resp *http.Response) (res struct{}, err erro } return nil }(); err != nil { - return res, err + 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: @@ -19278,7 +20967,10 @@ func decodeTestResponseNullArrayResponse(resp *http.Response) (res []struct{}, e } return nil }(); err != nil { - return res, err + 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: @@ -19327,7 +21019,10 @@ func decodeTestResponseNullArrayArrayResponse(resp *http.Response) (res [][]stru } return nil }(); err != nil { - return res, err + 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: @@ -19360,7 +21055,10 @@ func decodeTestResponseNullNullableResponse(resp *http.Response) (res struct{}, } return nil }(); err != nil { - return res, err + 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: @@ -19401,7 +21099,10 @@ func decodeTestResponseNullNullableArrayResponse(resp *http.Response) (res []str } return nil }(); err != nil { - return res, err + 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: @@ -19450,7 +21151,10 @@ func decodeTestResponseNullNullableArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -19485,7 +21189,10 @@ func decodeTestResponseNumberResponse(resp *http.Response) (res float64, err err } return nil }(); err != nil { - return res, err + 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: @@ -19528,7 +21235,10 @@ func decodeTestResponseNumberArrayResponse(resp *http.Response) (res []float64, } return nil }(); err != nil { - return res, err + 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: @@ -19579,7 +21289,10 @@ func decodeTestResponseNumberArrayArrayResponse(resp *http.Response) (res [][]fl } return nil }(); err != nil { - return res, err + 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: @@ -19614,7 +21327,10 @@ func decodeTestResponseNumberDoubleResponse(resp *http.Response) (res float64, e } return nil }(); err != nil { - return res, err + 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: @@ -19657,7 +21373,10 @@ func decodeTestResponseNumberDoubleArrayResponse(resp *http.Response) (res []flo } return nil }(); err != nil { - return res, err + 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: @@ -19708,7 +21427,10 @@ func decodeTestResponseNumberDoubleArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -19741,7 +21463,10 @@ func decodeTestResponseNumberDoubleNullableResponse(resp *http.Response) (res Ni } return nil }(); err != nil { - return res, err + 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: @@ -19782,7 +21507,10 @@ func decodeTestResponseNumberDoubleNullableArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -19831,7 +21559,10 @@ func decodeTestResponseNumberDoubleNullableArrayArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -19866,7 +21597,10 @@ func decodeTestResponseNumberFloatResponse(resp *http.Response) (res float32, er } return nil }(); err != nil { - return res, err + 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: @@ -19909,7 +21643,10 @@ func decodeTestResponseNumberFloatArrayResponse(resp *http.Response) (res []floa } return nil }(); err != nil { - return res, err + 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: @@ -19960,7 +21697,10 @@ func decodeTestResponseNumberFloatArrayArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -19993,7 +21733,10 @@ func decodeTestResponseNumberFloatNullableResponse(resp *http.Response) (res Nil } return nil }(); err != nil { - return res, err + 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: @@ -20034,7 +21777,10 @@ func decodeTestResponseNumberFloatNullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -20083,7 +21829,10 @@ func decodeTestResponseNumberFloatNullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -20118,7 +21867,10 @@ func decodeTestResponseNumberInt32Response(resp *http.Response) (res int32, err } return nil }(); err != nil { - return res, err + 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: @@ -20161,7 +21913,10 @@ func decodeTestResponseNumberInt32ArrayResponse(resp *http.Response) (res []int3 } return nil }(); err != nil { - return res, err + 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: @@ -20212,7 +21967,10 @@ func decodeTestResponseNumberInt32ArrayArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -20245,7 +22003,10 @@ func decodeTestResponseNumberInt32NullableResponse(resp *http.Response) (res Nil } return nil }(); err != nil { - return res, err + 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: @@ -20286,7 +22047,10 @@ func decodeTestResponseNumberInt32NullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -20335,7 +22099,10 @@ func decodeTestResponseNumberInt32NullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -20370,7 +22137,10 @@ func decodeTestResponseNumberInt64Response(resp *http.Response) (res int64, err } return nil }(); err != nil { - return res, err + 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: @@ -20413,7 +22183,10 @@ func decodeTestResponseNumberInt64ArrayResponse(resp *http.Response) (res []int6 } return nil }(); err != nil { - return res, err + 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: @@ -20464,7 +22237,10 @@ func decodeTestResponseNumberInt64ArrayArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -20497,7 +22273,10 @@ func decodeTestResponseNumberInt64NullableResponse(resp *http.Response) (res Nil } return nil }(); err != nil { - return res, err + 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: @@ -20538,7 +22317,10 @@ func decodeTestResponseNumberInt64NullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -20587,7 +22369,10 @@ func decodeTestResponseNumberInt64NullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -20620,7 +22405,10 @@ func decodeTestResponseNumberNullableResponse(resp *http.Response) (res NilFloat } return nil }(); err != nil { - return res, err + 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: @@ -20661,7 +22449,10 @@ func decodeTestResponseNumberNullableArrayResponse(resp *http.Response) (res []N } return nil }(); err != nil { - return res, err + 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: @@ -20710,7 +22501,10 @@ func decodeTestResponseNumberNullableArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -20745,7 +22539,10 @@ func decodeTestResponseStringResponse(resp *http.Response) (res string, err erro } return nil }(); err != nil { - return res, err + 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: @@ -20788,7 +22585,10 @@ func decodeTestResponseStringArrayResponse(resp *http.Response) (res []string, e } return nil }(); err != nil { - return res, err + 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: @@ -20839,7 +22639,10 @@ func decodeTestResponseStringArrayArrayResponse(resp *http.Response) (res [][]st } return nil }(); err != nil { - return res, err + 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: @@ -20874,7 +22677,10 @@ func decodeTestResponseStringBinaryResponse(resp *http.Response) (res string, er } return nil }(); err != nil { - return res, err + 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: @@ -20917,7 +22723,10 @@ func decodeTestResponseStringBinaryArrayResponse(resp *http.Response) (res []str } return nil }(); err != nil { - return res, err + 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: @@ -20968,7 +22777,10 @@ func decodeTestResponseStringBinaryArrayArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -21001,7 +22813,10 @@ func decodeTestResponseStringBinaryNullableResponse(resp *http.Response) (res Ni } return nil }(); err != nil { - return res, err + 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: @@ -21042,7 +22857,10 @@ func decodeTestResponseStringBinaryNullableArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -21091,7 +22909,10 @@ func decodeTestResponseStringBinaryNullableArrayArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -21126,7 +22947,10 @@ func decodeTestResponseStringByteResponse(resp *http.Response) (res []byte, err } return nil }(); err != nil { - return res, err + 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: @@ -21169,7 +22993,10 @@ func decodeTestResponseStringByteArrayResponse(resp *http.Response) (res [][]byt } return nil }(); err != nil { - return res, err + 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: @@ -21220,7 +23047,10 @@ func decodeTestResponseStringByteArrayArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -21255,7 +23085,10 @@ func decodeTestResponseStringByteNullableResponse(resp *http.Response) (res []by } return nil }(); err != nil { - return res, err + 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: @@ -21298,7 +23131,10 @@ func decodeTestResponseStringByteNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -21349,7 +23185,10 @@ func decodeTestResponseStringByteNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -21384,7 +23223,10 @@ func decodeTestResponseStringDateResponse(resp *http.Response) (res time.Time, e } return nil }(); err != nil { - return res, err + 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: @@ -21427,7 +23269,10 @@ func decodeTestResponseStringDateArrayResponse(resp *http.Response) (res []time. } return nil }(); err != nil { - return res, err + 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: @@ -21478,7 +23323,10 @@ func decodeTestResponseStringDateArrayArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -21511,7 +23359,10 @@ func decodeTestResponseStringDateNullableResponse(resp *http.Response) (res NilD } return nil }(); err != nil { - return res, err + 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: @@ -21552,7 +23403,10 @@ func decodeTestResponseStringDateNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -21601,7 +23455,10 @@ func decodeTestResponseStringDateNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -21636,7 +23493,10 @@ func decodeTestResponseStringDateTimeResponse(resp *http.Response) (res time.Tim } return nil }(); err != nil { - return res, err + 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: @@ -21679,7 +23539,10 @@ func decodeTestResponseStringDateTimeArrayResponse(resp *http.Response) (res []t } return nil }(); err != nil { - return res, err + 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: @@ -21730,7 +23593,10 @@ func decodeTestResponseStringDateTimeArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -21763,7 +23629,10 @@ func decodeTestResponseStringDateTimeNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -21804,7 +23673,10 @@ func decodeTestResponseStringDateTimeNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -21853,7 +23725,10 @@ func decodeTestResponseStringDateTimeNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -21888,7 +23763,10 @@ func decodeTestResponseStringDurationResponse(resp *http.Response) (res time.Dur } return nil }(); err != nil { - return res, err + 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: @@ -21931,7 +23809,10 @@ func decodeTestResponseStringDurationArrayResponse(resp *http.Response) (res []t } return nil }(); err != nil { - return res, err + 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: @@ -21982,7 +23863,10 @@ func decodeTestResponseStringDurationArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -22015,7 +23899,10 @@ func decodeTestResponseStringDurationNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -22056,7 +23943,10 @@ func decodeTestResponseStringDurationNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -22105,7 +23995,10 @@ func decodeTestResponseStringDurationNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -22140,7 +24033,10 @@ func decodeTestResponseStringEmailResponse(resp *http.Response) (res string, err } return nil }(); err != nil { - return res, err + 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: @@ -22183,7 +24079,10 @@ func decodeTestResponseStringEmailArrayResponse(resp *http.Response) (res []stri } return nil }(); err != nil { - return res, err + 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: @@ -22234,7 +24133,10 @@ func decodeTestResponseStringEmailArrayArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -22267,7 +24169,10 @@ func decodeTestResponseStringEmailNullableResponse(resp *http.Response) (res Nil } return nil }(); err != nil { - return res, err + 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: @@ -22308,7 +24213,10 @@ func decodeTestResponseStringEmailNullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -22357,7 +24265,10 @@ func decodeTestResponseStringEmailNullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -22392,7 +24303,10 @@ func decodeTestResponseStringHostnameResponse(resp *http.Response) (res string, } return nil }(); err != nil { - return res, err + 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: @@ -22435,7 +24349,10 @@ func decodeTestResponseStringHostnameArrayResponse(resp *http.Response) (res []s } return nil }(); err != nil { - return res, err + 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: @@ -22486,7 +24403,10 @@ func decodeTestResponseStringHostnameArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -22519,7 +24439,10 @@ func decodeTestResponseStringHostnameNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -22560,7 +24483,10 @@ func decodeTestResponseStringHostnameNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -22609,7 +24535,10 @@ func decodeTestResponseStringHostnameNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -22644,7 +24573,10 @@ func decodeTestResponseStringIPResponse(resp *http.Response) (res netip.Addr, er } return nil }(); err != nil { - return res, err + 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: @@ -22687,7 +24619,10 @@ func decodeTestResponseStringIPArrayResponse(resp *http.Response) (res []netip.A } return nil }(); err != nil { - return res, err + 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: @@ -22738,7 +24673,10 @@ func decodeTestResponseStringIPArrayArrayResponse(resp *http.Response) (res [][] } return nil }(); err != nil { - return res, err + 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: @@ -22771,7 +24709,10 @@ func decodeTestResponseStringIPNullableResponse(resp *http.Response) (res NilIP, } return nil }(); err != nil { - return res, err + 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: @@ -22812,7 +24753,10 @@ func decodeTestResponseStringIPNullableArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -22861,7 +24805,10 @@ func decodeTestResponseStringIPNullableArrayArrayResponse(resp *http.Response) ( } return nil }(); err != nil { - return res, err + 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: @@ -22896,7 +24843,10 @@ func decodeTestResponseStringInt32Response(resp *http.Response) (res int32, err } return nil }(); err != nil { - return res, err + 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: @@ -22939,7 +24889,10 @@ func decodeTestResponseStringInt32ArrayResponse(resp *http.Response) (res []int3 } return nil }(); err != nil { - return res, err + 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: @@ -22990,7 +24943,10 @@ func decodeTestResponseStringInt32ArrayArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -23023,7 +24979,10 @@ func decodeTestResponseStringInt32NullableResponse(resp *http.Response) (res Nil } return nil }(); err != nil { - return res, err + 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: @@ -23064,7 +25023,10 @@ func decodeTestResponseStringInt32NullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -23113,7 +25075,10 @@ func decodeTestResponseStringInt32NullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -23148,7 +25113,10 @@ func decodeTestResponseStringInt64Response(resp *http.Response) (res int64, err } return nil }(); err != nil { - return res, err + 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: @@ -23191,7 +25159,10 @@ func decodeTestResponseStringInt64ArrayResponse(resp *http.Response) (res []int6 } return nil }(); err != nil { - return res, err + 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: @@ -23242,7 +25213,10 @@ func decodeTestResponseStringInt64ArrayArrayResponse(resp *http.Response) (res [ } return nil }(); err != nil { - return res, err + 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: @@ -23275,7 +25249,10 @@ func decodeTestResponseStringInt64NullableResponse(resp *http.Response) (res Nil } return nil }(); err != nil { - return res, err + 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: @@ -23316,7 +25293,10 @@ func decodeTestResponseStringInt64NullableArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -23365,7 +25345,10 @@ func decodeTestResponseStringInt64NullableArrayArrayResponse(resp *http.Response } return nil }(); err != nil { - return res, err + 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: @@ -23400,7 +25383,10 @@ func decodeTestResponseStringIpv4Response(resp *http.Response) (res netip.Addr, } return nil }(); err != nil { - return res, err + 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: @@ -23443,7 +25429,10 @@ func decodeTestResponseStringIpv4ArrayResponse(resp *http.Response) (res []netip } return nil }(); err != nil { - return res, err + 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: @@ -23494,7 +25483,10 @@ func decodeTestResponseStringIpv4ArrayArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -23527,7 +25519,10 @@ func decodeTestResponseStringIpv4NullableResponse(resp *http.Response) (res NilI } return nil }(); err != nil { - return res, err + 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: @@ -23568,7 +25563,10 @@ func decodeTestResponseStringIpv4NullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23617,7 +25615,10 @@ func decodeTestResponseStringIpv4NullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -23652,7 +25653,10 @@ func decodeTestResponseStringIpv6Response(resp *http.Response) (res netip.Addr, } return nil }(); err != nil { - return res, err + 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: @@ -23695,7 +25699,10 @@ func decodeTestResponseStringIpv6ArrayResponse(resp *http.Response) (res []netip } return nil }(); err != nil { - return res, err + 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: @@ -23746,7 +25753,10 @@ func decodeTestResponseStringIpv6ArrayArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -23779,7 +25789,10 @@ func decodeTestResponseStringIpv6NullableResponse(resp *http.Response) (res NilI } return nil }(); err != nil { - return res, err + 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: @@ -23820,7 +25833,10 @@ func decodeTestResponseStringIpv6NullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -23869,7 +25885,10 @@ func decodeTestResponseStringIpv6NullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -23902,7 +25921,10 @@ func decodeTestResponseStringNullableResponse(resp *http.Response) (res NilStrin } return nil }(); err != nil { - return res, err + 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: @@ -23943,7 +25965,10 @@ func decodeTestResponseStringNullableArrayResponse(resp *http.Response) (res []N } return nil }(); err != nil { - return res, err + 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: @@ -23992,7 +26017,10 @@ func decodeTestResponseStringNullableArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -24027,7 +26055,10 @@ func decodeTestResponseStringPasswordResponse(resp *http.Response) (res string, } return nil }(); err != nil { - return res, err + 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: @@ -24070,7 +26101,10 @@ func decodeTestResponseStringPasswordArrayResponse(resp *http.Response) (res []s } return nil }(); err != nil { - return res, err + 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: @@ -24121,7 +26155,10 @@ func decodeTestResponseStringPasswordArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -24154,7 +26191,10 @@ func decodeTestResponseStringPasswordNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24195,7 +26235,10 @@ func decodeTestResponseStringPasswordNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -24244,7 +26287,10 @@ func decodeTestResponseStringPasswordNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -24279,7 +26325,10 @@ func decodeTestResponseStringTimeResponse(resp *http.Response) (res time.Time, e } return nil }(); err != nil { - return res, err + 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: @@ -24322,7 +26371,10 @@ func decodeTestResponseStringTimeArrayResponse(resp *http.Response) (res []time. } return nil }(); err != nil { - return res, err + 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: @@ -24373,7 +26425,10 @@ func decodeTestResponseStringTimeArrayArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -24406,7 +26461,10 @@ func decodeTestResponseStringTimeNullableResponse(resp *http.Response) (res NilT } return nil }(); err != nil { - return res, err + 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: @@ -24447,7 +26505,10 @@ func decodeTestResponseStringTimeNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24496,7 +26557,10 @@ func decodeTestResponseStringTimeNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -24531,7 +26595,10 @@ func decodeTestResponseStringURIResponse(resp *http.Response) (res url.URL, err } return nil }(); err != nil { - return res, err + 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: @@ -24574,7 +26641,10 @@ func decodeTestResponseStringURIArrayResponse(resp *http.Response) (res []url.UR } return nil }(); err != nil { - return res, err + 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: @@ -24625,7 +26695,10 @@ func decodeTestResponseStringURIArrayArrayResponse(resp *http.Response) (res [][ } return nil }(); err != nil { - return res, err + 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: @@ -24658,7 +26731,10 @@ func decodeTestResponseStringURINullableResponse(resp *http.Response) (res NilUR } return nil }(); err != nil { - return res, err + 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: @@ -24699,7 +26775,10 @@ func decodeTestResponseStringURINullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -24748,7 +26827,10 @@ func decodeTestResponseStringURINullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -24783,7 +26865,10 @@ func decodeTestResponseStringUUIDResponse(resp *http.Response) (res uuid.UUID, e } return nil }(); err != nil { - return res, err + 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: @@ -24826,7 +26911,10 @@ func decodeTestResponseStringUUIDArrayResponse(resp *http.Response) (res []uuid. } return nil }(); err != nil { - return res, err + 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: @@ -24877,7 +26965,10 @@ func decodeTestResponseStringUUIDArrayArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -24910,7 +27001,10 @@ func decodeTestResponseStringUUIDNullableResponse(resp *http.Response) (res NilU } return nil }(); err != nil { - return res, err + 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: @@ -24951,7 +27045,10 @@ func decodeTestResponseStringUUIDNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -25000,7 +27097,10 @@ func decodeTestResponseStringUUIDNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -25035,7 +27135,10 @@ func decodeTestResponseStringUnixResponse(resp *http.Response) (res time.Time, e } return nil }(); err != nil { - return res, err + 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: @@ -25078,7 +27181,10 @@ func decodeTestResponseStringUnixArrayResponse(resp *http.Response) (res []time. } return nil }(); err != nil { - return res, err + 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: @@ -25129,7 +27235,10 @@ func decodeTestResponseStringUnixArrayArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -25164,7 +27273,10 @@ func decodeTestResponseStringUnixMicroResponse(resp *http.Response) (res time.Ti } return nil }(); err != nil { - return res, err + 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: @@ -25207,7 +27319,10 @@ func decodeTestResponseStringUnixMicroArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -25258,7 +27373,10 @@ func decodeTestResponseStringUnixMicroArrayArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -25291,7 +27409,10 @@ func decodeTestResponseStringUnixMicroNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -25332,7 +27453,10 @@ func decodeTestResponseStringUnixMicroNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -25381,7 +27505,10 @@ func decodeTestResponseStringUnixMicroNullableArrayArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -25416,7 +27543,10 @@ func decodeTestResponseStringUnixMilliResponse(resp *http.Response) (res time.Ti } return nil }(); err != nil { - return res, err + 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: @@ -25459,7 +27589,10 @@ func decodeTestResponseStringUnixMilliArrayResponse(resp *http.Response) (res [] } return nil }(); err != nil { - return res, err + 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: @@ -25510,7 +27643,10 @@ func decodeTestResponseStringUnixMilliArrayArrayResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -25543,7 +27679,10 @@ func decodeTestResponseStringUnixMilliNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -25584,7 +27723,10 @@ func decodeTestResponseStringUnixMilliNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -25633,7 +27775,10 @@ func decodeTestResponseStringUnixMilliNullableArrayArrayResponse(resp *http.Resp } return nil }(); err != nil { - return res, err + 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: @@ -25668,7 +27813,10 @@ func decodeTestResponseStringUnixNanoResponse(resp *http.Response) (res time.Tim } return nil }(); err != nil { - return res, err + 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: @@ -25711,7 +27859,10 @@ func decodeTestResponseStringUnixNanoArrayResponse(resp *http.Response) (res []t } return nil }(); err != nil { - return res, err + 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: @@ -25762,7 +27913,10 @@ func decodeTestResponseStringUnixNanoArrayArrayResponse(resp *http.Response) (re } return nil }(); err != nil { - return res, err + 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: @@ -25795,7 +27949,10 @@ func decodeTestResponseStringUnixNanoNullableResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -25836,7 +27993,10 @@ func decodeTestResponseStringUnixNanoNullableArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -25885,7 +28045,10 @@ func decodeTestResponseStringUnixNanoNullableArrayArrayResponse(resp *http.Respo } return nil }(); err != nil { - return res, err + 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: @@ -25918,7 +28081,10 @@ func decodeTestResponseStringUnixNullableResponse(resp *http.Response) (res NilS } return nil }(); err != nil { - return res, err + 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: @@ -25959,7 +28125,10 @@ func decodeTestResponseStringUnixNullableArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -26008,7 +28177,10 @@ func decodeTestResponseStringUnixNullableArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -26043,7 +28215,10 @@ func decodeTestResponseStringUnixSecondsResponse(resp *http.Response) (res time. } return nil }(); err != nil { - return res, err + 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: @@ -26086,7 +28261,10 @@ func decodeTestResponseStringUnixSecondsArrayResponse(resp *http.Response) (res } return nil }(); err != nil { - return res, err + 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: @@ -26137,7 +28315,10 @@ func decodeTestResponseStringUnixSecondsArrayArrayResponse(resp *http.Response) } return nil }(); err != nil { - return res, err + 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: @@ -26170,7 +28351,10 @@ func decodeTestResponseStringUnixSecondsNullableResponse(resp *http.Response) (r } return nil }(); err != nil { - return res, err + 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: @@ -26211,7 +28395,10 @@ func decodeTestResponseStringUnixSecondsNullableArrayResponse(resp *http.Respons } return nil }(); err != nil { - return res, err + 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: @@ -26260,7 +28447,10 @@ func decodeTestResponseStringUnixSecondsNullableArrayArrayResponse(resp *http.Re } return nil }(); err != nil { - return res, err + 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: diff --git a/examples/ex_tinkoff/oas_request_decoders_gen.go b/examples/ex_tinkoff/oas_request_decoders_gen.go index 99254ea8d..48e84c15e 100644 --- a/examples/ex_tinkoff/oas_request_decoders_gen.go +++ b/examples/ex_tinkoff/oas_request_decoders_gen.go @@ -63,6 +63,9 @@ func (s *Server) decodeOrdersLimitOrderPostRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -126,6 +129,9 @@ func (s *Server) decodeOrdersMarketOrderPostRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -189,6 +195,9 @@ func (s *Server) decodeSandboxCurrenciesBalancePostRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -252,6 +261,9 @@ func (s *Server) decodeSandboxPositionsBalancePostRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -319,6 +331,9 @@ func (s *Server) decodeSandboxRegisterPostRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { diff --git a/examples/ex_tinkoff/oas_response_decoders_gen.go b/examples/ex_tinkoff/oas_response_decoders_gen.go index a304cc772..400f7142f 100644 --- a/examples/ex_tinkoff/oas_response_decoders_gen.go +++ b/examples/ex_tinkoff/oas_response_decoders_gen.go @@ -36,7 +36,10 @@ func decodeMarketBondsGetResponse(resp *http.Response) (res MarketBondsGetRes, e } return nil }(); err != nil { - return res, err + 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: @@ -63,7 +66,10 @@ func decodeMarketBondsGetResponse(resp *http.Response) (res MarketBondsGetRes, e } return nil }(); err != nil { - return res, err + 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: @@ -96,7 +102,10 @@ func decodeMarketCandlesGetResponse(resp *http.Response) (res MarketCandlesGetRe } return nil }(); err != nil { - return res, err + 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: @@ -123,7 +132,10 @@ func decodeMarketCandlesGetResponse(resp *http.Response) (res MarketCandlesGetRe } return nil }(); err != nil { - return res, err + 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: @@ -156,7 +168,10 @@ func decodeMarketCurrenciesGetResponse(resp *http.Response) (res MarketCurrencie } return nil }(); err != nil { - return res, err + 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: @@ -183,7 +198,10 @@ func decodeMarketCurrenciesGetResponse(resp *http.Response) (res MarketCurrencie } return nil }(); err != nil { - return res, err + 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: @@ -216,7 +234,10 @@ func decodeMarketEtfsGetResponse(resp *http.Response) (res MarketEtfsGetRes, err } return nil }(); err != nil { - return res, err + 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: @@ -243,7 +264,10 @@ func decodeMarketEtfsGetResponse(resp *http.Response) (res MarketEtfsGetRes, err } return nil }(); err != nil { - return res, err + 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: @@ -276,7 +300,10 @@ func decodeMarketOrderbookGetResponse(resp *http.Response) (res MarketOrderbookG } return nil }(); err != nil { - return res, err + 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: @@ -303,7 +330,10 @@ func decodeMarketOrderbookGetResponse(resp *http.Response) (res MarketOrderbookG } return nil }(); err != nil { - return res, err + 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: @@ -336,7 +366,10 @@ func decodeMarketSearchByFigiGetResponse(resp *http.Response) (res MarketSearchB } return nil }(); err != nil { - return res, err + 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: @@ -363,7 +396,10 @@ func decodeMarketSearchByFigiGetResponse(resp *http.Response) (res MarketSearchB } return nil }(); err != nil { - return res, err + 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: @@ -396,7 +432,10 @@ func decodeMarketSearchByTickerGetResponse(resp *http.Response) (res MarketSearc } return nil }(); err != nil { - return res, err + 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: @@ -423,7 +462,10 @@ func decodeMarketSearchByTickerGetResponse(resp *http.Response) (res MarketSearc } return nil }(); err != nil { - return res, err + 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: @@ -456,7 +498,10 @@ func decodeMarketStocksGetResponse(resp *http.Response) (res MarketStocksGetRes, } return nil }(); err != nil { - return res, err + 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: @@ -483,7 +528,10 @@ func decodeMarketStocksGetResponse(resp *http.Response) (res MarketStocksGetRes, } return nil }(); err != nil { - return res, err + 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: @@ -516,7 +564,10 @@ func decodeOperationsGetResponse(resp *http.Response) (res OperationsGetRes, err } return nil }(); err != nil { - return res, err + 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: @@ -543,7 +594,10 @@ func decodeOperationsGetResponse(resp *http.Response) (res OperationsGetRes, err } return nil }(); err != nil { - return res, err + 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: @@ -576,7 +630,10 @@ func decodeOrdersCancelPostResponse(resp *http.Response) (res OrdersCancelPostRe } return nil }(); err != nil { - return res, err + 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: @@ -603,7 +660,10 @@ func decodeOrdersCancelPostResponse(resp *http.Response) (res OrdersCancelPostRe } return nil }(); err != nil { - return res, err + 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: @@ -636,7 +696,10 @@ func decodeOrdersGetResponse(resp *http.Response) (res OrdersGetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -663,7 +726,10 @@ func decodeOrdersGetResponse(resp *http.Response) (res OrdersGetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -696,7 +762,10 @@ func decodeOrdersLimitOrderPostResponse(resp *http.Response) (res OrdersLimitOrd } return nil }(); err != nil { - return res, err + 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: @@ -723,7 +792,10 @@ func decodeOrdersLimitOrderPostResponse(resp *http.Response) (res OrdersLimitOrd } return nil }(); err != nil { - return res, err + 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: @@ -756,7 +828,10 @@ func decodeOrdersMarketOrderPostResponse(resp *http.Response) (res OrdersMarketO } return nil }(); err != nil { - return res, err + 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: @@ -783,7 +858,10 @@ func decodeOrdersMarketOrderPostResponse(resp *http.Response) (res OrdersMarketO } return nil }(); err != nil { - return res, err + 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: @@ -816,7 +894,10 @@ func decodePortfolioCurrenciesGetResponse(resp *http.Response) (res PortfolioCur } return nil }(); err != nil { - return res, err + 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: @@ -843,7 +924,10 @@ func decodePortfolioCurrenciesGetResponse(resp *http.Response) (res PortfolioCur } return nil }(); err != nil { - return res, err + 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: @@ -876,7 +960,10 @@ func decodePortfolioGetResponse(resp *http.Response) (res PortfolioGetRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -903,7 +990,10 @@ func decodePortfolioGetResponse(resp *http.Response) (res PortfolioGetRes, err e } return nil }(); err != nil { - return res, err + 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: @@ -936,7 +1026,10 @@ func decodeSandboxClearPostResponse(resp *http.Response) (res SandboxClearPostRe } return nil }(); err != nil { - return res, err + 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: @@ -963,7 +1056,10 @@ func decodeSandboxClearPostResponse(resp *http.Response) (res SandboxClearPostRe } return nil }(); err != nil { - return res, err + 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: @@ -996,7 +1092,10 @@ func decodeSandboxCurrenciesBalancePostResponse(resp *http.Response) (res Sandbo } return nil }(); err != nil { - return res, err + 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: @@ -1023,7 +1122,10 @@ func decodeSandboxCurrenciesBalancePostResponse(resp *http.Response) (res Sandbo } return nil }(); err != nil { - return res, err + 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: @@ -1056,7 +1158,10 @@ func decodeSandboxPositionsBalancePostResponse(resp *http.Response) (res Sandbox } return nil }(); err != nil { - return res, err + 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: @@ -1083,7 +1188,10 @@ func decodeSandboxPositionsBalancePostResponse(resp *http.Response) (res Sandbox } return nil }(); err != nil { - return res, err + 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: @@ -1116,7 +1224,10 @@ func decodeSandboxRegisterPostResponse(resp *http.Response) (res SandboxRegister } return nil }(); err != nil { - return res, err + 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: @@ -1143,7 +1254,10 @@ func decodeSandboxRegisterPostResponse(resp *http.Response) (res SandboxRegister } return nil }(); err != nil { - return res, err + 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: @@ -1176,7 +1290,10 @@ func decodeSandboxRemovePostResponse(resp *http.Response) (res SandboxRemovePost } return nil }(); err != nil { - return res, err + 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: @@ -1203,7 +1320,10 @@ func decodeSandboxRemovePostResponse(resp *http.Response) (res SandboxRemovePost } return nil }(); err != nil { - return res, err + 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: @@ -1236,7 +1356,10 @@ func decodeUserAccountsGetResponse(resp *http.Response) (res UserAccountsGetRes, } return nil }(); err != nil { - return res, err + 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: @@ -1263,7 +1386,10 @@ func decodeUserAccountsGetResponse(resp *http.Response) (res UserAccountsGetRes, } return nil }(); err != nil { - return res, err + 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: diff --git a/internal/referenced_path_item/oas_response_decoders_gen.go b/internal/referenced_path_item/oas_response_decoders_gen.go index 88021ebf4..b4956a498 100644 --- a/internal/referenced_path_item/oas_response_decoders_gen.go +++ b/internal/referenced_path_item/oas_response_decoders_gen.go @@ -38,7 +38,10 @@ func decodeFooGetResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: diff --git a/internal/sample_api/oas_request_decoders_gen.go b/internal/sample_api/oas_request_decoders_gen.go index 38d8713af..7547260ad 100644 --- a/internal/sample_api/oas_request_decoders_gen.go +++ b/internal/sample_api/oas_request_decoders_gen.go @@ -63,6 +63,9 @@ func (s *Server) decodeDefaultTestRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -130,6 +133,9 @@ func (s *Server) decodeFoobarPostRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -200,6 +206,9 @@ func (s *Server) decodeOneofBugRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -267,6 +276,9 @@ func (s *Server) decodePetCreateRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -341,6 +353,9 @@ func (s *Server) decodePetUpdateNameAliasPostRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -415,6 +430,9 @@ func (s *Server) decodePetUpdateNamePostRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -529,6 +547,9 @@ func (s *Server) decodeTestFloatValidationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err diff --git a/internal/sample_api/oas_response_decoders_gen.go b/internal/sample_api/oas_response_decoders_gen.go index 327845301..d7b3c3efd 100644 --- a/internal/sample_api/oas_response_decoders_gen.go +++ b/internal/sample_api/oas_response_decoders_gen.go @@ -39,7 +39,10 @@ func decodeDataGetFormatResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -74,7 +77,10 @@ func decodeDefaultTestResponse(resp *http.Response) (res int32, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -105,7 +111,10 @@ func decodeErrorGetResponse(resp *http.Response) (res ErrorStatusCode, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -139,7 +148,10 @@ func decodeFoobarGetResponse(resp *http.Response) (res FoobarGetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -175,7 +187,10 @@ func decodeFoobarPostResponse(resp *http.Response) (res FoobarPostRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -205,7 +220,10 @@ func decodeFoobarPostResponse(resp *http.Response) (res FoobarPostRes, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -246,7 +264,10 @@ func decodeGetHeaderResponse(resp *http.Response) (res Hash, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -279,7 +300,10 @@ func decodeNoAdditionalPropertiesTestResponse(resp *http.Response) (res NoAdditi } return nil }(); err != nil { - return res, err + 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: @@ -310,7 +334,10 @@ func decodeNullableDefaultResponseResponse(resp *http.Response) (res NilIntStatu } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return NilIntStatusCode{ StatusCode: resp.StatusCode, @@ -353,7 +380,10 @@ func decodePatternRecursiveMapGetResponse(resp *http.Response) (res PatternRecur } return nil }(); err != nil { - return res, err + 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: @@ -386,7 +416,10 @@ func decodePetCreateResponse(resp *http.Response) (res Pet, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -429,7 +462,10 @@ func decodePetFriendsNamesByIDResponse(resp *http.Response) (res []string, err e } return nil }(); err != nil { - return res, err + 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: @@ -462,7 +498,10 @@ func decodePetGetResponse(resp *http.Response) (res PetGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -489,7 +528,10 @@ func decodePetGetResponse(resp *http.Response) (res PetGetRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &PetGetDefStatusCode{ StatusCode: resp.StatusCode, @@ -544,7 +586,10 @@ func decodePetGetAvatarByIDResponse(resp *http.Response) (res PetGetAvatarByIDRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -599,7 +644,10 @@ func decodePetGetAvatarByNameResponse(resp *http.Response) (res PetGetAvatarByNa } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -633,7 +681,10 @@ func decodePetGetByNameResponse(resp *http.Response) (res Pet, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -668,7 +719,10 @@ func decodePetNameByIDResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -721,7 +775,10 @@ func decodePetUploadAvatarByIDResponse(resp *http.Response) (res PetUploadAvatar } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -755,7 +812,10 @@ func decodeRecursiveArrayGetResponse(resp *http.Response) (res RecursiveArray, e } return nil }(); err != nil { - return res, err + 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: @@ -788,7 +848,10 @@ func decodeRecursiveMapGetResponse(resp *http.Response) (res RecursiveMap, err e } return nil }(); err != nil { - return res, err + 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: @@ -823,7 +886,10 @@ func decodeSecurityTestResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -856,7 +922,10 @@ func decodeStringIntMapGetResponse(resp *http.Response) (res StringIntMap, err e } return nil }(); err != nil { - return res, err + 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: @@ -891,7 +960,10 @@ func decodeTestContentParameterResponse(resp *http.Response) (res string, err er } return nil }(); err != nil { - return res, err + 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: @@ -933,7 +1005,10 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } return nil }(); err != nil { - return res, err + 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: @@ -960,7 +1035,10 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } return nil }(); err != nil { - return res, err + 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: @@ -987,7 +1065,10 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } return nil }(); err != nil { - return res, err + 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: @@ -1020,7 +1101,10 @@ func decodeTestObjectQueryParameterResponse(resp *http.Response) (res TestObject } return nil }(); err != nil { - return res, err + 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: diff --git a/internal/sample_api_nc/oas_request_decoders_gen.go b/internal/sample_api_nc/oas_request_decoders_gen.go index 38d8713af..7547260ad 100644 --- a/internal/sample_api_nc/oas_request_decoders_gen.go +++ b/internal/sample_api_nc/oas_request_decoders_gen.go @@ -63,6 +63,9 @@ func (s *Server) decodeDefaultTestRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -130,6 +133,9 @@ func (s *Server) decodeFoobarPostRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -200,6 +206,9 @@ func (s *Server) decodeOneofBugRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -267,6 +276,9 @@ func (s *Server) decodePetCreateRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -341,6 +353,9 @@ func (s *Server) decodePetUpdateNameAliasPostRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -415,6 +430,9 @@ func (s *Server) decodePetUpdateNamePostRequest(r *http.Request) ( }(); err != nil { 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 { if request.Set { if err := func() error { @@ -529,6 +547,9 @@ func (s *Server) decodeTestFloatValidationRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err diff --git a/internal/sample_api_ns/oas_response_decoders_gen.go b/internal/sample_api_ns/oas_response_decoders_gen.go index 327845301..d7b3c3efd 100644 --- a/internal/sample_api_ns/oas_response_decoders_gen.go +++ b/internal/sample_api_ns/oas_response_decoders_gen.go @@ -39,7 +39,10 @@ func decodeDataGetFormatResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -74,7 +77,10 @@ func decodeDefaultTestResponse(resp *http.Response) (res int32, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -105,7 +111,10 @@ func decodeErrorGetResponse(resp *http.Response) (res ErrorStatusCode, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -139,7 +148,10 @@ func decodeFoobarGetResponse(resp *http.Response) (res FoobarGetRes, err error) } return nil }(); err != nil { - return res, err + 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: @@ -175,7 +187,10 @@ func decodeFoobarPostResponse(resp *http.Response) (res FoobarPostRes, err error } return nil }(); err != nil { - return res, err + 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: @@ -205,7 +220,10 @@ func decodeFoobarPostResponse(resp *http.Response) (res FoobarPostRes, err error } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -246,7 +264,10 @@ func decodeGetHeaderResponse(resp *http.Response) (res Hash, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -279,7 +300,10 @@ func decodeNoAdditionalPropertiesTestResponse(resp *http.Response) (res NoAdditi } return nil }(); err != nil { - return res, err + 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: @@ -310,7 +334,10 @@ func decodeNullableDefaultResponseResponse(resp *http.Response) (res NilIntStatu } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return NilIntStatusCode{ StatusCode: resp.StatusCode, @@ -353,7 +380,10 @@ func decodePatternRecursiveMapGetResponse(resp *http.Response) (res PatternRecur } return nil }(); err != nil { - return res, err + 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: @@ -386,7 +416,10 @@ func decodePetCreateResponse(resp *http.Response) (res Pet, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -429,7 +462,10 @@ func decodePetFriendsNamesByIDResponse(resp *http.Response) (res []string, err e } return nil }(); err != nil { - return res, err + 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: @@ -462,7 +498,10 @@ func decodePetGetResponse(resp *http.Response) (res PetGetRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -489,7 +528,10 @@ func decodePetGetResponse(resp *http.Response) (res PetGetRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &PetGetDefStatusCode{ StatusCode: resp.StatusCode, @@ -544,7 +586,10 @@ func decodePetGetAvatarByIDResponse(resp *http.Response) (res PetGetAvatarByIDRe } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -599,7 +644,10 @@ func decodePetGetAvatarByNameResponse(resp *http.Response) (res PetGetAvatarByNa } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -633,7 +681,10 @@ func decodePetGetByNameResponse(resp *http.Response) (res Pet, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -668,7 +719,10 @@ func decodePetNameByIDResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -721,7 +775,10 @@ func decodePetUploadAvatarByIDResponse(resp *http.Response) (res PetUploadAvatar } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -755,7 +812,10 @@ func decodeRecursiveArrayGetResponse(resp *http.Response) (res RecursiveArray, e } return nil }(); err != nil { - return res, err + 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: @@ -788,7 +848,10 @@ func decodeRecursiveMapGetResponse(resp *http.Response) (res RecursiveMap, err e } return nil }(); err != nil { - return res, err + 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: @@ -823,7 +886,10 @@ func decodeSecurityTestResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -856,7 +922,10 @@ func decodeStringIntMapGetResponse(resp *http.Response) (res StringIntMap, err e } return nil }(); err != nil { - return res, err + 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: @@ -891,7 +960,10 @@ func decodeTestContentParameterResponse(resp *http.Response) (res string, err er } return nil }(); err != nil { - return res, err + 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: @@ -933,7 +1005,10 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } return nil }(); err != nil { - return res, err + 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: @@ -960,7 +1035,10 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } return nil }(); err != nil { - return res, err + 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: @@ -987,7 +1065,10 @@ func decodeTestNullableOneofsResponse(resp *http.Response) (res TestNullableOneo } return nil }(); err != nil { - return res, err + 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: @@ -1020,7 +1101,10 @@ func decodeTestObjectQueryParameterResponse(resp *http.Response) (res TestObject } return nil }(); err != nil { - return res, err + 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: diff --git a/internal/sample_err/oas_request_decoders_gen.go b/internal/sample_err/oas_request_decoders_gen.go index e9bb26abc..8b0a25c15 100644 --- a/internal/sample_err/oas_request_decoders_gen.go +++ b/internal/sample_err/oas_request_decoders_gen.go @@ -67,6 +67,9 @@ func (s *Server) decodeDataCreateRequest(r *http.Request) ( }(); err != nil { 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) diff --git a/internal/sample_err/oas_response_decoders_gen.go b/internal/sample_err/oas_response_decoders_gen.go index f881a2b5f..c49d7de9e 100644 --- a/internal/sample_err/oas_response_decoders_gen.go +++ b/internal/sample_err/oas_response_decoders_gen.go @@ -36,7 +36,10 @@ func decodeDataCreateResponse(resp *http.Response) (res Data, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -64,7 +67,10 @@ func decodeDataCreateResponse(resp *http.Response) (res Data, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, @@ -103,7 +109,10 @@ func decodeDataGetResponse(resp *http.Response) (res Data, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -131,7 +140,10 @@ func decodeDataGetResponse(resp *http.Response) (res Data, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode, diff --git a/internal/techempower/oas_response_decoders_gen.go b/internal/techempower/oas_response_decoders_gen.go index ccae5cf35..f4ff7b74b 100644 --- a/internal/techempower/oas_response_decoders_gen.go +++ b/internal/techempower/oas_response_decoders_gen.go @@ -36,7 +36,10 @@ func decodeCachingResponse(resp *http.Response) (res WorldObjects, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -69,7 +72,10 @@ func decodeDBResponse(resp *http.Response) (res WorldObject, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -102,7 +108,10 @@ func decodeJSONResponse(resp *http.Response) (res HelloWorld, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -135,7 +144,10 @@ func decodeQueriesResponse(resp *http.Response) (res WorldObjects, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -168,7 +180,10 @@ func decodeUpdatesResponse(resp *http.Response) (res WorldObjects, err error) { } return nil }(); err != nil { - return res, err + 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: diff --git a/internal/test_allof/oas_request_decoders_gen.go b/internal/test_allof/oas_request_decoders_gen.go index 0ece8f930..48a7b90bf 100644 --- a/internal/test_allof/oas_request_decoders_gen.go +++ b/internal/test_allof/oas_request_decoders_gen.go @@ -68,6 +68,9 @@ func (s *Server) decodeNullableStringsRequest(r *http.Request) ( }(); err != nil { 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 { if err := (validate.String{ MinLength: 0, @@ -139,6 +142,9 @@ func (s *Server) decodeObjectsWithConflictingArrayPropertyRequest(r *http.Reques }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -202,6 +208,9 @@ func (s *Server) decodeObjectsWithConflictingPropertiesRequest(r *http.Request) }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -265,6 +274,9 @@ func (s *Server) decodeReferencedAllofRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -440,6 +452,9 @@ func (s *Server) decodeReferencedAllofOptionalRequest(r *http.Request) ( }(); err != nil { 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 { if err := request.Validate(); err != nil { return err @@ -613,6 +628,9 @@ func (s *Server) decodeSimpleIntegerRequest(r *http.Request) ( }(); err != nil { 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 { if err := (validate.Int{ MinSet: true, @@ -685,6 +703,9 @@ func (s *Server) decodeSimpleObjectsRequest(r *http.Request) ( }(); err != nil { 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) diff --git a/internal/test_form/oas_request_decoders_gen.go b/internal/test_form/oas_request_decoders_gen.go index 1758f430b..0ca526980 100644 --- a/internal/test_form/oas_request_decoders_gen.go +++ b/internal/test_form/oas_request_decoders_gen.go @@ -688,6 +688,9 @@ func (s *Server) decodeTestShareFormSchemaRequest(r *http.Request) ( }(); err != nil { 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 case ct == "multipart/form-data": if r.ContentLength == 0 { diff --git a/internal/test_form/oas_response_decoders_gen.go b/internal/test_form/oas_response_decoders_gen.go index f3c41360f..d22a0a6ad 100644 --- a/internal/test_form/oas_response_decoders_gen.go +++ b/internal/test_form/oas_response_decoders_gen.go @@ -54,7 +54,10 @@ func decodeTestMultipartUploadResponse(resp *http.Response) (res TestMultipartUp } return nil }(); err != nil { - return res, err + 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: diff --git a/internal/test_http_requests/oas_request_decoders_gen.go b/internal/test_http_requests/oas_request_decoders_gen.go index ea6f1dd89..660f23faa 100644 --- a/internal/test_http_requests/oas_request_decoders_gen.go +++ b/internal/test_http_requests/oas_request_decoders_gen.go @@ -67,6 +67,9 @@ func (s *Server) decodeAllRequestBodiesRequest(r *http.Request) ( }(); err != nil { 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 case ct == "application/octet-stream": request := AllRequestBodiesReqApplicationOctetStream{Data: r.Body} @@ -287,6 +290,9 @@ func (s *Server) decodeAllRequestBodiesOptionalRequest(r *http.Request) ( }(); err != nil { 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 case ct == "application/octet-stream": request := AllRequestBodiesOptionalReqApplicationOctetStream{Data: r.Body} diff --git a/internal/test_http_requests/oas_response_decoders_gen.go b/internal/test_http_requests/oas_response_decoders_gen.go index 23ebc6fe9..c14b1d28f 100644 --- a/internal/test_http_requests/oas_response_decoders_gen.go +++ b/internal/test_http_requests/oas_response_decoders_gen.go @@ -85,7 +85,10 @@ func decodeMaskContentTypeResponse(resp *http.Response) (res MaskResponse, err e } return nil }(); err != nil { - return res, err + 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: @@ -118,7 +121,10 @@ func decodeMaskContentTypeOptionalResponse(resp *http.Response) (res MaskRespons } return nil }(); err != nil { - return res, err + 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: diff --git a/internal/test_http_responses/oas_response_decoders_gen.go b/internal/test_http_responses/oas_response_decoders_gen.go index 82aa85070..2e0e74dd1 100644 --- a/internal/test_http_responses/oas_response_decoders_gen.go +++ b/internal/test_http_responses/oas_response_decoders_gen.go @@ -87,7 +87,10 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -118,7 +121,10 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &Combined2XXStatusCode{ StatusCode: resp.StatusCode, @@ -150,7 +156,10 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &Combined5XXStatusCode{ StatusCode: resp.StatusCode, @@ -190,7 +199,10 @@ func decodeCombinedResponse(resp *http.Response) (res CombinedRes, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &CombinedDefStatusCode{ StatusCode: resp.StatusCode, @@ -416,7 +428,10 @@ func decodeIntersectPatternCodeResponse(resp *http.Response) (res IntersectPatte } return nil }(); err != nil { - return res, err + 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: @@ -447,7 +462,10 @@ func decodeIntersectPatternCodeResponse(resp *http.Response) (res IntersectPatte } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return &IntersectPatternCode2XXStatusCode{ StatusCode: resp.StatusCode, @@ -483,7 +501,10 @@ func decodeMultipleGenericResponsesResponse(resp *http.Response) (res MultipleGe } return nil }(); err != nil { - return res, err + 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: @@ -510,7 +531,10 @@ func decodeMultipleGenericResponsesResponse(resp *http.Response) (res MultipleGe } return nil }(); err != nil { - return res, err + 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: diff --git a/internal/test_single_endpoint/oas_response_decoders_gen.go b/internal/test_single_endpoint/oas_response_decoders_gen.go index cc02dc58c..0016b9465 100644 --- a/internal/test_single_endpoint/oas_response_decoders_gen.go +++ b/internal/test_single_endpoint/oas_response_decoders_gen.go @@ -38,7 +38,10 @@ func decodeProbeLivenessResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + 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: @@ -66,7 +69,10 @@ func decodeProbeLivenessResponse(resp *http.Response) (res string, err error) { } return nil }(); err != nil { - return res, err + return res, errors.Wrap(err, "decode \"application/json\"") + } + if err := d.Skip(); err != io.EOF { + return res, errors.New("unexpected trailing data") } return ErrorStatusCode{ StatusCode: resp.StatusCode,