diff --git a/client.gen.go b/client.gen.go index 2b39b05..ead47a3 100644 --- a/client.gen.go +++ b/client.gen.go @@ -8636,10 +8636,11 @@ type AuthRegistryRequestResponse struct { Body []byte HTTPResponse *http.Response JSON200 *RegistryAuthToken - JSON400 *BadRequest - JSON401 *RequiresAuthentication - JSON422 *UnprocessableEntity - JSON500 *InternalError + JSON400 *DockerError + JSON401 *DockerError + JSON404 *DockerError + JSON422 *DockerError + JSON500 *DockerError } // Status returns HTTPResponse.Status @@ -13193,28 +13194,35 @@ func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestR response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest BadRequest + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + var dest DockerError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/models.gen.go b/models.gen.go index 2e38e33..3cf6c08 100644 --- a/models.gen.go +++ b/models.gen.go @@ -441,6 +441,11 @@ type BasicError struct { Status int `json:"status"` } +// DockerError Error Returned from the Docker Authorization Handler to the Docker Registry +type DockerError struct { + Details string `json:"details"` +} + // Email defines model for Email. type Email = openapi_types.Email diff --git a/spec.json b/spec.json index f96907f..23d24f5 100644 --- a/spec.json +++ b/spec.json @@ -4562,16 +4562,19 @@ "description": "Response" }, "400": { - "$ref": "#/components/responses/BadRequest" + "$ref": "#/components/responses/DockerError" }, "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "$ref": "#/components/responses/DockerError" + }, + "404": { + "$ref": "#/components/responses/DockerError" }, "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "$ref": "#/components/responses/DockerError" }, "500": { - "$ref": "#/components/responses/InternalError" + "$ref": "#/components/responses/DockerError" } }, "tags": [ @@ -7158,6 +7161,20 @@ "token" ] }, + "DockerError": { + "additionalProperties": false, + "description": "Error Returned from the Docker Authorization Handler to the Docker Registry", + "required": [ + "details" + ], + "properties": { + "details": { + "type": "string" + } + }, + "title": "Docker Error", + "type": "object" + }, "Sync": { "description": "Managed Sync definition", "type": "object", @@ -7377,6 +7394,16 @@ } }, "description": "Method not allowed" + }, + "DockerError": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DockerError" + } + } + }, + "description": "Error Returned from the Docker Authorization Handler to the Docker Registry" } }, "parameters": {