diff --git a/apollo-openapi.yaml b/apollo-openapi.yaml
index 5054a9a..9dc2479 100644
--- a/apollo-openapi.yaml
+++ b/apollo-openapi.yaml
@@ -2395,6 +2395,7 @@ paths:
/openapi/v1/envs/{env}/releases/{releaseId}/instances:
get:
summary: 根据发布版本查询实例(支持分页) (new added)
+ operationId: getByRelease
deprecated: false
description: GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
tags:
@@ -2461,9 +2462,10 @@ paths:
dataChangeLastModifiedTime: ''
dataChangeCreatedTime: ''
headers: {}
- /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int: # avoidng confliction with other server endpoint
+ /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in: # avoidng confliction with other server endpoint
get:
summary: 查询不在指定发布版本中的实例 (new added)
+ operationId: getByReleasesNotIn
deprecated: false
description: >-
GET
diff --git a/java-client/README.md b/java-client/README.md
index 5adde87..a815e7b 100644
--- a/java-client/README.md
+++ b/java-client/README.md
@@ -149,9 +149,9 @@ Class | Method | HTTP request | Description
*ClusterManagementApi* | [**createCluster**](docs/ClusterManagementApi.md#createCluster) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi)
*ClusterManagementApi* | [**deleteCluster**](docs/ClusterManagementApi.md#deleteCluster) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added)
*ClusterManagementApi* | [**getCluster**](docs/ClusterManagementApi.md#getCluster) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi)
+*InstanceManagementApi* | [**getByRelease**](docs/InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added)
+*InstanceManagementApi* | [**getByReleasesNotIn**](docs/InstanceManagementApi.md#getByReleasesNotIn) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added)
*InstanceManagementApi* | [**getInstanceCountByNamespace**](docs/InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi)
-*InstanceManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added)
-*InstanceManagementApi* | [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added)
*ItemManagementApi* | [**batchUpdateItemsByText**](docs/ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added)
*ItemManagementApi* | [**compareItems**](docs/ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added)
*ItemManagementApi* | [**createItem**](docs/ItemManagementApi.md#createItem) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi)
diff --git a/java-client/api/openapi.yaml b/java-client/api/openapi.yaml
index 83430ba..0d4cccf 100644
--- a/java-client/api/openapi.yaml
+++ b/java-client/api/openapi.yaml
@@ -2680,6 +2680,7 @@ paths:
get:
deprecated: false
description: "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances"
+ operationId: getByRelease
parameters:
- description: ""
explode: false
@@ -2754,10 +2755,11 @@ paths:
tags:
- Instance Management
x-accepts: application/json
- /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int:
+ /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in:
get:
deprecated: false
description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3"
+ operationId: getByReleasesNotIn
parameters:
- description: 环境标识
explode: false
diff --git a/java-client/docs/InstanceManagementApi.md b/java-client/docs/InstanceManagementApi.md
index 4976b4a..6e2c7d7 100644
--- a/java-client/docs/InstanceManagementApi.md
+++ b/java-client/docs/InstanceManagementApi.md
@@ -4,18 +4,18 @@ All URIs are relative to *http://localhost*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
+| [**getByRelease**](InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) |
+| [**getByReleasesNotIn**](InstanceManagementApi.md#getByReleasesNotIn) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added) |
| [**getInstanceCountByNamespace**](InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) |
-| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet**](InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added) |
-| [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) |
-
-# **getInstanceCountByNamespace**
-> Integer getInstanceCountByNamespace(env, appId, clusterName, namespaceName)
+
+# **getByRelease**
+> OpenPageDTOOpenInstanceDTO getByRelease(env, releaseId, page, size)
-获取命名空间下的实例数量 (original openapi)
+根据发布版本查询实例(支持分页) (new added)
-GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
### Example
```java
@@ -40,14 +40,14 @@ public class Example {
InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient);
String env = "env_example"; // String |
- String appId = "appId_example"; // String | 应用ID
- String clusterName = "clusterName_example"; // String | 集群名称
- String namespaceName = "namespaceName_example"; // String | 命名空间名称
+ Integer releaseId = 56; // Integer |
+ Integer page = 0; // Integer |
+ Integer size = 20; // Integer |
try {
- Integer result = apiInstance.getInstanceCountByNamespace(env, appId, clusterName, namespaceName);
+ OpenPageDTOOpenInstanceDTO result = apiInstance.getByRelease(env, releaseId, page, size);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling InstanceManagementApi#getInstanceCountByNamespace");
+ System.err.println("Exception when calling InstanceManagementApi#getByRelease");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -62,13 +62,13 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **env** | **String**| | |
-| **appId** | **String**| 应用ID | |
-| **clusterName** | **String**| 集群名称 | |
-| **namespaceName** | **String**| 命名空间名称 | |
+| **releaseId** | **Integer**| | |
+| **page** | **Integer**| | |
+| **size** | **Integer**| | |
### Return type
-**Integer**
+[**OpenPageDTOOpenInstanceDTO**](OpenPageDTOOpenInstanceDTO.md)
### Authorization
@@ -82,11 +82,11 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-| **200** | 成功返回实例数量 | - |
+| **200** | | - |
-
-# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet**
-> List<OpenInstanceDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases)
+
+# **getByReleasesNotIn**
+> List<OpenInstanceDTO> getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases)
查询不在指定发布版本中的实例 (new added)
@@ -120,10 +120,10 @@ public class Example {
String namespaceName = "namespaceName_example"; // String | 命名空间名称
String excludeReleases = "excludeReleases_example"; // String | 排除的发布ID列表,用逗号分隔
try {
- List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases);
+ List result = apiInstance.getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet");
+ System.err.println("Exception when calling InstanceManagementApi#getByReleasesNotIn");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -161,13 +161,13 @@ public class Example {
|-------------|-------------|------------------|
| **200** | | - |
-
-# **openapiV1EnvsEnvReleasesReleaseIdInstancesGet**
-> OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size)
+
+# **getInstanceCountByNamespace**
+> Integer getInstanceCountByNamespace(env, appId, clusterName, namespaceName)
-根据发布版本查询实例(支持分页) (new added)
+获取命名空间下的实例数量 (original openapi)
-GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
### Example
```java
@@ -192,14 +192,14 @@ public class Example {
InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient);
String env = "env_example"; // String |
- Integer releaseId = 56; // Integer |
- Integer page = 0; // Integer |
- Integer size = 20; // Integer |
+ String appId = "appId_example"; // String | 应用ID
+ String clusterName = "clusterName_example"; // String | 集群名称
+ String namespaceName = "namespaceName_example"; // String | 命名空间名称
try {
- OpenPageDTOOpenInstanceDTO result = apiInstance.openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size);
+ Integer result = apiInstance.getInstanceCountByNamespace(env, appId, clusterName, namespaceName);
System.out.println(result);
} catch (ApiException e) {
- System.err.println("Exception when calling InstanceManagementApi#openapiV1EnvsEnvReleasesReleaseIdInstancesGet");
+ System.err.println("Exception when calling InstanceManagementApi#getInstanceCountByNamespace");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -214,13 +214,13 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **env** | **String**| | |
-| **releaseId** | **Integer**| | |
-| **page** | **Integer**| | |
-| **size** | **Integer**| | |
+| **appId** | **String**| 应用ID | |
+| **clusterName** | **String**| 集群名称 | |
+| **namespaceName** | **String**| 命名空间名称 | |
### Return type
-[**OpenPageDTOOpenInstanceDTO**](OpenPageDTOOpenInstanceDTO.md)
+**Integer**
### Authorization
@@ -234,4 +234,4 @@ public class Example {
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-| **200** | | - |
+| **200** | 成功返回实例数量 | - |
diff --git a/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java
index 1e158f7..80787b4 100644
--- a/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java
+++ b/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java
@@ -75,21 +75,21 @@ public void setCustomBaseUrl(String customBaseUrl) {
}
/**
- * Build call for getInstanceCountByNamespace
+ * Build call for getByRelease
* @param env (required)
- * @param appId 应用ID (required)
- * @param clusterName 集群名称 (required)
- * @param namespaceName 命名空间名称 (required)
+ * @param releaseId (required)
+ * @param page (required)
+ * @param size (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
| Status Code | Description | Response Headers |
- | 200 | 成功返回实例数量 | - |
+ | 200 | | - |
*/
- public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getByReleaseCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -106,11 +106,9 @@ public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, St
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances"
+ String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}/instances"
.replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString()))
- .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString()))
- .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString()))
- .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString()));
+ .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -118,6 +116,14 @@ public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, St
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
+ if (page != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
+ }
+
+ if (size != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size));
+ }
+
final String[] localVarAccepts = {
"application/json"
};
@@ -138,97 +144,97 @@ public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, St
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call getInstanceCountByNamespaceValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getByReleaseValidateBeforeCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'env' is set
if (env == null) {
- throw new ApiException("Missing the required parameter 'env' when calling getInstanceCountByNamespace(Async)");
+ throw new ApiException("Missing the required parameter 'env' when calling getByRelease(Async)");
}
- // verify the required parameter 'appId' is set
- if (appId == null) {
- throw new ApiException("Missing the required parameter 'appId' when calling getInstanceCountByNamespace(Async)");
+ // verify the required parameter 'releaseId' is set
+ if (releaseId == null) {
+ throw new ApiException("Missing the required parameter 'releaseId' when calling getByRelease(Async)");
}
- // verify the required parameter 'clusterName' is set
- if (clusterName == null) {
- throw new ApiException("Missing the required parameter 'clusterName' when calling getInstanceCountByNamespace(Async)");
+ // verify the required parameter 'page' is set
+ if (page == null) {
+ throw new ApiException("Missing the required parameter 'page' when calling getByRelease(Async)");
}
- // verify the required parameter 'namespaceName' is set
- if (namespaceName == null) {
- throw new ApiException("Missing the required parameter 'namespaceName' when calling getInstanceCountByNamespace(Async)");
+ // verify the required parameter 'size' is set
+ if (size == null) {
+ throw new ApiException("Missing the required parameter 'size' when calling getByRelease(Async)");
}
- return getInstanceCountByNamespaceCall(env, appId, clusterName, namespaceName, _callback);
+ return getByReleaseCall(env, releaseId, page, size, _callback);
}
/**
- * 获取命名空间下的实例数量 (original openapi)
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+ * 根据发布版本查询实例(支持分页) (new added)
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
* @param env (required)
- * @param appId 应用ID (required)
- * @param clusterName 集群名称 (required)
- * @param namespaceName 命名空间名称 (required)
- * @return Integer
+ * @param releaseId (required)
+ * @param page (required)
+ * @param size (required)
+ * @return OpenPageDTOOpenInstanceDTO
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
| Status Code | Description | Response Headers |
- | 200 | 成功返回实例数量 | - |
+ | 200 | | - |
*/
- public Integer getInstanceCountByNamespace(String env, String appId, String clusterName, String namespaceName) throws ApiException {
- ApiResponse localVarResp = getInstanceCountByNamespaceWithHttpInfo(env, appId, clusterName, namespaceName);
+ public OpenPageDTOOpenInstanceDTO getByRelease(String env, Integer releaseId, Integer page, Integer size) throws ApiException {
+ ApiResponse localVarResp = getByReleaseWithHttpInfo(env, releaseId, page, size);
return localVarResp.getData();
}
/**
- * 获取命名空间下的实例数量 (original openapi)
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+ * 根据发布版本查询实例(支持分页) (new added)
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
* @param env (required)
- * @param appId 应用ID (required)
- * @param clusterName 集群名称 (required)
- * @param namespaceName 命名空间名称 (required)
- * @return ApiResponse<Integer>
+ * @param releaseId (required)
+ * @param page (required)
+ * @param size (required)
+ * @return ApiResponse<OpenPageDTOOpenInstanceDTO>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
| Status Code | Description | Response Headers |
- | 200 | 成功返回实例数量 | - |
+ | 200 | | - |
*/
- public ApiResponse getInstanceCountByNamespaceWithHttpInfo(String env, String appId, String clusterName, String namespaceName) throws ApiException {
- okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ public ApiResponse getByReleaseWithHttpInfo(String env, Integer releaseId, Integer page, Integer size) throws ApiException {
+ okhttp3.Call localVarCall = getByReleaseValidateBeforeCall(env, releaseId, page, size, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * 获取命名空间下的实例数量 (original openapi) (asynchronously)
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+ * 根据发布版本查询实例(支持分页) (new added) (asynchronously)
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
* @param env (required)
- * @param appId 应用ID (required)
- * @param clusterName 集群名称 (required)
- * @param namespaceName 命名空间名称 (required)
+ * @param releaseId (required)
+ * @param page (required)
+ * @param size (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
| Status Code | Description | Response Headers |
- | 200 | 成功返回实例数量 | - |
+ | 200 | | - |
*/
- public okhttp3.Call getInstanceCountByNamespaceAsync(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getByReleaseAsync(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ okhttp3.Call localVarCall = getByReleaseValidateBeforeCall(env, releaseId, page, size, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
- * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet
+ * Build call for getByReleasesNotIn
* @param env 环境标识 (required)
* @param appId 应用ID (required)
* @param clusterName 集群名称 (required)
@@ -243,7 +249,7 @@ public okhttp3.Call getInstanceCountByNamespaceAsync(String env, String appId, S
| 200 | | - |
*/
- public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getByReleasesNotInCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -260,7 +266,7 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int"
+ String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in"
.replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString()))
.replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString()))
.replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString()))
@@ -296,28 +302,28 @@ public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamesp
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getByReleasesNotInValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'env' is set
if (env == null) {
- throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)");
+ throw new ApiException("Missing the required parameter 'env' when calling getByReleasesNotIn(Async)");
}
// verify the required parameter 'appId' is set
if (appId == null) {
- throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)");
+ throw new ApiException("Missing the required parameter 'appId' when calling getByReleasesNotIn(Async)");
}
// verify the required parameter 'clusterName' is set
if (clusterName == null) {
- throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)");
+ throw new ApiException("Missing the required parameter 'clusterName' when calling getByReleasesNotIn(Async)");
}
// verify the required parameter 'namespaceName' is set
if (namespaceName == null) {
- throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(Async)");
+ throw new ApiException("Missing the required parameter 'namespaceName' when calling getByReleasesNotIn(Async)");
}
- return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetCall(env, appId, clusterName, namespaceName, excludeReleases, _callback);
+ return getByReleasesNotInCall(env, appId, clusterName, namespaceName, excludeReleases, _callback);
}
@@ -337,8 +343,8 @@ private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNames
| 200 | | - |
*/
- public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException {
- ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetWithHttpInfo(env, appId, clusterName, namespaceName, excludeReleases);
+ public List getByReleasesNotIn(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException {
+ ApiResponse> localVarResp = getByReleasesNotInWithHttpInfo(env, appId, clusterName, namespaceName, excludeReleases);
return localVarResp.getData();
}
@@ -358,8 +364,8 @@ public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespa
| 200 | | - |
*/
- public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException {
- okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, null);
+ public ApiResponse> getByReleasesNotInWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException {
+ okhttp3.Call localVarCall = getByReleasesNotInValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
@@ -381,29 +387,29 @@ public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClust
| 200 | | - |
*/
- public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetAsync(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback> _callback) throws ApiException {
+ public okhttp3.Call getByReleasesNotInAsync(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback> _callback) throws ApiException {
- okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, _callback);
+ okhttp3.Call localVarCall = getByReleasesNotInValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
- * Build call for openapiV1EnvsEnvReleasesReleaseIdInstancesGet
+ * Build call for getInstanceCountByNamespace
* @param env (required)
- * @param releaseId (required)
- * @param page (required)
- * @param size (required)
+ * @param appId 应用ID (required)
+ * @param clusterName 集群名称 (required)
+ * @param namespaceName 命名空间名称 (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
| Status Code | Description | Response Headers |
- | 200 | | - |
+ | 200 | 成功返回实例数量 | - |
*/
- public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getInstanceCountByNamespaceCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -420,9 +426,11 @@ public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(String env
Object localVarPostBody = null;
// create path and map variables
- String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}/instances"
+ String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances"
.replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString()))
- .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString()));
+ .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString()))
+ .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString()))
+ .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -430,14 +438,6 @@ public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(String env
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
- if (page != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
- }
-
- if (size != null) {
- localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size));
- }
-
final String[] localVarAccepts = {
"application/json"
};
@@ -458,92 +458,92 @@ public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(String env
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call getInstanceCountByNamespaceValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'env' is set
if (env == null) {
- throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)");
+ throw new ApiException("Missing the required parameter 'env' when calling getInstanceCountByNamespace(Async)");
}
- // verify the required parameter 'releaseId' is set
- if (releaseId == null) {
- throw new ApiException("Missing the required parameter 'releaseId' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)");
+ // verify the required parameter 'appId' is set
+ if (appId == null) {
+ throw new ApiException("Missing the required parameter 'appId' when calling getInstanceCountByNamespace(Async)");
}
- // verify the required parameter 'page' is set
- if (page == null) {
- throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)");
+ // verify the required parameter 'clusterName' is set
+ if (clusterName == null) {
+ throw new ApiException("Missing the required parameter 'clusterName' when calling getInstanceCountByNamespace(Async)");
}
- // verify the required parameter 'size' is set
- if (size == null) {
- throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)");
+ // verify the required parameter 'namespaceName' is set
+ if (namespaceName == null) {
+ throw new ApiException("Missing the required parameter 'namespaceName' when calling getInstanceCountByNamespace(Async)");
}
- return openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(env, releaseId, page, size, _callback);
+ return getInstanceCountByNamespaceCall(env, appId, clusterName, namespaceName, _callback);
}
/**
- * 根据发布版本查询实例(支持分页) (new added)
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+ * 获取命名空间下的实例数量 (original openapi)
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
* @param env (required)
- * @param releaseId (required)
- * @param page (required)
- * @param size (required)
- * @return OpenPageDTOOpenInstanceDTO
+ * @param appId 应用ID (required)
+ * @param clusterName 集群名称 (required)
+ * @param namespaceName 命名空间名称 (required)
+ * @return Integer
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
| Status Code | Description | Response Headers |
- | 200 | | - |
+ | 200 | 成功返回实例数量 | - |
*/
- public OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet(String env, Integer releaseId, Integer page, Integer size) throws ApiException {
- ApiResponse localVarResp = openapiV1EnvsEnvReleasesReleaseIdInstancesGetWithHttpInfo(env, releaseId, page, size);
+ public Integer getInstanceCountByNamespace(String env, String appId, String clusterName, String namespaceName) throws ApiException {
+ ApiResponse localVarResp = getInstanceCountByNamespaceWithHttpInfo(env, appId, clusterName, namespaceName);
return localVarResp.getData();
}
/**
- * 根据发布版本查询实例(支持分页) (new added)
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+ * 获取命名空间下的实例数量 (original openapi)
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
* @param env (required)
- * @param releaseId (required)
- * @param page (required)
- * @param size (required)
- * @return ApiResponse<OpenPageDTOOpenInstanceDTO>
+ * @param appId 应用ID (required)
+ * @param clusterName 集群名称 (required)
+ * @param namespaceName 命名空间名称 (required)
+ * @return ApiResponse<Integer>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
| Status Code | Description | Response Headers |
- | 200 | | - |
+ | 200 | 成功返回实例数量 | - |
*/
- public ApiResponse openapiV1EnvsEnvReleasesReleaseIdInstancesGetWithHttpInfo(String env, Integer releaseId, Integer page, Integer size) throws ApiException {
- okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(env, releaseId, page, size, null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ public ApiResponse getInstanceCountByNamespaceWithHttpInfo(String env, String appId, String clusterName, String namespaceName) throws ApiException {
+ okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * 根据发布版本查询实例(支持分页) (new added) (asynchronously)
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+ * 获取命名空间下的实例数量 (original openapi) (asynchronously)
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
* @param env (required)
- * @param releaseId (required)
- * @param page (required)
- * @param size (required)
+ * @param appId 应用ID (required)
+ * @param clusterName 集群名称 (required)
+ * @param namespaceName 命名空间名称 (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
| Status Code | Description | Response Headers |
- | 200 | | - |
+ | 200 | 成功返回实例数量 | - |
*/
- public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetAsync(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call getInstanceCountByNamespaceAsync(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(env, releaseId, page, size, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ okhttp3.Call localVarCall = getInstanceCountByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
diff --git a/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java
index 70a0cc7..906a4ac 100644
--- a/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java
+++ b/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java
@@ -33,19 +33,19 @@ public class InstanceManagementApiTest {
private final InstanceManagementApi api = new InstanceManagementApi();
/**
- * 获取命名空间下的实例数量 (original openapi)
+ * 根据发布版本查询实例(支持分页) (new added)
*
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
*
* @throws ApiException if the Api call fails
*/
@Test
- public void getInstanceCountByNamespaceTest() throws ApiException {
+ public void getByReleaseTest() throws ApiException {
String env = null;
- String appId = null;
- String clusterName = null;
- String namespaceName = null;
- Integer response = api.getInstanceCountByNamespace(env, appId, clusterName, namespaceName);
+ Integer releaseId = null;
+ Integer page = null;
+ Integer size = null;
+ OpenPageDTOOpenInstanceDTO response = api.getByRelease(env, releaseId, page, size);
// TODO: test validations
}
@@ -57,30 +57,30 @@ public void getInstanceCountByNamespaceTest() throws ApiException {
* @throws ApiException if the Api call fails
*/
@Test
- public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetTest() throws ApiException {
+ public void getByReleasesNotInTest() throws ApiException {
String env = null;
String appId = null;
String clusterName = null;
String namespaceName = null;
String excludeReleases = null;
- List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases);
+ List response = api.getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases);
// TODO: test validations
}
/**
- * 根据发布版本查询实例(支持分页) (new added)
+ * 获取命名空间下的实例数量 (original openapi)
*
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
*
* @throws ApiException if the Api call fails
*/
@Test
- public void openapiV1EnvsEnvReleasesReleaseIdInstancesGetTest() throws ApiException {
+ public void getInstanceCountByNamespaceTest() throws ApiException {
String env = null;
- Integer releaseId = null;
- Integer page = null;
- Integer size = null;
- OpenPageDTOOpenInstanceDTO response = api.openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size);
+ String appId = null;
+ String clusterName = null;
+ String namespaceName = null;
+ Integer response = api.getInstanceCountByNamespace(env, appId, clusterName, namespaceName);
// TODO: test validations
}
diff --git a/python/README.md b/python/README.md
index c0452a4..f4777cd 100644
--- a/python/README.md
+++ b/python/README.md
@@ -229,9 +229,9 @@ 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)
+*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)
-*InstanceManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get**](docs/apis/tags/InstanceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added)
-*InstanceManagementApi* | [**openapi_v1_envs_env_releases_release_id_instances_get**](docs/apis/tags/InstanceManagementApi.md#openapi_v1_envs_env_releases_release_id_instances_get) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added)
*ItemManagementApi* | [**batch_update_items_by_text**](docs/apis/tags/ItemManagementApi.md#batch_update_items_by_text) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added)
*ItemManagementApi* | [**compare_items**](docs/apis/tags/ItemManagementApi.md#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added)
*ItemManagementApi* | [**create_item**](docs/apis/tags/ItemManagementApi.md#create_item) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi)
diff --git a/python/apollo_openapi/apis/path_to_api.py b/python/apollo_openapi/apis/path_to_api.py
index 1850d56..7325294 100644
--- a/python/apollo_openapi/apis/path_to_api.py
+++ b/python/apollo_openapi/apis/path_to_api.py
@@ -31,7 +31,7 @@
from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive
from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances
from apollo_openapi.apis.paths.openapi_v1_envs_env_releases_release_id_instances import OpenapiV1EnvsEnvReleasesReleaseIdInstances
-from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt
+from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_in import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIn
from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces import OpenapiV1AppsAppIdAppnamespaces
from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces
from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName
@@ -81,7 +81,7 @@
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances,
PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES: OpenapiV1EnvsEnvReleasesReleaseIdInstances,
- PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_INT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt,
+ PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIn,
PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName,
@@ -132,7 +132,7 @@
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances,
PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES: OpenapiV1EnvsEnvReleasesReleaseIdInstances,
- PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_INT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt,
+ PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIn,
PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces,
PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName,
diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py
deleted file mode 100644
index 74a45f7..0000000
--- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.get import ApiForget
-
-
-class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt(
- ApiForget,
-):
- pass
diff --git a/python/apollo_openapi/apis/tags/instance_management_api.py b/python/apollo_openapi/apis/tags/instance_management_api.py
index c381c87..30cf505 100644
--- a/python/apollo_openapi/apis/tags/instance_management_api.py
+++ b/python/apollo_openapi/apis/tags/instance_management_api.py
@@ -9,15 +9,15 @@
Generated by: https://openapi-generator.tech
"""
+from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_instances.get import GetByRelease
+from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_in.get import GetByReleasesNotIn
from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.get import GetInstanceCountByNamespace
-from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int.get import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet
-from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_instances.get import OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet
class InstanceManagementApi(
+ GetByRelease,
+ GetByReleasesNotIn,
GetInstanceCountByNamespace,
- OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet,
- OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet,
):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
diff --git a/python/apollo_openapi/paths/__init__.py b/python/apollo_openapi/paths/__init__.py
index 57366be..e441c48 100644
--- a/python/apollo_openapi/paths/__init__.py
+++ b/python/apollo_openapi/paths/__init__.py
@@ -36,7 +36,7 @@ class PathValues(str, enum.Enum):
OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active"
OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances"
OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES = "/openapi/v1/envs/{env}/releases/{releaseId}/instances"
- OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_INT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int"
+ OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in"
OPENAPI_V1_APPS_APP_ID_APPNAMESPACES = "/openapi/v1/apps/{appId}/appnamespaces"
OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces"
OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}"
diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py
deleted file mode 100644
index d2052f6..0000000
--- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# 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_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int import Api
-
-from apollo_openapi.paths import PathValues
-
-path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_INT
diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py
deleted file mode 100644
index 7c93e90..0000000
--- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.py
+++ /dev/null
@@ -1,401 +0,0 @@
-# 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 apollo_openapi.model.open_instance_dto import OpenInstanceDTO
-
-from . import path
-
-# Query params
-ExcludeReleasesSchema = schemas.StrSchema
-RequestRequiredQueryParams = typing_extensions.TypedDict(
- 'RequestRequiredQueryParams',
- {
- }
-)
-RequestOptionalQueryParams = typing_extensions.TypedDict(
- 'RequestOptionalQueryParams',
- {
- 'excludeReleases': typing.Union[ExcludeReleasesSchema, str, ],
- },
- total=False
-)
-
-
-class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams):
- pass
-
-
-request_query_exclude_releases = api_client.QueryParameter(
- name="excludeReleases",
- style=api_client.ParameterStyle.FORM,
- schema=ExcludeReleasesSchema,
- explode=True,
-)
-# Path params
-EnvSchema = schemas.StrSchema
-AppIdSchema = schemas.StrSchema
-ClusterNameSchema = schemas.StrSchema
-NamespaceNameSchema = schemas.StrSchema
-RequestRequiredPathParams = typing_extensions.TypedDict(
- 'RequestRequiredPathParams',
- {
- 'env': typing.Union[EnvSchema, str, ],
- 'appId': typing.Union[AppIdSchema, str, ],
- 'clusterName': typing.Union[ClusterNameSchema, str, ],
- 'namespaceName': typing.Union[NamespaceNameSchema, str, ],
- }
-)
-RequestOptionalPathParams = typing_extensions.TypedDict(
- 'RequestOptionalPathParams',
- {
- },
- total=False
-)
-
-
-class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
- pass
-
-
-request_path_env = api_client.PathParameter(
- name="env",
- style=api_client.ParameterStyle.SIMPLE,
- schema=EnvSchema,
- required=True,
-)
-request_path_app_id = api_client.PathParameter(
- name="appId",
- style=api_client.ParameterStyle.SIMPLE,
- schema=AppIdSchema,
- required=True,
-)
-request_path_cluster_name = api_client.PathParameter(
- name="clusterName",
- style=api_client.ParameterStyle.SIMPLE,
- schema=ClusterNameSchema,
- required=True,
-)
-request_path_namespace_name = api_client.PathParameter(
- name="namespaceName",
- style=api_client.ParameterStyle.SIMPLE,
- schema=NamespaceNameSchema,
- required=True,
-)
-_auth = [
- 'ApiKeyAuth',
-]
-
-
-class SchemaFor200ResponseBodyApplicationJson(
- schemas.ListSchema
-):
-
-
- class MetaOapg:
-
- @staticmethod
- def items() -> typing.Type['OpenInstanceDTO']:
- return OpenInstanceDTO
-
- def __new__(
- cls,
- _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']],
- _configuration: typing.Optional[schemas.Configuration] = None,
- ) -> 'SchemaFor200ResponseBodyApplicationJson':
- return super().__new__(
- cls,
- _arg,
- _configuration=_configuration,
- )
-
- def __getitem__(self, i: int) -> 'OpenInstanceDTO':
- 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 _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- self,
- skip_deserialization: typing_extensions.Literal[True],
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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,
- ):
- """
- 查询不在指定发布版本中的实例 (new added)
- :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
- """
- self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params)
- self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params)
- used_path = path.value
-
- _path_params = {}
- for parameter in (
- request_path_env,
- request_path_app_id,
- request_path_cluster_name,
- request_path_namespace_name,
- ):
- parameter_data = path_params.get(parameter.name, schemas.unset)
- if parameter_data is schemas.unset:
- continue
- serialized_data = parameter.serialize(parameter_data)
- _path_params.update(serialized_data)
-
- for k, v in _path_params.items():
- used_path = used_path.replace('{%s}' % k, v)
-
- prefix_separator_iterator = None
- for parameter in (
- request_query_exclude_releases,
- ):
- parameter_data = query_params.get(parameter.name, schemas.unset)
- if parameter_data is schemas.unset:
- continue
- if prefix_separator_iterator is None:
- prefix_separator_iterator = parameter.get_prefix_separator_iterator()
- serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator)
- for serialized_value in serialized_data.values():
- used_path += serialized_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 OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(BaseApi):
- # this class is used by api classes that refer to endpoints with operationId fn names
-
- @typing.overload
- def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
- self,
- skip_deserialization: typing_extensions.Literal[True],
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- query_params=query_params,
- path_params=path_params,
- 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,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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],
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- query_params=query_params,
- path_params=path_params,
- 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_namespaces_namespace_name_instances_not_int/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi
deleted file mode 100644
index cc2a38c..0000000
--- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/get.pyi
+++ /dev/null
@@ -1,393 +0,0 @@
-# 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 apollo_openapi.model.open_instance_dto import OpenInstanceDTO
-
-# Query params
-ExcludeReleasesSchema = schemas.StrSchema
-RequestRequiredQueryParams = typing_extensions.TypedDict(
- 'RequestRequiredQueryParams',
- {
- }
-)
-RequestOptionalQueryParams = typing_extensions.TypedDict(
- 'RequestOptionalQueryParams',
- {
- 'excludeReleases': typing.Union[ExcludeReleasesSchema, str, ],
- },
- total=False
-)
-
-
-class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams):
- pass
-
-
-request_query_exclude_releases = api_client.QueryParameter(
- name="excludeReleases",
- style=api_client.ParameterStyle.FORM,
- schema=ExcludeReleasesSchema,
- explode=True,
-)
-# Path params
-EnvSchema = schemas.StrSchema
-AppIdSchema = schemas.StrSchema
-ClusterNameSchema = schemas.StrSchema
-NamespaceNameSchema = schemas.StrSchema
-RequestRequiredPathParams = typing_extensions.TypedDict(
- 'RequestRequiredPathParams',
- {
- 'env': typing.Union[EnvSchema, str, ],
- 'appId': typing.Union[AppIdSchema, str, ],
- 'clusterName': typing.Union[ClusterNameSchema, str, ],
- 'namespaceName': typing.Union[NamespaceNameSchema, str, ],
- }
-)
-RequestOptionalPathParams = typing_extensions.TypedDict(
- 'RequestOptionalPathParams',
- {
- },
- total=False
-)
-
-
-class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams):
- pass
-
-
-request_path_env = api_client.PathParameter(
- name="env",
- style=api_client.ParameterStyle.SIMPLE,
- schema=EnvSchema,
- required=True,
-)
-request_path_app_id = api_client.PathParameter(
- name="appId",
- style=api_client.ParameterStyle.SIMPLE,
- schema=AppIdSchema,
- required=True,
-)
-request_path_cluster_name = api_client.PathParameter(
- name="clusterName",
- style=api_client.ParameterStyle.SIMPLE,
- schema=ClusterNameSchema,
- required=True,
-)
-request_path_namespace_name = api_client.PathParameter(
- name="namespaceName",
- style=api_client.ParameterStyle.SIMPLE,
- schema=NamespaceNameSchema,
- required=True,
-)
-
-
-class SchemaFor200ResponseBodyApplicationJson(
- schemas.ListSchema
-):
-
-
- class MetaOapg:
-
- @staticmethod
- def items() -> typing.Type['OpenInstanceDTO']:
- return OpenInstanceDTO
-
- def __new__(
- cls,
- _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']],
- _configuration: typing.Optional[schemas.Configuration] = None,
- ) -> 'SchemaFor200ResponseBodyApplicationJson':
- return super().__new__(
- cls,
- _arg,
- _configuration=_configuration,
- )
-
- def __getitem__(self, i: int) -> 'OpenInstanceDTO':
- 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 _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- self,
- skip_deserialization: typing_extensions.Literal[True],
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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,
- ):
- """
- 查询不在指定发布版本中的实例 (new added)
- :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
- """
- self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params)
- self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params)
- used_path = path.value
-
- _path_params = {}
- for parameter in (
- request_path_env,
- request_path_app_id,
- request_path_cluster_name,
- request_path_namespace_name,
- ):
- parameter_data = path_params.get(parameter.name, schemas.unset)
- if parameter_data is schemas.unset:
- continue
- serialized_data = parameter.serialize(parameter_data)
- _path_params.update(serialized_data)
-
- for k, v in _path_params.items():
- used_path = used_path.replace('{%s}' % k, v)
-
- prefix_separator_iterator = None
- for parameter in (
- request_query_exclude_releases,
- ):
- parameter_data = query_params.get(parameter.name, schemas.unset)
- if parameter_data is schemas.unset:
- continue
- if prefix_separator_iterator is None:
- prefix_separator_iterator = parameter.get_prefix_separator_iterator()
- serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator)
- for serialized_value in serialized_data.values():
- used_path += serialized_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 OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(BaseApi):
- # this class is used by api classes that refer to endpoints with operationId fn names
-
- @typing.overload
- def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
- self,
- skip_deserialization: typing_extensions.Literal[True],
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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 openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
- self,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- query_params=query_params,
- path_params=path_params,
- 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,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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],
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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,
- query_params: RequestQueryParams = frozendict.frozendict(),
- path_params: RequestPathParams = frozendict.frozendict(),
- 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._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get_oapg(
- query_params=query_params,
- path_params=path_params,
- 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_releases_release_id_instances/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py
index 8d56305..421e98c 100644
--- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py
+++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py
@@ -131,7 +131,7 @@ class ApiResponseFor200(api_client.ApiResponse):
class BaseApi(api_client.Api):
@typing.overload
- def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ def _get_by_release_oapg(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -144,7 +144,7 @@ def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
]: ...
@typing.overload
- def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ def _get_by_release_oapg(
self,
skip_deserialization: typing_extensions.Literal[True],
query_params: RequestQueryParams = frozendict.frozendict(),
@@ -155,7 +155,7 @@ def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
) -> api_client.ApiResponseWithoutDeserialization: ...
@typing.overload
- def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ def _get_by_release_oapg(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -168,7 +168,7 @@ def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
api_client.ApiResponseWithoutDeserialization,
]: ...
- def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ def _get_by_release_oapg(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -249,11 +249,11 @@ class instances
return api_response
-class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi):
+class GetByRelease(BaseApi):
# this class is used by api classes that refer to endpoints with operationId fn names
@typing.overload
- def openapi_v1_envs_env_releases_release_id_instances_get(
+ def get_by_release(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -266,7 +266,7 @@ def openapi_v1_envs_env_releases_release_id_instances_get(
]: ...
@typing.overload
- def openapi_v1_envs_env_releases_release_id_instances_get(
+ def get_by_release(
self,
skip_deserialization: typing_extensions.Literal[True],
query_params: RequestQueryParams = frozendict.frozendict(),
@@ -277,7 +277,7 @@ def openapi_v1_envs_env_releases_release_id_instances_get(
) -> api_client.ApiResponseWithoutDeserialization: ...
@typing.overload
- def openapi_v1_envs_env_releases_release_id_instances_get(
+ def get_by_release(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -290,7 +290,7 @@ def openapi_v1_envs_env_releases_release_id_instances_get(
api_client.ApiResponseWithoutDeserialization,
]: ...
- def openapi_v1_envs_env_releases_release_id_instances_get(
+ def get_by_release(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -299,7 +299,7 @@ def openapi_v1_envs_env_releases_release_id_instances_get(
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
skip_deserialization: bool = False,
):
- return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ return self._get_by_release_oapg(
query_params=query_params,
path_params=path_params,
accept_content_types=accept_content_types,
@@ -359,7 +359,7 @@ def get(
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
skip_deserialization: bool = False,
):
- return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ return self._get_by_release_oapg(
query_params=query_params,
path_params=path_params,
accept_content_types=accept_content_types,
diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi
index 350b2f7..692c88d 100644
--- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi
+++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi
@@ -123,7 +123,7 @@ _all_accept_content_types = (
class BaseApi(api_client.Api):
@typing.overload
- def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ def _get_by_release_oapg(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -136,7 +136,7 @@ class BaseApi(api_client.Api):
]: ...
@typing.overload
- def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ def _get_by_release_oapg(
self,
skip_deserialization: typing_extensions.Literal[True],
query_params: RequestQueryParams = frozendict.frozendict(),
@@ -147,7 +147,7 @@ class BaseApi(api_client.Api):
) -> api_client.ApiResponseWithoutDeserialization: ...
@typing.overload
- def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ def _get_by_release_oapg(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -160,7 +160,7 @@ class BaseApi(api_client.Api):
api_client.ApiResponseWithoutDeserialization,
]: ...
- def _openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ def _get_by_release_oapg(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -241,11 +241,11 @@ class BaseApi(api_client.Api):
return api_response
-class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi):
+class GetByRelease(BaseApi):
# this class is used by api classes that refer to endpoints with operationId fn names
@typing.overload
- def openapi_v1_envs_env_releases_release_id_instances_get(
+ def get_by_release(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -258,7 +258,7 @@ class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi):
]: ...
@typing.overload
- def openapi_v1_envs_env_releases_release_id_instances_get(
+ def get_by_release(
self,
skip_deserialization: typing_extensions.Literal[True],
query_params: RequestQueryParams = frozendict.frozendict(),
@@ -269,7 +269,7 @@ class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi):
) -> api_client.ApiResponseWithoutDeserialization: ...
@typing.overload
- def openapi_v1_envs_env_releases_release_id_instances_get(
+ def get_by_release(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -282,7 +282,7 @@ class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi):
api_client.ApiResponseWithoutDeserialization,
]: ...
- def openapi_v1_envs_env_releases_release_id_instances_get(
+ def get_by_release(
self,
query_params: RequestQueryParams = frozendict.frozendict(),
path_params: RequestPathParams = frozendict.frozendict(),
@@ -291,7 +291,7 @@ class OpenapiV1EnvsEnvReleasesReleaseIdInstancesGet(BaseApi):
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
skip_deserialization: bool = False,
):
- return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ return self._get_by_release_oapg(
query_params=query_params,
path_params=path_params,
accept_content_types=accept_content_types,
@@ -351,7 +351,7 @@ class ApiForget(BaseApi):
timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
skip_deserialization: bool = False,
):
- return self._openapi_v1_envs_env_releases_release_id_instances_get_oapg(
+ return self._get_by_release_oapg(
query_params=query_params,
path_params=path_params,
accept_content_types=accept_content_types,
diff --git a/python/docs/apis/tags/InstanceManagementApi.md b/python/docs/apis/tags/InstanceManagementApi.md
index 797c1f7..02cc397 100644
--- a/python/docs/apis/tags/InstanceManagementApi.md
+++ b/python/docs/apis/tags/InstanceManagementApi.md
@@ -5,17 +5,17 @@ All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
+[**get_by_release**](#get_by_release) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added)
+[**get_by_releases_not_in**](#get_by_releases_not_in) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added)
[**get_instance_count_by_namespace**](#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi)
-[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get**](#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int | 查询不在指定发布版本中的实例 (new added)
-[**openapi_v1_envs_env_releases_release_id_instances_get**](#openapi_v1_envs_env_releases_release_id_instances_get) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added)
-# **get_instance_count_by_namespace**
-
-> int get_instance_count_by_namespace(envapp_idcluster_namenamespace_name)
+# **get_by_release**
+
+> OpenPageDTOOpenInstanceDTO get_by_release(envrelease_idpagesize)
-获取命名空间下的实例数量 (original openapi)
+根据发布版本查询实例(支持分页) (new added)
-GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
### Example
@@ -23,6 +23,7 @@ GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{names
```python
import apollo_openapi
from apollo_openapi.apis.tags import instance_management_api
+from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO
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.
@@ -48,75 +49,86 @@ with apollo_openapi.ApiClient(configuration) as api_client:
# example passing only required values which don't have defaults set
path_params = {
'env': "env_example",
- 'appId': "appId_example",
- 'clusterName': "clusterName_example",
- 'namespaceName': "namespaceName_example",
+ 'releaseId': 1,
+ }
+ query_params = {
+ 'page': 0,
+ 'size': 20,
}
try:
- # 获取命名空间下的实例数量 (original openapi)
- api_response = api_instance.get_instance_count_by_namespace(
+ # 根据发布版本查询实例(支持分页) (new added)
+ api_response = api_instance.get_by_release(
path_params=path_params,
+ query_params=query_params,
)
pprint(api_response)
except apollo_openapi.ApiException as e:
- print("Exception when calling InstanceManagementApi->get_instance_count_by_namespace: %s\n" % e)
+ print("Exception when calling InstanceManagementApi->get_by_release: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+query_params | RequestQueryParams | |
path_params | RequestPathParams | |
accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client
stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
-### path_params
-#### RequestPathParams
+### query_params
+#### RequestQueryParams
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-env | EnvSchema | |
-appId | AppIdSchema | |
-clusterName | ClusterNameSchema | |
-namespaceName | NamespaceNameSchema | |
+page | PageSchema | |
+size | SizeSchema | |
-# EnvSchema
+
+# PageSchema
## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
-str, | str, | |
+decimal.Decimal, int, | decimal.Decimal, | |
-# AppIdSchema
+# SizeSchema
## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
-str, | str, | |
+decimal.Decimal, int, | decimal.Decimal, | |
-# ClusterNameSchema
+### path_params
+#### RequestPathParams
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+env | EnvSchema | |
+releaseId | ReleaseIdSchema | |
+
+# EnvSchema
## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
str, | str, | |
-# NamespaceNameSchema
+# ReleaseIdSchema
## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
-str, | str, | |
+decimal.Decimal, int, | decimal.Decimal, | |
### Return Types, Responses
Code | Class | Description
------------- | ------------- | -------------
n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
-200 | [ApiResponseFor200](#get_instance_count_by_namespace.ApiResponseFor200) | 成功返回实例数量
+200 | [ApiResponseFor200](#get_by_release.ApiResponseFor200) |
-#### get_instance_count_by_namespace.ApiResponseFor200
+#### get_by_release.ApiResponseFor200
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
response | urllib3.HTTPResponse | Raw response |
@@ -124,11 +136,10 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
headers | Unset | headers were not defined |
# SchemaFor200ResponseBodyApplicationJson
+Type | Description | Notes
+------------- | ------------- | -------------
+[**OpenPageDTOOpenInstanceDTO**](../../models/OpenPageDTOOpenInstanceDTO.md) | |
-## Model Type Info
-Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | -------------
-decimal.Decimal, int, | decimal.Decimal, | |
### Authorization
@@ -136,9 +147,9 @@ decimal.Decimal, int, | decimal.Decimal, | |
[[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)
-# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get**
-
-> [OpenInstanceDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(envapp_idcluster_namenamespace_name)
+# **get_by_releases_not_in**
+
+> [OpenInstanceDTO] get_by_releases_not_in(envapp_idcluster_namenamespace_name)
查询不在指定发布版本中的实例 (new added)
@@ -184,13 +195,13 @@ with apollo_openapi.ApiClient(configuration) as api_client:
}
try:
# 查询不在指定发布版本中的实例 (new added)
- api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
+ api_response = api_instance.get_by_releases_not_in(
path_params=path_params,
query_params=query_params,
)
pprint(api_response)
except apollo_openapi.ApiException as e:
- print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get: %s\n" % e)
+ print("Exception when calling InstanceManagementApi->get_by_releases_not_in: %s\n" % e)
# example passing only optional values
path_params = {
@@ -204,13 +215,13 @@ with apollo_openapi.ApiClient(configuration) as api_client:
}
try:
# 查询不在指定发布版本中的实例 (new added)
- api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get(
+ api_response = api_instance.get_by_releases_not_in(
path_params=path_params,
query_params=query_params,
)
pprint(api_response)
except apollo_openapi.ApiException as e:
- print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get: %s\n" % e)
+ print("Exception when calling InstanceManagementApi->get_by_releases_not_in: %s\n" % e)
```
### Parameters
@@ -281,9 +292,9 @@ str, | str, | |
Code | Class | Description
------------- | ------------- | -------------
n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
-200 | [ApiResponseFor200](#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get.ApiResponseFor200) |
+200 | [ApiResponseFor200](#get_by_releases_not_in.ApiResponseFor200) |
-#### openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int_get.ApiResponseFor200
+#### get_by_releases_not_in.ApiResponseFor200
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
response | urllib3.HTTPResponse | Raw response |
@@ -308,13 +319,13 @@ Class Name | Input Type | Accessed Type | Description | Notes
[[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)
-# **openapi_v1_envs_env_releases_release_id_instances_get**
-
-> OpenPageDTOOpenInstanceDTO openapi_v1_envs_env_releases_release_id_instances_get(envrelease_idpagesize)
+# **get_instance_count_by_namespace**
+
+> int get_instance_count_by_namespace(envapp_idcluster_namenamespace_name)
-根据发布版本查询实例(支持分页) (new added)
+获取命名空间下的实例数量 (original openapi)
-GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
### Example
@@ -322,7 +333,6 @@ GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
```python
import apollo_openapi
from apollo_openapi.apis.tags import instance_management_api
-from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO
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.
@@ -348,86 +358,75 @@ with apollo_openapi.ApiClient(configuration) as api_client:
# example passing only required values which don't have defaults set
path_params = {
'env': "env_example",
- 'releaseId': 1,
- }
- query_params = {
- 'page': 0,
- 'size': 20,
+ 'appId': "appId_example",
+ 'clusterName': "clusterName_example",
+ 'namespaceName': "namespaceName_example",
}
try:
- # 根据发布版本查询实例(支持分页) (new added)
- api_response = api_instance.openapi_v1_envs_env_releases_release_id_instances_get(
+ # 获取命名空间下的实例数量 (original openapi)
+ api_response = api_instance.get_instance_count_by_namespace(
path_params=path_params,
- query_params=query_params,
)
pprint(api_response)
except apollo_openapi.ApiException as e:
- print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_releases_release_id_instances_get: %s\n" % e)
+ print("Exception when calling InstanceManagementApi->get_instance_count_by_namespace: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-query_params | RequestQueryParams | |
path_params | RequestPathParams | |
accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client
stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
-### query_params
-#### RequestQueryParams
+### path_params
+#### RequestPathParams
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-page | PageSchema | |
-size | SizeSchema | |
-
+env | EnvSchema | |
+appId | AppIdSchema | |
+clusterName | ClusterNameSchema | |
+namespaceName | NamespaceNameSchema | |
-# PageSchema
+# EnvSchema
## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
-decimal.Decimal, int, | decimal.Decimal, | |
+str, | str, | |
-# SizeSchema
+# AppIdSchema
## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
-decimal.Decimal, int, | decimal.Decimal, | |
-
-### path_params
-#### RequestPathParams
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
-env | EnvSchema | |
-releaseId | ReleaseIdSchema | |
+str, | str, | |
-# EnvSchema
+# ClusterNameSchema
## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
str, | str, | |
-# ReleaseIdSchema
+# NamespaceNameSchema
## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
-decimal.Decimal, int, | decimal.Decimal, | |
+str, | str, | |
### Return Types, Responses
Code | Class | Description
------------- | ------------- | -------------
n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
-200 | [ApiResponseFor200](#openapi_v1_envs_env_releases_release_id_instances_get.ApiResponseFor200) |
+200 | [ApiResponseFor200](#get_instance_count_by_namespace.ApiResponseFor200) | 成功返回实例数量
-#### openapi_v1_envs_env_releases_release_id_instances_get.ApiResponseFor200
+#### get_instance_count_by_namespace.ApiResponseFor200
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
response | urllib3.HTTPResponse | Raw response |
@@ -435,10 +434,11 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | |
headers | Unset | headers were not defined |
# SchemaFor200ResponseBodyApplicationJson
-Type | Description | Notes
-------------- | ------------- | -------------
-[**OpenPageDTOOpenInstanceDTO**](../../models/OpenPageDTOOpenInstanceDTO.md) | |
+## Model Type Info
+Input Type | Accessed Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+decimal.Decimal, int, | decimal.Decimal, | |
### Authorization
diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py
deleted file mode 100644
index 8b13789..0000000
--- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py
deleted file mode 100644
index c1b1900..0000000
--- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int/test_get.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_int import get # noqa: E501
-from apollo_openapi import configuration, schemas, api_client
-
-from .. import ApiTestMixin
-
-
-class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt(ApiTestMixin, unittest.TestCase):
- """
- OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInt unit test stubs
- 查询不在指定发布版本中的实例 (new added) # 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/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java
index 08ec977..d44577c 100644
--- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java
+++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java
@@ -39,23 +39,23 @@ default InstanceManagementApiDelegate getDelegate() {
}
/**
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi)
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added)
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
*
* @param env (required)
- * @param appId 应用ID (required)
- * @param clusterName 集群名称 (required)
- * @param namespaceName 命名空间名称 (required)
- * @return 成功返回实例数量 (status code 200)
+ * @param releaseId (required)
+ * @param page (required)
+ * @param size (required)
+ * @return (status code 200)
*/
@Operation(
- operationId = "getInstanceCountByNamespace",
- summary = "获取命名空间下的实例数量 (original openapi)",
- description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances",
+ operationId = "getByRelease",
+ summary = "根据发布版本查询实例(支持分页) (new added)",
+ description = "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances",
tags = { "Instance Management" },
responses = {
- @ApiResponse(responseCode = "200", description = "成功返回实例数量", content = {
- @Content(mediaType = "application/json", schema = @Schema(implementation = Integer.class))
+ @ApiResponse(responseCode = "200", description = "", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPageDTOOpenInstanceDTO.class))
})
},
security = {
@@ -64,21 +64,21 @@ default InstanceManagementApiDelegate getDelegate() {
)
@RequestMapping(
method = RequestMethod.GET,
- value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances",
+ value = "/openapi/v1/envs/{env}/releases/{releaseId}/instances",
produces = { "application/json" }
)
- default ResponseEntity getInstanceCountByNamespace(
+ default ResponseEntity getByRelease(
@Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env,
- @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId,
- @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName,
- @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName
+ @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId,
+ @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page,
+ @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size
) {
- return getDelegate().getInstanceCountByNamespace(env, appId, clusterName, namespaceName);
+ return getDelegate().getByRelease(env, releaseId, page, size);
}
/**
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int : 查询不在指定发布版本中的实例 (new added)
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in : 查询不在指定发布版本中的实例 (new added)
* GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3
*
* @param env 环境标识 (required)
@@ -89,7 +89,7 @@ default ResponseEntity getInstanceCountByNamespace(
* @return (status code 200)
*/
@Operation(
- operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet",
+ operationId = "getByReleasesNotIn",
summary = "查询不在指定发布版本中的实例 (new added)",
description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3",
tags = { "Instance Management" },
@@ -104,38 +104,38 @@ default ResponseEntity getInstanceCountByNamespace(
)
@RequestMapping(
method = RequestMethod.GET,
- value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int",
+ value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in",
produces = { "application/json" }
)
- default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(
+ default ResponseEntity> getByReleasesNotIn(
@Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env,
@Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId,
@Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName,
@Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName,
@Parameter(name = "excludeReleases", description = "排除的发布ID列表,用逗号分隔", in = ParameterIn.QUERY) @Valid @RequestParam(value = "excludeReleases", required = false) String excludeReleases
) {
- return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(env, appId, clusterName, namespaceName, excludeReleases);
+ return getDelegate().getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases);
}
/**
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added)
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi)
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
*
* @param env (required)
- * @param releaseId (required)
- * @param page (required)
- * @param size (required)
- * @return (status code 200)
+ * @param appId 应用ID (required)
+ * @param clusterName 集群名称 (required)
+ * @param namespaceName 命名空间名称 (required)
+ * @return 成功返回实例数量 (status code 200)
*/
@Operation(
- operationId = "openapiV1EnvsEnvReleasesReleaseIdInstancesGet",
- summary = "根据发布版本查询实例(支持分页) (new added)",
- description = "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances",
+ operationId = "getInstanceCountByNamespace",
+ summary = "获取命名空间下的实例数量 (original openapi)",
+ description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances",
tags = { "Instance Management" },
responses = {
- @ApiResponse(responseCode = "200", description = "", content = {
- @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPageDTOOpenInstanceDTO.class))
+ @ApiResponse(responseCode = "200", description = "成功返回实例数量", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Integer.class))
})
},
security = {
@@ -144,16 +144,16 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC
)
@RequestMapping(
method = RequestMethod.GET,
- value = "/openapi/v1/envs/{env}/releases/{releaseId}/instances",
+ value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances",
produces = { "application/json" }
)
- default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdInstancesGet(
+ default ResponseEntity getInstanceCountByNamespace(
@Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env,
- @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId,
- @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page,
- @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size
+ @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId,
+ @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName,
+ @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName
) {
- return getDelegate().openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size);
+ return getDelegate().getInstanceCountByNamespace(env, appId, clusterName, namespaceName);
}
}
diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java
index 160caba..ebb3ca9 100644
--- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java
+++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java
@@ -25,26 +25,35 @@ default Optional getRequest() {
}
/**
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi)
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added)
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
*
* @param env (required)
- * @param appId 应用ID (required)
- * @param clusterName 集群名称 (required)
- * @param namespaceName 命名空间名称 (required)
- * @return 成功返回实例数量 (status code 200)
- * @see InstanceManagementApi#getInstanceCountByNamespace
+ * @param releaseId (required)
+ * @param page (required)
+ * @param size (required)
+ * @return (status code 200)
+ * @see InstanceManagementApi#getByRelease
*/
- default ResponseEntity getInstanceCountByNamespace(String env,
- String appId,
- String clusterName,
- String namespaceName) {
+ default ResponseEntity getByRelease(String env,
+ Integer releaseId,
+ Integer page,
+ Integer size) {
+ getRequest().ifPresent(request -> {
+ for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
+ if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
+ String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ] }";
+ ApiUtil.setExampleResponse(request, "application/json", exampleString);
+ break;
+ }
+ }
+ });
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
/**
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int : 查询不在指定发布版本中的实例 (new added)
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in : 查询不在指定发布版本中的实例 (new added)
* GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3
*
* @param env 环境标识 (required)
@@ -53,9 +62,9 @@ default ResponseEntity getInstanceCountByNamespace(String env,
* @param namespaceName 命名空间名称 (required)
* @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional)
* @return (status code 200)
- * @see InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet
+ * @see InstanceManagementApi#getByReleasesNotIn
*/
- default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(String env,
+ default ResponseEntity> getByReleasesNotIn(String env,
String appId,
String clusterName,
String namespaceName,
@@ -74,29 +83,20 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC
}
/**
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added)
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 (original openapi)
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
*
* @param env (required)
- * @param releaseId (required)
- * @param page (required)
- * @param size (required)
- * @return (status code 200)
- * @see InstanceManagementApi#openapiV1EnvsEnvReleasesReleaseIdInstancesGet
+ * @param appId 应用ID (required)
+ * @param clusterName 集群名称 (required)
+ * @param namespaceName 命名空间名称 (required)
+ * @return 成功返回实例数量 (status code 200)
+ * @see InstanceManagementApi#getInstanceCountByNamespace
*/
- default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdInstancesGet(String env,
- Integer releaseId,
- Integer page,
- Integer size) {
- getRequest().ifPresent(request -> {
- for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
- if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
- String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ] }";
- ApiUtil.setExampleResponse(request, "application/json", exampleString);
- break;
- }
- }
- });
+ default ResponseEntity getInstanceCountByNamespace(String env,
+ String appId,
+ String clusterName,
+ String namespaceName) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
diff --git a/spring-boot2/src/main/resources/openapi.yaml b/spring-boot2/src/main/resources/openapi.yaml
index 3dd6d6b..8e043b9 100644
--- a/spring-boot2/src/main/resources/openapi.yaml
+++ b/spring-boot2/src/main/resources/openapi.yaml
@@ -2756,6 +2756,7 @@ paths:
get:
deprecated: false
description: "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances"
+ operationId: getByRelease
parameters:
- description: ""
explode: false
@@ -2832,10 +2833,11 @@ paths:
x-accepts: application/json
x-tags:
- tag: Instance Management
- /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int:
+ /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in:
get:
deprecated: false
description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3"
+ operationId: getByReleasesNotIn
parameters:
- description: 环境标识
explode: false
diff --git a/typescript/src/apis/InstanceManagementApi.ts b/typescript/src/apis/InstanceManagementApi.ts
index d87a8cf..954050a 100644
--- a/typescript/src/apis/InstanceManagementApi.ts
+++ b/typescript/src/apis/InstanceManagementApi.ts
@@ -25,14 +25,14 @@ import {
OpenPageDTOOpenInstanceDTOToJSON,
} from '../models';
-export interface GetInstanceCountByNamespaceRequest {
+export interface GetByReleaseRequest {
env: string;
- appId: string;
- clusterName: string;
- namespaceName: string;
+ releaseId: number;
+ page: number;
+ size: number;
}
-export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRequest {
+export interface GetByReleasesNotInRequest {
env: string;
appId: string;
clusterName: string;
@@ -40,11 +40,11 @@ export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespace
excludeReleases?: string;
}
-export interface OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest {
+export interface GetInstanceCountByNamespaceRequest {
env: string;
- releaseId: number;
- page: number;
- size: number;
+ appId: string;
+ clusterName: string;
+ namespaceName: string;
}
/**
@@ -53,28 +53,36 @@ export interface OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest {
export class InstanceManagementApi extends runtime.BaseAPI {
/**
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
- * 获取命名空间下的实例数量 (original openapi)
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+ * 根据发布版本查询实例(支持分页) (new added)
*/
- async getInstanceCountByNamespaceRaw(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ async getByReleaseRaw(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.env === null || requestParameters.env === undefined) {
- throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getInstanceCountByNamespace.');
+ throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getByRelease.');
}
- if (requestParameters.appId === null || requestParameters.appId === undefined) {
- throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getInstanceCountByNamespace.');
+ if (requestParameters.releaseId === null || requestParameters.releaseId === undefined) {
+ throw new runtime.RequiredError('releaseId','Required parameter requestParameters.releaseId was null or undefined when calling getByRelease.');
}
- if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) {
- throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getInstanceCountByNamespace.');
+ if (requestParameters.page === null || requestParameters.page === undefined) {
+ throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getByRelease.');
}
- if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) {
- throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getInstanceCountByNamespace.');
+ if (requestParameters.size === null || requestParameters.size === undefined) {
+ throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getByRelease.');
}
const queryParameters: any = {};
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.size !== undefined) {
+ queryParameters['size'] = requestParameters.size;
+ }
+
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
@@ -82,25 +90,21 @@ export class InstanceManagementApi extends runtime.BaseAPI {
}
const response = await this.request({
- path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))),
+ path: `/openapi/v1/envs/{env}/releases/{releaseId}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters.releaseId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
- if (this.isJsonMime(response.headers.get('content-type'))) {
- return new runtime.JSONApiResponse(response);
- } else {
- return new runtime.TextApiResponse(response) as any;
- }
+ return new runtime.JSONApiResponse(response, (jsonValue) => OpenPageDTOOpenInstanceDTOFromJSON(jsonValue));
}
/**
- * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
- * 获取命名空间下的实例数量 (original openapi)
+ * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
+ * 根据发布版本查询实例(支持分页) (new added)
*/
- async getInstanceCountByNamespace(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
- const response = await this.getInstanceCountByNamespaceRaw(requestParameters, initOverrides);
+ async getByRelease(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getByReleaseRaw(requestParameters, initOverrides);
return await response.value();
}
@@ -108,21 +112,21 @@ export class InstanceManagementApi extends runtime.BaseAPI {
* GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3
* 查询不在指定发布版本中的实例 (new added)
*/
- async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ async getByReleasesNotInRaw(requestParameters: GetByReleasesNotInRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
if (requestParameters.env === null || requestParameters.env === undefined) {
- throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.');
+ throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getByReleasesNotIn.');
}
if (requestParameters.appId === null || requestParameters.appId === undefined) {
- throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.');
+ throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getByReleasesNotIn.');
}
if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) {
- throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.');
+ throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getByReleasesNotIn.');
}
if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) {
- throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet.');
+ throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getByReleasesNotIn.');
}
const queryParameters: any = {};
@@ -138,7 +142,7 @@ export class InstanceManagementApi extends runtime.BaseAPI {
}
const response = await this.request({
- path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))),
+ path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
@@ -151,42 +155,34 @@ export class InstanceManagementApi extends runtime.BaseAPI {
* GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3
* 查询不在指定发布版本中的实例 (new added)
*/
- async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
- const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIntGetRaw(requestParameters, initOverrides);
+ async getByReleasesNotIn(requestParameters: GetByReleasesNotInRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getByReleasesNotInRaw(requestParameters, initOverrides);
return await response.value();
}
/**
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
- * 根据发布版本查询实例(支持分页) (new added)
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+ * 获取命名空间下的实例数量 (original openapi)
*/
- async openapiV1EnvsEnvReleasesReleaseIdInstancesGetRaw(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ async getInstanceCountByNamespaceRaw(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
if (requestParameters.env === null || requestParameters.env === undefined) {
- throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.');
+ throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getInstanceCountByNamespace.');
}
- if (requestParameters.releaseId === null || requestParameters.releaseId === undefined) {
- throw new runtime.RequiredError('releaseId','Required parameter requestParameters.releaseId was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.');
+ if (requestParameters.appId === null || requestParameters.appId === undefined) {
+ throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getInstanceCountByNamespace.');
}
- if (requestParameters.page === null || requestParameters.page === undefined) {
- throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.');
+ if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) {
+ throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getInstanceCountByNamespace.');
}
- if (requestParameters.size === null || requestParameters.size === undefined) {
- throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet.');
+ if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) {
+ throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getInstanceCountByNamespace.');
}
const queryParameters: any = {};
- if (requestParameters.page !== undefined) {
- queryParameters['page'] = requestParameters.page;
- }
-
- if (requestParameters.size !== undefined) {
- queryParameters['size'] = requestParameters.size;
- }
-
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
@@ -194,21 +190,25 @@ export class InstanceManagementApi extends runtime.BaseAPI {
}
const response = await this.request({
- path: `/openapi/v1/envs/{env}/releases/{releaseId}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters.releaseId))),
+ path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
- return new runtime.JSONApiResponse(response, (jsonValue) => OpenPageDTOOpenInstanceDTOFromJSON(jsonValue));
+ if (this.isJsonMime(response.headers.get('content-type'))) {
+ return new runtime.JSONApiResponse(response);
+ } else {
+ return new runtime.TextApiResponse(response) as any;
+ }
}
/**
- * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
- * 根据发布版本查询实例(支持分页) (new added)
+ * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances
+ * 获取命名空间下的实例数量 (original openapi)
*/
- async openapiV1EnvsEnvReleasesReleaseIdInstancesGet(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
- const response = await this.openapiV1EnvsEnvReleasesReleaseIdInstancesGetRaw(requestParameters, initOverrides);
+ async getInstanceCountByNamespace(requestParameters: GetInstanceCountByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getInstanceCountByNamespaceRaw(requestParameters, initOverrides);
return await response.value();
}