diff --git a/client/client.gen.go b/client/client.gen.go index 9e5e414..bf6dfd7 100644 --- a/client/client.gen.go +++ b/client/client.gen.go @@ -214,7 +214,7 @@ type Agent struct { // CreatedBy User ID of user that added the Agent. CreatedBy string `json:"created_by"` - // Description A pcks8 RSA public key PEM encoded (as the ones produced by openssl), whose module length is greater or equal than 4096 bits. + // Description A description to show future users. It can be empty. Description *string `json:"description,omitempty"` // Id The Agent id. @@ -1749,13 +1749,16 @@ type PipelineStep struct { // Name The name of the step or a generated default. Name string `json:"name"` + // RelatedEntities A map of related object ids that this step created or interacted with. + RelatedEntities map[string]string `json:"related_entities"` + // Status The current status of this Step within the Job. Status string `json:"status"` // StatusMessage A human-readable message indicating the reason for the status. StatusMessage string `json:"status_message"` - // TimeoutSeconds The timeout for this Job. + // TimeoutSeconds The timeout for this Step. TimeoutSeconds int `json:"timeout_seconds"` // Uses The action used by this step. @@ -20781,6 +20784,9 @@ func (r QueryResourceGraphResponse) StatusCode() int { type DeleteActiveResourceResponse struct { Body []byte HTTPResponse *http.Response + JSON400 *HumanitecErrorResponse + JSON404 *HumanitecErrorResponse + JSON409 *HumanitecErrorResponse } // Status returns HTTPResponse.Status @@ -27880,6 +27886,30 @@ func ParseDeleteActiveResourceResponse(rsp *http.Response) (*DeleteActiveResourc HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest HumanitecErrorResponse + 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 == 404: + var dest HumanitecErrorResponse + 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 == 409: + var dest HumanitecErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + } + return response, nil } diff --git a/docs/openapi.json b/docs/openapi.json index 348fe19..0c5a80c 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "Humanitec API", - "version": "0.25.2", + "version": "0.25.4", "description": "# Introduction\nThe *Humanitec API* allows you to automate and integrate Humanitec into your developer and operational workflows.\nThe API is a REST based API. It is based around a set of concepts:\n\n* Core\n* External Resources\n* Sets and Deltas\n\n## Authentication\n\nAlmost all requests made to the Humanitec API require Authentication. See our [Developer Docs on API Authentication](https://developer.humanitec.com/platform-orchestrator/reference/api-references/#authentication) for instructions.\n\n## Content Types\nAll of the Humanitec API unless explicitly only accepts content types of `application/json` and will always return valid `application/json` or an empty response.\n\n## Response Codes\n### Success\nAny response code in the `2xx` range should be regarded as success.\n\n| **Code** | **Meaning** |\n| --- | --- |\n| `200` | Success |\n| `201` | Success (In future, `201` will be replaced by `200`) |\n| `204` | Success, but no content in response |\n\n_Note: We plan to simplify the interface by replacing 201 with 200 status codes._\n\n### Failure\nAny response code in the `4xx` should be regarded as an error which can be rectified by the client. `5xx` error codes indicate errors that cannot be corrected by the client.\n\n| **Code** | **Meaning** |\n| --- | --- |\n| `400` | General error. (Body will contain details) |\n| `401` | Attempt to access protected resource without `Authorization` Header. |\n| `403` | The `Bearer` or `JWT` does not grant access to the requested resource. |\n| `404` | Resource not found. |\n| `405` | Method not allowed |\n| `409` | Conflict. Usually indicated a resource with that ID already exists. |\n| `422` | Unprocessable Entity. The body was not valid JSON, was empty or contained an object different from what was expected. |\n| `429` | Too many requests - request rate limit has been reached. |\n| `500` | Internal Error. If it occurs repeatedly, contact support. |\n", "contact": { "name": "API Support", @@ -161,7 +161,7 @@ "/orgs/{orgId}/agents/{agentId}/keys": { "get": { "tags": [ - "Agent", + "Agents", "public" ], "operationId": "listKeysInAgent", @@ -195,7 +195,7 @@ }, "post": { "tags": [ - "Agent", + "Agents", "public" ], "operationId": "createKey", @@ -6821,11 +6821,35 @@ "204": { "description": "The resource deleted.\n\n" }, + "400": { + "description": "The driver associated to the request resource could not be found.\n\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanitecErrorResponse" + } + } + } + }, "404": { - "description": "The requested resource could not be found.\n\n" + "description": "The requested resource could not be found.\n\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanitecErrorResponse" + } + } + } }, "409": { - "description": "Conflict when deleting resource.\n\n" + "description": "Conflict when deleting resource.\n\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanitecErrorResponse" + } + } + } } } } @@ -12148,7 +12172,7 @@ }, "description": { "type": "string", - "description": "A pcks8 RSA public key PEM encoded (as the ones produced by openssl), whose module length is greater or equal than 4096 bits.", + "description": "A description to show future users. It can be empty.", "example": "One of my agents." }, "created_at": { @@ -15138,7 +15162,8 @@ "status", "status_message", "created_at", - "timeout_seconds" + "timeout_seconds", + "related_entities" ], "properties": { "index": { @@ -15176,9 +15201,20 @@ "format": "date-time" }, "timeout_seconds": { - "description": "The timeout for this Job.", + "description": "The timeout for this Step.", "example": 3600, "type": "integer" + }, + "related_entities": { + "description": "A map of related object ids that this step created or interacted with.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "env_id": "my-environment", + "deployment_id": "0123456789abcdef" + } } } },