diff --git a/backend/Makefile b/backend/Makefile index 0768e7afe..15fd921dd 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -103,7 +103,7 @@ code-checks: tools/golangci-lint .PHONY: tools/oapi-codegen tools/oapi-codegen: - env GOBIN=$(CURDIR)/tools/ go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12.4 + env GOBIN=$(CURDIR)/tools/ go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 .PHONY: codegen codegen: tools/oapi-codegen diff --git a/backend/go.mod b/backend/go.mod index d20820714..e07c02cca 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -5,7 +5,6 @@ go 1.21 require ( github.com/blang/semver/v4 v4.0.0 github.com/coreos/go-oidc/v3 v3.10.0 - github.com/deepmap/oapi-codegen v1.12.4 github.com/doug-martin/goqu/v9 v9.19.0 github.com/getkin/kin-openapi v0.126.0 github.com/golangci/golangci-lint v1.59.1 @@ -22,6 +21,8 @@ require ( github.com/labstack/echo/v4 v4.12.0 github.com/labstack/gommon v0.4.2 github.com/lib/pq v1.10.9 + github.com/oapi-codegen/echo-middleware v1.0.2 + github.com/oapi-codegen/runtime v1.1.1 github.com/oauth2-proxy/mockoidc v0.0.0-20220308204021-b9169deeb282 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.19.1 @@ -78,7 +79,7 @@ require ( github.com/fatih/color v1.17.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.5 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/ghostiam/protogetter v0.3.6 // indirect github.com/go-critic/go-critic v0.11.4 // indirect @@ -150,7 +151,7 @@ require ( github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mgechev/revive v1.3.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -176,6 +177,7 @@ require ( github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/ryancurrah/gomodguard v1.3.2 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect diff --git a/backend/go.sum b/backend/go.sum index 6c40974e8..d8ec64b51 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -130,8 +130,6 @@ github.com/daixiang0/gci v0.13.4/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deepmap/oapi-codegen v1.12.4 h1:pPmn6qI9MuOtCz82WY2Xaw46EQjgvxednXXrP7g5Q2s= -github.com/deepmap/oapi-codegen v1.12.4/go.mod h1:3lgHGMu6myQ2vqbbTXH2H1o4eXFTGnFiDaOaKKl5yas= github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= @@ -157,8 +155,8 @@ github.com/firefart/nonamedreturns v1.0.5/go.mod h1:gHJjDqhGM4WyPt639SOZs+G89Ko7 github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/getkin/kin-openapi v0.126.0 h1:c2cSgLnAsS0xYfKsgt5oBV6MYRM/giU8/RtwUY4wyfY= @@ -520,8 +518,9 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= @@ -566,6 +565,10 @@ github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3L github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= +github.com/oapi-codegen/echo-middleware v1.0.2 h1:oNBqiE7jd/9bfGNk/bpbX2nqWrtPc+LL4Boya8Wl81U= +github.com/oapi-codegen/echo-middleware v1.0.2/go.mod h1:5J6MFcGqrpWLXpbKGZtRPZViLIHyyyUHlkqg6dT2R4E= +github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= +github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= github.com/oauth2-proxy/mockoidc v0.0.0-20220308204021-b9169deeb282 h1:TQMyrpijtkFyXpNI3rY5hsZQZw+paiH+BfAlsb81HBY= github.com/oauth2-proxy/mockoidc v0.0.0-20220308204021-b9169deeb282/go.mod h1:rW25Kyd08Wdn3UVn0YBsDTSvReu0jqpmJKzxITPSjks= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= @@ -640,6 +643,8 @@ github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:r github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= @@ -756,8 +761,8 @@ github.com/tomarrell/wrapcheck/v2 v2.8.3 h1:5ov+Cbhlgi7s/a42BprYoxsr73CbdMUTzE3b github.com/tomarrell/wrapcheck/v2 v2.8.3/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/Gk8VQ= @@ -944,12 +949,12 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/backend/pkg/codegen/client.gen.go b/backend/pkg/codegen/client.gen.go index 46016c73b..cf971961f 100644 --- a/backend/pkg/codegen/client.gen.go +++ b/backend/pkg/codegen/client.gen.go @@ -1,6 +1,6 @@ // Package codegen provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package codegen import ( @@ -13,7 +13,7 @@ import ( "net/url" "strings" - "github.com/deepmap/oapi-codegen/pkg/runtime" + "github.com/oapi-codegen/runtime" ) // RequestEditorFn is the function signature for the RequestEditor callback function @@ -95,7 +95,7 @@ type ClientInterface interface { // PaginateApps request PaginateApps(ctx context.Context, params *PaginateAppsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateApp request with any body + // CreateAppWithBody request with any body CreateAppWithBody(ctx context.Context, params *CreateAppParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateApp(ctx context.Context, params *CreateAppParams, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -106,7 +106,7 @@ type ClientInterface interface { // GetApp request GetApp(ctx context.Context, appIDorProductID string, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateApp request with any body + // UpdateAppWithBody request with any body UpdateAppWithBody(ctx context.Context, appIDorProductID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateApp(ctx context.Context, appIDorProductID string, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -114,7 +114,7 @@ type ClientInterface interface { // PaginateChannels request PaginateChannels(ctx context.Context, appIDorProductID string, params *PaginateChannelsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateChannel request with any body + // CreateChannelWithBody request with any body CreateChannelWithBody(ctx context.Context, appIDorProductID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateChannel(ctx context.Context, appIDorProductID string, body CreateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -125,7 +125,7 @@ type ClientInterface interface { // GetChannel request GetChannel(ctx context.Context, appIDorProductID string, channelID string, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateChannel request with any body + // UpdateChannelWithBody request with any body UpdateChannelWithBody(ctx context.Context, appIDorProductID string, channelID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateChannel(ctx context.Context, appIDorProductID string, channelID string, body UpdateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -133,7 +133,7 @@ type ClientInterface interface { // PaginateGroups request PaginateGroups(ctx context.Context, appIDorProductID string, params *PaginateGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateGroup request with any body + // CreateGroupWithBody request with any body CreateGroupWithBody(ctx context.Context, appIDorProductID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateGroup(ctx context.Context, appIDorProductID string, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -144,7 +144,7 @@ type ClientInterface interface { // GetGroup request GetGroup(ctx context.Context, appIDorProductID string, groupID string, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateGroup request with any body + // UpdateGroupWithBody request with any body UpdateGroupWithBody(ctx context.Context, appIDorProductID string, groupID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateGroup(ctx context.Context, appIDorProductID string, groupID string, body UpdateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -176,7 +176,7 @@ type ClientInterface interface { // PaginatePackages request PaginatePackages(ctx context.Context, appIDorProductID string, params *PaginatePackagesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreatePackage request with any body + // CreatePackageWithBody request with any body CreatePackageWithBody(ctx context.Context, appIDorProductID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreatePackage(ctx context.Context, appIDorProductID string, body CreatePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -187,12 +187,12 @@ type ClientInterface interface { // GetPackage request GetPackage(ctx context.Context, appIDorProductID string, packageID string, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdatePackage request with any body + // UpdatePackageWithBody request with any body UpdatePackageWithBody(ctx context.Context, appIDorProductID string, packageID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdatePackage(ctx context.Context, appIDorProductID string, packageID string, body UpdatePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateInstance request with any body + // UpdateInstanceWithBody request with any body UpdateInstanceWithBody(ctx context.Context, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateInstance(ctx context.Context, instanceID string, body UpdateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -209,7 +209,7 @@ type ClientInterface interface { // LoginCb request LoginCb(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // LoginToken request with any body + // LoginTokenWithBody request with any body LoginTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) LoginTokenWithFormdataBody(ctx context.Context, body LoginTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -220,7 +220,7 @@ type ClientInterface interface { // LoginWebhook request LoginWebhook(ctx context.Context, params *LoginWebhookParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // Omaha request with any body + // OmahaWithBody request with any body OmahaWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) } @@ -819,75 +819,106 @@ func NewPaginateActivityRequest(server string, params *PaginateActivityParams) ( return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if params.AppIDorProductID != nil { + if params.AppIDorProductID != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "appIDorProductID", runtime.ParamLocationQuery, *params.AppIDorProductID); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "appIDorProductID", runtime.ParamLocationQuery, *params.AppIDorProductID); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - } - if params.GroupID != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupID", runtime.ParamLocationQuery, *params.GroupID); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.GroupID != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "groupID", runtime.ParamLocationQuery, *params.GroupID); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - } - if params.ChannelID != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "channelID", runtime.ParamLocationQuery, *params.ChannelID); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.ChannelID != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "channelID", runtime.ParamLocationQuery, *params.ChannelID); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } - } + if params.InstanceID != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "instanceID", runtime.ParamLocationQuery, *params.InstanceID); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if params.InstanceID != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "instanceID", runtime.ParamLocationQuery, *params.InstanceID); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Version != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, *params.Version); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } - } + if params.Severity != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "severity", runtime.ParamLocationQuery, *params.Severity); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if params.Version != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, *params.Version); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, params.Start); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -899,11 +930,7 @@ func NewPaginateActivityRequest(server string, params *PaginateActivityParams) ( } } - } - - if params.Severity != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "severity", runtime.ParamLocationQuery, *params.Severity); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, params.End); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -915,66 +942,41 @@ func NewPaginateActivityRequest(server string, params *PaginateActivityParams) ( } } - } - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, params.Start); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } } - } - } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, params.End); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } } - } - - if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Perpage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - } - - if params.Perpage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } + queryURL.RawQuery = queryValues.Encode() } - queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -1002,42 +1004,44 @@ func NewPaginateAppsRequest(server string, params *PaginateAppsParams) (*http.Re return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if params.Page != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - } - if params.Perpage != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Perpage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } + queryURL.RawQuery = queryValues.Encode() } - queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -1076,26 +1080,28 @@ func NewCreateAppRequestWithBody(server string, params *CreateAppParams, content return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if params.CloneFrom != nil { + if params.CloneFrom != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clone_from", runtime.ParamLocationQuery, *params.CloneFrom); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clone_from", runtime.ParamLocationQuery, *params.CloneFrom); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } + queryURL.RawQuery = queryValues.Encode() } - queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err @@ -1247,42 +1253,44 @@ func NewPaginateChannelsRequest(server string, appIDorProductID string, params * return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if params.Page != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - } - if params.Perpage != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Perpage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } + queryURL.RawQuery = queryValues.Encode() } - queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -1500,42 +1508,44 @@ func NewPaginateGroupsRequest(server string, appIDorProductID string, params *Pa return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if params.Page != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - } - if params.Perpage != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Perpage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } + queryURL.RawQuery = queryValues.Encode() } - queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -1760,23 +1770,10 @@ func NewGetGroupInstancesRequest(server string, appIDorProductID string, groupID return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, params.Status); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, params.Status); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1788,75 +1785,103 @@ func NewGetGroupInstancesRequest(server string, appIDorProductID string, groupID } } - } - - if params.Perpage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - } - if params.SortFilter != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortFilter", runtime.ParamLocationQuery, *params.SortFilter); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Perpage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - } - if params.SortOrder != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortOrder", runtime.ParamLocationQuery, *params.SortOrder); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.SortFilter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortFilter", runtime.ParamLocationQuery, *params.SortFilter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } - } + if params.SortOrder != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortOrder", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if params.SearchFilter != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchFilter", runtime.ParamLocationQuery, *params.SearchFilter); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.SearchFilter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchFilter", runtime.ParamLocationQuery, *params.SearchFilter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } - } + if params.SearchValue != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchValue", runtime.ParamLocationQuery, *params.SearchValue); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if params.SearchValue != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchValue", runtime.ParamLocationQuery, *params.SearchValue); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1868,38 +1893,25 @@ func NewGetGroupInstancesRequest(server string, appIDorProductID string, groupID } } - } - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - if params.Version != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, *params.Version); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Version != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, *params.Version); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } + queryURL.RawQuery = queryValues.Encode() } - queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -1996,26 +2008,28 @@ func NewGetInstanceStatusHistoryRequest(server string, appIDorProductID string, return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if params.Limit != nil { + if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } + queryURL.RawQuery = queryValues.Encode() } - queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -2057,21 +2071,23 @@ func NewGetGroupInstanceStatsRequest(server string, appIDorProductID string, gro return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - queryURL.RawQuery = queryValues.Encode() + queryURL.RawQuery = queryValues.Encode() + } req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { @@ -2114,21 +2130,23 @@ func NewGetGroupInstancesCountRequest(server string, appIDorProductID string, gr return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - queryURL.RawQuery = queryValues.Encode() + queryURL.RawQuery = queryValues.Encode() + } req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { @@ -2171,21 +2189,23 @@ func NewGetGroupStatusTimelineRequest(server string, appIDorProductID string, gr return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - queryURL.RawQuery = queryValues.Encode() + queryURL.RawQuery = queryValues.Encode() + } req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { @@ -2269,21 +2289,23 @@ func NewGetGroupVersionTimelineRequest(server string, appIDorProductID string, g return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "duration", runtime.ParamLocationQuery, params.Duration); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - queryURL.RawQuery = queryValues.Encode() + queryURL.RawQuery = queryValues.Encode() + } req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { @@ -2319,58 +2341,60 @@ func NewPaginatePackagesRequest(server string, appIDorProductID string, params * return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if params.Page != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - } - if params.Perpage != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.Perpage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perpage", runtime.ParamLocationQuery, *params.Perpage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - } - if params.SearchVersion != nil { + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchVersion", runtime.ParamLocationQuery, *params.SearchVersion); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.SearchVersion != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchVersion", runtime.ParamLocationQuery, *params.SearchVersion); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } + queryURL.RawQuery = queryValues.Encode() } - queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -2682,21 +2706,23 @@ func NewLoginRequest(server string, params *LoginParams) (*http.Request, error) return nil, err } - queryValues := queryURL.Query() + if params != nil { + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "login_redirect_url", runtime.ParamLocationQuery, params.LoginRedirectUrl); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "login_redirect_url", runtime.ParamLocationQuery, params.LoginRedirectUrl); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - queryURL.RawQuery = queryValues.Encode() + queryURL.RawQuery = queryValues.Encode() + } req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { @@ -2824,23 +2850,27 @@ func NewLoginWebhookRequest(server string, params *LoginWebhookParams) (*http.Re return nil, err } - var headerParam0 string + if params != nil { - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Hub-Signature", runtime.ParamLocationHeader, params.XHubSignature) - if err != nil { - return nil, err - } + var headerParam0 string - req.Header.Set("X-Hub-Signature", headerParam0) + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Hub-Signature", runtime.ParamLocationHeader, params.XHubSignature) + if err != nil { + return nil, err + } - var headerParam1 string + req.Header.Set("X-Hub-Signature", headerParam0) - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Github-Event", runtime.ParamLocationHeader, params.XGithubEvent) - if err != nil { - return nil, err - } + var headerParam1 string - req.Header.Set("X-Github-Event", headerParam1) + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Github-Event", runtime.ParamLocationHeader, params.XGithubEvent) + if err != nil { + return nil, err + } + + req.Header.Set("X-Github-Event", headerParam1) + + } return req, nil } @@ -2917,138 +2947,138 @@ func WithBaseURL(baseURL string) ClientOption { // ClientWithResponsesInterface is the interface specification for the client with responses above. type ClientWithResponsesInterface interface { - // PaginateActivity request + // PaginateActivityWithResponse request PaginateActivityWithResponse(ctx context.Context, params *PaginateActivityParams, reqEditors ...RequestEditorFn) (*PaginateActivityResponse, error) - // PaginateApps request + // PaginateAppsWithResponse request PaginateAppsWithResponse(ctx context.Context, params *PaginateAppsParams, reqEditors ...RequestEditorFn) (*PaginateAppsResponse, error) - // CreateApp request with any body + // CreateAppWithBodyWithResponse request with any body CreateAppWithBodyWithResponse(ctx context.Context, params *CreateAppParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAppResponse, error) CreateAppWithResponse(ctx context.Context, params *CreateAppParams, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAppResponse, error) - // DeleteApp request + // DeleteAppWithResponse request DeleteAppWithResponse(ctx context.Context, appIDorProductID string, reqEditors ...RequestEditorFn) (*DeleteAppResponse, error) - // GetApp request + // GetAppWithResponse request GetAppWithResponse(ctx context.Context, appIDorProductID string, reqEditors ...RequestEditorFn) (*GetAppResponse, error) - // UpdateApp request with any body + // UpdateAppWithBodyWithResponse request with any body UpdateAppWithBodyWithResponse(ctx context.Context, appIDorProductID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAppResponse, error) UpdateAppWithResponse(ctx context.Context, appIDorProductID string, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAppResponse, error) - // PaginateChannels request + // PaginateChannelsWithResponse request PaginateChannelsWithResponse(ctx context.Context, appIDorProductID string, params *PaginateChannelsParams, reqEditors ...RequestEditorFn) (*PaginateChannelsResponse, error) - // CreateChannel request with any body + // CreateChannelWithBodyWithResponse request with any body CreateChannelWithBodyWithResponse(ctx context.Context, appIDorProductID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateChannelResponse, error) CreateChannelWithResponse(ctx context.Context, appIDorProductID string, body CreateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateChannelResponse, error) - // DeleteChannel request + // DeleteChannelWithResponse request DeleteChannelWithResponse(ctx context.Context, appIDorProductID string, channelID string, reqEditors ...RequestEditorFn) (*DeleteChannelResponse, error) - // GetChannel request + // GetChannelWithResponse request GetChannelWithResponse(ctx context.Context, appIDorProductID string, channelID string, reqEditors ...RequestEditorFn) (*GetChannelResponse, error) - // UpdateChannel request with any body + // UpdateChannelWithBodyWithResponse request with any body UpdateChannelWithBodyWithResponse(ctx context.Context, appIDorProductID string, channelID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateChannelResponse, error) UpdateChannelWithResponse(ctx context.Context, appIDorProductID string, channelID string, body UpdateChannelJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateChannelResponse, error) - // PaginateGroups request + // PaginateGroupsWithResponse request PaginateGroupsWithResponse(ctx context.Context, appIDorProductID string, params *PaginateGroupsParams, reqEditors ...RequestEditorFn) (*PaginateGroupsResponse, error) - // CreateGroup request with any body + // CreateGroupWithBodyWithResponse request with any body CreateGroupWithBodyWithResponse(ctx context.Context, appIDorProductID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error) CreateGroupWithResponse(ctx context.Context, appIDorProductID string, body CreateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGroupResponse, error) - // DeleteGroup request + // DeleteGroupWithResponse request DeleteGroupWithResponse(ctx context.Context, appIDorProductID string, groupID string, reqEditors ...RequestEditorFn) (*DeleteGroupResponse, error) - // GetGroup request + // GetGroupWithResponse request GetGroupWithResponse(ctx context.Context, appIDorProductID string, groupID string, reqEditors ...RequestEditorFn) (*GetGroupResponse, error) - // UpdateGroup request with any body + // UpdateGroupWithBodyWithResponse request with any body UpdateGroupWithBodyWithResponse(ctx context.Context, appIDorProductID string, groupID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateGroupResponse, error) UpdateGroupWithResponse(ctx context.Context, appIDorProductID string, groupID string, body UpdateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateGroupResponse, error) - // GetGroupInstances request + // GetGroupInstancesWithResponse request GetGroupInstancesWithResponse(ctx context.Context, appIDorProductID string, groupID string, params *GetGroupInstancesParams, reqEditors ...RequestEditorFn) (*GetGroupInstancesResponse, error) - // GetInstance request + // GetInstanceWithResponse request GetInstanceWithResponse(ctx context.Context, appIDorProductID string, groupID string, instanceID string, reqEditors ...RequestEditorFn) (*GetInstanceResponse, error) - // GetInstanceStatusHistory request + // GetInstanceStatusHistoryWithResponse request GetInstanceStatusHistoryWithResponse(ctx context.Context, appIDorProductID string, groupID string, instanceID string, params *GetInstanceStatusHistoryParams, reqEditors ...RequestEditorFn) (*GetInstanceStatusHistoryResponse, error) - // GetGroupInstanceStats request + // GetGroupInstanceStatsWithResponse request GetGroupInstanceStatsWithResponse(ctx context.Context, appIDorProductID string, groupID string, params *GetGroupInstanceStatsParams, reqEditors ...RequestEditorFn) (*GetGroupInstanceStatsResponse, error) - // GetGroupInstancesCount request + // GetGroupInstancesCountWithResponse request GetGroupInstancesCountWithResponse(ctx context.Context, appIDorProductID string, groupID string, params *GetGroupInstancesCountParams, reqEditors ...RequestEditorFn) (*GetGroupInstancesCountResponse, error) - // GetGroupStatusTimeline request + // GetGroupStatusTimelineWithResponse request GetGroupStatusTimelineWithResponse(ctx context.Context, appIDorProductID string, groupID string, params *GetGroupStatusTimelineParams, reqEditors ...RequestEditorFn) (*GetGroupStatusTimelineResponse, error) - // GetGroupVersionBreakdown request + // GetGroupVersionBreakdownWithResponse request GetGroupVersionBreakdownWithResponse(ctx context.Context, appIDorProductID string, groupID string, reqEditors ...RequestEditorFn) (*GetGroupVersionBreakdownResponse, error) - // GetGroupVersionTimeline request + // GetGroupVersionTimelineWithResponse request GetGroupVersionTimelineWithResponse(ctx context.Context, appIDorProductID string, groupID string, params *GetGroupVersionTimelineParams, reqEditors ...RequestEditorFn) (*GetGroupVersionTimelineResponse, error) - // PaginatePackages request + // PaginatePackagesWithResponse request PaginatePackagesWithResponse(ctx context.Context, appIDorProductID string, params *PaginatePackagesParams, reqEditors ...RequestEditorFn) (*PaginatePackagesResponse, error) - // CreatePackage request with any body + // CreatePackageWithBodyWithResponse request with any body CreatePackageWithBodyWithResponse(ctx context.Context, appIDorProductID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePackageResponse, error) CreatePackageWithResponse(ctx context.Context, appIDorProductID string, body CreatePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePackageResponse, error) - // DeletePackage request + // DeletePackageWithResponse request DeletePackageWithResponse(ctx context.Context, appIDorProductID string, packageID string, reqEditors ...RequestEditorFn) (*DeletePackageResponse, error) - // GetPackage request + // GetPackageWithResponse request GetPackageWithResponse(ctx context.Context, appIDorProductID string, packageID string, reqEditors ...RequestEditorFn) (*GetPackageResponse, error) - // UpdatePackage request with any body + // UpdatePackageWithBodyWithResponse request with any body UpdatePackageWithBodyWithResponse(ctx context.Context, appIDorProductID string, packageID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePackageResponse, error) UpdatePackageWithResponse(ctx context.Context, appIDorProductID string, packageID string, body UpdatePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePackageResponse, error) - // UpdateInstance request with any body + // UpdateInstanceWithBodyWithResponse request with any body UpdateInstanceWithBodyWithResponse(ctx context.Context, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateInstanceResponse, error) UpdateInstanceWithResponse(ctx context.Context, instanceID string, body UpdateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateInstanceResponse, error) - // GetConfig request + // GetConfigWithResponse request GetConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetConfigResponse, error) - // Health request + // HealthWithResponse request HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error) - // Login request + // LoginWithResponse request LoginWithResponse(ctx context.Context, params *LoginParams, reqEditors ...RequestEditorFn) (*LoginResponse, error) - // LoginCb request + // LoginCbWithResponse request LoginCbWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LoginCbResponse, error) - // LoginToken request with any body + // LoginTokenWithBodyWithResponse request with any body LoginTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginTokenResponse, error) LoginTokenWithFormdataBodyWithResponse(ctx context.Context, body LoginTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*LoginTokenResponse, error) - // ValidateToken request + // ValidateTokenWithResponse request ValidateTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ValidateTokenResponse, error) - // LoginWebhook request + // LoginWebhookWithResponse request LoginWebhookWithResponse(ctx context.Context, params *LoginWebhookParams, reqEditors ...RequestEditorFn) (*LoginWebhookResponse, error) - // Omaha request with any body + // OmahaWithBodyWithResponse request with any body OmahaWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OmahaResponse, error) } diff --git a/backend/pkg/codegen/server.gen.go b/backend/pkg/codegen/server.gen.go index 46dc671be..cbd88e7a9 100644 --- a/backend/pkg/codegen/server.gen.go +++ b/backend/pkg/codegen/server.gen.go @@ -1,14 +1,14 @@ // Package codegen provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package codegen import ( "fmt" "net/http" - "github.com/deepmap/oapi-codegen/pkg/runtime" "github.com/labstack/echo/v4" + "github.com/oapi-codegen/runtime" ) // ServerInterface represents all server handlers. @@ -138,11 +138,11 @@ type ServerInterfaceWrapper struct { func (w *ServerInterfaceWrapper) PaginateActivity(ctx echo.Context) error { var err error - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params PaginateActivityParams @@ -216,7 +216,7 @@ func (w *ServerInterfaceWrapper) PaginateActivity(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter perpage: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.PaginateActivity(ctx, params) return err } @@ -225,11 +225,11 @@ func (w *ServerInterfaceWrapper) PaginateActivity(ctx echo.Context) error { func (w *ServerInterfaceWrapper) PaginateApps(ctx echo.Context) error { var err error - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params PaginateAppsParams @@ -247,7 +247,7 @@ func (w *ServerInterfaceWrapper) PaginateApps(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter perpage: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.PaginateApps(ctx, params) return err } @@ -256,11 +256,11 @@ func (w *ServerInterfaceWrapper) PaginateApps(ctx echo.Context) error { func (w *ServerInterfaceWrapper) CreateApp(ctx echo.Context) error { var err error - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params CreateAppParams @@ -271,7 +271,7 @@ func (w *ServerInterfaceWrapper) CreateApp(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter clone_from: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.CreateApp(ctx, params) return err } @@ -282,18 +282,18 @@ func (w *ServerInterfaceWrapper) DeleteApp(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.DeleteApp(ctx, appIDorProductID) return err } @@ -304,18 +304,18 @@ func (w *ServerInterfaceWrapper) GetApp(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetApp(ctx, appIDorProductID) return err } @@ -326,18 +326,18 @@ func (w *ServerInterfaceWrapper) UpdateApp(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.UpdateApp(ctx, appIDorProductID) return err } @@ -348,16 +348,16 @@ func (w *ServerInterfaceWrapper) PaginateChannels(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params PaginateChannelsParams @@ -375,7 +375,7 @@ func (w *ServerInterfaceWrapper) PaginateChannels(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter perpage: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.PaginateChannels(ctx, appIDorProductID, params) return err } @@ -386,18 +386,18 @@ func (w *ServerInterfaceWrapper) CreateChannel(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.CreateChannel(ctx, appIDorProductID) return err } @@ -408,7 +408,7 @@ func (w *ServerInterfaceWrapper) DeleteChannel(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -416,18 +416,18 @@ func (w *ServerInterfaceWrapper) DeleteChannel(ctx echo.Context) error { // ------------- Path parameter "channelID" ------------- var channelID string - err = runtime.BindStyledParameterWithLocation("simple", false, "channelID", runtime.ParamLocationPath, ctx.Param("channelID"), &channelID) + err = runtime.BindStyledParameterWithOptions("simple", "channelID", ctx.Param("channelID"), &channelID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter channelID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.DeleteChannel(ctx, appIDorProductID, channelID) return err } @@ -438,7 +438,7 @@ func (w *ServerInterfaceWrapper) GetChannel(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -446,18 +446,18 @@ func (w *ServerInterfaceWrapper) GetChannel(ctx echo.Context) error { // ------------- Path parameter "channelID" ------------- var channelID string - err = runtime.BindStyledParameterWithLocation("simple", false, "channelID", runtime.ParamLocationPath, ctx.Param("channelID"), &channelID) + err = runtime.BindStyledParameterWithOptions("simple", "channelID", ctx.Param("channelID"), &channelID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter channelID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetChannel(ctx, appIDorProductID, channelID) return err } @@ -468,7 +468,7 @@ func (w *ServerInterfaceWrapper) UpdateChannel(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -476,18 +476,18 @@ func (w *ServerInterfaceWrapper) UpdateChannel(ctx echo.Context) error { // ------------- Path parameter "channelID" ------------- var channelID string - err = runtime.BindStyledParameterWithLocation("simple", false, "channelID", runtime.ParamLocationPath, ctx.Param("channelID"), &channelID) + err = runtime.BindStyledParameterWithOptions("simple", "channelID", ctx.Param("channelID"), &channelID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter channelID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.UpdateChannel(ctx, appIDorProductID, channelID) return err } @@ -498,16 +498,16 @@ func (w *ServerInterfaceWrapper) PaginateGroups(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params PaginateGroupsParams @@ -525,7 +525,7 @@ func (w *ServerInterfaceWrapper) PaginateGroups(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter perpage: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.PaginateGroups(ctx, appIDorProductID, params) return err } @@ -536,18 +536,18 @@ func (w *ServerInterfaceWrapper) CreateGroup(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.CreateGroup(ctx, appIDorProductID) return err } @@ -558,7 +558,7 @@ func (w *ServerInterfaceWrapper) DeleteGroup(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -566,18 +566,18 @@ func (w *ServerInterfaceWrapper) DeleteGroup(ctx echo.Context) error { // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.DeleteGroup(ctx, appIDorProductID, groupID) return err } @@ -588,7 +588,7 @@ func (w *ServerInterfaceWrapper) GetGroup(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -596,18 +596,18 @@ func (w *ServerInterfaceWrapper) GetGroup(ctx echo.Context) error { // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetGroup(ctx, appIDorProductID, groupID) return err } @@ -618,7 +618,7 @@ func (w *ServerInterfaceWrapper) UpdateGroup(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -626,18 +626,18 @@ func (w *ServerInterfaceWrapper) UpdateGroup(ctx echo.Context) error { // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.UpdateGroup(ctx, appIDorProductID, groupID) return err } @@ -648,7 +648,7 @@ func (w *ServerInterfaceWrapper) GetGroupInstances(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -656,16 +656,16 @@ func (w *ServerInterfaceWrapper) GetGroupInstances(ctx echo.Context) error { // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params GetGroupInstancesParams @@ -732,7 +732,7 @@ func (w *ServerInterfaceWrapper) GetGroupInstances(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter version: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetGroupInstances(ctx, appIDorProductID, groupID, params) return err } @@ -743,7 +743,7 @@ func (w *ServerInterfaceWrapper) GetInstance(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -751,7 +751,7 @@ func (w *ServerInterfaceWrapper) GetInstance(ctx echo.Context) error { // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } @@ -759,18 +759,18 @@ func (w *ServerInterfaceWrapper) GetInstance(ctx echo.Context) error { // ------------- Path parameter "instanceID" ------------- var instanceID string - err = runtime.BindStyledParameterWithLocation("simple", false, "instanceID", runtime.ParamLocationPath, ctx.Param("instanceID"), &instanceID) + err = runtime.BindStyledParameterWithOptions("simple", "instanceID", ctx.Param("instanceID"), &instanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter instanceID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetInstance(ctx, appIDorProductID, groupID, instanceID) return err } @@ -781,7 +781,7 @@ func (w *ServerInterfaceWrapper) GetInstanceStatusHistory(ctx echo.Context) erro // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -789,7 +789,7 @@ func (w *ServerInterfaceWrapper) GetInstanceStatusHistory(ctx echo.Context) erro // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } @@ -797,16 +797,16 @@ func (w *ServerInterfaceWrapper) GetInstanceStatusHistory(ctx echo.Context) erro // ------------- Path parameter "instanceID" ------------- var instanceID string - err = runtime.BindStyledParameterWithLocation("simple", false, "instanceID", runtime.ParamLocationPath, ctx.Param("instanceID"), &instanceID) + err = runtime.BindStyledParameterWithOptions("simple", "instanceID", ctx.Param("instanceID"), &instanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter instanceID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params GetInstanceStatusHistoryParams @@ -817,7 +817,7 @@ func (w *ServerInterfaceWrapper) GetInstanceStatusHistory(ctx echo.Context) erro return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter limit: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetInstanceStatusHistory(ctx, appIDorProductID, groupID, instanceID, params) return err } @@ -828,7 +828,7 @@ func (w *ServerInterfaceWrapper) GetGroupInstanceStats(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -836,16 +836,16 @@ func (w *ServerInterfaceWrapper) GetGroupInstanceStats(ctx echo.Context) error { // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params GetGroupInstanceStatsParams @@ -856,7 +856,7 @@ func (w *ServerInterfaceWrapper) GetGroupInstanceStats(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter duration: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetGroupInstanceStats(ctx, appIDorProductID, groupID, params) return err } @@ -867,7 +867,7 @@ func (w *ServerInterfaceWrapper) GetGroupInstancesCount(ctx echo.Context) error // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -875,16 +875,16 @@ func (w *ServerInterfaceWrapper) GetGroupInstancesCount(ctx echo.Context) error // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params GetGroupInstancesCountParams @@ -895,7 +895,7 @@ func (w *ServerInterfaceWrapper) GetGroupInstancesCount(ctx echo.Context) error return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter duration: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetGroupInstancesCount(ctx, appIDorProductID, groupID, params) return err } @@ -906,7 +906,7 @@ func (w *ServerInterfaceWrapper) GetGroupStatusTimeline(ctx echo.Context) error // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -914,16 +914,16 @@ func (w *ServerInterfaceWrapper) GetGroupStatusTimeline(ctx echo.Context) error // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params GetGroupStatusTimelineParams @@ -934,7 +934,7 @@ func (w *ServerInterfaceWrapper) GetGroupStatusTimeline(ctx echo.Context) error return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter duration: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetGroupStatusTimeline(ctx, appIDorProductID, groupID, params) return err } @@ -945,7 +945,7 @@ func (w *ServerInterfaceWrapper) GetGroupVersionBreakdown(ctx echo.Context) erro // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -953,18 +953,18 @@ func (w *ServerInterfaceWrapper) GetGroupVersionBreakdown(ctx echo.Context) erro // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetGroupVersionBreakdown(ctx, appIDorProductID, groupID) return err } @@ -975,7 +975,7 @@ func (w *ServerInterfaceWrapper) GetGroupVersionTimeline(ctx echo.Context) error // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -983,16 +983,16 @@ func (w *ServerInterfaceWrapper) GetGroupVersionTimeline(ctx echo.Context) error // ------------- Path parameter "groupID" ------------- var groupID string - err = runtime.BindStyledParameterWithLocation("simple", false, "groupID", runtime.ParamLocationPath, ctx.Param("groupID"), &groupID) + err = runtime.BindStyledParameterWithOptions("simple", "groupID", ctx.Param("groupID"), &groupID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter groupID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params GetGroupVersionTimelineParams @@ -1003,7 +1003,7 @@ func (w *ServerInterfaceWrapper) GetGroupVersionTimeline(ctx echo.Context) error return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter duration: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetGroupVersionTimeline(ctx, appIDorProductID, groupID, params) return err } @@ -1014,16 +1014,16 @@ func (w *ServerInterfaceWrapper) PaginatePackages(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) // Parameter object where we will unmarshal all parameters from the context var params PaginatePackagesParams @@ -1048,7 +1048,7 @@ func (w *ServerInterfaceWrapper) PaginatePackages(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter searchVersion: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.PaginatePackages(ctx, appIDorProductID, params) return err } @@ -1059,18 +1059,18 @@ func (w *ServerInterfaceWrapper) CreatePackage(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.CreatePackage(ctx, appIDorProductID) return err } @@ -1081,7 +1081,7 @@ func (w *ServerInterfaceWrapper) DeletePackage(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -1089,18 +1089,18 @@ func (w *ServerInterfaceWrapper) DeletePackage(ctx echo.Context) error { // ------------- Path parameter "packageID" ------------- var packageID string - err = runtime.BindStyledParameterWithLocation("simple", false, "packageID", runtime.ParamLocationPath, ctx.Param("packageID"), &packageID) + err = runtime.BindStyledParameterWithOptions("simple", "packageID", ctx.Param("packageID"), &packageID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter packageID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.DeletePackage(ctx, appIDorProductID, packageID) return err } @@ -1111,7 +1111,7 @@ func (w *ServerInterfaceWrapper) GetPackage(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -1119,18 +1119,18 @@ func (w *ServerInterfaceWrapper) GetPackage(ctx echo.Context) error { // ------------- Path parameter "packageID" ------------- var packageID string - err = runtime.BindStyledParameterWithLocation("simple", false, "packageID", runtime.ParamLocationPath, ctx.Param("packageID"), &packageID) + err = runtime.BindStyledParameterWithOptions("simple", "packageID", ctx.Param("packageID"), &packageID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter packageID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetPackage(ctx, appIDorProductID, packageID) return err } @@ -1141,7 +1141,7 @@ func (w *ServerInterfaceWrapper) UpdatePackage(ctx echo.Context) error { // ------------- Path parameter "appIDorProductID" ------------- var appIDorProductID string - err = runtime.BindStyledParameterWithLocation("simple", false, "appIDorProductID", runtime.ParamLocationPath, ctx.Param("appIDorProductID"), &appIDorProductID) + err = runtime.BindStyledParameterWithOptions("simple", "appIDorProductID", ctx.Param("appIDorProductID"), &appIDorProductID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter appIDorProductID: %s", err)) } @@ -1149,18 +1149,18 @@ func (w *ServerInterfaceWrapper) UpdatePackage(ctx echo.Context) error { // ------------- Path parameter "packageID" ------------- var packageID string - err = runtime.BindStyledParameterWithLocation("simple", false, "packageID", runtime.ParamLocationPath, ctx.Param("packageID"), &packageID) + err = runtime.BindStyledParameterWithOptions("simple", "packageID", ctx.Param("packageID"), &packageID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter packageID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.UpdatePackage(ctx, appIDorProductID, packageID) return err } @@ -1171,18 +1171,18 @@ func (w *ServerInterfaceWrapper) UpdateInstance(ctx echo.Context) error { // ------------- Path parameter "instanceID" ------------- var instanceID string - err = runtime.BindStyledParameterWithLocation("simple", false, "instanceID", runtime.ParamLocationPath, ctx.Param("instanceID"), &instanceID) + err = runtime.BindStyledParameterWithOptions("simple", "instanceID", ctx.Param("instanceID"), &instanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter instanceID: %s", err)) } - ctx.Set(OidcBearerAuthScopes, []string{""}) + ctx.Set(OidcBearerAuthScopes, []string{}) - ctx.Set(OidcCookieAuthScopes, []string{""}) + ctx.Set(OidcCookieAuthScopes, []string{}) - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.UpdateInstance(ctx, instanceID) return err } @@ -1191,9 +1191,9 @@ func (w *ServerInterfaceWrapper) UpdateInstance(ctx echo.Context) error { func (w *ServerInterfaceWrapper) GetConfig(ctx echo.Context) error { var err error - ctx.Set(GithubCookieAuthScopes, []string{""}) + ctx.Set(GithubCookieAuthScopes, []string{}) - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.GetConfig(ctx) return err } @@ -1202,7 +1202,7 @@ func (w *ServerInterfaceWrapper) GetConfig(ctx echo.Context) error { func (w *ServerInterfaceWrapper) Health(ctx echo.Context) error { var err error - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.Health(ctx) return err } @@ -1220,7 +1220,7 @@ func (w *ServerInterfaceWrapper) Login(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter login_redirect_url: %s", err)) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.Login(ctx, params) return err } @@ -1229,7 +1229,7 @@ func (w *ServerInterfaceWrapper) Login(ctx echo.Context) error { func (w *ServerInterfaceWrapper) LoginCb(ctx echo.Context) error { var err error - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.LoginCb(ctx) return err } @@ -1238,7 +1238,7 @@ func (w *ServerInterfaceWrapper) LoginCb(ctx echo.Context) error { func (w *ServerInterfaceWrapper) LoginToken(ctx echo.Context) error { var err error - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.LoginToken(ctx) return err } @@ -1247,7 +1247,7 @@ func (w *ServerInterfaceWrapper) LoginToken(ctx echo.Context) error { func (w *ServerInterfaceWrapper) ValidateToken(ctx echo.Context) error { var err error - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.ValidateToken(ctx) return err } @@ -1268,7 +1268,7 @@ func (w *ServerInterfaceWrapper) LoginWebhook(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Expected one value for X-Hub-Signature, got %d", n)) } - err = runtime.BindStyledParameterWithLocation("simple", false, "X-Hub-Signature", runtime.ParamLocationHeader, valueList[0], &XHubSignature) + err = runtime.BindStyledParameterWithOptions("simple", "X-Hub-Signature", valueList[0], &XHubSignature, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter X-Hub-Signature: %s", err)) } @@ -1285,7 +1285,7 @@ func (w *ServerInterfaceWrapper) LoginWebhook(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Expected one value for X-Github-Event, got %d", n)) } - err = runtime.BindStyledParameterWithLocation("simple", false, "X-Github-Event", runtime.ParamLocationHeader, valueList[0], &XGithubEvent) + err = runtime.BindStyledParameterWithOptions("simple", "X-Github-Event", valueList[0], &XGithubEvent, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true}) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter X-Github-Event: %s", err)) } @@ -1295,7 +1295,7 @@ func (w *ServerInterfaceWrapper) LoginWebhook(ctx echo.Context) error { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Header parameter X-Github-Event is required, but not found")) } - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.LoginWebhook(ctx, params) return err } @@ -1304,7 +1304,7 @@ func (w *ServerInterfaceWrapper) LoginWebhook(ctx echo.Context) error { func (w *ServerInterfaceWrapper) Omaha(ctx echo.Context) error { var err error - // Invoke the callback with all the unmarshalled arguments + // Invoke the callback with all the unmarshaled arguments err = w.Handler.Omaha(ctx) return err } diff --git a/backend/pkg/codegen/spec.gen.go b/backend/pkg/codegen/spec.gen.go index 9d398ad87..e13259bfb 100644 --- a/backend/pkg/codegen/spec.gen.go +++ b/backend/pkg/codegen/spec.gen.go @@ -1,6 +1,6 @@ // Package codegen provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package codegen import ( @@ -94,16 +94,16 @@ var swaggerSpec = []string{ func decodeSpec() ([]byte, error) { zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) if err != nil { - return nil, fmt.Errorf("error base64 decoding spec: %s", err) + return nil, fmt.Errorf("error base64 decoding spec: %w", err) } zr, err := gzip.NewReader(bytes.NewReader(zipped)) if err != nil { - return nil, fmt.Errorf("error decompressing spec: %s", err) + return nil, fmt.Errorf("error decompressing spec: %w", err) } var buf bytes.Buffer _, err = buf.ReadFrom(zr) if err != nil { - return nil, fmt.Errorf("error decompressing spec: %s", err) + return nil, fmt.Errorf("error decompressing spec: %w", err) } return buf.Bytes(), nil @@ -121,7 +121,7 @@ func decodeSpecCached() func() ([]byte, error) { // Constructs a synthetic filesystem for resolving external references when loading openapi specifications. func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { - var res = make(map[string]func() ([]byte, error)) + res := make(map[string]func() ([]byte, error)) if len(pathToFile) > 0 { res[pathToFile] = rawSpec } @@ -135,12 +135,12 @@ func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { // Externally referenced files must be embedded in the corresponding golang packages. // Urls can be supported but this task was out of the scope. func GetSwagger() (swagger *openapi3.T, err error) { - var resolvePath = PathToRawSpec("") + resolvePath := PathToRawSpec("") loader := openapi3.NewLoader() loader.IsExternalRefsAllowed = true loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { - var pathToFile = url.String() + pathToFile := url.String() pathToFile = path.Clean(pathToFile) getSpec, ok := resolvePath[pathToFile] if !ok { diff --git a/backend/pkg/codegen/types.gen.go b/backend/pkg/codegen/types.gen.go index 9588b0c8e..69d5aa0fb 100644 --- a/backend/pkg/codegen/types.gen.go +++ b/backend/pkg/codegen/types.gen.go @@ -1,6 +1,6 @@ // Package codegen provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package codegen import ( diff --git a/backend/pkg/server/server.go b/backend/pkg/server/server.go index d9afd8fea..61e10b77c 100644 --- a/backend/pkg/server/server.go +++ b/backend/pkg/server/server.go @@ -9,12 +9,12 @@ import ( "strings" "time" - oapimiddleware "github.com/deepmap/oapi-codegen/pkg/middleware" "github.com/getkin/kin-openapi/openapi3filter" "github.com/labstack/echo-contrib/prometheus" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" "github.com/labstack/gommon/log" + echomiddleware "github.com/oapi-codegen/echo-middleware" "github.com/pkg/errors" db "github.com/kinvolk/nebraska/backend/pkg/api" @@ -105,7 +105,7 @@ func New(conf *config.Config, db *db.API) (*echo.Echo, error) { if sessionStore != nil { e.Use(echosessions.SessionsMiddleware(sessionStore, conf.AuthMode)) } - e.Use(oapimiddleware.OapiRequestValidatorWithOptions(swagger, &oapimiddleware.Options{Options: openapi3filter.Options{AuthenticationFunc: nebraskaAuthenticationFunc(conf.AuthMode)}, Skipper: middlewareSkipper})) + e.Use(echomiddleware.OapiRequestValidatorWithOptions(swagger, &echomiddleware.Options{Options: openapi3filter.Options{AuthenticationFunc: nebraskaAuthenticationFunc(conf.AuthMode)}, Skipper: middlewareSkipper})) e.Use(custommiddleware.Auth(authenticator, custommiddleware.AuthConfig{Skipper: custommiddleware.NewAuthSkipper(conf.AuthMode)})) // setup handler