diff --git a/client.gen.go b/client.gen.go index d3fba9a..8677550 100644 --- a/client.gen.go +++ b/client.gen.go @@ -11727,6 +11727,7 @@ func (r UploadAddonAssetResponse) StatusCode() int { type CQHealthCheckResponse struct { Body []byte HTTPResponse *http.Response + JSON500 *InternalError } // Status returns HTTPResponse.Status @@ -17368,6 +17369,16 @@ func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, err HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } diff --git a/spec.json b/spec.json index e221819..43cef10 100644 --- a/spec.json +++ b/spec.json @@ -16,7 +16,8 @@ "version" : "1.0.0" }, "servers" : [ { - "url" : "https://api.cloudquery.io" + "url" : "https://api.cloudquery.io", + "x-internal" : false } ], "security" : [ { "bearerAuth" : [ ] @@ -61,6 +62,9 @@ "responses" : { "200" : { "description" : "Response" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } }, "security" : [ ], @@ -6395,19 +6399,6 @@ } }, "schemas" : { - "ImageURL" : { - "properties" : { - "upload_url" : { - "example" : "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef", - "type" : "string" - }, - "download_url" : { - "example" : "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef", - "type" : "string" - } - }, - "required" : [ "download_url", "upload_url" ] - }, "BasicError" : { "additionalProperties" : false, "description" : "Basic Error", @@ -6422,6 +6413,19 @@ "required" : [ "message", "status" ], "title" : "Basic Error" }, + "ImageURL" : { + "properties" : { + "upload_url" : { + "example" : "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef", + "type" : "string" + }, + "download_url" : { + "example" : "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef", + "type" : "string" + } + }, + "required" : [ "download_url", "upload_url" ] + }, "TeamName" : { "description" : "The unique name for the team.", "example" : "cloudquery", @@ -8564,7 +8568,7 @@ "example" : "Human Readable Name", "maxLength" : 255, "minLength" : 1, - "pattern" : "^[a-zA-Z\\p{L}][a-zA-Z\\p{L} \\-']*$", + "pattern" : "^[a-zA-Z\\p{L}\\p{N}_][a-zA-Z\\p{L}\\p{N}_ \\-']*$", "type" : "string" }, "PromoteSyncSourceTestConnection" : {