From 68874b1880c3c3fd1abfab834add35caa090b641 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Thu, 4 Jan 2024 13:54:46 +0200 Subject: [PATCH] fix: Generate CloudQuery Go API Client from `spec.json` (#98) This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` --- client.gen.go | 16 ++++++++++++++++ models.gen.go | 3 +++ spec.json | 8 ++++++++ 3 files changed, 27 insertions(+) diff --git a/client.gen.go b/client.gen.go index facc146..b7db3c2 100644 --- a/client.gen.go +++ b/client.gen.go @@ -4311,6 +4311,22 @@ func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestPar } + if params.Service != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service", runtime.ParamLocationQuery, *params.Service); 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.Scope != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil { diff --git a/models.gen.go b/models.gen.go index 9352750..51ed1ce 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1478,6 +1478,9 @@ type AuthRegistryRequestParams struct { // Account Username used for `docker login` Account *string `form:"account,omitempty" json:"account,omitempty"` + // Service Service requesting the JTW token + Service *string `form:"service,omitempty" json:"service,omitempty"` + // Scope Multi-value string containing the repository being access and the operation type (push/pull) Scope *string `form:"scope,omitempty" json:"scope,omitempty"` diff --git a/spec.json b/spec.json index fc08bba..7fb5698 100644 --- a/spec.json +++ b/spec.json @@ -4457,6 +4457,14 @@ }, "description": "Username used for `docker login`" }, + { + "in": "query", + "name": "service", + "schema": { + "type": "string" + }, + "description": "Service requesting the JTW token" + }, { "in": "query", "name": "scope",