();
@@ -309,6 +393,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString()));
}
+ if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString()));
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
diff --git a/java-client/src/test/java/org/openapitools/client/api/EnvironmentManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/EnvironmentManagementApiTest.java
new file mode 100644
index 0000000..d00073e
--- /dev/null
+++ b/java-client/src/test/java/org/openapitools/client/api/EnvironmentManagementApiTest.java
@@ -0,0 +1,46 @@
+/*
+ * Apollo OpenAPI
+ * Apollo配置中心OpenAPI接口文档
认证方式
所有 API 接口都需要通过 Authorization header 进行身份验证。
获取 Token 的方式:
- Portal 管理界面获取:登录 Portal → 管理员工具 → 开放平台授权管理 → 创建第三方应用,获取 Token。
- Token 格式:
Authorization: token_value - Token 权限:按应用/环境/命名空间授予,建议不同用途分别创建。
使用示例
curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiException;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * API tests for EnvironmentManagementApi
+ */
+@Disabled
+public class EnvironmentManagementApiTest {
+
+ private final EnvironmentManagementApi api = new EnvironmentManagementApi();
+
+ /**
+ * 获取所有环境
+ *
+ * GET /openapi/v1/envs
+ *
+ * @throws ApiException if the Api call fails
+ */
+ @Test
+ public void getEnvsTest() throws ApiException {
+ List response = api.getEnvs();
+ // TODO: test validations
+ }
+
+}
diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java
index 5936027..24f10d4 100644
--- a/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java
+++ b/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java
@@ -85,4 +85,28 @@ public void appIdTest() {
// TODO: test appId
}
+ /**
+ * Test the property 'id'
+ */
+ @Test
+ public void idTest() {
+ // TODO: test id
+ }
+
+ /**
+ * Test the property 'parentClusterId'
+ */
+ @Test
+ public void parentClusterIdTest() {
+ // TODO: test parentClusterId
+ }
+
+ /**
+ * Test the property 'comment'
+ */
+ @Test
+ public void commentTest() {
+ // TODO: test comment
+ }
+
}
diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES
index 604290a..970aae7 100644
--- a/python/.openapi-generator/FILES
+++ b/python/.openapi-generator/FILES
@@ -8,6 +8,7 @@ apollo_openapi/api_client.py
apollo_openapi/apis/__init__.py
apollo_openapi/apis/tags/app_management_api.py
apollo_openapi/apis/tags/cluster_management_api.py
+apollo_openapi/apis/tags/environment_management_api.py
apollo_openapi/apis/tags/instance_management_api.py
apollo_openapi/apis/tags/item_management_api.py
apollo_openapi/apis/tags/namespace_branch_management_api.py
@@ -84,6 +85,7 @@ apollo_openapi/rest.py
apollo_openapi/schemas.py
docs/apis/tags/AppManagementApi.md
docs/apis/tags/ClusterManagementApi.md
+docs/apis/tags/EnvironmentManagementApi.md
docs/apis/tags/InstanceManagementApi.md
docs/apis/tags/ItemManagementApi.md
docs/apis/tags/NamespaceBranchManagementApi.md
diff --git a/python/README.md b/python/README.md
index f4777cd..56b8f29 100644
--- a/python/README.md
+++ b/python/README.md
@@ -229,6 +229,7 @@ Class | Method | HTTP request | Description
*ClusterManagementApi* | [**create_cluster**](docs/apis/tags/ClusterManagementApi.md#create_cluster) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi)
*ClusterManagementApi* | [**delete_cluster**](docs/apis/tags/ClusterManagementApi.md#delete_cluster) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added)
*ClusterManagementApi* | [**get_cluster**](docs/apis/tags/ClusterManagementApi.md#get_cluster) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi)
+*EnvironmentManagementApi* | [**get_envs**](docs/apis/tags/EnvironmentManagementApi.md#get_envs) | **get** /openapi/v1/envs | 获取所有环境
*InstanceManagementApi* | [**get_by_release**](docs/apis/tags/InstanceManagementApi.md#get_by_release) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added)
*InstanceManagementApi* | [**get_by_releases_not_in**](docs/apis/tags/InstanceManagementApi.md#get_by_releases_not_in) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added)
*InstanceManagementApi* | [**get_instance_count_by_namespace**](docs/apis/tags/InstanceManagementApi.md#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi)
@@ -332,6 +333,7 @@ Authentication schemes defined for the API:
+
## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in apollo_openapi.apis and apollo_openapi.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
diff --git a/python/apollo_openapi/apis/path_to_api.py b/python/apollo_openapi/apis/path_to_api.py
index 7325294..b12a7ea 100644
--- a/python/apollo_openapi/apis/path_to_api.py
+++ b/python/apollo_openapi/apis/path_to_api.py
@@ -47,6 +47,7 @@
from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches
from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName
from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules
+from apollo_openapi.apis.paths.openapi_v1_envs import OpenapiV1Envs
PathToApi = typing_extensions.TypedDict(
'PathToApi',
@@ -97,6 +98,7 @@
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules,
+ PathValues.OPENAPI_V1_ENVS: OpenapiV1Envs,
}
)
@@ -148,5 +150,6 @@
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules,
+ PathValues.OPENAPI_V1_ENVS: OpenapiV1Envs,
}
)
diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs.py b/python/apollo_openapi/apis/paths/openapi_v1_envs.py
new file mode 100644
index 0000000..401dc92
--- /dev/null
+++ b/python/apollo_openapi/apis/paths/openapi_v1_envs.py
@@ -0,0 +1,7 @@
+from apollo_openapi.paths.openapi_v1_envs.get import ApiForget
+
+
+class OpenapiV1Envs(
+ ApiForget,
+):
+ pass
diff --git a/python/apollo_openapi/apis/tag_to_api.py b/python/apollo_openapi/apis/tag_to_api.py
index 396e7df..08add91 100644
--- a/python/apollo_openapi/apis/tag_to_api.py
+++ b/python/apollo_openapi/apis/tag_to_api.py
@@ -9,6 +9,7 @@
from apollo_openapi.apis.tags.namespace_namespace_branch_management_api import NamespaceNamespaceBranchManagementApi
from apollo_openapi.apis.tags.instance_management_api import InstanceManagementApi
from apollo_openapi.apis.tags.organization_management_api import OrganizationManagementApi
+from apollo_openapi.apis.tags.environment_management_api import EnvironmentManagementApi
from apollo_openapi.apis.tags.namespace_branch_management_api import NamespaceBranchManagementApi
TagToApi = typing_extensions.TypedDict(
@@ -22,6 +23,7 @@
TagValues.NAMESPACE_NAMESPACE_BRANCH_MANAGEMENT: NamespaceNamespaceBranchManagementApi,
TagValues.INSTANCE_MANAGEMENT: InstanceManagementApi,
TagValues.ORGANIZATION_MANAGEMENT: OrganizationManagementApi,
+ TagValues.ENVIRONMENT_MANAGEMENT: EnvironmentManagementApi,
TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi,
}
)
@@ -36,6 +38,7 @@
TagValues.NAMESPACE_NAMESPACE_BRANCH_MANAGEMENT: NamespaceNamespaceBranchManagementApi,
TagValues.INSTANCE_MANAGEMENT: InstanceManagementApi,
TagValues.ORGANIZATION_MANAGEMENT: OrganizationManagementApi,
+ TagValues.ENVIRONMENT_MANAGEMENT: EnvironmentManagementApi,
TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi,
}
)
diff --git a/python/apollo_openapi/apis/tags/__init__.py b/python/apollo_openapi/apis/tags/__init__.py
index d1a9aef..eaf2d81 100644
--- a/python/apollo_openapi/apis/tags/__init__.py
+++ b/python/apollo_openapi/apis/tags/__init__.py
@@ -14,4 +14,5 @@ class TagValues(str, enum.Enum):
NAMESPACE_NAMESPACE_BRANCH_MANAGEMENT = "Namespace Namespace Branch Management"
INSTANCE_MANAGEMENT = "Instance Management"
ORGANIZATION_MANAGEMENT = "Organization Management"
+ ENVIRONMENT_MANAGEMENT = "Environment Management"
NAMESPACE_BRANCH_MANAGEMENT = "Namespace Branch Management"
diff --git a/python/apollo_openapi/apis/tags/environment_management_api.py b/python/apollo_openapi/apis/tags/environment_management_api.py
new file mode 100644
index 0000000..5132f75
--- /dev/null
+++ b/python/apollo_openapi/apis/tags/environment_management_api.py
@@ -0,0 +1,23 @@
+# coding: utf-8
+
+"""
+ Apollo OpenAPI
+
+ Apollo配置中心OpenAPI接口文档
认证方式
所有 API 接口都需要通过 Authorization header 进行身份验证。
获取 Token 的方式:
- Portal 管理界面获取:登录 Portal → 管理员工具 → 开放平台授权管理 → 创建第三方应用,获取 Token。
- Token 格式:
Authorization: token_value - Token 权限:按应用/环境/命名空间授予,建议不同用途分别创建。
使用示例
curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+from apollo_openapi.paths.openapi_v1_envs.get import GetEnvs
+
+
+class EnvironmentManagementApi(
+ GetEnvs,
+):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+ pass
diff --git a/python/apollo_openapi/model/open_cluster_dto.py b/python/apollo_openapi/model/open_cluster_dto.py
index f46ca77..152952b 100644
--- a/python/apollo_openapi/model/open_cluster_dto.py
+++ b/python/apollo_openapi/model/open_cluster_dto.py
@@ -44,6 +44,9 @@ class properties:
dataChangeLastModifiedTime = schemas.StrSchema
name = schemas.StrSchema
appId = schemas.StrSchema
+ id = schemas.Int64Schema
+ parentClusterId = schemas.Int64Schema
+ comment = schemas.StrSchema
__annotations__ = {
"dataChangeCreatedBy": dataChangeCreatedBy,
"dataChangeLastModifiedBy": dataChangeLastModifiedBy,
@@ -51,6 +54,9 @@ class properties:
"dataChangeLastModifiedTime": dataChangeLastModifiedTime,
"name": name,
"appId": appId,
+ "id": id,
+ "parentClusterId": parentClusterId,
+ "comment": comment,
}
@typing.overload
@@ -71,10 +77,19 @@ def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.prope
@typing.overload
def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ...
+ @typing.overload
+ def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
+
+ @typing.overload
+ def __getitem__(self, name: typing_extensions.Literal["parentClusterId"]) -> MetaOapg.properties.parentClusterId: ...
+
+ @typing.overload
+ def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ...
+
@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
- def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", ], str]):
+ def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "id", "parentClusterId", "comment", ], str]):
# dict_instance[name] accessor
return super().__getitem__(name)
@@ -97,10 +112,19 @@ def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union
@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ...
+ @typing.overload
+ def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
+
+ @typing.overload
+ def get_item_oapg(self, name: typing_extensions.Literal["parentClusterId"]) -> typing.Union[MetaOapg.properties.parentClusterId, schemas.Unset]: ...
+
+ @typing.overload
+ def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ...
+
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
- def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", ], str]):
+ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "id", "parentClusterId", "comment", ], str]):
return super().get_item_oapg(name)
@@ -113,6 +137,9 @@ def __new__(
dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset,
name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset,
+ id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset,
+ parentClusterId: typing.Union[MetaOapg.properties.parentClusterId, decimal.Decimal, int, schemas.Unset] = schemas.unset,
+ comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset,
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
) -> 'OpenClusterDTO':
@@ -125,6 +152,9 @@ def __new__(
dataChangeLastModifiedTime=dataChangeLastModifiedTime,
name=name,
appId=appId,
+ id=id,
+ parentClusterId=parentClusterId,
+ comment=comment,
_configuration=_configuration,
**kwargs,
)
diff --git a/python/apollo_openapi/model/open_cluster_dto.pyi b/python/apollo_openapi/model/open_cluster_dto.pyi
index f46ca77..152952b 100644
--- a/python/apollo_openapi/model/open_cluster_dto.pyi
+++ b/python/apollo_openapi/model/open_cluster_dto.pyi
@@ -44,6 +44,9 @@ class OpenClusterDTO(
dataChangeLastModifiedTime = schemas.StrSchema
name = schemas.StrSchema
appId = schemas.StrSchema
+ id = schemas.Int64Schema
+ parentClusterId = schemas.Int64Schema
+ comment = schemas.StrSchema
__annotations__ = {
"dataChangeCreatedBy": dataChangeCreatedBy,
"dataChangeLastModifiedBy": dataChangeLastModifiedBy,
@@ -51,6 +54,9 @@ class OpenClusterDTO(
"dataChangeLastModifiedTime": dataChangeLastModifiedTime,
"name": name,
"appId": appId,
+ "id": id,
+ "parentClusterId": parentClusterId,
+ "comment": comment,
}
@typing.overload
@@ -71,10 +77,19 @@ class OpenClusterDTO(
@typing.overload
def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ...
+ @typing.overload
+ def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
+
+ @typing.overload
+ def __getitem__(self, name: typing_extensions.Literal["parentClusterId"]) -> MetaOapg.properties.parentClusterId: ...
+
+ @typing.overload
+ def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ...
+
@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
- def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", ], str]):
+ def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "id", "parentClusterId", "comment", ], str]):
# dict_instance[name] accessor
return super().__getitem__(name)
@@ -97,10 +112,19 @@ class OpenClusterDTO(
@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ...
+ @typing.overload
+ def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
+
+ @typing.overload
+ def get_item_oapg(self, name: typing_extensions.Literal["parentClusterId"]) -> typing.Union[MetaOapg.properties.parentClusterId, schemas.Unset]: ...
+
+ @typing.overload
+ def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ...
+
@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
- def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", ], str]):
+ def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "id", "parentClusterId", "comment", ], str]):
return super().get_item_oapg(name)
@@ -113,6 +137,9 @@ class OpenClusterDTO(
dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset,
name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset,
+ id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset,
+ parentClusterId: typing.Union[MetaOapg.properties.parentClusterId, decimal.Decimal, int, schemas.Unset] = schemas.unset,
+ comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset,
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
) -> 'OpenClusterDTO':
@@ -125,6 +152,9 @@ class OpenClusterDTO(
dataChangeLastModifiedTime=dataChangeLastModifiedTime,
name=name,
appId=appId,
+ id=id,
+ parentClusterId=parentClusterId,
+ comment=comment,
_configuration=_configuration,
**kwargs,
)
diff --git a/python/apollo_openapi/paths/__init__.py b/python/apollo_openapi/paths/__init__.py
index e441c48..4437ce9 100644
--- a/python/apollo_openapi/paths/__init__.py
+++ b/python/apollo_openapi/paths/__init__.py
@@ -52,3 +52,4 @@ class PathValues(str, enum.Enum):
OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches"
OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}"
OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules"
+ OPENAPI_V1_ENVS = "/openapi/v1/envs"
diff --git a/python/apollo_openapi/paths/openapi_v1_envs/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs/__init__.py
new file mode 100644
index 0000000..8b1a664
--- /dev/null
+++ b/python/apollo_openapi/paths/openapi_v1_envs/__init__.py
@@ -0,0 +1,7 @@
+# do not import all endpoints into this module because that uses a lot of memory and stack frames
+# if you need the ability to import all endpoints from this module, import them with
+# from apollo_openapi.paths.openapi_v1_envs import Api
+
+from apollo_openapi.paths import PathValues
+
+path = PathValues.OPENAPI_V1_ENVS
diff --git a/python/apollo_openapi/paths/openapi_v1_envs/get.py b/python/apollo_openapi/paths/openapi_v1_envs/get.py
new file mode 100644
index 0000000..834b579
--- /dev/null
+++ b/python/apollo_openapi/paths/openapi_v1_envs/get.py
@@ -0,0 +1,261 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+from dataclasses import dataclass
+import typing_extensions
+import urllib3
+from urllib3._collections import HTTPHeaderDict
+
+from apollo_openapi import api_client, exceptions
+from datetime import date, datetime # noqa: F401
+import decimal # noqa: F401
+import functools # noqa: F401
+import io # noqa: F401
+import re # noqa: F401
+import typing # noqa: F401
+import typing_extensions # noqa: F401
+import uuid # noqa: F401
+
+import frozendict # noqa: F401
+
+from apollo_openapi import schemas # noqa: F401
+
+from . import path
+
+_auth = [
+ 'ApiKeyAuth',
+]
+
+
+class SchemaFor200ResponseBodyApplicationJson(
+ schemas.ListSchema
+):
+
+
+ class MetaOapg:
+ items = schemas.StrSchema
+
+ def __new__(
+ cls,
+ _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]],
+ _configuration: typing.Optional[schemas.Configuration] = None,
+ ) -> 'SchemaFor200ResponseBodyApplicationJson':
+ return super().__new__(
+ cls,
+ _arg,
+ _configuration=_configuration,
+ )
+
+ def __getitem__(self, i: int) -> MetaOapg.items:
+ return super().__getitem__(i)
+
+
+@dataclass
+class ApiResponseFor200(api_client.ApiResponse):
+ response: urllib3.HTTPResponse
+ body: typing.Union[
+ SchemaFor200ResponseBodyApplicationJson,
+ ]
+ headers: schemas.Unset = schemas.unset
+
+
+_response_for_200 = api_client.OpenApiResponse(
+ response_cls=ApiResponseFor200,
+ content={
+ 'application/json': api_client.MediaType(
+ schema=SchemaFor200ResponseBodyApplicationJson),
+ },
+)
+_status_code_to_response = {
+ '200': _response_for_200,
+}
+_all_accept_content_types = (
+ 'application/json',
+)
+
+
+class BaseApi(api_client.Api):
+ @typing.overload
+ def _get_envs_oapg(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: typing_extensions.Literal[False] = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ ]: ...
+
+ @typing.overload
+ def _get_envs_oapg(
+ self,
+ skip_deserialization: typing_extensions.Literal[True],
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ ) -> api_client.ApiResponseWithoutDeserialization: ...
+
+ @typing.overload
+ def _get_envs_oapg(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization,
+ ]: ...
+
+ def _get_envs_oapg(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ):
+ """
+ 获取所有环境
+ :param skip_deserialization: If true then api_response.response will be set but
+ api_response.body and api_response.headers will not be deserialized into schema
+ class instances
+ """
+ used_path = path.value
+
+ _headers = HTTPHeaderDict()
+ # TODO add cookie handling
+ if accept_content_types:
+ for accept_content_type in accept_content_types:
+ _headers.add('Accept', accept_content_type)
+
+ response = self.api_client.call_api(
+ resource_path=used_path,
+ method='get'.upper(),
+ headers=_headers,
+ auth_settings=_auth,
+ stream=stream,
+ timeout=timeout,
+ )
+
+ if skip_deserialization:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+ else:
+ response_for_status = _status_code_to_response.get(str(response.status))
+ if response_for_status:
+ api_response = response_for_status.deserialize(response, self.api_client.configuration)
+ else:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+
+ if not 200 <= response.status <= 299:
+ raise exceptions.ApiException(
+ status=response.status,
+ reason=response.reason,
+ api_response=api_response
+ )
+
+ return api_response
+
+
+class GetEnvs(BaseApi):
+ # this class is used by api classes that refer to endpoints with operationId fn names
+
+ @typing.overload
+ def get_envs(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: typing_extensions.Literal[False] = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ ]: ...
+
+ @typing.overload
+ def get_envs(
+ self,
+ skip_deserialization: typing_extensions.Literal[True],
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ ) -> api_client.ApiResponseWithoutDeserialization: ...
+
+ @typing.overload
+ def get_envs(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization,
+ ]: ...
+
+ def get_envs(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ):
+ return self._get_envs_oapg(
+ accept_content_types=accept_content_types,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
+class ApiForget(BaseApi):
+ # this class is used by api classes that refer to endpoints by path and http method names
+
+ @typing.overload
+ def get(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: typing_extensions.Literal[False] = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ ]: ...
+
+ @typing.overload
+ def get(
+ self,
+ skip_deserialization: typing_extensions.Literal[True],
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ ) -> api_client.ApiResponseWithoutDeserialization: ...
+
+ @typing.overload
+ def get(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization,
+ ]: ...
+
+ def get(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ):
+ return self._get_envs_oapg(
+ accept_content_types=accept_content_types,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
diff --git a/python/apollo_openapi/paths/openapi_v1_envs/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs/get.pyi
new file mode 100644
index 0000000..51500d6
--- /dev/null
+++ b/python/apollo_openapi/paths/openapi_v1_envs/get.pyi
@@ -0,0 +1,253 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+from dataclasses import dataclass
+import typing_extensions
+import urllib3
+from urllib3._collections import HTTPHeaderDict
+
+from apollo_openapi import api_client, exceptions
+from datetime import date, datetime # noqa: F401
+import decimal # noqa: F401
+import functools # noqa: F401
+import io # noqa: F401
+import re # noqa: F401
+import typing # noqa: F401
+import typing_extensions # noqa: F401
+import uuid # noqa: F401
+
+import frozendict # noqa: F401
+
+from apollo_openapi import schemas # noqa: F401
+
+
+
+class SchemaFor200ResponseBodyApplicationJson(
+ schemas.ListSchema
+):
+
+
+ class MetaOapg:
+ items = schemas.StrSchema
+
+ def __new__(
+ cls,
+ _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]],
+ _configuration: typing.Optional[schemas.Configuration] = None,
+ ) -> 'SchemaFor200ResponseBodyApplicationJson':
+ return super().__new__(
+ cls,
+ _arg,
+ _configuration=_configuration,
+ )
+
+ def __getitem__(self, i: int) -> MetaOapg.items:
+ return super().__getitem__(i)
+
+
+@dataclass
+class ApiResponseFor200(api_client.ApiResponse):
+ response: urllib3.HTTPResponse
+ body: typing.Union[
+ SchemaFor200ResponseBodyApplicationJson,
+ ]
+ headers: schemas.Unset = schemas.unset
+
+
+_response_for_200 = api_client.OpenApiResponse(
+ response_cls=ApiResponseFor200,
+ content={
+ 'application/json': api_client.MediaType(
+ schema=SchemaFor200ResponseBodyApplicationJson),
+ },
+)
+_all_accept_content_types = (
+ 'application/json',
+)
+
+
+class BaseApi(api_client.Api):
+ @typing.overload
+ def _get_envs_oapg(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: typing_extensions.Literal[False] = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ ]: ...
+
+ @typing.overload
+ def _get_envs_oapg(
+ self,
+ skip_deserialization: typing_extensions.Literal[True],
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ ) -> api_client.ApiResponseWithoutDeserialization: ...
+
+ @typing.overload
+ def _get_envs_oapg(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization,
+ ]: ...
+
+ def _get_envs_oapg(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ):
+ """
+ 获取所有环境
+ :param skip_deserialization: If true then api_response.response will be set but
+ api_response.body and api_response.headers will not be deserialized into schema
+ class instances
+ """
+ used_path = path.value
+
+ _headers = HTTPHeaderDict()
+ # TODO add cookie handling
+ if accept_content_types:
+ for accept_content_type in accept_content_types:
+ _headers.add('Accept', accept_content_type)
+
+ response = self.api_client.call_api(
+ resource_path=used_path,
+ method='get'.upper(),
+ headers=_headers,
+ auth_settings=_auth,
+ stream=stream,
+ timeout=timeout,
+ )
+
+ if skip_deserialization:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+ else:
+ response_for_status = _status_code_to_response.get(str(response.status))
+ if response_for_status:
+ api_response = response_for_status.deserialize(response, self.api_client.configuration)
+ else:
+ api_response = api_client.ApiResponseWithoutDeserialization(response=response)
+
+ if not 200 <= response.status <= 299:
+ raise exceptions.ApiException(
+ status=response.status,
+ reason=response.reason,
+ api_response=api_response
+ )
+
+ return api_response
+
+
+class GetEnvs(BaseApi):
+ # this class is used by api classes that refer to endpoints with operationId fn names
+
+ @typing.overload
+ def get_envs(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: typing_extensions.Literal[False] = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ ]: ...
+
+ @typing.overload
+ def get_envs(
+ self,
+ skip_deserialization: typing_extensions.Literal[True],
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ ) -> api_client.ApiResponseWithoutDeserialization: ...
+
+ @typing.overload
+ def get_envs(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization,
+ ]: ...
+
+ def get_envs(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ):
+ return self._get_envs_oapg(
+ accept_content_types=accept_content_types,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
+
+
+class ApiForget(BaseApi):
+ # this class is used by api classes that refer to endpoints by path and http method names
+
+ @typing.overload
+ def get(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: typing_extensions.Literal[False] = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ ]: ...
+
+ @typing.overload
+ def get(
+ self,
+ skip_deserialization: typing_extensions.Literal[True],
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ ) -> api_client.ApiResponseWithoutDeserialization: ...
+
+ @typing.overload
+ def get(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = ...,
+ ) -> typing.Union[
+ ApiResponseFor200,
+ api_client.ApiResponseWithoutDeserialization,
+ ]: ...
+
+ def get(
+ self,
+ accept_content_types: typing.Tuple[str] = _all_accept_content_types,
+ stream: bool = False,
+ timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ skip_deserialization: bool = False,
+ ):
+ return self._get_envs_oapg(
+ accept_content_types=accept_content_types,
+ stream=stream,
+ timeout=timeout,
+ skip_deserialization=skip_deserialization
+ )
diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py
index ed36dc4..c4fec0c 100644
--- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py
+++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py
@@ -34,12 +34,12 @@
RequestRequiredQueryParams = typing_extensions.TypedDict(
'RequestRequiredQueryParams',
{
- 'operator': typing.Union[OperatorSchema, str, ],
}
)
RequestOptionalQueryParams = typing_extensions.TypedDict(
'RequestOptionalQueryParams',
{
+ 'operator': typing.Union[OperatorSchema, str, ],
},
total=False
)
@@ -53,7 +53,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams)
name="operator",
style=api_client.ParameterStyle.FORM,
schema=OperatorSchema,
- required=True,
explode=True,
)
# Path params
diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi
index 3108827..b90fede 100644
--- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi
+++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi
@@ -32,12 +32,12 @@ OperatorSchema = schemas.StrSchema
RequestRequiredQueryParams = typing_extensions.TypedDict(
'RequestRequiredQueryParams',
{
- 'operator': typing.Union[OperatorSchema, str, ],
}
)
RequestOptionalQueryParams = typing_extensions.TypedDict(
'RequestOptionalQueryParams',
{
+ 'operator': typing.Union[OperatorSchema, str, ],
},
total=False
)
@@ -51,7 +51,6 @@ request_query_operator = api_client.QueryParameter(
name="operator",
style=api_client.ParameterStyle.FORM,
schema=OperatorSchema,
- required=True,
explode=True,
)
# Path params
diff --git a/python/docs/apis/tags/ClusterManagementApi.md b/python/docs/apis/tags/ClusterManagementApi.md
index af6f9e6..3444585 100644
--- a/python/docs/apis/tags/ClusterManagementApi.md
+++ b/python/docs/apis/tags/ClusterManagementApi.md
@@ -59,6 +59,9 @@ with apollo_openapi.ApiClient(configuration) as api_client:
data_change_last_modified_time="2025-09-29T12:34:56Z",
name="name_example",
app_id="app_id_example",
+ id=1,
+ parent_cluster_id=1,
+ comment="comment_example",
)
try:
# 创建集群 (original openapi)
@@ -182,7 +185,7 @@ Class Name | Input Type | Accessed Type | Description | Notes
# **delete_cluster**
-> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_cluster(envapp_idcluster_nameoperator)
+> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_cluster(envapp_idcluster_name)
删除集群 (new added)
@@ -223,6 +226,24 @@ with apollo_openapi.ApiClient(configuration) as api_client:
'appId': "appId_example",
'clusterName': "clusterName_example",
}
+ query_params = {
+ }
+ try:
+ # 删除集群 (new added)
+ api_response = api_instance.delete_cluster(
+ path_params=path_params,
+ query_params=query_params,
+ )
+ pprint(api_response)
+ except apollo_openapi.ApiException as e:
+ print("Exception when calling ClusterManagementApi->delete_cluster: %s\n" % e)
+
+ # example passing only optional values
+ path_params = {
+ 'env': "env_example",
+ 'appId': "appId_example",
+ 'clusterName': "clusterName_example",
+ }
query_params = {
'operator': "operator_example",
}
@@ -252,7 +273,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-operator | OperatorSchema | |
+operator | OperatorSchema | | optional
# OperatorSchema
diff --git a/python/docs/apis/tags/EnvironmentManagementApi.md b/python/docs/apis/tags/EnvironmentManagementApi.md
new file mode 100644
index 0000000..fac15bc
--- /dev/null
+++ b/python/docs/apis/tags/EnvironmentManagementApi.md
@@ -0,0 +1,87 @@
+
+# apollo_openapi.apis.tags.environment_management_api.EnvironmentManagementApi
+
+All URIs are relative to *http://localhost*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_envs**](#get_envs) | **get** /openapi/v1/envs | 获取所有环境
+
+# **get_envs**
+
+> [str] get_envs()
+
+获取所有环境
+
+GET /openapi/v1/envs
+
+### Example
+
+* Api Key Authentication (ApiKeyAuth):
+```python
+import apollo_openapi
+from apollo_openapi.apis.tags import environment_management_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://localhost
+# See configuration.py for a list of all supported configuration parameters.
+configuration = apollo_openapi.Configuration(
+ host = "http://localhost"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: ApiKeyAuth
+configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
+# Enter a context with an instance of the API client
+with apollo_openapi.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = environment_management_api.EnvironmentManagementApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ # 获取所有环境
+ api_response = api_instance.get_envs()
+ pprint(api_response)
+ except apollo_openapi.ApiException as e:
+ print("Exception when calling EnvironmentManagementApi->get_envs: %s\n" % e)
+```
+### Parameters
+This endpoint does not need any parameter.
+
+### Return Types, Responses
+
+Code | Class | Description
+------------- | ------------- | -------------
+n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
+200 | [ApiResponseFor200](#get_envs.ApiResponseFor200) | 成功获取环境列表
+
+#### get_envs.ApiResponseFor200
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+response | urllib3.HTTPResponse | Raw response |
+body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
+headers | Unset | headers were not defined |
+
+# SchemaFor200ResponseBodyApplicationJson
+
+## Model Type Info
+Input Type | Accessed Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+list, tuple, | tuple, | |
+
+### Tuple Items
+Class Name | Input Type | Accessed Type | Description | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+items | str, | str, | |
+
+### Authorization
+
+[ApiKeyAuth](../../../README.md#ApiKeyAuth)
+
+[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md)
diff --git a/python/docs/models/OpenClusterDTO.md b/python/docs/models/OpenClusterDTO.md
index 2f3d910..1793358 100644
--- a/python/docs/models/OpenClusterDTO.md
+++ b/python/docs/models/OpenClusterDTO.md
@@ -16,6 +16,9 @@ Key | Input Type | Accessed Type | Description | Notes
**dataChangeLastModifiedTime** | str, | str, | 集群最后修改时间,ISO 8601格式的时间戳 | [optional]
**name** | str, | str, | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional]
**appId** | str, | str, | 所属应用的唯一标识符 | [optional]
+**id** | decimal.Decimal, int, | decimal.Decimal, | 集群的唯一标识符 | [optional] value must be a 64 bit integer
+**parentClusterId** | decimal.Decimal, int, | decimal.Decimal, | 父集群的ID | [optional] value must be a 64 bit integer
+**comment** | str, | str, | 集群的备注说明 | [optional]
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
diff --git a/python/test/test_paths/test_openapi_v1_envs/__init__.py b/python/test/test_paths/test_openapi_v1_envs/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/python/test/test_paths/test_openapi_v1_envs/__init__.py
@@ -0,0 +1 @@
+
diff --git a/python/test/test_paths/test_openapi_v1_envs/test_get.py b/python/test/test_paths/test_openapi_v1_envs/test_get.py
new file mode 100644
index 0000000..483125b
--- /dev/null
+++ b/python/test/test_paths/test_openapi_v1_envs/test_get.py
@@ -0,0 +1,41 @@
+# coding: utf-8
+
+"""
+
+
+ Generated by: https://openapi-generator.tech
+"""
+
+import unittest
+from unittest.mock import patch
+
+import urllib3
+
+import apollo_openapi
+from apollo_openapi.paths.openapi_v1_envs import get # noqa: E501
+from apollo_openapi import configuration, schemas, api_client
+
+from .. import ApiTestMixin
+
+
+class TestOpenapiV1Envs(ApiTestMixin, unittest.TestCase):
+ """
+ OpenapiV1Envs unit test stubs
+ 获取所有环境 # noqa: E501
+ """
+ _configuration = configuration.Configuration()
+
+ def setUp(self):
+ used_api_client = api_client.ApiClient(configuration=self._configuration)
+ self.api = get.ApiForget(api_client=used_api_client) # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ response_status = 200
+
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/rust/docs/OpenClusterDto.md b/rust/docs/OpenClusterDto.md
index 095dcb4..a39fa57 100644
--- a/rust/docs/OpenClusterDto.md
+++ b/rust/docs/OpenClusterDto.md
@@ -10,5 +10,8 @@ Name | Type | Description | Notes
**data_change_last_modified_time** | Option<**String**> | 集群最后修改时间,ISO 8601格式的时间戳 | [optional]
**name** | Option<**String**> | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional]
**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional]
+**id** | Option<**i64**> | 集群的唯一标识符 | [optional]
+**parent_cluster_id** | Option<**i64**> | 父集群的ID | [optional]
+**comment** | Option<**String**> | 集群的备注说明 | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/rust/src/models/open_cluster_dto.rs b/rust/src/models/open_cluster_dto.rs
index 460c46c..ab6f49d 100644
--- a/rust/src/models/open_cluster_dto.rs
+++ b/rust/src/models/open_cluster_dto.rs
@@ -32,6 +32,15 @@ pub struct OpenClusterDto {
/// 所属应用的唯一标识符
#[serde(rename = "appId", skip_serializing_if = "Option::is_none")]
pub app_id: Option,
+ /// 集群的唯一标识符
+ #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
+ pub id: Option,
+ /// 父集群的ID
+ #[serde(rename = "parentClusterId", skip_serializing_if = "Option::is_none")]
+ pub parent_cluster_id: Option,
+ /// 集群的备注说明
+ #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
+ pub comment: Option,
}
impl OpenClusterDto {
@@ -44,6 +53,9 @@ impl OpenClusterDto {
data_change_last_modified_time: None,
name: None,
app_id: None,
+ id: None,
+ parent_cluster_id: None,
+ comment: None,
}
}
}
diff --git a/spring-boot2/.openapi-generator/FILES b/spring-boot2/.openapi-generator/FILES
index 46c06f3..f4da8b2 100644
--- a/spring-boot2/.openapi-generator/FILES
+++ b/spring-boot2/.openapi-generator/FILES
@@ -10,6 +10,9 @@ src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java
src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java
src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java
src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java
+src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApi.java
+src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiController.java
+src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiDelegate.java
src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java
src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java
src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java
diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java
index 12f4560..9cce350 100644
--- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java
+++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java
@@ -91,7 +91,7 @@ default ResponseEntity createCluster(
* @param env (required)
* @param appId (required)
* @param clusterName (required)
- * @param operator 操作人用户名 (required)
+ * @param operator 操作人用户名,openapi外部调用时需传入 (optional)
* @return 集群删除成功 (status code 200)
* or 删除失败,集群可能包含配置 (status code 400)
* or 权限不足 (status code 403)
@@ -129,7 +129,7 @@ default ResponseEntity