From 9719936b69bebf2c7c93a7588fd0f19630645c2b Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Mon, 29 Apr 2024 15:10:15 -0700 Subject: [PATCH] chore: regenerate sources (#1513) --- server/genrest/compliance.go | 22 ++++++++++++++++++ server/genrest/echo.go | 16 +++++++++++++ server/genrest/iampolicy.go | 24 +++++++++++++++++++ server/genrest/identity.go | 10 ++++++++ server/genrest/locations.go | 4 ++++ server/genrest/messaging.go | 38 +++++++++++++++++++++++++++++++ server/genrest/operations.go | 8 +++++++ server/genrest/sequenceservice.go | 12 ++++++++++ server/genrest/testing.go | 16 +++++++++++++ 9 files changed, 150 insertions(+) diff --git a/server/genrest/compliance.go b/server/genrest/compliance.go index 325f906ec..644b9329b 100644 --- a/server/genrest/compliance.go +++ b/server/genrest/compliance.go @@ -38,6 +38,8 @@ func (backend *RESTBackend) HandleRepeatDataBody(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -110,6 +112,8 @@ func (backend *RESTBackend) HandleRepeatDataBodyInfo(w http.ResponseWriter, r *h backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -191,6 +195,8 @@ func (backend *RESTBackend) HandleRepeatDataQuery(w http.ResponseWriter, r *http backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -250,6 +256,8 @@ func (backend *RESTBackend) HandleRepeatDataSimplePath(w http.ResponseWriter, r backend.StdLog.Printf(" urlPathParams (expect 5, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 5 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 5, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -314,6 +322,8 @@ func (backend *RESTBackend) HandleRepeatDataPathResource(w http.ResponseWriter, backend.StdLog.Printf(" urlPathParams (expect 3, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 3 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 3, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -378,6 +388,8 @@ func (backend *RESTBackend) HandleRepeatDataPathResource_1(w http.ResponseWriter backend.StdLog.Printf(" urlPathParams (expect 3, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 3 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 3, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -442,6 +454,8 @@ func (backend *RESTBackend) HandleRepeatDataPathTrailingResource(w http.Response backend.StdLog.Printf(" urlPathParams (expect 2, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 2 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 2, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -506,6 +520,8 @@ func (backend *RESTBackend) HandleRepeatDataBodyPut(w http.ResponseWriter, r *ht backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -578,6 +594,8 @@ func (backend *RESTBackend) HandleRepeatDataBodyPatch(w http.ResponseWriter, r * backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -650,6 +668,8 @@ func (backend *RESTBackend) HandleGetEnum(w http.ResponseWriter, r *http.Request backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -709,6 +729,8 @@ func (backend *RESTBackend) HandleVerifyEnum(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return diff --git a/server/genrest/echo.go b/server/genrest/echo.go index 5434ecab8..cbf89d155 100644 --- a/server/genrest/echo.go +++ b/server/genrest/echo.go @@ -38,6 +38,8 @@ func (backend *RESTBackend) HandleEcho(w http.ResponseWriter, r *http.Request) { backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -110,6 +112,8 @@ func (backend *RESTBackend) HandleEchoErrorDetails(w http.ResponseWriter, r *htt backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -182,6 +186,8 @@ func (backend *RESTBackend) HandleExpand(w http.ResponseWriter, r *http.Request) backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -257,6 +263,8 @@ func (backend *RESTBackend) HandlePagedExpand(w http.ResponseWriter, r *http.Req backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -329,6 +337,8 @@ func (backend *RESTBackend) HandlePagedExpandLegacy(w http.ResponseWriter, r *ht backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -401,6 +411,8 @@ func (backend *RESTBackend) HandlePagedExpandLegacyMapped(w http.ResponseWriter, backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -473,6 +485,8 @@ func (backend *RESTBackend) HandleWait(w http.ResponseWriter, r *http.Request) { backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -545,6 +559,8 @@ func (backend *RESTBackend) HandleBlock(w http.ResponseWriter, r *http.Request) backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return diff --git a/server/genrest/iampolicy.go b/server/genrest/iampolicy.go index 27ebadc99..df8f2f33b 100644 --- a/server/genrest/iampolicy.go +++ b/server/genrest/iampolicy.go @@ -38,6 +38,8 @@ func (backend *RESTBackend) HandleSetIamPolicy(w http.ResponseWriter, r *http.Re backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -110,6 +112,8 @@ func (backend *RESTBackend) HandleSetIamPolicy_1(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -182,6 +186,8 @@ func (backend *RESTBackend) HandleSetIamPolicy_2(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -254,6 +260,8 @@ func (backend *RESTBackend) HandleSetIamPolicy_3(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -326,6 +334,8 @@ func (backend *RESTBackend) HandleGetIamPolicy(w http.ResponseWriter, r *http.Re backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -390,6 +400,8 @@ func (backend *RESTBackend) HandleGetIamPolicy_1(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -454,6 +466,8 @@ func (backend *RESTBackend) HandleGetIamPolicy_2(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -518,6 +532,8 @@ func (backend *RESTBackend) HandleGetIamPolicy_3(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -582,6 +598,8 @@ func (backend *RESTBackend) HandleTestIamPermissions(w http.ResponseWriter, r *h backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -654,6 +672,8 @@ func (backend *RESTBackend) HandleTestIamPermissions_1(w http.ResponseWriter, r backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -726,6 +746,8 @@ func (backend *RESTBackend) HandleTestIamPermissions_2(w http.ResponseWriter, r backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -798,6 +820,8 @@ func (backend *RESTBackend) HandleTestIamPermissions_3(w http.ResponseWriter, r backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return diff --git a/server/genrest/identity.go b/server/genrest/identity.go index 518e94739..c153cfd94 100644 --- a/server/genrest/identity.go +++ b/server/genrest/identity.go @@ -38,6 +38,8 @@ func (backend *RESTBackend) HandleCreateUser(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -110,6 +112,8 @@ func (backend *RESTBackend) HandleGetUser(w http.ResponseWriter, r *http.Request backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -174,6 +178,8 @@ func (backend *RESTBackend) HandleUpdateUser(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -255,6 +261,8 @@ func (backend *RESTBackend) HandleDeleteUser(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -319,6 +327,8 @@ func (backend *RESTBackend) HandleListUsers(w http.ResponseWriter, r *http.Reque backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return diff --git a/server/genrest/locations.go b/server/genrest/locations.go index 942da79cd..2a050acf5 100644 --- a/server/genrest/locations.go +++ b/server/genrest/locations.go @@ -36,6 +36,8 @@ func (backend *RESTBackend) HandleListLocations(w http.ResponseWriter, r *http.R backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -100,6 +102,8 @@ func (backend *RESTBackend) HandleGetLocation(w http.ResponseWriter, r *http.Req backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return diff --git a/server/genrest/messaging.go b/server/genrest/messaging.go index 5db715aa2..db11c0dd2 100644 --- a/server/genrest/messaging.go +++ b/server/genrest/messaging.go @@ -38,6 +38,8 @@ func (backend *RESTBackend) HandleCreateRoom(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -110,6 +112,8 @@ func (backend *RESTBackend) HandleGetRoom(w http.ResponseWriter, r *http.Request backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -174,6 +178,8 @@ func (backend *RESTBackend) HandleUpdateRoom(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -255,6 +261,8 @@ func (backend *RESTBackend) HandleDeleteRoom(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -319,6 +327,8 @@ func (backend *RESTBackend) HandleListRooms(w http.ResponseWriter, r *http.Reque backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -378,6 +388,8 @@ func (backend *RESTBackend) HandleCreateBlurb(w http.ResponseWriter, r *http.Req backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -450,6 +462,8 @@ func (backend *RESTBackend) HandleCreateBlurb_1(w http.ResponseWriter, r *http.R backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -522,6 +536,8 @@ func (backend *RESTBackend) HandleGetBlurb(w http.ResponseWriter, r *http.Reques backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -586,6 +602,8 @@ func (backend *RESTBackend) HandleGetBlurb_1(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -650,6 +668,8 @@ func (backend *RESTBackend) HandleUpdateBlurb(w http.ResponseWriter, r *http.Req backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -731,6 +751,8 @@ func (backend *RESTBackend) HandleUpdateBlurb_1(w http.ResponseWriter, r *http.R backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -812,6 +834,8 @@ func (backend *RESTBackend) HandleDeleteBlurb(w http.ResponseWriter, r *http.Req backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -876,6 +900,8 @@ func (backend *RESTBackend) HandleDeleteBlurb_1(w http.ResponseWriter, r *http.R backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -940,6 +966,8 @@ func (backend *RESTBackend) HandleListBlurbs(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -1004,6 +1032,8 @@ func (backend *RESTBackend) HandleListBlurbs_1(w http.ResponseWriter, r *http.Re backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -1068,6 +1098,8 @@ func (backend *RESTBackend) HandleSearchBlurbs(w http.ResponseWriter, r *http.Re backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -1140,6 +1172,8 @@ func (backend *RESTBackend) HandleSearchBlurbs_1(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -1204,6 +1238,8 @@ func (backend *RESTBackend) HandleStreamBlurbs(w http.ResponseWriter, r *http.Re backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -1272,6 +1308,8 @@ func (backend *RESTBackend) HandleStreamBlurbs_1(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return diff --git a/server/genrest/operations.go b/server/genrest/operations.go index 33031ae82..4676776e8 100644 --- a/server/genrest/operations.go +++ b/server/genrest/operations.go @@ -36,6 +36,8 @@ func (backend *RESTBackend) HandleListOperations(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -95,6 +97,8 @@ func (backend *RESTBackend) HandleGetOperation(w http.ResponseWriter, r *http.Re backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -159,6 +163,8 @@ func (backend *RESTBackend) HandleDeleteOperation(w http.ResponseWriter, r *http backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -223,6 +229,8 @@ func (backend *RESTBackend) HandleCancelOperation(w http.ResponseWriter, r *http backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return diff --git a/server/genrest/sequenceservice.go b/server/genrest/sequenceservice.go index 558aa0e5c..fb93d5a0f 100644 --- a/server/genrest/sequenceservice.go +++ b/server/genrest/sequenceservice.go @@ -38,6 +38,8 @@ func (backend *RESTBackend) HandleCreateSequence(w http.ResponseWriter, r *http. backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -119,6 +121,8 @@ func (backend *RESTBackend) HandleCreateStreamingSequence(w http.ResponseWriter, backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -200,6 +204,8 @@ func (backend *RESTBackend) HandleGetSequenceReport(w http.ResponseWriter, r *ht backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -264,6 +270,8 @@ func (backend *RESTBackend) HandleGetStreamingSequenceReport(w http.ResponseWrit backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -328,6 +336,8 @@ func (backend *RESTBackend) HandleAttemptSequence(w http.ResponseWriter, r *http backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -400,6 +410,8 @@ func (backend *RESTBackend) HandleAttemptStreamingSequence(w http.ResponseWriter backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return diff --git a/server/genrest/testing.go b/server/genrest/testing.go index 4b1d6eaf2..2f59816d2 100644 --- a/server/genrest/testing.go +++ b/server/genrest/testing.go @@ -38,6 +38,8 @@ func (backend *RESTBackend) HandleCreateSession(w http.ResponseWriter, r *http.R backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -119,6 +121,8 @@ func (backend *RESTBackend) HandleGetSession(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -183,6 +187,8 @@ func (backend *RESTBackend) HandleListSessions(w http.ResponseWriter, r *http.Re backend.StdLog.Printf(" urlPathParams (expect 0, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 0 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 0, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -242,6 +248,8 @@ func (backend *RESTBackend) HandleDeleteSession(w http.ResponseWriter, r *http.R backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -306,6 +314,8 @@ func (backend *RESTBackend) HandleReportSession(w http.ResponseWriter, r *http.R backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -370,6 +380,8 @@ func (backend *RESTBackend) HandleListTests(w http.ResponseWriter, r *http.Reque backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -434,6 +446,8 @@ func (backend *RESTBackend) HandleDeleteTest(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return @@ -498,6 +512,8 @@ func (backend *RESTBackend) HandleVerifyTest(w http.ResponseWriter, r *http.Requ backend.StdLog.Printf(" urlPathParams (expect 1, have %d): %q", numUrlPathParams, urlPathParams) backend.StdLog.Printf(" urlRequestHeaders:\n%s", resttools.PrettyPrintHeaders(r, " ")) + resttools.IncludeRequestHeadersInResponse(w, r) + if numUrlPathParams != 1 { backend.Error(w, http.StatusBadRequest, "found unexpected number of URL variables: expected 1, have %d: %#v", numUrlPathParams, urlPathParams) return