Skip to content

Commit

Permalink
feat: update client
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach authored and github-actions[bot] committed Jul 1, 2024
1 parent 6979d29 commit 0c67c1d
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 24 deletions.
37 changes: 28 additions & 9 deletions client/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 61 additions & 15 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.0",
"info": {
"title": "Humanitec API",
"version": "0.26.5",
"version": "0.26.10",
"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",
Expand Down Expand Up @@ -6880,11 +6880,11 @@
"description": "The account was successfully deleted.\n\n"
},
"400": {
"description": "One or more request parameters is missing or invalid.\n\n",
"description": "The Resource Account cannot be deleted as at least one non-deleted Resource Definition or one Active Resource still referencing it.\nIn the error the coordinates of the referencing resources are provided.\n",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HumanitecErrorResponse"
"$ref": "#/components/schemas/ConflictingResourcesErrorResponse"
}
}
}
Expand Down Expand Up @@ -7423,7 +7423,7 @@
}
],
"requestBody": {
"description": "The Resource Definition record details.\n\nThe PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored.\n\nFor the map properties, such as PatchResourceDefinitionRequest.DriverInputs, the merge operation is applied.\n\nMerge rules are as follows:\n\n- If a map property has a value, it is replaced (or added).\n\n- If a map property is set to `null`, it is removed.\n\n- If a map property is not included (missing in JSON), it remains unchanged.\n\nIf driver_type changes and an Active Resource which uses this Resource Definition exists, the resource provisioned with the previous used driver_type will be deleted.",
"description": "The Resource Definition record details.\n\nThe PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored.\n\nFor the map properties, such as PatchResourceDefinitionRequest.DriverInputs, the merge operation is applied.\n\nMerge rules are as follows:\n\n- If a map property has a value, it is replaced (or added).\n\n- If a map property is set to `null`, it is removed.\n\n- If a map property is not included (missing in JSON), it remains unchanged.",
"required": true,
"content": {
"application/json": {
Expand Down Expand Up @@ -16250,10 +16250,7 @@
}
},
"required": [
"registry",
"username",
"password",
"secrets"
"registry"
],
"type": "object"
},
Expand Down Expand Up @@ -16911,6 +16908,59 @@
],
"type": "object"
},
"ConflictingResourcesErrorResponse": {
"description": "Represents a standard Humanitec Error with additional details which describe why an action on a specific resource cannot be performed due to some other entities linked to it.\n",
"properties": {
"details": {
"$ref": "#/components/schemas/ConflictingResourcesErrorResponseDetails"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message",
"details"
],
"type": "object"
},
"ConflictingResourcesErrorResponseDetails": {
"description": "Object composed by the list of resources which prevent the deletion of the specified entity. The resources are indexed by their kind.",
"type": "object",
"properties": {
"referencing_resources": {
"$ref": "#/components/schemas/ConflictingResourcesErrorResponseDetailsResources"
}
},
"required": [
"referencing_resources"
],
"additionalProperties": false
},
"ConflictingResourcesErrorResponseDetailsResources": {
"type": "object",
"properties": {
"resource_definitions": {
"description": "List of non-deleted Resource Definitions referencing the specified Resource Account.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceDefinitionResponse"
}
},
"active_resources": {
"description": "List of Active Resources referencing the specified Resource Account.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ActiveResourceResponse"
}
}
},
"additionalProperties": false
},
"ManifestResponse": {
"description": "Manifest represents a complete or a partial Kubernetes manifest, and a location for its injection.",
"properties": {
Expand Down Expand Up @@ -17132,7 +17182,6 @@
"description": "PatchResourceDefinitionRequest describes a ResourceDefinition change request.",
"example": {
"driver_account": "gcp-dev-cloudsql",
"driver_type": "humanitec/terraform",
"driver_inputs": {
"secret_refs": {
"dbcredentials": {
Expand Down Expand Up @@ -17168,10 +17217,6 @@
"$ref": "#/components/schemas/ValuesSecretsRefsRequest",
"description": "(Optional) Additional input data to be passed to the driver."
},
"driver_type": {
"description": "(Optional) The driver to be used to create the resource.",
"type": "string"
},
"name": {
"description": "(Optional) Resource display name",
"nullable": true,
Expand Down Expand Up @@ -17246,7 +17291,7 @@
"type": "string"
},
"is_used": {
"description": "Indicates if this account is being used (referenced) by any resource definition.",
"description": "Indicates if this account is being used (referenced) by any resource definition or active resource.",
"type": "boolean"
},
"name": {
Expand Down Expand Up @@ -19912,6 +19957,7 @@
"ResourceDefinition",
"ResourceDefinitionVersion",
"ResourceProvision",
"AccountType",
"ResourceAccount",
"ResourceType",
"ResourceClass"
Expand Down Expand Up @@ -19999,7 +20045,7 @@
},
{
"name": "AccountType",
"x-displayName": "Account Types",
"x-displayName": "Resource Account Types",
"description": "Resource Account Types define cloud providers or protocols to which a resource account can belong.\n<SchemaDefinition schemaRef=\"#/components/schemas/AccountTypeRequest\" />\n"
},
{
Expand Down

0 comments on commit 0c67c1d

Please sign in to comment.